From a31a7a32a51bd05960058aca7ad0f7060d4b478c Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 1 Apr 2022 21:28:49 +0800 Subject: [PATCH] MindMap: preparations --- src/data/extra/extra.qrc | 2 ++ src/data/extra/web/js/mind-elixir/MindElixir.min.js | 7 +++++++ src/data/extra/web/js/mind-elixir/README.md | 2 ++ src/data/extra/web/js/mind-elixir/painter.js | 1 + 4 files changed, 12 insertions(+) create mode 100644 src/data/extra/web/js/mind-elixir/MindElixir.min.js create mode 100644 src/data/extra/web/js/mind-elixir/README.md create mode 100644 src/data/extra/web/js/mind-elixir/painter.js diff --git a/src/data/extra/extra.qrc b/src/data/extra/extra.qrc index 1fa43ccb..075888ca 100644 --- a/src/data/extra/extra.qrc +++ b/src/data/extra/extra.qrc @@ -78,6 +78,8 @@ web/js/turndown.js web/js/mark.js/mark.min.js web/js/markjs.js + web/js/mind-elixir/MindElixir.min.js + web/js/mind-elixir/painter.min.js dicts/en_US.aff dicts/en_US.dic themes/native/text-editor.theme diff --git a/src/data/extra/web/js/mind-elixir/MindElixir.min.js b/src/data/extra/web/js/mind-elixir/MindElixir.min.js new file mode 100644 index 00000000..17f74b69 --- /dev/null +++ b/src/data/extra/web/js/mind-elixir/MindElixir.min.js @@ -0,0 +1,7 @@ +/** + * Skipped minification because the original files appears to be already minified. + * Original file: /npm/mind-elixir@0.19.3/dist/MindElixir.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MindElixir=t():e.MindElixir=t()}(self,(function(){return(()=>{var e={8074:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(8081),o=n.n(i),s=n(3645),r=n.n(s)()(o());r.push([e.id,".mind-elixir {\n position: relative;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.mind-elixir .hyper-link {\n text-decoration: none;\n}\n.map-container {\n user-select: none;\n height: 100%;\n width: 100%;\n overflow: scroll;\n font-size: 15px;\n}\n.map-container::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n}\n.map-container .focus-mode {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background: #fff;\n}\n.map-container .map-canvas {\n height: 20000px;\n width: 20000px;\n position: relative;\n user-select: none;\n transition: all 0.3s;\n transform: scale(1);\n background: #f6f6f6;\n}\n.map-container .map-canvas .selected {\n outline: 2px solid #4dc4ff;\n}\n.map-container .map-canvas root {\n position: absolute;\n}\n.map-container .map-canvas root tpc {\n display: block;\n color: #ffffff;\n padding: 10px 15px;\n background-color: #00aaff;\n border-radius: 5px;\n font-size: 25px;\n white-space: pre-wrap;\n}\n.map-container .map-canvas root tpc #input-box {\n padding: 10px 15px;\n}\n.map-container .box > grp {\n position: absolute;\n}\n.map-container .box > grp > t > tpc {\n background-color: #ffffff;\n border: 1px solid #444444;\n border-radius: 5px;\n color: #735c45;\n padding: 8px 10px;\n margin: 0;\n}\n.map-container .box > grp > t > tpc #input-box {\n padding: 8px 10px;\n}\n.map-container .box .lhs {\n direction: rtl;\n}\n.map-container .box .lhs tpc {\n direction: ltr;\n}\n.map-container .box grp {\n display: block;\n pointer-events: none;\n}\n.map-container .box children,\n.map-container .box t {\n display: inline-block;\n vertical-align: middle;\n}\n.map-container .box t {\n position: relative;\n cursor: pointer;\n padding: 0 15px;\n margin-top: 10px;\n}\n.map-container .box t tpc {\n position: relative;\n display: block;\n padding: 5px;\n border-radius: 3px;\n color: #666666;\n pointer-events: all;\n max-width: 800px;\n white-space: pre-wrap;\n line-height: 1;\n}\n.map-container .box t tpc #input-box {\n padding: 5px;\n}\n.map-container .box t tpc .tags {\n direction: ltr;\n}\n.map-container .box t tpc .tags span {\n display: inline-block;\n border-radius: 3px;\n padding: 2px 4px;\n background: #d6f0f8;\n color: #276f86;\n margin: 0px;\n font-size: 12px;\n height: 16px;\n line-height: 16px;\n margin-right: 3px;\n margin-top: 2px;\n}\n.map-container .box t tpc .icons {\n display: inline-block;\n direction: ltr;\n margin-right: 10px;\n}\n.map-container .box t tpc .insert-preview {\n position: absolute;\n width: 100%;\n left: 0px;\n z-index: 9;\n}\n.map-container .box t tpc .before {\n height: 14px;\n top: -14px;\n}\n.map-container .box t tpc .show {\n background: #7ad5ff;\n pointer-events: none;\n opacity: 0.7;\n}\n.map-container .box t tpc .in {\n height: 100%;\n top: 0px;\n}\n.map-container .box t tpc .after {\n height: 14px;\n bottom: -14px;\n}\n.map-container .box t epd {\n position: absolute;\n height: 12px;\n width: 12px;\n line-height: 12px;\n text-align: center;\n border-radius: 50%;\n border: 1px solid #4f4f4f;\n background-color: #fff;\n pointer-events: all;\n z-index: 9;\n}\n.map-container .box t epd.minus {\n transition: all 0.3s;\n opacity: 0;\n}\n.map-container .box t epd.minus:hover {\n opacity: 1;\n}\n.map-container .icon {\n width: 1em;\n height: 1em;\n vertical-align: -0.15em;\n fill: currentColor;\n overflow: hidden;\n}\n.map-container .svg2nd,\n.map-container .svg3rd,\n.map-container .topiclinks,\n.map-container .linkcontroller {\n position: absolute;\n height: 102%;\n width: 100%;\n top: 0;\n left: 0;\n}\n.map-container .topiclinks,\n.map-container .linkcontroller {\n pointer-events: none;\n}\n.map-container .topiclinks g,\n.map-container .linkcontroller g {\n pointer-events: all;\n}\n.map-container .svg2nd,\n.map-container .svg3rd {\n pointer-events: none;\n z-index: -1;\n}\n.map-container .topiclinks *,\n.map-container .linkcontroller * {\n z-index: 100;\n}\n.map-container .topiclinks g {\n cursor: pointer;\n}\n.down t,\n.down children {\n display: block !important;\n}\n.down grp {\n display: inline-block !important;\n}\n.circle {\n position: absolute;\n height: 10px;\n width: 10px;\n margin-top: -5px;\n margin-left: -5px;\n border-radius: 100%;\n background: #aaa;\n cursor: pointer;\n}\n#input-box {\n position: absolute;\n top: 0;\n left: 0;\n background-color: #fff;\n width: max-content;\n max-width: 800px;\n z-index: 11;\n direction: ltr;\n user-select: auto;\n}\n",""]);const a=r},5165:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(8081),o=n.n(i),s=n(3645),r=n.n(s)()(o());r.push([e.id,"cmenu {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 99;\n}\ncmenu .menu-list {\n position: fixed;\n list-style: none;\n margin: 0;\n padding: 0;\n font: 300 15px 'Roboto', sans-serif;\n color: #333;\n box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.2);\n}\ncmenu .menu-list * {\n transition: color 0.4s, background-color 0.4s;\n}\ncmenu .menu-list li {\n min-width: 150px;\n overflow: hidden;\n white-space: nowrap;\n padding: 6px 10px;\n background-color: #fff;\n border-bottom: 1px solid #ecf0f1;\n}\ncmenu .menu-list li a {\n color: #333;\n text-decoration: none;\n}\ncmenu .menu-list li.disabled {\n color: #5e5e5e;\n background-color: #f7f7f7;\n}\ncmenu .menu-list li.disabled:hover {\n cursor: default;\n background-color: #f7f7f7;\n}\ncmenu .menu-list li:hover {\n cursor: pointer;\n background-color: #ecf0f1;\n}\ncmenu .menu-list li:first-child {\n border-radius: 5px 5px 0 0;\n}\ncmenu .menu-list li:last-child {\n border-bottom: 0;\n border-radius: 0 0 5px 5px;\n}\ncmenu .menu-list li span:last-child {\n float: right;\n}\n",""]);const a=r},7787:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(8081),o=n.n(i),s=n(3645),r=n.n(s)()(o());r.push([e.id,"mmenu {\n position: absolute;\n left: 20px;\n bottom: 70px;\n z-index: 99;\n margin: 0;\n padding: 0;\n color: #333;\n border-radius: 5px;\n box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.2);\n overflow: hidden;\n}\nmmenu * {\n transition: color 0.4s, background-color 0.4s;\n}\nmmenu div {\n float: left;\n text-align: center;\n width: 30px;\n overflow: hidden;\n white-space: nowrap;\n padding: 8px;\n background-color: #fff;\n border-bottom: 1px solid #ecf0f1;\n}\nmmenu div a {\n color: #333;\n text-decoration: none;\n}\nmmenu div.disabled {\n color: #5e5e5e;\n background-color: #f7f7f7;\n}\nmmenu div.disabled:hover {\n cursor: default;\n background-color: #f7f7f7;\n}\nmmenu div:hover {\n cursor: pointer;\n background-color: #ecf0f1;\n}\n",""]);const a=r},9519:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(8081),o=n.n(i),s=n(3645),r=n.n(s)()(o());r.push([e.id,"nmenu {\n position: absolute;\n right: 20px;\n top: 20px;\n background: #fff;\n padding: 10px;\n border-radius: 5px;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n width: 240px;\n box-sizing: border-box;\n padding: 0 15px 15px;\n transition: 0.3s all;\n}\nnmenu.close {\n height: 30px;\n width: 50px;\n overflow: hidden;\n}\nnmenu .button-container {\n padding: 3px 0;\n direction: rtl;\n}\nnmenu #nm-tag {\n margin-top: 20px;\n}\nnmenu .nm-fontsize-container {\n display: flex;\n justify-content: space-around;\n margin-bottom: 20px;\n}\nnmenu .nm-fontsize-container div {\n height: 36px;\n width: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n background-color: white;\n color: tomato;\n border-radius: 100%;\n}\nnmenu .nm-fontcolor-container {\n margin-bottom: 10px;\n}\nnmenu input {\n background: #f7f9fa;\n border: 1px solid #dce2e6;\n border-radius: 3px;\n padding: 5px;\n margin: 10px 0;\n width: 100%;\n box-sizing: border-box;\n}\nnmenu .split6 {\n display: inline-block;\n width: 16.66%;\n margin-bottom: 5px;\n}\nnmenu .palette {\n border-radius: 100%;\n width: 21px;\n height: 21px;\n border: 1px solid #edf1f2;\n margin: auto;\n}\nnmenu .nmenu-selected,\nnmenu .palette:hover {\n box-shadow: tomato 0 0 0 2px;\n background-color: #c7e9fa;\n}\nnmenu .size-selected {\n background-color: tomato !important;\n border-color: tomato;\n fill: white;\n color: white;\n}\nnmenu .size-selected svg {\n color: #fff;\n}\nnmenu .bof {\n text-align: center;\n}\nnmenu .bof span {\n display: inline-block;\n font-size: 14px;\n border-radius: 4px;\n padding: 2px 5px;\n}\nnmenu .bof .selected {\n background-color: tomato;\n color: white;\n}\n",""]);const a=r},8301:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(8081),o=n.n(i),s=n(3645),r=n.n(s)()(o());r.push([e.id,"toolbar {\n position: absolute;\n background: #fff;\n padding: 10px;\n border-radius: 5px;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n}\ntoolbar span:active {\n opacity: 0.5;\n}\n.rb {\n right: 20px;\n bottom: 20px;\n font-family: iconfont;\n}\n.rb span + span {\n margin-left: 10px;\n}\n.lt {\n font-size: 20px;\n left: 20px;\n top: 20px;\n width: 20px;\n}\n.lt span {\n display: block;\n}\n.lt span + span {\n margin-top: 10px;\n}\n",""]);const a=r},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(i)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9857:()=>{!function(e){var t,n,i,o,s,r,a='',l=(l=document.getElementsByTagName("script"))[l.length-1].getAttribute("data-injectcss");if(l&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(e){console}}function c(){s||(s=!0,i())}t=function(){var e,t,n,i;(i=document.createElement("div")).innerHTML=a,a=null,(n=i.getElementsByTagName("svg")[0])&&(n.setAttribute("aria-hidden","true"),n.style.position="absolute",n.style.width=0,n.style.height=0,n.style.overflow="hidden",e=n,(t=document.body).firstChild?(i=e,(n=t.firstChild).parentNode.insertBefore(i,n)):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(i=t,o=e.document,s=!1,(r=function(){try{o.documentElement.doScroll("left")}catch(e){return void setTimeout(r,50)}c()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,c())})}(window)}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={id:i,exports:{}};return e[i](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};return(()=>{"use strict";n.d(i,{default:()=>fe});function e(e){return e.replace(/&/g,"&").replace(/e.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,(function(e,t,n,i){return"#"+("0"+Number(t).toString(16)).substr(-2)+("0"+Number(n).toString(16)).substr(-2)+("0"+Number(i).toString(16)).substr(-2)})),o=function(e,t){if((t=t||this.nodeData).id===e)return t;if(!t.children||!t.children.length)return null;for(let n=0;n{if(e.parent=t,e.children)for(let t=0;t{var n=Date.now();return function(){var i=this,o=arguments,s=Date.now();s-n>=t&&(e.apply(i,o),n=Date.now())}};function l(e,t,n,i){const o=i-t,s=e-n;let r=Math.atan(Math.abs(o)/Math.abs(s))/3.14*180;s<0&&o>0&&(r=180-r),s<0&&o<0&&(r=180+r),s>0&&o<0&&(r=360-r);var a=r+30;const l=r-30;return{x1:n+20*Math.cos(Math.PI*a/180),y1:i-20*Math.sin(Math.PI*a/180),x2:n+20*Math.cos(Math.PI*l/180),y2:i-20*Math.sin(Math.PI*l/180)}}function c(e,t,n){let i,o;const s=(e.cy-n)/(t-e.cx);return s>e.h/e.w||s<-e.h/e.w?e.cy-n<0?(i=e.cx-e.h/2/s,o=e.cy+e.h/2):(i=e.cx+e.h/2/s,o=e.cy-e.h/2):e.cx-t<0?(i=e.cx+e.w/2,o=e.cy-e.w*s/2):(i=e.cx-e.w/2,o=e.cy+e.w*s/2),{x:i,y:o}}function d(e,t,n){let i,o;const s=(e.cy-n)/(t-e.cx);return s>e.h/e.w||s<-e.h/e.w?e.cy-n<0?(i=e.cx-e.h/2/s,o=e.cy+e.h/2):(i=e.cx+e.h/2/s,o=e.cy-e.h/2):e.cx-t<0?(i=e.cx+e.w/2,o=e.cy-e.w*s/2):(i=e.cx-e.w/2,o=e.cy+e.w*s/2),{x:i,y:o}}function h(){return((new Date).getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}function p(e){const t=e.parent.children,n=t.indexOf(e);return t.splice(n,1),t.length}const u={afterMoving:!1,mousedown:!1,lastX:null,lastY:null,onMove(e,t){if(this.mousedown){if(this.afterMoving=!0,!this.lastX)return this.lastX=e.pageX,void(this.lastY=e.pageY);const n=this.lastX-e.pageX,i=this.lastY-e.pageY;t.scrollTo(t.scrollLeft+n,t.scrollTop+i),this.lastX=e.pageX,this.lastY=e.pageY}},clear(){this.afterMoving=!1,this.mousedown=!1,this.lastX=null,this.lastY=null}};function m(e){this.dom=e,this.mousedown=!1,this.lastX=null,this.lastY=null}m.prototype.init=function(e,t){this.handleMouseMove=e=>{if(e.stopPropagation(),this.mousedown){if(!this.lastX)return this.lastX=e.pageX,void(this.lastY=e.pageY);const n=this.lastX-e.pageX,i=this.lastY-e.pageY;t(n,i),this.lastX=e.pageX,this.lastY=e.pageY}},this.handleMouseDown=e=>{e.stopPropagation(),this.mousedown=!0},this.handleClear=e=>{e.stopPropagation(),this.clear()},e.addEventListener("mousemove",this.handleMouseMove),e.addEventListener("mouseleave",this.handleClear),e.addEventListener("mouseup",this.handleClear),this.dom.addEventListener("mousedown",this.handleMouseDown)},m.prototype.destory=function(e){e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mouseleave",this.handleClear),e.removeEventListener("mouseup",this.handleClear),this.dom.removeEventListener("mousedown",this.handleMouseDown)},m.prototype.clear=function(){this.mousedown=!1,this.lastX=null,this.lastY=null};const f=document,b=(e,t)=>(t?t.mindElixirBox:f).querySelector(`[data-nodeid=me${e}]`),g=function(t,n){if(t.innerText=n.topic,n.style&&(t.style.color=n.style.color||"inherit",t.style.background=n.style.background||"inherit",t.style.fontSize=n.style.fontSize+"px",t.style.fontWeight=n.style.fontWeight||"normal"),n.hyperLink){const e=f.createElement("a");e.className="hyper-link",e.target="_blank",e.innerText="🔗",e.href=n.hyperLink,t.appendChild(e)}if(n.icons){const i=f.createElement("span");i.className="icons",i.innerHTML=n.icons.map((t=>`${e(t)}`)).join(""),t.appendChild(i)}if(n.tags){const i=f.createElement("div");i.className="tags",i.innerHTML=n.tags.map((t=>`${e(t)}`)).join(""),t.appendChild(i)}};const v=function(e){const t=f.createElement("epd");return t.innerText=!1!==e?"-":"+",t.expanded=!1!==e,t.className=!1!==e?"minus":"",t};const x=document,y="http://www.w3.org/2000/svg",N=function(e){const t=x.createElementNS(y,"svg");return t.setAttribute("class",e),t},k=function(e,t,n,i){const o=x.createElementNS(y,"line");return o.setAttribute("x1",e),o.setAttribute("y1",t),o.setAttribute("x2",n),o.setAttribute("y2",i),o.setAttribute("stroke","#bbb"),o.setAttribute("fill","none"),o.setAttribute("stroke-width","2"),o},w=function(e){const t=x.createElementNS(y,"path");return t.setAttribute("d",e),t.setAttribute("stroke","#555"),t.setAttribute("fill","none"),t.setAttribute("stroke-linecap","square"),t.setAttribute("stroke-width","1"),t.setAttribute("transform","translate(0.5,-0.5)"),t};function C(e){return e.isFocusMode?e.nodeDataBackup:e.nodeData}const $=document,E=function(e,t){if(!e)return;const n=e.nodeObj;!1===n.expanded&&(this.expandNode(e,!0),e=b(n.id));const i=t||this.generateNewObj();n.children?n.children.push(i):n.children=[i],s(this.nodeData);const o=e.parentElement,{grp:r,top:a}=this.createGroup(i);if("T"===o.tagName){if(o.children[1])o.nextSibling.appendChild(r);else{const e=$.createElement("children");e.appendChild(r),o.appendChild(v(!0)),o.parentElement.insertBefore(e,o.nextSibling)}this.linkDiv(r.offsetParent)}else"ROOT"===o.tagName&&(this.processPrimaryNode(r,i),o.nextSibling.appendChild(r),this.linkDiv());return{newTop:a,newNodeObj:i}};let S="";function M(e,t,n){const i=t.offsetTop,o=t.offsetLeft,s=t.offsetWidth,r=t.offsetHeight;for(let t=0;ti+r/2-50?`M ${u} ${h} H ${f} V ${p} H ${m}`:c+d>=i+r/2?`M ${u} ${h} H ${f} V ${p-8} A 8 8 0 0 1 ${f-8} ${p} H ${m}`:`M ${u} ${h} H ${f} V ${p+8} A 8 8 0 0 0 ${f-8} ${p} H ${m}`):"rhs"===b&&(u=o+s-15,f=o+s,m=o+s+l.offsetWidth,S+=c+di+r/2-50?`M ${u} ${h} H ${f} V ${p} H ${m}`:c+d>=i+r/2?`M ${u} ${h} H ${f} V ${p-8} A 8 8 0 0 0 ${f+8} ${p} H ${m}`:`M ${u} ${h} H ${f} V ${p+8} A 8 8 0 0 1 ${f+8} ${p} H ${m}`);const g=l.children[1];if(!g)continue;if(g.style.top=(l.offsetHeight-g.offsetHeight)/2+"px","lhs"===b?g.style.left="-10px":"rhs"===b&&(g.style.left=l.offsetWidth-10+"px"),!g.expanded)continue;const v=a.children[1].children;v.length>0&&M(v,l)}}const L={addChild:"插入子节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",clickTips:"请点击目标节点",font:"文字",background:"背景",tag:"标签",icon:"图标",tagsSeparate:"多个标签半角逗号分隔",iconsSeparate:"多个图标半角逗号分隔"},j={cn:L,zh_CN:L,zh_TW:{addChild:"插入子節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",clickTips:"請點擊目標節點",font:"文字",background:"背景",tag:"標簽",icon:"圖標",tagsSeparate:"多個標簽半角逗號分隔",iconsSeparate:"多個圖標半角逗號分隔"},en:{addChild:"Add a child",addSibling:"Add a sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",clickTips:"Please click the target node",font:"Font",background:"Background",tag:"Tag",icon:"Icon",tagsSeparate:"Separate tags by comma",iconsSeparate:"Separate icons by comma"},ja:{addChild:"子ノードを追加する",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",clickTips:"ターゲットノードをクリックしてください",font:"フォント",background:"バックグラウンド",tag:"タグ",icon:"アイコン",tagsSeparate:"複数タグはカンマ区切り",iconsSeparate:"複数アイコンはカンマ区切り"},pt:{addChild:"Adicionar item filho",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",clickTips:"Favor clicar no item alvo",font:"Fonte",background:"Cor de fundo",tag:"Tag",icon:"Icone",tagsSeparate:"Separe tags por virgula",iconsSeparate:"Separe icones por virgula"}};function D(t,n){const i=(t,n,i)=>{const o=document.createElement("li");return o.id=t,o.innerHTML=`${e(n)}${e(i)}`,o},o=j[t.locale]?t.locale:"en",s=i("cm-add_child",j[o].addChild,"tab"),r=i("cm-add_sibling",j[o].addSibling,"enter"),a=i("cm-remove_child",j[o].removeNode,"delete"),l=i("cm-fucus",j[o].focus,""),c=i("cm-unfucus",j[o].cancelFocus,""),d=i("cm-up",j[o].moveUp,"PgUp"),h=i("cm-down",j[o].moveDown,"Pgdn"),p=i("cm-down",j[o].link,""),u=document.createElement("ul");if(u.className="menu-list",u.appendChild(s),u.appendChild(r),u.appendChild(a),n&&!n.focus||(u.appendChild(l),u.appendChild(c)),u.appendChild(d),u.appendChild(h),n&&!n.link||u.appendChild(p),n&&n.extend)for(let e=0;e{t.onclick(e)}}const m=document.createElement("cmenu");m.appendChild(u),m.hidden=!0,t.container.append(m);let f=!0;t.container.oncontextmenu=function(e){if(e.preventDefault(),!t.editable)return;const n=e.target;if("TPC"===n.tagName){f="ROOT"===n.parentElement.tagName,f?(l.className="disabled",d.className="disabled",h.className="disabled",r.className="disabled",a.className="disabled"):(l.className="",d.className="",h.className="",r.className="",a.className=""),t.selectNode(n),m.hidden=!1;const i=u.offsetHeight,o=u.offsetWidth;i+e.clientY>window.innerHeight?(u.style.top="",u.style.bottom="0px"):(u.style.bottom="",u.style.top=e.clientY+15+"px"),o+e.clientX>window.innerWidth?(u.style.left="",u.style.right="0px"):(u.style.right="",u.style.left=e.clientX+10+"px")}},m.onclick=e=>{e.target===m&&(m.hidden=!0)},s.onclick=e=>{t.addChild(),m.hidden=!0},r.onclick=e=>{f||(t.insertSibling(),m.hidden=!0)},a.onclick=e=>{f||(t.removeNode(),m.hidden=!0)},l.onclick=e=>{f||(t.focusNode(t.currentNode),m.hidden=!0)},c.onclick=e=>{t.cancelFocus(),m.hidden=!0},d.onclick=e=>{f||(t.moveUpNode(),m.hidden=!0)},h.onclick=e=>{f||(t.moveDownNode(),m.hidden=!0)},p.onclick=e=>{m.hidden=!0;const n=t.currentNode,i=(e=>{const t=document.createElement("div");return t.innerText=e,t.style.cssText="position:absolute;bottom:20px;left:50%;transform:translateX(-50%);",t})(j[o].clickTips);t.container.appendChild(i),t.map.addEventListener("click",(e=>{e.preventDefault(),i.remove(),"T"!==e.target.parentElement.nodeName&&"ROOT"!==e.target.parentElement.nodeName||t.createLink(n,t.currentNode)}),{once:!0})}}const T=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=``,n};function O(e){e.container.append(function(e){const t=document.createElement("toolbar"),n=T("fullscreen","full"),i=T("toCenter","living"),o=T("zoomout","move"),s=T("zoomin","add");return document.createElement("span").innerText="100%",t.appendChild(n),t.appendChild(i),t.appendChild(o),t.appendChild(s),t.className="rb",n.onclick=()=>{e.container.requestFullscreen()},i.onclick=()=>{e.toCenter()},o.onclick=()=>{e.scaleVal<.6||e.scale(e.scaleVal-=.2)},s.onclick=()=>{e.scaleVal>1.6||e.scale(e.scaleVal+=.2)},t}(e)),e.container.append(function(e){const t=document.createElement("toolbar"),n=T("tbltl","left"),i=T("tbltr","right"),o=T("tblts","side");return t.appendChild(n),t.appendChild(i),t.appendChild(o),t.className="lt",n.onclick=()=>{e.initLeft()},i.onclick=()=>{e.initRight()},o.onclick=()=>{e.initSide()},t}(e))}const z=e=>{const t=document.createElement("div");return t.id=e,t},A=["#2c3e50","#34495e","#7f8c8d","#94a5a6","#bdc3c7","#ecf0f1","#8e44ad","#9b59b6","#2980b9","#3298db","#c0392c","#e74c3c","#d35400","#f39c11","#f1c40e","#17a085","#27ae61","#2ecc71"];var P=function(e,t,n,i){return new(n||(n=Promise))((function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}l((i=i.apply(e,t||[])).next())}))};const H=document,B=function(e){if(!e)return;const t=e.getElementsByClassName("insert-preview");for(const e of t||[])e.remove()},V=function(e,t){const n=t.parentNode.parentNode.contains(e);return e&&"TPC"===e.tagName&&e!==t&&!n&&!0!==e.nodeObj.root};function I(e){let t,n,i;e.map.addEventListener("dragstart",(function(e){t=e.target,t.parentNode.parentNode.style.opacity="0.5",u.clear()})),e.map.addEventListener("dragend",(function(o){return P(this,void 0,void 0,(function*(){o.target.style.opacity="",B(i);const s=t.nodeObj;switch(n){case"before":e.moveNodeBefore(t,i),e.selectNode(b(s.id));break;case"after":e.moveNodeAfter(t,i),e.selectNode(b(s.id));break;case"in":e.moveNode(t,i)}t.parentNode.parentNode.style.opacity="1",t=null}))})),e.map.addEventListener("dragover",a((function(e){B(i);const o=H.elementFromPoint(e.clientX,e.clientY-12);if(V(o,t)){i=o;const t=o.getBoundingClientRect().y;e.clientY>t+o.clientHeight?n="after":e.clientY>t+o.clientHeight/2&&(n="in")}else{const o=H.elementFromPoint(e.clientX,e.clientY+12);if(V(o,t)){i=o;const t=o.getBoundingClientRect().y;e.clientY0)n[0].className=i;else{const t=H.createElement("div");t.className=i,e.appendChild(t)}}(i,n)}),200))}function q(){this.handlers={}}q.prototype={showHandler:function(){},addListener:function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t)},fire:function(e,t){if(this.handlers[e]instanceof Array)for(var n=this.handlers[e],i=0;i{this.isUndo?this.isUndo=!1:["moveNode","removeNode","addChild","finishEdit","editStyle","editTags","editIcons"].includes(e.name)&&this.history.push(e)})),this.history=[],this.isUndo=!1,this.undo=function(){const e=this.history.pop();e&&(this.isUndo=!0,"moveNode"===e.name?this.moveNode(he(e.obj.fromObj.id),he(e.obj.originParentId)):"removeNode"===e.name?e.originSiblingId?this.insertBefore(he(e.originSiblingId),e.obj):this.addChild(he(e.originParentId),e.obj):"addChild"===e.name||"copyNode"===e.name?this.removeNode(he(e.obj.id)):"finishEdit"===e.name?this.setNodeTopic(he(e.obj.id),e.origin):this.isUndo=!1)})}function me(e){return function(...t){return de(this,void 0,void 0,(function*(){this.before[e.name]&&!(yield this.before[e.name].apply(this,t))||e.apply(this,t)}))}}ue.prototype={addParentLink:s,getObjById:o,generateNewObj:function(){const e=h();return{topic:this.newTopicName||"new node",id:e}},insertSibling:me((function(e,t){const n=e||this.currentNode;if(!n)return;const i=n.nodeObj;if(!0===i.root)return void this.addChild();const o=t||this.generateNewObj();!function(e,t){const n=e.parent.children,i=n.indexOf(e);n.splice(i+1,0,t)}(i,o),s(this.nodeData);const r=n.parentElement,{grp:a,top:l}=this.createGroup(o),c=r.parentNode.parentNode;c.insertBefore(a,r.parentNode.nextSibling),"box"===c.className?(this.processPrimaryNode(a,o),this.linkDiv()):this.linkDiv(a.offsetParent),t||this.createInputDiv(l.children[0]),this.selectNode(l.children[0],!0),this.bus.fire("operation",{name:"insertSibling",obj:o})})),insertBefore:me((function(e,t){const n=e||this.currentNode;if(!n)return;const i=n.nodeObj;if(!0===i.root)return void this.addChild();const o=t||this.generateNewObj();!function(e,t){const n=e.parent.children,i=n.indexOf(e);n.splice(i,0,t)}(i,o),s(this.nodeData);const r=n.parentElement,{grp:a,top:l}=this.createGroup(o),c=r.parentNode.parentNode;c.insertBefore(a,r.parentNode),"box"===c.className?(this.processPrimaryNode(a,o),this.linkDiv()):this.linkDiv(a.offsetParent),t||this.createInputDiv(l.children[0]),this.selectNode(l.children[0],!0),this.bus.fire("operation",{name:"insertSibling",obj:o})})),addChild:me((function(e,t){const n=e||this.currentNode;if(!n)return;const{newTop:i,newNodeObj:o}=E.call(this,n,t);t||this.createInputDiv(i.children[0]),this.selectNode(i.children[0],!0),this.bus.fire("operation",{name:"addChild",obj:o})})),copyNode:me((function(e,t){const n=JSON.parse(JSON.stringify(e.nodeObj,((e,t)=>{if("parent"!==e)return t})));r(n);const{newNodeObj:i}=E.call(this,t,n);this.bus.fire("operation",{name:"copyNode",obj:i})})),moveNode:me((function(e,t){const n=e.nodeObj,i=t.nodeObj,o=n.parent.id;if(!1===i.expanded&&(this.expandNode(t,!0),e=b(n.id),t=b(i.id)),!function(e,t){let n=!0;for(;t.parent;){if(t.parent===e){n=!1;break}t=t.parent}return n}(n,i))return;!function(e,t){p(e),t.children?t.children.push(e):t.children=[e]}(n,i),s(this.nodeData);const r=e.parentElement,a=r.parentNode.parentNode,l=t.parentElement;if("box"===a.className?r.parentNode.lastChild.remove():"box"===r.parentNode.className&&(r.style.cssText=""),"T"===l.tagName)if("box"===a.className&&(r.parentNode.className=""),l.children[1])l.nextSibling.appendChild(r.parentNode);else{const e=$.createElement("children");e.appendChild(r.parentNode),l.appendChild(v(!0)),l.parentElement.insertBefore(e,l.nextSibling)}else"ROOT"===l.tagName&&(this.processPrimaryNode(r.parentNode,n),l.nextSibling.appendChild(r.parentNode));this.linkDiv(),this.bus.fire("operation",{name:"moveNode",obj:{fromObj:n,toObj:i,originParentId:o}})})),removeNode:me((function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;if(!0===n.root)throw new Error("Can not remove root node");const i=n.parent.children.findIndex((e=>e===n)),o=n.parent.children[i+1],s=o&&o.id,r=p(n),a=t.parentNode;if("ROOT"!==a.tagName){if(0===r){const e=a.parentNode.parentNode.previousSibling;"ROOT"!==e.tagName&&e.children[1].remove(),this.selectParent()}else{this.selectPrevSibling()||this.selectNextSibling()}for(const e in this.linkData){const t=this.linkData[e];t.from!==a.firstChild&&t.to!==a.firstChild||this.removeLink(this.mindElixirBox.querySelector(`[data-linkid=${this.linkData[e].id}]`))}a.parentNode.remove(),this.linkDiv(),this.bus.fire("operation",{name:"removeNode",obj:n,originSiblingId:s,originParentId:n.parent.id})}})),moveUpNode:me((function(e){const t=e||this.currentNode;if(!t)return;const n=t.parentNode.parentNode,i=t.nodeObj;!function(e){const t=e.parent.children,n=t.indexOf(e),i=t[n];0===n?(t[n]=t[t.length-1],t[t.length-1]=i):(t[n]=t[n-1],t[n-1]=i)}(i),n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:i})})),moveDownNode:me((function(e){const t=e||this.currentNode;if(!t)return;const n=t.parentNode.parentNode,i=t.nodeObj;!function(e){const t=e.parent.children,n=t.indexOf(e),i=t[n];n===t.length-1?(t[n]=t[0],t[0]=i):(t[n]=t[n+1],t[n+1]=i)}(i),n.nextSibling?n.parentNode.insertBefore(n,n.nextSibling.nextSibling):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:i})})),beginEdit:me((function(e){const t=e||this.currentNode;t&&this.createInputDiv(t)})),moveNodeBefore:me((function(e,t){const n=e.nodeObj,i=t.nodeObj,o=n.parent.id;!function(e,t){p(e);const n=t.parent.children;let i=0;for(let e=0;e{e-=r/this.scaleVal,t-=a/this.scaleVal;const l=c(s,e,t);h=l.x,p=l.y,this.P2.style.top=t+"px",this.P2.style.left=e+"px",this.currentLink.children[0].setAttribute("d",`M ${h} ${p} C ${e} ${t} ${n} ${i} ${f} ${b}`),this.line1.setAttribute("x1",h),this.line1.setAttribute("y1",p),this.line1.setAttribute("x2",e),this.line1.setAttribute("y2",t),o.delta1.x=e-s.cx,o.delta1.y=t-s.cy})),this.helper2.init(this.map,((s,a)=>{n-=s/this.scaleVal,i-=a/this.scaleVal;const c=d(r,n,i);f=c.x,b=c.y;const u=l(n,i,f,b);this.P3.style.top=i+"px",this.P3.style.left=n+"px",this.currentLink.children[0].setAttribute("d",`M ${h} ${p} C ${e} ${t} ${n} ${i} ${f} ${b}`),this.currentLink.children[1].setAttribute("d",`M ${u.x1} ${u.y1} L ${f} ${b} L ${u.x2} ${u.y2}`),this.line2.setAttribute("x1",n),this.line2.setAttribute("y1",i),this.line2.setAttribute("x2",f),this.line2.setAttribute("y2",b),o.delta2.x=n-r.cx,o.delta2.y=i-r.cy}))},layout:function(){this.root.innerHTML="",this.box.innerHTML="";const e=this.createTopic(this.nodeData);g(e,this.nodeData),e.draggable=!1,this.root.appendChild(e);const t=this.nodeData.children;if(t&&0!==t.length){if(2===this.direction){let e=0,n=0;t.map((t=>{void 0===t.direction?e<=n?(t.direction=0,e+=1):(t.direction=1,n+=1):0===t.direction?e+=1:n+=1}))}this.createChildren(this.nodeData.children,this.box,this.direction)}},linkDiv:function(e){var t=this.primaryNodeHorizontalGap||65,n=this.primaryNodeVerticalGap||25;const i=this.root;i.style.cssText=`top:${1e4-i.offsetHeight/2}px;left:${1e4-i.offsetWidth/2}px;`;const o=this.box.children;this.svg2nd.innerHTML="";let s,r,a=0,l=0,c=0,d=0,h=0,p=0;if(2===this.direction){let e=0,t=0,i=0,a=0;for(let s=0;sp?(r=1e4-Math.max(h)/2,s="r",l=(h-a)/(t-1)):(r=1e4-Math.max(p)/2,s="l",l=(p-i)/(e-1))}else{for(let e=0;e{e.stopPropagation();const t=e.key;if("Enter"===t||"Tab"===t){if(e.shiftKey)return;e.preventDefault(),this.inputDiv.blur(),this.map.focus()}})),t.addEventListener("blur",(()=>{if(!t)return;const i=e.nodeObj,o=t.textContent.trim();i.topic=""===o?n:o,t.remove(),this.inputDiv=t=null,this.bus.fire("operation",{name:"finishEdit",obj:i,origin:n}),o!==n&&(e.childNodes[0].textContent=i.topic,this.linkDiv())}))},createChildren:function(e,t,n){let i;i=t||f.createElement("children");for(let t=0;t0){if(r.appendChild(v(o.expanded)),s.appendChild(r),!1!==o.expanded){const e=this.createChildren(o.children);s.appendChild(e)}}else s.appendChild(r);i.appendChild(s)}return i},createGroup:function(e){const t=f.createElement("GRP"),n=this.createTop(e);if(t.appendChild(n),e.children&&e.children.length>0&&(n.appendChild(v(e.expanded)),!1!==e.expanded)){const n=this.createChildren(e.children);t.appendChild(n)}return{grp:t,top:n}},createTop:function(e){const t=f.createElement("t"),n=this.createTopic(e);return g(n,e),t.appendChild(n),t},createTopic:function(e){const t=f.createElement("tpc");return t.nodeObj=e,t.dataset.nodeid="me"+e.id,t.draggable=this.draggable,t},selectNode:function(e,t){if(e){if("string"==typeof e)return this.selectNode(b(e));this.currentNode&&(this.currentNode.className=""),e.className="selected",this.currentNode=e,t?this.bus.fire("selectNewNode",e.nodeObj):this.bus.fire("selectNode",e.nodeObj)}},unselectNode:function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},selectNextSibling:function(){if(!this.currentNode||"meroot"===this.currentNode.dataset.nodeid)return;const e=this.currentNode.parentElement.parentElement.nextSibling;let t;const n=this.currentNode.parentElement.parentElement;if("rhs"===n.className||"lhs"===n.className){const e=this.mindElixirBox.querySelectorAll("."+n.className),i=Array.from(e).indexOf(n);if(!(i+1=0))return!1;t=e[i-1].firstChild.firstChild}else{if(!e)return!1;t=e.firstChild.firstChild}return this.selectNode(t),!0},selectFirstChild:function(){if(!this.currentNode)return;const e=this.currentNode.parentElement.nextSibling;if(e&&e.firstChild){const t=e.firstChild.firstChild.firstChild;this.selectNode(t)}},selectParent:function(){if(!this.currentNode||"meroot"===this.currentNode.dataset.nodeid)return;const e=this.currentNode.parentElement.parentElement.parentElement.previousSibling;if(e){const t=e.firstChild;this.selectNode(t)}},getAllDataString:function(){const e={nodeData:C(this),linkData:this.linkData};return JSON.stringify(e,((e,t)=>{if("parent"!==e)return"from"===e||"to"===e?t.nodeObj.id:t}))},getAllData:function(){const e={nodeData:C(this),linkData:this.linkData};return JSON.parse(JSON.stringify(e,((e,t)=>{if("parent"!==e)return"from"===e||"to"===e?t.nodeObj.id:t})))},getAllDataMd:function(){const e=C(this);let t="# "+e.topic+"\n\n";return function e(n,i){for(let o=0;o\n ${["15","24","32"].map((e=>`
\n
`)).join("")}
\n \n
\n ${A.map((e=>`
`)).join("")}\n
\n
\n ${j[t].font}\n ${j[t].background}\n
\n `,o.innerHTML=`${j[t].tag}
`,s.innerHTML=`${j[t].icon}
`;const r=document.createElement("nmenu");function a(t,n){var i=e.container.querySelectorAll(t);[].forEach.call(i,(function(e){e.classList.remove(n)}))}r.innerHTML='\n
\n ',r.appendChild(i),r.appendChild(o),r.appendChild(s),r.hidden=!0,e.container.append(r);const l=r.querySelectorAll(".size"),c=r.querySelector(".bold"),d=r.querySelector(".button-container"),h=r.querySelector(".font"),p=e.container.querySelector(".nm-tag"),u=e.container.querySelector(".nm-icon");r.onclick=t=>{if(!e.currentNode)return;const i=e.currentNode.nodeObj,o=t.target;"palette"===o.className?(i.style||(i.style={}),a(".palette","nmenu-selected"),o.className="palette nmenu-selected","font"===n?i.style.color=o.dataset.color:"background"===n&&(i.style.background=o.dataset.color),e.updateNodeStyle(i)):"background"===o.className?(a(".palette","nmenu-selected"),n="background",o.className="background selected",o.previousElementSibling.className="font",i.style&&i.style.background&&(r.querySelector('.palette[data-color="'+i.style.background+'"]').className="palette nmenu-selected")):"font"===o.className&&(a(".palette","nmenu-selected"),n="font",o.className="font selected",o.nextElementSibling.className="background",i.style&&i.style.color&&(r.querySelector('.palette[data-color="'+i.style.color+'"]').className="palette nmenu-selected"))},Array.from(l).map((t=>{t.onclick=t=>{e.currentNode.nodeObj.style||(e.currentNode.nodeObj.style={}),a(".size","size-selected");const n=t.currentTarget;e.currentNode.nodeObj.style.fontSize=n.dataset.size,n.className="size size-selected",e.updateNodeStyle(e.currentNode.nodeObj)}})),c.onclick=t=>{e.currentNode.nodeObj.style||(e.currentNode.nodeObj.style={}),"bold"===e.currentNode.nodeObj.style.fontWeight?(delete e.currentNode.nodeObj.style.fontWeight,t.currentTarget.className="bold",e.updateNodeStyle(e.currentNode.nodeObj)):(e.currentNode.nodeObj.style.fontWeight="bold",t.currentTarget.className="bold size-selected",e.updateNodeStyle(e.currentNode.nodeObj))},p.onchange=t=>{if(e.currentNode&&t.target.value){const n=t.target.value.split(",");e.updateNodeTags(e.currentNode.nodeObj,n)}},u.onchange=t=>{if(e.currentNode&&t.target.value){const n=t.target.value.split(",");e.updateNodeIcons(e.currentNode.nodeObj,n)}};let m="open";d.onclick=e=>{"open"===m?(m="close",r.className="close",d.innerHTML=''):(m="open",r.className="",d.innerHTML='')},e.bus.addListener("unselectNode",(function(){r.hidden=!0})),e.bus.addListener("selectNode",(function(e){r.hidden=!1,a(".palette","nmenu-selected"),a(".size","size-selected"),a(".bold","size-selected"),n="font",h.className="font selected",h.nextElementSibling.className="background",e.style&&(e.style.fontSize&&(r.querySelector('.size[data-size="'+e.style.fontSize+'"]').className="size size-selected"),e.style.fontWeight&&(r.querySelector(".bold").className="bold size-selected"),e.style.color&&(r.querySelector('.palette[data-color="'+e.style.color+'"]').className="palette nmenu-selected")),e.tags?p.value=e.tags.join(","):p.value="",e.icons?u.value=e.icons.join(","):u.value=""}))}(this),this.keypress&&function(e){const t={13:()=>{e.insertSibling()},9:()=>{e.addChild()},113:()=>{e.beginEdit()},38:()=>{e.selectPrevSibling()},40:()=>{e.selectNextSibling()},37:()=>{e.currentNode&&("rhs"===e.currentNode.offsetParent.offsetParent.className?e.selectParent():("lhs"===e.currentNode.offsetParent.offsetParent.className||e.currentNode.nodeObj.root)&&e.selectFirstChild())},39:()=>{e.currentNode&&("rhs"===e.currentNode.offsetParent.offsetParent.className||e.currentNode.nodeObj.root?e.selectFirstChild():"lhs"===e.currentNode.offsetParent.offsetParent.className&&e.selectParent())},33(){e.moveUpNode()},34(){e.moveDownNode()},67(t){(t.metaKey||t.ctrlKey)&&(e.waitCopy=e.currentNode)},86(t){e.waitCopy&&(t.metaKey||t.ctrlKey)&&(e.copyNode(e.waitCopy,e.currentNode),e.waitCopy=null)},90:t=>{e.allowUndo&&(t.metaKey||t.ctrlKey)&&e.undo()},187:t=>{if(t.metaKey||t.ctrlKey){if(e.scaleVal>1.6)return;e.scale(e.scaleVal+=.2)}},189:t=>{if(t.metaKey||t.ctrlKey){if(e.scaleVal<.6)return;e.scale(e.scaleVal-=.2)}}};e.map.onkeydown=n=>{n.preventDefault(),e.editable&&n.target===n.currentTarget&&(8===n.keyCode||46===n.keyCode?e.currentLink?e.removeLink():e.removeNode():t[n.keyCode]&&t[n.keyCode](n))}}(this),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&this.mobileMenu?function(e,t){const n=(e,t)=>{const n=document.createElement("div");return n.id=e,n.innerHTML=``,n},i=n("cm-add_child","zijiedian"),o=n("cm-add_sibling","tongjijiedian-"),s=n("cm-remove_child","shanchu2"),r=n("cm-up","rising"),a=n("cm-down","falling"),l=n("cm-edit","edit"),c=document.createElement("ul");if(c.className="menu-list",t&&t.extend)for(let e=0;e{i.onclick(e)}}const d=document.createElement("mmenu");d.appendChild(i),d.appendChild(o),d.appendChild(s),d.appendChild(r),d.appendChild(a),d.appendChild(l),d.hidden=!0,e.container.append(d);let h=!0;e.bus.addListener("unselectNode",(function(){d.hidden=!0})),e.bus.addListener("selectNode",(function(e){d.hidden=!1,h=!!e.root})),d.onclick=e=>{e.target===d&&(d.hidden=!0)},i.onclick=t=>{e.addChild()},o.onclick=t=>{h||e.insertSibling()},s.onclick=t=>{h||e.removeNode()},r.onclick=t=>{h||e.moveUpNode()},a.onclick=t=>{h||e.moveDownNode()},l.onclick=t=>{e.beginEdit()}}(this):this.contextMenu&&D(this,this.contextMenuOption),this.draggable&&I(this),this.toCenter(),this.layout(),this.linkDiv(),this.overflowHidden||((e=this).map.addEventListener("click",(t=>{"EPD"===t.target.nodeName?e.expandNode(t.target.previousSibling):"T"===t.target.parentElement.nodeName||"ROOT"===t.target.parentElement.nodeName?e.selectNode(t.target):"path"===t.target.nodeName?"g"===t.target.parentElement.nodeName&&e.selectLink(t.target.parentElement):"circle"===t.target.className||(e.unselectNode(),e.hideLinkController())})),e.map.addEventListener("dblclick",(t=>{t.preventDefault(),e.editable&&("T"!==t.target.parentElement.nodeName&&"ROOT"!==t.target.parentElement.nodeName||e.beginEdit(t.target))})),e.map.addEventListener("mousemove",(t=>{"true"!==t.target.contentEditable&&u.onMove(t,e.container)})),e.map.addEventListener("mousedown",(e=>{"true"!==e.target.contentEditable&&(u.afterMoving=!1,u.mousedown=!0)})),e.map.addEventListener("mouseleave",(e=>{u.clear()})),e.map.addEventListener("mouseup",(e=>{u.clear()})))}},ue.LEFT=0,ue.RIGHT=1,ue.SIDE=2,ue.version="0.17.0",ue.E=b,ue.new=e=>({nodeData:{id:h(),topic:e||"new topic",root:!0,children:[]},linkData:{}});const fe=ue})(),i=i.default})()})); \ No newline at end of file diff --git a/src/data/extra/web/js/mind-elixir/README.md b/src/data/extra/web/js/mind-elixir/README.md new file mode 100644 index 00000000..a3e47cf2 --- /dev/null +++ b/src/data/extra/web/js/mind-elixir/README.md @@ -0,0 +1,2 @@ +# [mind-elixir](https://github.com/ssshooter/mind-elixir-core) +v0.19.3 diff --git a/src/data/extra/web/js/mind-elixir/painter.js b/src/data/extra/web/js/mind-elixir/painter.js new file mode 100644 index 00000000..eecd9dce --- /dev/null +++ b/src/data/extra/web/js/mind-elixir/painter.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.painter=e():t.painter=e()}(self,(function(){return(()=>{var t={9662:(t,e,r)=>{var i=r(7854),n=r(614),a=r(6330),s=i.TypeError;t.exports=function(t){if(n(t))return t;throw s(a(t)+" is not a function")}},9483:(t,e,r)=>{var i=r(7854),n=r(4411),a=r(6330),s=i.TypeError;t.exports=function(t){if(n(t))return t;throw s(a(t)+" is not a constructor")}},6077:(t,e,r)=>{var i=r(7854),n=r(614),a=i.String,s=i.TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw s("Can't set "+a(t)+" as a prototype")}},1223:(t,e,r)=>{var i=r(5112),n=r(30),a=r(3070),s=i("unscopables"),o=Array.prototype;null==o[s]&&a.f(o,s,{configurable:!0,value:n(null)}),t.exports=function(t){o[s][t]=!0}},1530:(t,e,r)=>{"use strict";var i=r(8710).charAt;t.exports=function(t,e,r){return e+(r?i(t,e).length:1)}},5787:(t,e,r)=>{var i=r(7854),n=r(7976),a=i.TypeError;t.exports=function(t,e){if(n(e,t))return t;throw a("Incorrect invocation")}},9670:(t,e,r)=>{var i=r(7854),n=r(111),a=i.String,s=i.TypeError;t.exports=function(t){if(n(t))return t;throw s(a(t)+" is not an object")}},1318:(t,e,r)=>{var i=r(5656),n=r(1400),a=r(6244),s=function(t){return function(e,r,s){var o,h=i(e),u=a(h),l=n(s,u);if(t&&r!=r){for(;u>l;)if((o=h[l++])!=o)return!0}else for(;u>l;l++)if((t||l in h)&&h[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9341:(t,e,r)=>{"use strict";var i=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&i((function(){r.call(null,e||function(){return 1},1)}))}},3671:(t,e,r)=>{var i=r(7854),n=r(9662),a=r(7908),s=r(8361),o=r(6244),h=i.TypeError,u=function(t){return function(e,r,i,u){n(r);var l=a(e),c=s(l),f=o(l),g=t?f-1:0,p=t?-1:1;if(i<2)for(;;){if(g in c){u=c[g],g+=p;break}if(g+=p,t?g<0:f<=g)throw h("Reduce of empty array with no initial value")}for(;t?g>=0:f>g;g+=p)g in c&&(u=r(u,c[g],g,l));return u}};t.exports={left:u(!1),right:u(!0)}},1589:(t,e,r)=>{var i=r(7854),n=r(1400),a=r(6244),s=r(6135),o=i.Array,h=Math.max;t.exports=function(t,e,r){for(var i=a(t),u=n(e,i),l=n(void 0===r?i:r,i),c=o(h(l-u,0)),f=0;u{var i=r(1702);t.exports=i([].slice)},7072:(t,e,r)=>{var i=r(5112)("iterator"),n=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){n=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!n)return!1;var r=!1;try{var a={};a[i]=function(){return{next:function(){return{done:r=!0}}}},t(a)}catch(t){}return r}},4326:(t,e,r)=>{var i=r(1702),n=i({}.toString),a=i("".slice);t.exports=function(t){return a(n(t),8,-1)}},648:(t,e,r)=>{var i=r(7854),n=r(1694),a=r(614),s=r(4326),o=r(5112)("toStringTag"),h=i.Object,u="Arguments"==s(function(){return arguments}());t.exports=n?s:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=h(t),o))?r:u?s(e):"Object"==(i=s(e))&&a(e.callee)?"Arguments":i}},9920:(t,e,r)=>{var i=r(2597),n=r(3887),a=r(1236),s=r(3070);t.exports=function(t,e,r){for(var o=n(e),h=s.f,u=a.f,l=0;l{var i=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var i=r(7293);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,r)=>{"use strict";var i=r(3383).IteratorPrototype,n=r(30),a=r(9114),s=r(8003),o=r(7497),h=function(){return this};t.exports=function(t,e,r,u){var l=e+" Iterator";return t.prototype=n(i,{next:a(+!u,r)}),s(t,l,!1,!0),o[l]=h,t}},8880:(t,e,r)=>{var i=r(9781),n=r(3070),a=r(9114);t.exports=i?function(t,e,r){return n.f(t,e,a(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var i=r(4948),n=r(3070),a=r(9114);t.exports=function(t,e,r){var s=i(e);s in t?n.f(t,s,a(0,r)):t[s]=r}},654:(t,e,r)=>{"use strict";var i=r(2109),n=r(6916),a=r(1913),s=r(6530),o=r(614),h=r(4994),u=r(9518),l=r(7674),c=r(8003),f=r(8880),g=r(1320),p=r(5112),d=r(7497),v=r(3383),y=s.PROPER,m=s.CONFIGURABLE,x=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=p("iterator"),S="keys",T="values",A="entries",O=function(){return this};t.exports=function(t,e,r,s,p,v,C){h(r,e,s);var P,E,M,N=function(t){if(t===p&&I)return I;if(!b&&t in V)return V[t];switch(t){case S:case T:case A:return function(){return new r(this,t)}}return function(){return new r(this)}},R=e+" Iterator",_=!1,V=t.prototype,k=V[w]||V["@@iterator"]||p&&V[p],I=!b&&k||N(p),L="Array"==e&&V.entries||k;if(L&&(P=u(L.call(new t)))!==Object.prototype&&P.next&&(a||u(P)===x||(l?l(P,x):o(P[w])||g(P,w,O)),c(P,R,!0,!0),a&&(d[R]=O)),y&&p==T&&k&&k.name!==T&&(!a&&m?f(V,"name",T):(_=!0,I=function(){return n(k,this)})),p)if(E={values:N(T),keys:v?I:N(S),entries:N(A)},C)for(M in E)(b||_||!(M in V))&&g(V,M,E[M]);else i({target:e,proto:!0,forced:b||_},E);return a&&!C||V[w]===I||g(V,w,I,{name:p}),d[e]=I,E}},9781:(t,e,r)=>{var i=r(7293);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var i=r(7854),n=r(111),a=i.document,s=n(a)&&n(a.createElement);t.exports=function(t){return s?a.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var i=r(317)("span").classList,n=i&&i.constructor&&i.constructor.prototype;t.exports=n===Object.prototype?void 0:n},7871:t=>{t.exports="object"==typeof window},1528:(t,e,r)=>{var i=r(8113),n=r(7854);t.exports=/ipad|iphone|ipod/i.test(i)&&void 0!==n.Pebble},6833:(t,e,r)=>{var i=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},5268:(t,e,r)=>{var i=r(4326),n=r(7854);t.exports="process"==i(n.process)},1036:(t,e,r)=>{var i=r(8113);t.exports=/web0s(?!.*chrome)/i.test(i)},8113:(t,e,r)=>{var i=r(5005);t.exports=i("navigator","userAgent")||""},7392:(t,e,r)=>{var i,n,a=r(7854),s=r(8113),o=a.process,h=a.Deno,u=o&&o.versions||h&&h.version,l=u&&u.v8;l&&(n=(i=l.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!n&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(n=+i[1]),t.exports=n},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var i=r(7854),n=r(1236).f,a=r(8880),s=r(1320),o=r(3505),h=r(9920),u=r(4705);t.exports=function(t,e){var r,l,c,f,g,p=t.target,d=t.global,v=t.stat;if(r=d?i:v?i[p]||o(p,{}):(i[p]||{}).prototype)for(l in e){if(f=e[l],c=t.noTargetGet?(g=n(r,l))&&g.value:r[l],!u(d?l:p+(v?".":"#")+l,t.forced)&&void 0!==c){if(typeof f==typeof c)continue;h(f,c)}(t.sham||c&&c.sham)&&a(f,"sham",!0),s(r,l,f,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var i=r(1702),n=r(1320),a=r(2261),s=r(7293),o=r(5112),h=r(8880),u=o("species"),l=RegExp.prototype;t.exports=function(t,e,r,c){var f=o(t),g=!s((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=g&&!s((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!g||!p||r){var d=i(/./[f]),v=e(f,""[t],(function(t,e,r,n,s){var o=i(t),h=e.exec;return h===a||h===l.exec?g&&!s?{done:!0,value:d(e,r,n)}:{done:!0,value:o(r,e,n)}:{done:!1}}));n(String.prototype,t,v[0]),n(l,f,v[1])}c&&h(l[f],"sham",!0)}},2104:(t,e,r)=>{var i=r(4374),n=Function.prototype,a=n.apply,s=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(a):function(){return s.apply(a,arguments)})},9974:(t,e,r)=>{var i=r(1702),n=r(9662),a=r(4374),s=i(i.bind);t.exports=function(t,e){return n(t),void 0===e?t:a?s(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,r)=>{var i=r(7293);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,e,r)=>{var i=r(4374),n=Function.prototype.call;t.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},6530:(t,e,r)=>{var i=r(9781),n=r(2597),a=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,o=n(a,"name"),h=o&&"something"===function(){}.name,u=o&&(!i||i&&s(a,"name").configurable);t.exports={EXISTS:o,PROPER:h,CONFIGURABLE:u}},1702:(t,e,r)=>{var i=r(4374),n=Function.prototype,a=n.bind,s=n.call,o=i&&a.bind(s,s);t.exports=i?function(t){return t&&o(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},5005:(t,e,r)=>{var i=r(7854),n=r(614),a=function(t){return n(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?a(i[t]):i[t]&&i[t][e]}},1246:(t,e,r)=>{var i=r(648),n=r(8173),a=r(7497),s=r(5112)("iterator");t.exports=function(t){if(null!=t)return n(t,s)||n(t,"@@iterator")||a[i(t)]}},8554:(t,e,r)=>{var i=r(7854),n=r(6916),a=r(9662),s=r(9670),o=r(6330),h=r(1246),u=i.TypeError;t.exports=function(t,e){var r=arguments.length<2?h(t):e;if(a(r))return s(n(r,t));throw u(o(t)+" is not iterable")}},8173:(t,e,r)=>{var i=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:i(r)}},647:(t,e,r)=>{var i=r(1702),n=r(7908),a=Math.floor,s=i("".charAt),o=i("".replace),h=i("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,i,c,f){var g=r+t.length,p=i.length,d=l;return void 0!==c&&(c=n(c),d=u),o(f,d,(function(n,o){var u;switch(s(o,0)){case"$":return"$";case"&":return t;case"`":return h(e,0,r);case"'":return h(e,g);case"<":u=c[h(o,1,-1)];break;default:var l=+o;if(0===l)return n;if(l>p){var f=a(l/10);return 0===f?n:f<=p?void 0===i[f-1]?s(o,1):i[f-1]+s(o,1):n}u=i[l-1]}return void 0===u?"":u}))}},7854:(t,e,r)=>{var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(t,e,r)=>{var i=r(1702),n=r(7908),a=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(n(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var i=r(7854);t.exports=function(t,e){var r=i.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var i=r(5005);t.exports=i("document","documentElement")},4664:(t,e,r)=>{var i=r(9781),n=r(7293),a=r(317);t.exports=!i&&!n((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var i=r(7854),n=r(1702),a=r(7293),s=r(4326),o=i.Object,h=n("".split);t.exports=a((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?h(t,""):o(t)}:o},2788:(t,e,r)=>{var i=r(1702),n=r(614),a=r(5465),s=i(Function.toString);n(a.inspectSource)||(a.inspectSource=function(t){return s(t)}),t.exports=a.inspectSource},9909:(t,e,r)=>{var i,n,a,s=r(8536),o=r(7854),h=r(1702),u=r(111),l=r(8880),c=r(2597),f=r(5465),g=r(6200),p=r(3501),d="Object already initialized",v=o.TypeError,y=o.WeakMap;if(s||f.state){var m=f.state||(f.state=new y),x=h(m.get),b=h(m.has),w=h(m.set);i=function(t,e){if(b(m,t))throw new v(d);return e.facade=t,w(m,t,e),e},n=function(t){return x(m,t)||{}},a=function(t){return b(m,t)}}else{var S=g("state");p[S]=!0,i=function(t,e){if(c(t,S))throw new v(d);return e.facade=t,l(t,S,e),e},n=function(t){return c(t,S)?t[S]:{}},a=function(t){return c(t,S)}}t.exports={set:i,get:n,has:a,enforce:function(t){return a(t)?n(t):i(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=n(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var i=r(5112),n=r(7497),a=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||s[a]===t)}},1349:(t,e,r)=>{var i=r(4326);t.exports=Array.isArray||function(t){return"Array"==i(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,r)=>{var i=r(1702),n=r(7293),a=r(614),s=r(648),o=r(5005),h=r(2788),u=function(){},l=[],c=o("Reflect","construct"),f=/^\s*(?:class|function)\b/,g=i(f.exec),p=!f.exec(u),d=function(t){if(!a(t))return!1;try{return c(u,l,t),!0}catch(t){return!1}},v=function(t){if(!a(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!g(f,h(t))}catch(t){return!0}};v.sham=!0,t.exports=!c||n((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?v:d},4705:(t,e,r)=>{var i=r(7293),n=r(614),a=/#|\.prototype\./,s=function(t,e){var r=h[o(t)];return r==l||r!=u&&(n(e)?i(e):!!e)},o=s.normalize=function(t){return String(t).replace(a,".").toLowerCase()},h=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},111:(t,e,r)=>{var i=r(614);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var i=r(111),n=r(4326),a=r(5112)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==n(t))}},2190:(t,e,r)=>{var i=r(7854),n=r(5005),a=r(614),s=r(7976),o=r(3307),h=i.Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return a(e)&&s(e.prototype,h(t))}},408:(t,e,r)=>{var i=r(7854),n=r(9974),a=r(6916),s=r(9670),o=r(6330),h=r(7659),u=r(6244),l=r(7976),c=r(8554),f=r(1246),g=r(9212),p=i.TypeError,d=function(t,e){this.stopped=t,this.result=e},v=d.prototype;t.exports=function(t,e,r){var i,y,m,x,b,w,S,T=r&&r.that,A=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),P=n(e,T),E=function(t){return i&&g(i,"normal",t),new d(!0,t)},M=function(t){return A?(s(t),C?P(t[0],t[1],E):P(t[0],t[1])):C?P(t,E):P(t)};if(O)i=t;else{if(!(y=f(t)))throw p(o(t)+" is not iterable");if(h(y)){for(m=0,x=u(t);x>m;m++)if((b=M(t[m]))&&l(v,b))return b;return new d(!1)}i=c(t,y)}for(w=i.next;!(S=a(w,i)).done;){try{b=M(S.value)}catch(t){g(i,"throw",t)}if("object"==typeof b&&b&&l(v,b))return b}return new d(!1)}},9212:(t,e,r)=>{var i=r(6916),n=r(9670),a=r(8173);t.exports=function(t,e,r){var s,o;n(t);try{if(!(s=a(t,"return"))){if("throw"===e)throw r;return r}s=i(s,t)}catch(t){o=!0,s=t}if("throw"===e)throw r;if(o)throw s;return n(s),r}},3383:(t,e,r)=>{"use strict";var i,n,a,s=r(7293),o=r(614),h=r(30),u=r(9518),l=r(1320),c=r(5112),f=r(1913),g=c("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(n=u(u(a)))!==Object.prototype&&(i=n):p=!0),null==i||s((function(){var t={};return i[g].call(t)!==t}))?i={}:f&&(i=h(i)),o(i[g])||l(i,g,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:p}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var i=r(7466);t.exports=function(t){return i(t.length)}},5948:(t,e,r)=>{var i,n,a,s,o,h,u,l,c=r(7854),f=r(9974),g=r(1236).f,p=r(261).set,d=r(6833),v=r(1528),y=r(1036),m=r(5268),x=c.MutationObserver||c.WebKitMutationObserver,b=c.document,w=c.process,S=c.Promise,T=g(c,"queueMicrotask"),A=T&&T.value;A||(i=function(){var t,e;for(m&&(t=w.domain)&&t.exit();n;){e=n.fn,n=n.next;try{e()}catch(t){throw n?s():a=void 0,t}}a=void 0,t&&t.enter()},d||m||y||!x||!b?!v&&S&&S.resolve?((u=S.resolve(void 0)).constructor=S,l=f(u.then,u),s=function(){l(i)}):m?s=function(){w.nextTick(i)}:(p=f(p,c),s=function(){p(i)}):(o=!0,h=b.createTextNode(""),new x(i).observe(h,{characterData:!0}),s=function(){h.data=o=!o})),t.exports=A||function(t){var e={fn:t,next:void 0};a&&(a.next=e),n||(n=e,s()),a=e}},3366:(t,e,r)=>{var i=r(7854);t.exports=i.Promise},133:(t,e,r)=>{var i=r(7392),n=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8536:(t,e,r)=>{var i=r(7854),n=r(614),a=r(2788),s=i.WeakMap;t.exports=n(s)&&/native code/.test(a(s))},8523:(t,e,r)=>{"use strict";var i=r(9662),n=function(t){var e,r;this.promise=new t((function(t,i){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=i})),this.resolve=i(e),this.reject=i(r)};t.exports.f=function(t){return new n(t)}},3929:(t,e,r)=>{var i=r(7854),n=r(7850),a=i.TypeError;t.exports=function(t){if(n(t))throw a("The method doesn't accept regular expressions");return t}},30:(t,e,r)=>{var i,n=r(9670),a=r(6048),s=r(748),o=r(3501),h=r(490),u=r(317),l=r(6200),c=l("IE_PROTO"),f=function(){},g=function(t){return"