!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","react-dom"],e):e((t=t||self).ReactFlow={},t.React,t.PropTypes,t.ReactDOM)}(this,(function(t,e,n,r){"use strict";var o,i="default"in e?e.default:e;n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r;var a="undefined"!=typeof Symbol?Symbol("immer-nothing"):((o={})["immer-nothing"]=!0,o),s="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("immer-draftable"):"__$immer_draftable",u="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("immer-state"):"__$immer_state";function c(t){return!!t&&!!t[u]}function l(t){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t))return!0;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype||(!!t[s]||!!t.constructor[s])}var f=Object.assign||function(t,e){for(var n in e)m(e,n)&&(t[n]=e[n]);return t},d="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function h(t,e){if(void 0===e&&(e=!1),Array.isArray(t))return t.slice();var n=Object.create(Object.getPrototypeOf(t));return d(t).forEach((function(r){if(r!==u){var o=Object.getOwnPropertyDescriptor(t,r),i=o.value;o.get&&e&&(i=o.get.call(t)),o.enumerable?n[r]=i:e&&Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0})}})),n}function p(t,e){if(Array.isArray(t))for(var n=0;n=0;e--){var n=t[e][u];n.modified||(Array.isArray(n.base)?A(n)&&P(n):C(n)&&P(n))}}function C(t){for(var e=t.base,n=t.draft,r=Object.keys(n),o=r.length-1;o>=0;o--){var i=r[o],a=e[i];if(void 0===a&&!m(e,i))return!0;var s=n[i],c=s&&s[u];if(c?c.base!==a:!y(s,a))return!0}return r.length!==Object.keys(e).length}function A(t){var e=t.draft;if(e.length!==t.base.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);return!(!n||n.get)}var T=Object.freeze({willFinalize:function(t,e,n){t.drafts.forEach((function(t){t[u].finalizing=!0})),n?c(e)&&e[u].scope===t&&D(t.drafts):(t.patches&&function t(e){if(!e||"object"!=typeof e)return;var n=e[u];if(!n)return;var r=n.base;var o=n.draft;var i=n.assigned;if(Array.isArray(e)){if(A(n)){if(P(n),i.length=!0,o.lengthl&&a[f-1]===s[f+c-1];)--f;for(var d=l;d=f;--m){var y=e.concat([m]);n[g+m-f]={op:"add",path:y,value:s[m]},p&&r.push({op:"remove",path:y})}p||r.push({op:"replace",path:e.concat(["length"]),value:a.length})}(t,e,n,r):function(t,e,n,r){var o=t.base,i=t.copy;p(t.assigned,(function(t,a){var s=o[t],u=i[t],c=a?t in o?"replace":"add":"remove";if(s!==u||"replace"!==c){var l=e.concat(t);n.push("remove"===c?{op:c,path:l}:{op:c,path:l,value:u}),r.push("add"===c?{op:"remove",path:l}:"remove"===c?{op:"add",path:l,value:s}:{op:"replace",path:l,value:s})}}))}(t,e,n,r)}function V(t,e){for(var n=0;n0;)r[o]=arguments[o+1];return s.produce(t,(function(t){return e.call.apply(e,[n,t].concat(r))}))}}if("function"!=typeof e)throw new Error("The first or second argument to `produce` must be a function");if(void 0!==n&&"function"!=typeof n)throw new Error("The third argument to `produce` must be a function or undefined");if(l(t)){var u=v.enter(),c=this.createProxy(t),f=!0;try{r=e(c),f=!1}finally{f?u.revoke():u.leave()}return r instanceof Promise?r.then((function(t){return u.usePatches(n),o.processResult(t,u)}),(function(t){throw u.revoke(),t})):(u.usePatches(n),this.processResult(r,u))}return void 0===(r=e(t))?t:r!==a?r:void 0},H.prototype.createDraft=function(t){if(!l(t))throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");var e=v.enter(),n=this.createProxy(t);return n[u].isManual=!0,e.leave(),n},H.prototype.finishDraft=function(t,e){var n=t&&t[u];if(!n||!n.isManual)throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");if(n.finalized)throw new Error("The given draft is already finalized");var r=n.scope;return r.usePatches(e),this.processResult(void 0,r)},H.prototype.setAutoFreeze=function(t){this.autoFreeze=t},H.prototype.setUseProxies=function(t){this.useProxies=t,f(this,t?L:T)},H.prototype.applyPatches=function(t,e){return c(t)?V(t,e):this.produce(t,(function(t){return V(t,e)}))},H.prototype.processResult=function(t,e){var n=e.drafts[0],r=void 0!==t&&t!==n;if(this.willFinalize(e,t,r),r){if(n[u].modified)throw e.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");l(t)&&(t=this.finalize(t,null,e)),e.patches&&(e.patches.push({op:"replace",path:[],value:t}),e.inversePatches.push({op:"replace",path:[],value:n[u].base}))}else t=this.finalize(n,[],e);return e.revoke(),e.patches&&e.patchListener(e.patches,e.inversePatches),t!==a?t:void 0},H.prototype.finalize=function(t,e,n){var r=this,o=t[u];if(!o)return Object.isFrozen(t)?t:this.finalizeTree(t,null,n);if(o.scope!==n)return t;if(!o.modified)return o.base;if(!o.finalized){if(o.finalized=!0,this.finalizeTree(o.draft,e,n),this.onDelete)if(this.useProxies){var i=o.assigned;for(var a in i)i[a]||this.onDelete(o,a)}else{var s=o.base,c=o.copy;p(s,(function(t){m(c,t)||r.onDelete(o,t)}))}this.onCopy&&this.onCopy(o),this.autoFreeze&&n.canAutoFreeze&&Object.freeze(o.copy),e&&n.patches&&Y(o,e,n.patches,n.inversePatches)}return o.copy},H.prototype.finalizeTree=function(t,e,n){var r=this,o=t[u];o&&(this.useProxies||(o.copy=h(o.draft,!0)),t=o.copy);var i=!!e&&!!n.patches,a=function(s,u,f){if(u===f)throw Error("Immer forbids circular references");var d=!!o&&f===t;if(c(u)){var h=d&&i&&!o.assigned[s]?e.concat(s):null;if(c(u=r.finalize(u,h,n))&&(n.canAutoFreeze=!1),Array.isArray(f)||g(f,s)?f[s]=u:Object.defineProperty(f,s,{value:u}),d&&u===o.base[s])return}else{if(d&&y(u,o.base[s]))return;l(u)&&!Object.isFrozen(u)&&p(u,a)}d&&r.onAssign&&r.onAssign(o,s,u)};return p(t,a),t};var U=new H,q=U.setAutoFreeze.bind(U),F=(U.setUseProxies.bind(U),U.applyPatches.bind(U),U.createDraft.bind(U)),$=U.finishDraft.bind(U);var G=function(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),W=function(){return Math.random().toString(36).substring(7).split("").join(".")},K={INIT:"@@redux/INIT"+W(),REPLACE:"@@redux/REPLACE"+W(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+W()}};function Z(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(Z)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var o=t,i=e,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function l(){if(u)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(u)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var e=!0;return c(),s.push(t),function(){if(e){if(u)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");e=!1,c();var n=s.indexOf(t);s.splice(n,1)}}}function d(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,i=o(i,t)}finally{u=!1}for(var e=a=s,n=0;n=0?(this.lastItem=this.list[e],this.list[e].val):void 0},at.prototype.set=function(t,e){var n;return this.lastItem&&this.isEqual(this.lastItem.key,t)?(this.lastItem.val=e,this):(n=this.indexOf(t))>=0?(this.lastItem=this.list[n],this.list[n].val=e,this):(this.lastItem={key:t,val:e},this.list.push(this.lastItem),this.size++,this)},at.prototype.delete=function(t){var e;if(this.lastItem&&this.isEqual(this.lastItem.key,t)&&(this.lastItem=void 0),(e=this.indexOf(t))>=0)return this.size--,this.list.splice(e,1)[0]},at.prototype.has=function(t){var e;return!(!this.lastItem||!this.isEqual(this.lastItem.key,t))||(e=this.indexOf(t))>=0&&(this.lastItem=this.list[e],!0)},at.prototype.forEach=function(t,e){var n;for(n=0;n0&&(l[c]={cacheItem:u,arg:arguments[c]},f?lt(n,l):n.push(l),n.length>t&&ft(n.shift())),o.wasMemoized=f,o.numArgs=c+1,a};return o.limit=t,o.wasMemoized=!1,o.cache=e,o.lru=n,o}};function lt(t,e){var n,r,o,i,a,s=t.length,u=e.length;for(r=0;r=0&&(!(e=(o=t[n]).cacheItem.get(o.arg))||!e.size);n--)o.cacheItem.delete(o.arg)}var dt=e.createContext(),ht="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;var pt,gt=(pt=dt,function(t){var n=e.useContext(pt),r=e.useRef(t),o=e.useRef(),i=e.useRef(!0),a=e.useRef(),s=e.useReducer((function(t){return t+1}),0)[1];if(a.current||r.current!==t||void 0===o.current)try{o.current=t(n.getState())}catch(t){var u="An error occurred trying to map state in a useStoreState hook: "+t.message+".";throw a.current&&(u+="\nThis error may be related to the following error:\n"+a.current.stack+"\n\nOriginal stack trace:"),new Error(u)}return ht((function(){r.current=t,a.current=void 0})),ht((function(){var t=function(){try{var t=r.current(n.getState());if(t===o.current)return;o.current=t}catch(t){a.current=t}i.current&&s({})},e=n.subscribe(t);return t(),function(){i.current=!1,e()}}),[]),o.current});var mt=function(t){return function(n){return n(e.useContext(t).getActions())}}(dt);function yt(){return(yt=Object.assign||function(t){for(var e=1;e0?function(t,e){return p.reduce((function(t,n){var r=n.parentPath,o=n.key,i=n.reducer;return s(r,t,(function(t){return t[o]=i(t[o],e),t}))}),t)}(n,e):n;return t!==r&&h.forEach((function(t){var e=t.parentPath;(0,t.createComputedProperty)(kt(e,r))})),r}))}}var Ct=function(t){var e=t.children,n=t.store;return i.createElement(dt.Provider,{value:n},e)};function At(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tt(){return(Tt=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Rt(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Bt(t,e){for(var n,r=0,o=t.length;r0)for(var n,r,o=new Array(n),i=0;i=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),qt.hasOwnProperty(e)?{space:qt[e],local:t}:t}function $t(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ut&&e.documentElement.namespaceURI===Ut?e.createElement(t):e.createElementNS(n,t)}}function Gt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Wt(t){var e=Ft(t);return(e.local?Gt:$t)(e)}function Kt(){}function Zt(t){return null==t?Kt:function(){return this.querySelector(t)}}function Jt(){return[]}function Qt(t){return null==t?Jt:function(){return this.querySelectorAll(t)}}function te(t){return function(){return this.matches(t)}}function ee(t){return new Array(t.length)}function ne(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ne.prototype={constructor:ne,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var re="$";function oe(t,e,n,r,o,i){for(var a,s=0,u=e.length,c=i.length;se?1:t>=e?0:NaN}function se(t){return function(){this.removeAttribute(t)}}function ue(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ce(t,e){return function(){this.setAttribute(t,e)}}function le(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function de(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function he(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pe(t){return function(){this.style.removeProperty(t)}}function ge(t,e,n){return function(){this.style.setProperty(t,e,n)}}function me(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ye(t,e){return t.style.getPropertyValue(e)||he(t).getComputedStyle(t,null).getPropertyValue(e)}function ve(t){return function(){delete this[t]}}function we(t,e){return function(){this[t]=e}}function be(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function _e(t){return t.trim().split(/^|\s+/)}function xe(t){return t.classList||new Ee(t)}function Ee(t){this._node=t,this._names=_e(t.getAttribute("class")||"")}function Se(t,e){for(var n=xe(t),r=-1,o=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ve={},Be=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ve={mouseenter:"mouseover",mouseleave:"mouseout"}));function He(t,e,n){return t=Ue(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Ue(t,e,n){return function(r){var o=Be;Be=r;try{t.call(this,this.__data__,e,n)}finally{Be=o}}}function qe(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r=_&&(_=b+1);!(w=y[_])&&++_=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ae);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i1?this.each((null==e?pe:"function"==typeof e?me:ge)(t,e,null==n?"":n)):ye(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ve:"function"==typeof e?be:we)(t,e)):this.node()[t]},classed:function(t,e){var n=_e(t+"");if(arguments.length<2){for(var r=xe(this.node()),o=-1,i=n.length;++o=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=i.length;if(!(arguments.length<2)){for(s=e?Fe:qe,null==n&&(n=!1),r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new kn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new kn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=hn.exec(t))?new kn(e[1],e[2],e[3],1):(e=pn.exec(t))?new kn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=gn.exec(t))?Sn(e[1],e[2],e[3],e[4]):(e=mn.exec(t))?Sn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=yn.exec(t))?Cn(e[1],e[2]/100,e[3]/100,1):(e=vn.exec(t))?Cn(e[1],e[2]/100,e[3]/100,e[4]):wn.hasOwnProperty(t)?En(wn[t]):"transparent"===t?new kn(NaN,NaN,NaN,0):null}function En(t){return new kn(t>>16&255,t>>8&255,255&t,1)}function Sn(t,e,n,r){return r<=0&&(t=e=n=NaN),new kn(t,e,n,r)}function Pn(t,e,n,r){return 1===arguments.length?((o=t)instanceof un||(o=xn(o)),o?new kn((o=o.rgb()).r,o.g,o.b,o.opacity):new kn):new kn(t,e,n,null==r?1:r);var o}function kn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Nn(){return"#"+Dn(this.r)+Dn(this.g)+Dn(this.b)}function On(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Dn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Cn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Tn(t,e,n,r)}function An(t){if(t instanceof Tn)return new Tn(t.h,t.s,t.l,t.opacity);if(t instanceof un||(t=xn(t)),!t)return new Tn;if(t instanceof Tn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,s=i-o,u=(i+o)/2;return s?(a=e===i?(n-r)/s+6*(n0&&u<1?0:a,new Tn(a,s,u,t.opacity)}function Tn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Mn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function jn(t){return function(){return t}}function zn(t){return 1==(t=+t)?In:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):jn(isNaN(e)?n:e)}}function In(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):jn(isNaN(t)?e:t)}an(un,xn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:bn,formatHex:bn,formatHsl:function(){return An(this).formatHsl()},formatRgb:_n,toString:_n}),an(kn,Pn,sn(un,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Nn,formatHex:Nn,formatRgb:On,toString:On})),an(Tn,(function(t,e,n,r){return 1===arguments.length?An(t):new Tn(t,e,n,null==r?1:r)}),sn(un,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new kn(Mn(t>=240?t-240:t+120,o,r),Mn(t,o,r),Mn(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Rn=function t(e){var n=zn(e);function r(t,e){var r=n((t=Pn(t)).r,(e=Pn(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=In(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Xn(t,e){return e-=t=+t,function(n){return t+e*n}}var Ln=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yn=new RegExp(Ln.source,"g");function Vn(t,e){var n,r,o,i=Ln.lastIndex=Yn.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Ln.exec(t))&&(r=Yn.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Xn(n,r)})),i=Yn.lastIndex;return i180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Xn(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,s,u),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Xn(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,s,u),function(t,e,n,r,i,a){if(t!==n||e!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Xn(t,n)},{i:s-2,x:Xn(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,u),i=a=null,function(t){for(var e,n=-1,r=u.length;++n=0&&e._call.call(null,t),e=e._next;--ar}()}finally{ar=0,function(){var t,e,n=or,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:or=e);ir=t,_r(r)}(),fr=0}}function br(){var t=hr.now(),e=t-lr;e>cr&&(dr-=e,lr=t)}function _r(t){ar||(sr&&(sr=clearTimeout(sr)),t-fr>24?(t<1/0&&(sr=setTimeout(wr,t-hr.now()-dr)),ur&&(ur=clearInterval(ur))):(ur||(lr=hr.now(),ur=setInterval(br,cr)),ar=1,pr(wr)))}function xr(t,e,n){var r=new yr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}yr.prototype=vr.prototype={constructor:yr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?gr():+n)+(null==e?0:+e),this._next||ir===this||(ir?ir._next=this:or=this,ir=this),this._call=t,this._time=n,_r()},stop:function(){this._call&&(this._call=null,this._time=1/0,_r())}};var Er=Lt("start","end","cancel","interrupt"),Sr=[],Pr=0,kr=1,Nr=2,Or=3,Dr=4,Cr=5,Ar=6;function Tr(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(u){var c,l,f,d;if(n.state!==kr)return s();for(c in o)if((d=o[c]).name===n.name){if(d.state===Or)return xr(i);d.state===Dr?(d.state=Ar,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete o[c]):+cPr)throw new Error("too late; already scheduled");return n}function jr(t,e){var n=zr(t,e);if(n.state>Or)throw new Error("too late; already running");return n}function zr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ir(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>Nr&&n.state=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Mr:jr;return function(){var a=i(this,t),s=a.on;s!==r&&(o=(r=s).copy()).on(e,n),a.on=o}}(n,t,e))},attr:function(t,e){var n=Ft(t),r="transform"===n?Zn:Yr;return this.attrTween(t,"function"==typeof e?(n.local?Fr:qr)(n,r,Lr(this,"attr."+t,e)):null==e?(n.local?Br:Vr)(n):(n.local?Ur:Hr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Ft(t);return this.tween(n,(r.local?$r:Gr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Kn:Yr;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=ye(this,t),a=(this.style.removeProperty(t),ye(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,to(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=ye(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=ye(this,t)),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,s))}}(t,r,Lr(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,s="end."+a;return function(){var u=jr(this,t),c=u.on,l=null==u.value[a]?i||(i=to(e)):void 0;c===n&&o===l||(r=(n=c).copy()).on(s,o=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=ye(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,i,n)),r}return i._value=e,i}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Lr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=zr(this.node(),n).tween,i=0,a=o.length;ir?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var bo=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(o=r;0!=o--;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!t(e[a],n[a]))return!1}return!0}return e!=e&&n!=n},_o={setOnConnect:St((function(t,e){t.onConnect=e})),setNodes:St((function(t,e){t.nodes=e})),setEdges:St((function(t,e){t.edges=e})),updateNodeData:St((function(t,e){var n=e.id,r=zt(e,["id"]);t.nodes.forEach((function(t){t.id===n&&(t.__rg=jt({},t.__rg,{},r))}))})),updateNodePos:St((function(t,e){var n=e.id,r=e.pos;t.nodes.forEach((function(t){t.id===n&&(t.__rg=jt({},t.__rg,{position:r}))}))})),setSelection:St((function(t,e){t.selectionActive=e})),setNodesSelection:St((function(t,e){var n=e.isActive,r=e.selection;if(!n)return t.nodesSelectionActive=!1,void(t.selectedElements=[]);var o=Ao(t.nodes,r,t.transform),i=Co(o);t.selection=r,t.nodesSelectionActive=!0,t.selectedNodesBbox=i,t.nodesSelectionActive=!0})),setSelectedElements:St((function(t,e){var n=Array.isArray(e)?e:[e],r=!bo(n,t.selectedElements)?n:t.selectedElements;t.selectedElements=r})),updateSelection:St((function(t,e){var n=Ao(t.nodes,e,t.transform),r=To(n,t.edges),o=[].concat(Rt(n),Rt(r)),i=!bo(o,t.selectedElements);t.selection=e,t.selectedElements=i?o:t.selectedElements})),updateTransform:St((function(t,e){t.transform=[e.x,e.y,e.k]})),updateSize:St((function(t,e){t.width=e.width,t.height=e.height})),initD3:St((function(t,e){var n=e.zoom,r=e.selection;t.d3Zoom=n,t.d3Selection=r,t.d3Initialised=!0})),setConnectionPosition:St((function(t,e){t.connectionPosition=e})),setConnectionSourceId:St((function(t,e){t.connectionSourceId=e}))},xo=function(t,e){void 0===e&&(e={});var n=e,r=n.compose,o=n.devTools,i=void 0===o||o,a=n.disableImmer,s=void 0!==a&&a,u=n.enhancers,c=void 0===u?[]:u,l=n.initialState,f=void 0===l?{}:l,d=n.injections,h=n.middleware,p=void 0===h?[]:h,g=n.mockActions,m=void 0!==g&&g,y=n.name,v=void 0===y?"EasyPeasyStore":y,w=n.reducerEnhancer,b=void 0===w?function(t){return t}:w,_=function(t){return yt({},t,{easyPeasyReplaceState:St((function(t,e){return e}))})},x=_(t),E=[],S={},P=function(t){void 0===t&&(t={}),S.internals=Dt({disableImmer:s,initialState:t,injections:d,model:x,reducerEnhancer:b,references:S})};P(f);var k=[function(t){return function(e){return function(n){return S.internals.computedState.currentState=t.getState(),S.internals.computedState.isInReducer=!0,e(n)}}},it].concat(p,[function(){return function(t){return function(e){var n=t(e);if(e&&S.internals.listenerActionMap[e.type]&&S.internals.listenerActionMap[e.type].length>0){var r=S.internals.actionCreatorDict[e.type];S.internals.listenerActionMap[e.type].forEach((function(t){t({type:r?r.type:e.type,payload:e.payload,error:e.error,result:e.result})}))}return n}}}]);m&&k.push((function(){return function(){return function(t){null!=t&&E.push(t)}}}));var N=r||(i&&"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:v}):et),O=Z(S.internals.reducer,S.internals.defaultState,N.apply(void 0,[nt.apply(void 0,k)].concat(c)));O.subscribe((function(){S.internals.computedState.isInReducer=!1})),S.dispatch=O.dispatch,S.getState=O.getState;var D=function(){Object.keys(O.dispatch).forEach((function(t){delete O.dispatch[t]})),Object.keys(S.internals.actionCreators).forEach((function(t){O.dispatch[t]=S.internals.actionCreators[t]}))};D();var C=function(t){var e=O.getState();t&&delete e[t],P(O.getState()),O.replaceReducer(S.internals.reducer),S.internals.actionCreatorDict["@action.easyPeasyReplaceState"](S.internals.defaultState),D()};return Object.assign(O,{addModel:function(t,e){x[t]&&"production"!==process.env.NODE_ENV&&(console.warn('easy-peasy: The store model already contains a model definition for "'+t+'"'),O.removeModel(t)),x[t]=e,C()},clearMockedActions:function(){E=[]},getActions:function(){return S.internals.actionCreators},getListeners:function(){return S.internals.listenerActionCreators},getMockedActions:function(){return[].concat(E)},reconfigure:function(t){x=_(t),C()},removeModel:function(t){x[t]?(delete x[t],C(t)):"production"!==process.env.NODE_ENV&&console.warn('easy-peasy: The store model does not contain a model definition for "'+t+'"')}})}(jt({width:0,height:0,transform:[0,0,1],nodes:[],edges:[],selectedElements:[],selectedNodesBbox:{x:0,y:0,width:0,height:0},d3Zoom:null,d3Selection:null,d3Initialised:!1,nodesSelectionActive:!1,selectionActive:!1,selection:{},connectionSourceId:null,connectionPosition:{x:0,y:0},onConnect:function(){}},_o)),Eo=function(t){return void 0!==t},So=function(t){return t&&t.target&&["INPUT","SELECT","TEXTAREA"].includes(t.target.nodeName)},Po=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{width:t.offsetWidth,height:t.offsetHeight}},ko=function(t){return t.source&&t.target},No=function(t){return!t.source&&!t.target};var Oo=function(t,e){var n=t.x,r=t.y;return{x:(n-e[0])*(1/[e[2]]),y:(r-e[1])*(1/[e[2]])}},Do=function(t,e){if(!t.id)throw new Error("All elements (nodes and edges) need to have an id.");return ko(t)?jt({},t,{id:t.id.toString(),type:t.type||"default"}):jt({},t,{id:t.id.toString(),type:t.type||"default",__rg:{position:Oo(t.position,e),width:null,height:null,handleBounds:{}}})},Co=function(t){var e=t.reduce((function(t,e){var n=e.__rg.position,r=n.x+e.__rg.width,o=n.y+e.__rg.height;return n.xt.maxX&&(t.maxX=r),n.yt.maxY&&(t.maxY=o),t}),{minX:Number.MAX_VALUE,minY:Number.MAX_VALUE,maxX:0,maxY:0});return{x:e.minX,y:e.minY,width:e.maxX-e.minX,height:e.maxY-e.minY}},Ao=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,1],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.filter((function(t){var o=(e.x-n[0])*(1/n[2]),i=(e.y-n[1])*(1/n[2]),a=e.width*(1/n[2]),s=e.height*(1/n[2]),u=t.__rg,c=u.position,l=u.width,f=u.height,d=r?-l:l,h=r?0:f,p=r?l:0,g=r?f:0;return c.x+p>o&&c.x+di&&c.y+h0&&void 0!==arguments[0]?arguments[0]:{},e=t.padding,n=void 0===e?0:e,r=xo.getState(),o=Co(r.nodes),i=Math.max(o.width,o.height),a=Math.min(r.width,r.height)/(i+i*n),s=o.x+o.width/2,u=o.y+o.height/2,c=[r.width/2-s*a,r.height/2-u*a],l=lo.translate(c[0],c[1]).scale(a);r.d3Selection.call(r.d3Zoom.transform,l)},jo=function(){var t=xo.getState();t.d3Zoom.scaleTo(t.d3Selection,t.transform[2]+.2)},zo=function(){var t=xo.getState();t.d3Zoom.scaleTo(t.d3Selection,t.transform[2]-.2)};var Io=e.memo((function(t){var e=gt((function(t){return{nodes:t.nodes,transform:t.transform,selectedElements:t.selectedElements}})),n=e.transform,r=e.nodes,o={transform:"translate(".concat(n[0],"px,").concat(n[1],"px) scale(").concat(n[2],")")};return i.createElement("div",{className:"react-flow__nodes",style:o},r.map((function(n){return function(t,e,n){var r=t.type||"default";e.nodeTypes[r]||console.warn('No node type found for type "'.concat(r,'". Using fallback type "default".'));var o=e.nodeTypes[r]||e.nodeTypes.default,a=n.selectedElements.filter(No).map((function(t){return t.id})).includes(t.id);return i.createElement(o,{key:t.id,id:t.id,type:t.type,data:t.data,xPos:t.__rg.position.x,yPos:t.__rg.position.y,onClick:e.onElementClick,onNodeDragStop:e.onNodeDragStop,transform:n.transform,selected:a,style:t.style})}(n,t,e)})))}));function Ro(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xo(t,e){return t(e={exports:{}},e.exports),e.exports}Io.displayName="NodeRenderer",Io.whyDidYouRender=!1;var Lo=Xo((function(t){ /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:null;if(!n)switch(t){case"top":return{x:e.__rg.width/2,y:0};case"right":return{x:e.__rg.width,y:e.__rg.height/2};case"bottom":return{x:e.__rg.width/2,y:e.__rg.height};case"left":return{x:0,y:e.__rg.height/2}}switch(t){case"top":return{x:n.x+n.width/2,y:n.y};case"right":return{x:n.x+n.width,y:n.y+n.height/2};case"bottom":return{x:n.x+n.width/2,y:n.y+n.height};case"left":return{x:n.x,y:n.y+n.height/2}}}function Bo(t,e){var n=null;return t?(1!==t.length&&e?e&&(n=t.find((function(t){return t.id===e}))):n=t[0],n):null}function Ho(t,e,n){var r=t.type||"default",o=t.source.includes("__"),a=t.target.includes("__"),s=o?t.source.split("__")[0]:t.source,u=a?t.target.split("__")[0]:t.target,c=o?t.source.split("__")[1]:null,l=a?t.target.split("__")[1]:null,f=n.nodes.find((function(t){return t.id===s})),d=n.nodes.find((function(t){return t.id===u}));if(!f)throw new Error("couldn't create edge for source id: ".concat(s));if(!d)throw new Error("couldn't create edge for target id: ".concat(u));var h=e.edgeTypes[r]||e.edgeTypes.default,p=Bo(f.__rg.handleBounds.source,c),g=Bo(d.__rg.handleBounds.target,l),m=p?p.position:"bottom",y=g?g.position:"top",v=function(t){var e=t.sourceNode,n=t.sourceHandle,r=t.sourcePosition,o=t.targetNode,i=t.targetHandle,a=t.targetPosition,s=Vo(r,e,n),u=e.__rg.position.x+s.x,c=e.__rg.position.y+s.y,l=Vo(a,o,i);return{sourceX:u,sourceY:c,targetX:o.__rg.position.x+l.x,targetY:o.__rg.position.y+l.y}}({sourceNode:f,sourceHandle:p,sourcePosition:m,targetNode:d,targetHandle:g,targetPosition:y}),w=v.sourceX,b=v.sourceY,_=v.targetX,x=v.targetY,E=n.selectedElements.filter(ko).find((function(t){return t.source===s&&t.target===u}));return i.createElement(h,{key:t.id,id:t.id,type:t.type,onClick:e.onElementClick,selected:E,animated:t.animated,style:t.style,source:s,target:u,sourceHandleId:c,targetHandleId:l,sourceX:w,sourceY:b,targetX:_,targetY:x,sourcePosition:m,targetPosition:y})}var Uo=e.memo((function(t){var e=gt((function(t){return{nodes:t.nodes,edges:t.edges,transform:t.transform,selectedElements:t.selectedElements,connectionSourceId:t.connectionSourceId,position:t.connectionPosition}})),n=t.width,r=t.height,o=t.connectionLineStyle,a=t.connectionLineType;if(!n)return null;var s=e.transform,u=e.edges,c=e.nodes,l=e.connectionSourceId,f=e.position,d="translate(".concat(s[0],",").concat(s[1],") scale(").concat(s[2],")");return i.createElement("svg",{width:n,height:r,className:"react-flow__edges"},i.createElement("g",{transform:d},u.map((function(n){return Ho(n,t,e)})),l&&i.createElement(Yo,{nodes:c,connectionSourceId:l,connectionPositionX:f.x,connectionPositionY:f.y,transform:s,connectionLineStyle:o,connectionLineType:a})))}));Uo.displayName="EdgeRenderer";var qo={position:"absolute",top:0,left:0},Fo=e.memo((function(t){var e=t.gap,n=t.strokeColor,r=t.strokeWidth,o=t.style,a=t.className,s=gt((function(t){return t})),u=s.width,c=s.height,l=It(s.transform,3),f=l[0],d=l[1],h=l[2],p=Lo("react-flow__grid",a),g=e*h,m=f%g,y=d%g,v=Math.ceil(u/g)+1,w=Math.ceil(c/g)+1,b=Array.from({length:v},(function(t,e){return"M".concat(e*g+m," 0 V").concat(c)})),_=Array.from({length:w},(function(t,e){return"M0 ".concat(e*g+y," H").concat(u)})),x=[].concat(Rt(b),Rt(_)).join(" ");return i.createElement("svg",{width:u,height:c,style:jt({},qo,{},o),className:p},i.createElement("path",{fill:"none",stroke:n,strokeWidth:r,d:x}))}));Fo.displayName="Grid",Fo.propTypes={gap:n.number,strokeColor:n.string,strokeWidth:n.number,style:n.object,className:n.string},Fo.defaultProps={gap:24,strokeColor:"#999",strokeWidth:.1,style:{},className:null};var $o={grid:Fo},Go=e.memo((function(t){var e=t.backgroundType,n=zt(t,["backgroundType"]),r=$o[e];return i.createElement(r,n)}));Go.displayName="BackgroundRenderer",Go.propTypes={backgroundType:n.oneOf(["grid"])},Go.defaultProps={backgroundType:"grid"};var Wo={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1};function Ko(t){var e=document.querySelector(".react-flow").getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}var Zo=e.memo((function(){var t=e.useRef(null),n=It(e.useState(Wo),2),r=n[0],o=n[1],a=mt((function(t){return t.setSelection})),s=mt((function(t){return t.updateSelection})),u=mt((function(t){return t.setNodesSelection}));return e.useEffect((function(){function e(t){var e=Ko(t);o((function(t){return jt({},t,{startX:e.x,startY:e.y,x:e.x,y:e.y,draw:!0})})),a(!0)}function n(t){o((function(e){if(!e.draw)return e;var n=Ko(t),r=n.xe===t.identifier)||t.changedTouches&&(0,Jo.findInArray)(t.changedTouches,t=>e===t.identifier)},e.getTouchIdentifier=function(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier},e.addUserSelectStyles=function(t){if(!t)return;let e=t.getElementById("react-draggable-style-el");e||((e=t.createElement("style")).type="text/css",e.id="react-draggable-style-el",e.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",e.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",t.getElementsByTagName("head")[0].appendChild(e));t.body&&a(t.body,"react-draggable-transparent-selection")},e.removeUserSelectStyles=function(t){try{t&&t.body&&s(t.body,"react-draggable-transparent-selection"),t.selection?t.selection.empty():window.getSelection().removeAllRanges()}catch(t){}},e.styleHacks=function(t={}){return{touchAction:"none",...t}},e.addClassName=a,e.removeClassName=s;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(Qo);let r="";function o(t,e){return r||(r=(0,Jo.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(e){return(0,Jo.isFunction)(t[e])}))),!!(0,Jo.isFunction)(t[r])&&t[r](e)}function i({x:t,y:e},n,r){let o=`translate(${t}${r},${e}${r})`;if(n){o=`translate(${`${"string"==typeof n.x?n.x:n.x+r}`}, ${`${"string"==typeof n.y?n.y:n.y+r}`})`+o}return o}function a(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp(`(?:^|\\s)${e}(?!\\S)`))||(t.className+=` ${e}`)}function s(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(`(?:^|\\s)${e}(?!\\S)`,"g"),"")}}));Ro(ti);ti.matchesSelector,ti.matchesSelectorAndParentsTo,ti.addEvent,ti.removeEvent,ti.outerHeight,ti.outerWidth,ti.innerHeight,ti.innerWidth,ti.offsetXYFromParent,ti.createCSSTransform,ti.createSVGTransform,ti.getTranslation,ti.getTouch,ti.getTouchIdentifier,ti.addUserSelectStyles,ti.removeUserSelectStyles,ti.styleHacks,ti.addClassName,ti.removeClassName;var ei=Xo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getBoundPosition=function(t,e,n){if(!t.props.bounds)return[e,n];let{bounds:r}=t.props;r="string"==typeof r?r:function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}(r);const i=o(t);if("string"==typeof r){const{ownerDocument:t}=i,e=t.defaultView;let n;if(!((n="parent"===r?i.parentNode:t.querySelector(r))instanceof e.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const o=e.getComputedStyle(i),a=e.getComputedStyle(n);r={left:-i.offsetLeft+(0,Jo.int)(a.paddingLeft)+(0,Jo.int)(o.marginLeft),top:-i.offsetTop+(0,Jo.int)(a.paddingTop)+(0,Jo.int)(o.marginTop),right:(0,ti.innerWidth)(n)-(0,ti.outerWidth)(i)-i.offsetLeft+(0,Jo.int)(a.paddingRight)-(0,Jo.int)(o.marginRight),bottom:(0,ti.innerHeight)(n)-(0,ti.outerHeight)(i)-i.offsetTop+(0,Jo.int)(a.paddingBottom)-(0,Jo.int)(o.marginBottom)}}(0,Jo.isNum)(r.right)&&(e=Math.min(e,r.right));(0,Jo.isNum)(r.bottom)&&(n=Math.min(n,r.bottom));(0,Jo.isNum)(r.left)&&(e=Math.max(e,r.left));(0,Jo.isNum)(r.top)&&(n=Math.max(n,r.top));return[e,n]},e.snapToGrid=function(t,e,n){const r=Math.round(e/t[0])*t[0],o=Math.round(n/t[1])*t[1];return[r,o]},e.canDragX=function(t){return"both"===t.props.axis||"x"===t.props.axis},e.canDragY=function(t){return"both"===t.props.axis||"y"===t.props.axis},e.getControlPosition=function(t,e,n){const r="number"==typeof e?(0,ti.getTouch)(t,e):null;if("number"==typeof e&&!r)return null;const i=o(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,ti.offsetXYFromParent)(r||t,a)},e.createCoreData=function(t,e,n){const r=t.state,i=!(0,Jo.isNum)(r.lastX),a=o(t);return i?{node:a,deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:a,deltaX:e-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:n}},e.createDraggableData=function(t,e){const n=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/n,y:t.state.y+e.deltaY/n,deltaX:e.deltaX/n,deltaY:e.deltaY/n,lastX:t.state.x,lastY:t.state.y}};var n=function(t){return t&&t.__esModule?t:{default:t}}(r);function o(t){const e=n.default.findDOMNode(t);if(!e)throw new Error(": Unmounted during event!");return e}}));Ro(ei);ei.getBoundPosition,ei.snapToGrid,ei.canDragX,ei.canDragY,ei.getControlPosition,ei.createCoreData,ei.createDraggableData;var ni=Xo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(...t){process.env.DRAGGABLE_DEBUG&&console.log(...t)}}));Ro(ni);var ri=Xo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=c(i),a=c(n),s=c(r),u=c(ni);function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const f={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let d=f.mouse;class h extends o.default.Component{constructor(...t){super(...t),l(this,"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),l(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;const e=s.default.findDOMNode(this);if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error(" not mounted on DragStart!");const{ownerDocument:n}=e;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!(0,ti.matchesSelectorAndParentsTo)(t.target,this.props.handle,e)||this.props.cancel&&(0,ti.matchesSelectorAndParentsTo)(t.target,this.props.cancel,e))return;const r=(0,ti.getTouchIdentifier)(t);this.setState({touchIdentifier:r});const o=(0,ei.getControlPosition)(t,r,this);if(null==o)return;const{x:i,y:a}=o,c=(0,ei.createCoreData)(this,i,a);(0,u.default)("DraggableCore: handleDragStart: %j",c),(0,u.default)("calling",this.props.onStart),!1!==this.props.onStart(t,c)&&(this.props.enableUserSelectHack&&(0,ti.addUserSelectStyles)(n),this.setState({dragging:!0,lastX:i,lastY:a}),(0,ti.addEvent)(n,d.move,this.handleDrag),(0,ti.addEvent)(n,d.stop,this.handleDragStop))}),l(this,"handleDrag",t=>{"touchmove"===t.type&&t.preventDefault();const e=(0,ei.getControlPosition)(t,this.state.touchIdentifier,this);if(null==e)return;let{x:n,y:r}=e;if(Array.isArray(this.props.grid)){let t=n-this.state.lastX,e=r-this.state.lastY;if([t,e]=(0,ei.snapToGrid)(this.props.grid,t,e),!t&&!e)return;n=this.state.lastX+t,r=this.state.lastY+e}const o=(0,ei.createCoreData)(this,n,r);if((0,u.default)("DraggableCore: handleDrag: %j",o),!1!==this.props.onDrag(t,o))this.setState({lastX:n,lastY:r});else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(t){const e=document.createEvent("MouseEvents");e.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}}),l(this,"handleDragStop",t=>{if(!this.state.dragging)return;const e=(0,ei.getControlPosition)(t,this.state.touchIdentifier,this);if(null==e)return;const{x:n,y:r}=e,o=(0,ei.createCoreData)(this,n,r),i=s.default.findDOMNode(this);i&&this.props.enableUserSelectHack&&(0,ti.removeUserSelectStyles)(i.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",o),this.setState({dragging:!1,lastX:NaN,lastY:NaN}),this.props.onStop(t,o),i&&((0,u.default)("DraggableCore: Removing handlers"),(0,ti.removeEvent)(i.ownerDocument,d.move,this.handleDrag),(0,ti.removeEvent)(i.ownerDocument,d.stop,this.handleDragStop))}),l(this,"onMouseDown",t=>(d=f.mouse,this.handleDragStart(t))),l(this,"onMouseUp",t=>(d=f.mouse,this.handleDragStop(t))),l(this,"onTouchStart",t=>(d=f.touch,this.handleDragStart(t))),l(this,"onTouchEnd",t=>(d=f.touch,this.handleDragStop(t)))}componentWillUnmount(){const t=s.default.findDOMNode(this);if(t){const{ownerDocument:e}=t;(0,ti.removeEvent)(e,f.mouse.move,this.handleDrag),(0,ti.removeEvent)(e,f.touch.move,this.handleDrag),(0,ti.removeEvent)(e,f.mouse.stop,this.handleDragStop),(0,ti.removeEvent)(e,f.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&(0,ti.removeUserSelectStyles)(e)}}render(){return o.default.cloneElement(o.default.Children.only(this.props.children),{style:(0,ti.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}e.default=h,l(h,"displayName","DraggableCore"),l(h,"propTypes",{allowAnyClick:a.default.bool,disabled:a.default.bool,enableUserSelectHack:a.default.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:a.default.arrayOf(a.default.number),handle:a.default.string,cancel:a.default.string,onStart:a.default.func,onDrag:a.default.func,onStop:a.default.func,onMouseDown:a.default.func,className:Jo.dontSetMe,style:Jo.dontSetMe,transform:Jo.dontSetMe}),l(h,"defaultProps",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}})}));Ro(ri);var oi=Xo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=f(i),a=f(n),s=f(r),u=f(Lo),c=f(ri),l=f(ni);function f(t){return t&&t.__esModule?t:{default:t}}function d(){return(d=Object.assign||function(t){for(var e=1;e{if((0,l.default)("Draggable: onDragStart: %j",e),!1===this.props.onStart(t,(0,ei.createDraggableData)(this,e)))return!1;this.setState({dragging:!0,dragged:!0})}),h(this,"onDrag",(t,e)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",e);const n=(0,ei.createDraggableData)(this,e),r={x:n.x,y:n.y};if(this.props.bounds){const{x:t,y:e}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,ei.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(t-r.x),r.slackY=this.state.slackY+(e-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(t,n))return!1;this.setState(r)}),h(this,"onDragStop",(t,e)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(t,(0,ei.createDraggableData)(this,e)))return!1;(0,l.default)("Draggable: onDragStop: %j",e);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:t,y:e}=this.props.position;n.x=t,n.y=e}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},!t.position||t.onDrag||t.onStop||console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&s.default.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}render(){const{axis:t,bounds:e,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:s,position:l,positionOffset:f,scale:h,...p}=this.props;let g={},m=null;const y=!Boolean(l)||this.state.dragging,v=l||r,w={x:(0,ei.canDragX)(this)&&y?this.state.x:v.x,y:(0,ei.canDragY)(this)&&y?this.state.y:v.y};this.state.isElementSVG?m=(0,ti.createSVGTransform)(w,f):g=(0,ti.createCSSTransform)(w,f);const b=(0,u.default)(n.props.className||"",i,{[a]:this.state.dragging,[s]:this.state.dragged});return o.default.createElement(c.default,d({},p,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.default.cloneElement(o.default.Children.only(n),{className:b,style:{...n.props.style,...g},transform:m}))}}e.default=p,h(p,"displayName","Draggable"),h(p,"propTypes",{...c.default.propTypes,axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:Jo.dontSetMe,style:Jo.dontSetMe,transform:Jo.dontSetMe}),h(p,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1})}));Ro(oi);var ii=oi.default,ai=ii,si=ii,ui=ri.default;ai.default=si,ai.DraggableCore=ui;var ci=e.memo((function(){var t=It(e.useState({x:0,y:0}),2),n=t[0],r=t[1],o=It(e.useState({}),2),a=o[0],s=o[1],u=gt((function(t){return{transform:t.transform,selectedNodesBbox:t.selectedNodesBbox,selectedElements:t.selectedElements}})),c=mt((function(t){return t.updateNodePos})),l=It(u.transform,3),f=l[0],d=l[1],h=l[2],p=u.selectedNodesBbox;return i.createElement("div",{className:"react-flow__nodesselection",style:{transform:"translate(".concat(f,"px,").concat(d,"px) scale(").concat(h,")")}},i.createElement(ai,{scale:h,onStart:function(t){var e=t.clientX*(1/h),n=t.clientY*(1/h),o=e-p.x-f,i=n-p.y-d,a=u.selectedElements.filter(No).reduce((function(t,e){var n={x:e.__rg.position.x||e.position.x,y:e.__rg.position.y||e.position.x};return t[e.id]=n,t}),{});r({x:o,y:i}),s(a)},onDrag:function(t){var e=t.clientX*(1/h),r=t.clientY*(1/h);u.selectedElements.filter(No).forEach((function(t){c({id:t.id,pos:{x:a[t.id].x+e-p.x-n.x-f,y:a[t.id].y+r-p.y-n.y-d}})}))}},i.createElement("div",{className:"react-flow__nodesselection-rect",style:{width:u.selectedNodesBbox.width,height:u.selectedNodesBbox.height,top:u.selectedNodesBbox.y,left:u.selectedNodesBbox.x}})))}));function li(t){var n=It(e.useState(!1),2),r=n[0],o=n[1];function i(e){e.keyCode!==t||So(e.target)||o(!0)}var a=function(e){e.keyCode!==t||So(e.target)||o(!1)};return e.useEffect((function(){return window.addEventListener("keydown",i),window.addEventListener("keyup",a),function(){window.removeEventListener("keydown",i),window.removeEventListener("keyup",a)}}),[]),r}var fi=function(){var t,e,n=po,r=go,o=wo,i=yo,a=vo,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=rr,f=Lt("start","zoom","end"),d=500,h=150,p=0;function g(t){t.property("__zoom",mo).on("wheel.zoom",x).on("mousedown.zoom",E).on("dblclick.zoom",S).filter(a).on("touchstart.zoom",P).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new co(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return r===t.x&&o===t.y?t:new co(t.k,r,o)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,o=arguments,i=b(t,o),a=r.apply(t,o),s=null==n?v(a):"function"==typeof n?n.apply(t,o):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),c=t.__zoom,f="function"==typeof e?e.apply(t,o):e,d=l(c.invert(s).concat(u/c.k),f.invert(s).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=u/e[2];t=new co(n,s[0]-e[0]*n,s[1]-e[1]*n)}i.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,i.apply(this,arguments)))),a=nn(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],Ir(this),t.start()}ho(),t.wheel=setTimeout((function(){t.wheel=null,t.end()}),h),t.zoom("mouse",o(y(m(e,r),t.mouse[0],t.mouse[1]),t.extent,u))}}function E(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=Qe(Be.view).on("mousemove.zoom",(function(){if(ho(),!t.moved){var e=Be.clientX-a,n=Be.clientY-s;t.moved=e*e+n*n>p}t.zoom("mouse",o(y(t.that.__zoom,t.mouse[0]=nn(t.that),t.mouse[1]),t.extent,u))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=Qe(t).on("dragstart.drag",null);e&&(r.on("click.drag",on,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(Be.view,t.moved),ho(),t.end()}),!0),i=nn(this),a=Be.clientX,s=Be.clientY;!function(t){var e=t.document.documentElement,n=Qe(t).on("dragstart.drag",on,!0);"onselectstart"in e?n.on("selectstart.drag",on,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(Be.view),fo(),t.mouse=[i,this.__zoom.invert(i)],Ir(this),t.start()}}function S(){if(n.apply(this,arguments)){var t=this.__zoom,e=nn(this),i=t.invert(e),a=t.k*(Be.shiftKey?.5:2),s=o(y(m(t,a),e,i),r.apply(this,arguments),u);ho(),c>0?Qe(this).transition().duration(c).call(w,s,e):Qe(this).call(g.transform,s)}}function P(){if(n.apply(this,arguments)){var e,r,o,i,a=Be.touches,s=a.length,u=b(this,arguments,Be.changedTouches.length===s);for(fo(),r=0;r'})),i.createElement("div",{className:"react-flow__controls-button react-flow__controls-zoomout",onClick:zo},i.createElement("img",{src:''})),i.createElement("div",{className:"react-flow__controls-button react-flow__controls-fitview",onClick:Mo},i.createElement("img",{src:''})))},t.Handle=mi,t.MiniMap=function(t){var n=t.style,r=void 0===n?{}:n,o=t.className,a=t.bgColor,s=void 0===a?"#f8f8f8":a,u=t.nodeColor,c=void 0===u?"#ddd":u,l=e.useRef(null),f=gt((function(t){return{width:t.width,height:t.height,nodes:t.nodes,transform:t.transform}})),d=Lo("react-flow__minimap",o),h=f.nodes.map((function(t){return t.__rg.position})),p=r.width||Ai.width,g=f.height/(f.width||1)*p,m={x:0,y:0,width:f.width,height:f.height},y=p/f.width,v=function(t){return!!(t&&t.constructor&&t.call&&t.apply)}(c)?c:function(){return c};return e.useEffect((function(){if(l){var t=l.current.getContext("2d"),e=Ao(f.nodes,m,f.transform,!0);t.fillStyle=s,t.fillRect(0,0,p,g),e.forEach((function(e){var n=e.__rg.position,r=f.transform[0],o=f.transform[1],i=n.x*f.transform[2]+r,a=n.y*f.transform[2]+o;t.fillStyle=v(e),t.fillRect(i*y,a*y,e.__rg.width*y*f.transform[2],e.__rg.height*y*f.transform[2])}))}}),[h,f.transform,g]),i.createElement("canvas",{style:jt({},Ai,{},r,{height:g}),width:p,height:g,className:d,ref:l})},t.addEdge=function(t,e){if(!t.source||!t.target)throw new Error("Can not create edge. An edge needs a source and a target");return e.concat(jt({},t,{id:Eo(t.id)?t.id:(n=t,"reactflow__edge-".concat(n.source,"-").concat(n.target))}));var n},t.default=Ci,t.getOutgoers=function(t,e){if(!No(t))return[];var n=e.filter((function(e){return e.source===t.id})).map((function(t){return t.target}));return e.filter((function(t){return n.includes(t.id)}))},t.isEdge=ko,t.isNode=No,t.removeElements=function(t,e){var n=t.map((function(t){return t.id}));return e.filter((function(t){return!n.includes(t.id)&&!n.includes(t.target)&&!n.includes(t.source)}))},Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=ReactFlow.min.js.map