ifthenelse-8.x-1.x-dev-no-core/modules/contrib/if_then_else/js/node-context-menu-plugin.min.js
modules/contrib/if_then_else/js/node-context-menu-plugin.min.js
/*! * rete-node-context-menu-plugin v1.0.0 * (c) 2019 Neerav Mehta * Released under the MIT license. */ !function(t){"use strict";var s,e=Object.prototype,c=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag",a="object"==typeof module,u=t.regeneratorRuntime;if(u)a&&(module.exports=u);else{(u=t.regeneratorRuntime=a?module.exports:{}).wrap=y;var l="suspendedStart",d="suspendedYield",f="executing",m="completed",h={},p={};p[i]=function(){return this};var v=Object.getPrototypeOf,A=v&&v(v(I([])));A&&A!==e&&c.call(A,i)&&(p=A);var b=w.prototype=x.prototype=Object.create(p);C.prototype=b.constructor=w,w.constructor=C,w[o]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,o in t||(t[o]="GeneratorFunction")),t.prototype=Object.create(b),t},u.awrap=function(t){return{__await:t}},E(S.prototype),S.prototype[r]=function(){return this},u.AsyncIterator=S,u.async=function(t,e,n,r){var i=new S(y(t,e,n,r));return u.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(b),b[o]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},u.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},u.values=I,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&c.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=s)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=s),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=c.call(i,"catchLoc"),u=c.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&c.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;j(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=s),h}}}function y(t,e,n,r){var i=e&&e.prototype instanceof x?e:x,o=Object.create(i.prototype),a=new B(r||[]);return o._invoke=function(o,a,u){var s=l;return function(t,e){if(s===f)throw new Error("Generator is already running");if(s===m){if("throw"===t)throw e;return L()}for(u.method=t,u.arg=e;;){var n=u.delegate;if(n){var r=_(n,u);if(r){if(r===h)continue;return r}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(s===l)throw s=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);s=f;var i=g(o,a,u);if("normal"===i.type){if(s=u.done?m:d,i.arg===h)continue;return{value:i.arg,done:u.done}}"throw"===i.type&&(s=m,u.method="throw",u.arg=i.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function x(){}function C(){}function w(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(s){var e;this._invoke=function(n,r){function t(){return new Promise(function(t,e){!function e(t,n,r,i){var o=g(s[t],s,n);if("throw"!==o.type){var a=o.arg,u=a.value;return u&&"object"==typeof u&&c.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):Promise.resolve(u).then(function(t){a.value=t,r(a)},i)}i(o.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function _(t,e){var n=t.iterator[e.method];if(n===s){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=s,_(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=s),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function I(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(c.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=s,t.done=!0,t};return r.next=r}}return{next:L}}function L(){return{value:s,done:!0}}}(function(){return this}()||Function("return this")()),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("lodash"),require("vue")):"function"==typeof define&&define.amd?define(["exports","lodash","vue"],e):e((t=t||self).NodeContextMenuPlugin={},t._,t.Vue)}(this,function(t,e,o){"use strict";function s(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function i(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function i(t){s(r,e,n,i,o,"next",t)}function o(t){s(r,e,n,i,o,"throw",t)}i(void 0)})}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(i){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,r;e=i,r=o[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return i}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],0<=e.indexOf(n)||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}o=o&&o.hasOwnProperty("default")?o.default:o;function h(t){return{props:{delay:{type:Number,required:!0}},data:function(){return{timeoutHide:function(){}}},methods:{cancelHide:function(){var t=this.timeoutHide;t&&t.cancel&&this.timeoutHide.cancel()}},mounted:function(){this.timeoutHide=e.debounce(this[t],this.delay)}}}function p(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"item",class:{hasSubitems:e.hasSubitems},on:{click:function(t){return e.onClick(t)},mouseover:function(t){return e.showSubitems()},mouseleave:function(t){return e.timeoutHide()}}},[e._v(e._s(e.item.title)),n("div",{directives:[{name:"show",rawName:"v-show",value:e.hasSubitems&&this.visibleSubitems,expression:"hasSubitems && this.visibleSubitems"}],staticClass:"subitems"},e._l(e.item.subitems,function(t){return n("Item",{key:t.title,attrs:{item:t,args:e.args,delay:e.delay}})}),1)])}var v={name:"Item",mixins:[h("hideSubitems")],props:{item:Object,args:Object},data:function(){return{visibleSubitems:!1}},computed:{hasSubitems:function(){return this.item.subitems}},methods:{showSubitems:function(){this.visibleSubitems=!0,this.cancelHide()},hideSubitems:function(){this.visibleSubitems=!1},onClick:function(t){t.stopPropagation(),this.item.onClick&&this.item.onClick(this.args),this.$root.$emit("hide")}}};p._withStripped=!0;var A=function(t,e,n,r,i,o,a){var u=("function"==typeof n?n.options:n)||{};u.__file="/Users/neeravbm/Sites/node-context-menu-plugin/src/menu/Item.vue",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),u._scopeId=r;var s=void 0;if(e&&(s=function(t){e.call(this,a(t))}),void 0!==s)if(u.functional){var c=u.render;u.render=function(t,e){return s.call(e),c(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,s):[s]}return u}({render:p,staticRenderFns:[]},function(t){t&&t("data-v-82091fec_0",{source:"\n@charset \"UTF-8\";\n.item[data-v-82091fec], .item .subitems .subitem[data-v-82091fec] {\n color: #fff;\n padding: 4px;\n border-bottom: 1px solid rgba(69, 103, 255, 0.8);\n background-color: rgba(110, 136, 255, 0.8);\n cursor: pointer;\n width: 100%;\n position: relative;\n}\n.item[data-v-82091fec]:first-child, .item .subitems .subitem[data-v-82091fec]:first-child {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.item[data-v-82091fec]:last-child, .item .subitems .subitem[data-v-82091fec]:last-child {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.item[data-v-82091fec]:hover, .item .subitems .subitem[data-v-82091fec]:hover {\n background-color: rgba(130, 153, 255, 0.8);\n}\n.hasSubitems.item[data-v-82091fec]:after, .item .subitems .hasSubitems.subitem[data-v-82091fec]:after {\n content: '►';\n position: absolute;\n opacity: 0.6;\n right: 5px;\n top: 5px;\n}\n.item .subitems[data-v-82091fec], .item .subitems .subitem .subitems[data-v-82091fec] {\n position: absolute;\n top: 0;\n left: 100%;\n width: 120px;\n}\n\n/*# sourceMappingURL=Item.vue.map */",map:{version:3,sources:["Item.vue","/Users/neeravbm/Sites/node-context-menu-plugin/src/menu/Item.vue"],names:[],mappings:";AAAA,iBAAiB;ACyDjB;EDvDE,YAAY;EACZ,aAAa;EACb,iDAAiD;EACjD,2CAA2C;EAC3C,gBAAgB;EAChB,YAAY;EACZ,mBAAmB;CAAE;ACiDvB;ID/CI,4BAA4B;IAC5B,6BAA6B;CAAE;AC8CnC;ID5CI,+BAA+B;IAC/B,gCAAgC;CAAE;AC2CtC;IDzCI,2CAA2C;CAAE;AC2CjD;EACA,aAAA;EACA,mBAAA;EACA,aAAA;EACA,WAAA;EACA,SAAA;CAAA;AAPA;EASA,mBAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;CAEA;;ADxCA,oCAAoC",file:"Item.vue",sourcesContent:["@charset \"UTF-8\";\n.item, .item .subitems .subitem {\n color: #fff;\n padding: 4px;\n border-bottom: 1px solid rgba(69, 103, 255, 0.8);\n background-color: rgba(110, 136, 255, 0.8);\n cursor: pointer;\n width: 100%;\n position: relative; }\n .item:first-child, .item .subitems .subitem:first-child {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px; }\n .item:last-child, .item .subitems .subitem:last-child {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px; }\n .item:hover, .item .subitems .subitem:hover {\n background-color: rgba(130, 153, 255, 0.8); }\n\n.hasSubitems.item:after, .item .subitems .hasSubitems.subitem:after {\n content: '►';\n position: absolute;\n opacity: 0.6;\n right: 5px;\n top: 5px; }\n\n.item .subitems, .item .subitems .subitem .subitems {\n position: absolute;\n top: 0;\n left: 100%;\n width: 120px; }\n\n/*# sourceMappingURL=Item.vue.map */",null]},media:void 0})},v,"data-v-82091fec",!(p._withStripped=!0),0,function t(){var c=document.head||document.getElementsByTagName("head")[0],l=t.styles||(t.styles={}),d="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(t,e){if(!document.querySelector('style[data-vue-ssr-id~="'+t+'"]')){var n=d?e.media||"default":t,r=l[n]||(l[n]={ids:[],parts:[],element:void 0});if(!r.ids.includes(t)){var i=e.source,o=r.ids.length;if(r.ids.push(t),d&&(r.element=r.element||document.querySelector("style[data-group="+n+"]")),!r.element){var a=r.element=document.createElement("style");a.type="text/css",e.media&&a.setAttribute("media",e.media),d&&(a.setAttribute("data-group",n),a.setAttribute("data-next-index","0")),c.appendChild(a)}if(d&&(o=parseInt(r.element.getAttribute("data-next-index")),r.element.setAttribute("data-next-index",o+1)),r.element.styleSheet)r.parts.push(i),r.element.styleSheet.cssText=r.parts.filter(Boolean).join("\n");else{var u=document.createTextNode(i),s=r.element.childNodes;s[o]&&r.element.removeChild(s[o]),s.length?r.element.insertBefore(u,s[o]):r.element.appendChild(u)}}}}});function b(t){return JSON.parse(JSON.stringify(t))}function y(){return g.apply(this,arguments)}function g(){return(g=i(regeneratorRuntime.mark(function t(e,n){var r,i,o,a,u,s,c,l,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.data,i=void 0===r?{}:r,o=n.meta,a=void 0===o?{}:o,u=n.x,s=void 0===u?0:u,c=n.y,l=void 0===c?0:c,t.next=3,e.createNode(b(i));case 3:return(d=t.sent).meta=Object.assign(b(a),d.meta),d.position[0]=s,d.position[1]=l,t.abrupt("return",d);case 8:case"end":return t.stop()}},t)}))).apply(this,arguments)}function x(){var e=this,t=e.$createElement,n=e._self._c||t;return e.visible?n("div",{ref:"menu",staticClass:"context-menu",style:e.style,on:{mouseleave:function(t){return e.timeoutHide()},mouseover:function(t){return e.cancelHide()},contextmenu:function(t){t.preventDefault()}}},e._l(e.filtered,function(t){return n("Item",{key:t.title,attrs:{item:t,args:e.args,delay:e.delay/2}})}),1):e._e()}var C={props:{},mixins:[h("hide")],data:function(){return{x:0,y:0,visible:!1,args:{},filter:"",items:[]}},computed:{style:function(){return{top:this.y+"px",left:this.x+"px"}},filtered:function(){if(!this.filter)return this.items;new RegExp(this.filter,"i");return this.extractLeafs(this.items).filter(function(t){t.title;return!0})}},methods:{extractLeafs:function(t){var e=this;if(!t)return[];var n=[];return t.map(function(t){t.subitems||n.push(t),n.push.apply(n,l(e.extractLeafs(t.subitems)))}),n},show:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{};this.visible=!0,this.x=t,this.y=e,this.args=r,this.cancelHide()},hide:function(){this.visible=!1},additem:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:[],i=this.items,o=!0,a=!1,u=void 0;try{for(var s,c=function(){var e=s.value,t=i.find(function(t){return t.title===e});t||(t={title:e,subitems:[]},i.push(t)),i=t.subitems||(t.subitems=[])},l=r[Symbol.iterator]();!(o=(s=l.next()).done);o=!0)c()}catch(t){a=!0,u=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw u}}i.push({title:t,onClick:e})}},updated:function(){if(this.$refs.menu){var t=m(function(t,e){var n=m(t,2),r=n[0],i=n[1];return[Math.min(r,window.innerWidth-e.clientWidth),Math.min(i,window.innerHeight-e.clientHeight)]}([this.x,this.y],this.$refs.menu),2);this.x=t[0],this.y=t[1]}},mounted:function(){this.$root.$on("show",this.show),this.$root.$on("hide",this.hide),this.$root.$on("additem",this.additem)},components:{Item:A}};x._withStripped=!0;var w=function(t,e,n,r,i,o,a){var u=("function"==typeof n?n.options:n)||{};u.__file="/Users/neeravbm/Sites/node-context-menu-plugin/src/menu/Menu.vue",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),u._scopeId=r;var s=void 0;if(e&&(s=function(t){e.call(this,a(t))}),void 0!==s)if(u.functional){var c=u.render;u.render=function(t,e){return s.call(e),c(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,s):[s]}return u}({render:x,staticRenderFns:[]},function(t){t&&t("data-v-00278156_0",{source:"\n.item[data-v-00278156] {\n color: #fff;\n padding: 4px;\n border-bottom: 1px solid rgba(69, 103, 255, 0.8);\n background-color: rgba(110, 136, 255, 0.8);\n cursor: pointer;\n width: 100%;\n position: relative;\n}\n.item[data-v-00278156]:first-child {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.item[data-v-00278156]:last-child {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.item[data-v-00278156]:hover {\n background-color: rgba(130, 153, 255, 0.8);\n}\n.context-menu[data-v-00278156] {\n left: 0;\n top: 0;\n position: fixed;\n padding: 10px;\n width: 120px;\n margin-top: -20px;\n margin-left: -60px;\n}\n\n/*# sourceMappingURL=Menu.vue.map */",map:{version:3,sources:["Menu.vue","/Users/neeravbm/Sites/node-context-menu-plugin/src/menu/Menu.vue"],names:[],mappings:";AAAA;EACE,YAAY;EACZ,aAAa;EACb,iDAAiD;EACjD,2CAA2C;EAC3C,gBAAgB;EAChB,YAAY;EACZ,mBAAmB;CAAE;AACrB;IACE,4BAA4B;IAC5B,6BAA6B;CAAE;AACjC;IACE,+BAA+B;IAC/B,gCAAgC;CAAE;AACpC;IACE,2CAA2C;CAAE;ACiGjD;EACA,QAAA;EACA,OAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;CAAA;;AD7FA,oCAAoC",file:"Menu.vue",sourcesContent:[".item {\n color: #fff;\n padding: 4px;\n border-bottom: 1px solid rgba(69, 103, 255, 0.8);\n background-color: rgba(110, 136, 255, 0.8);\n cursor: pointer;\n width: 100%;\n position: relative; }\n .item:first-child {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px; }\n .item:last-child {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px; }\n .item:hover {\n background-color: rgba(130, 153, 255, 0.8); }\n\n.context-menu {\n left: 0;\n top: 0;\n position: fixed;\n padding: 10px;\n width: 120px;\n margin-top: -20px;\n margin-left: -60px; }\n\n/*# sourceMappingURL=Menu.vue.map */",null]},media:void 0})},C,"data-v-00278156",!(x._withStripped=!0),0,function t(){var c=document.head||document.getElementsByTagName("head")[0],l=t.styles||(t.styles={}),d="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(t,e){if(!document.querySelector('style[data-vue-ssr-id~="'+t+'"]')){var n=d?e.media||"default":t,r=l[n]||(l[n]={ids:[],parts:[],element:void 0});if(!r.ids.includes(t)){var i=e.source,o=r.ids.length;if(r.ids.push(t),d&&(r.element=r.element||document.querySelector("style[data-group="+n+"]")),!r.element){var a=r.element=document.createElement("style");a.type="text/css",e.media&&a.setAttribute("media",e.media),d&&(a.setAttribute("data-group",n),a.setAttribute("data-next-index","0")),c.appendChild(a)}if(d&&(o=parseInt(r.element.getAttribute("data-next-index")),r.element.setAttribute("data-next-index",o+1)),r.element.styleSheet)r.parts.push(i),r.element.styleSheet.cssText=r.parts.filter(Boolean).join("\n");else{var u=document.createTextNode(i),s=r.element.childNodes;s[o]&&r.element.removeChild(s[o]),s.length?r.element.insertBefore(u,s[o]):r.element.appendChild(u)}}}}}),E=function(){function i(t,e,n){a(this,i);var r=document.createElement("div");t.view.container.appendChild(r),this.menu=new o({render:function(t){return t(n||w,{props:e})}}).$mount(r)}return function(t,e,n){e&&r(t.prototype,e),n&&r(t,n)}(i,[{key:"addItem",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=this.menu).$emit.apply(t,["additem"].concat(n))}},{key:"show",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=this.menu).$emit.apply(t,["show"].concat(n))}},{key:"hide",value:function(){this.menu.$emit("hide")}}]),i}(),S=function(){function r(l,t,e){var n;return a(this,r),(n=c(this,u(r).call(this,l,t,e))).addItem("Delete",function(t){var e=t.node;return l.removeNode(e)}),n.addItem("Clone",function(){var e=i(regeneratorRuntime.mark(function t(e){var n,r,i,o,a,u,s,c;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.node,r=n.name,i=m(n.position,2),o=i[0],a=i[1],u=f(n,["name","position"]),s=l.components.get(r),t.next=4,y(s,d({},u,{x:o+10,y:a+10}));case 4:c=t.sent,l.addNode(c);case 6:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}(r,E),r}();var _=w,O=A,j={name:"node-context-menu",install:function(t,e){e.delay,e.items,e.allocate,e.rename;var n=e.vueComponent,r=void 0===n?null:n;t.bind("hidecontextmenu");var a=new S(t,{},r);t.on("hidecontextmenu",function(){a.hide()}),t.on("click contextmenu",function(){t.trigger("hidecontextmenu")}),t.on("contextmenu",function(t){var e=t.e,n=t.node;e.preventDefault(),e.stopPropagation();var r=[e.clientX,e.clientY],i=r[0],o=r[1];(n?a:mainMenu).show(i,o,{node:n})})}};t.Item=O,t.Menu=_,t.default=j,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=node-context-menu-plugin.min.js.map