this[a+"Scope"]=function(b,c){x(b._katavorioDrag,c,this._dragsByScope,a+"Scope"),x(b._katavorioDrop,c,this._dropsByScope,a+"Scope")}.bind(this),this[a+"DragScope"]=function(b,c){x(b.constructor===F?b:b._katavorioDrag,c,this._dragsByScope,a+"Scope")}.bind(this),this[a+"DropScope"]=function(b,c){x(b.constructor===G?b:b._katavorioDrop,c,this._dropsByScope,a+"Scope")}.bind(this)}.bind(this)),this.snapToGrid=function(a,b){for(varcinthis._dragsByScope)w(this._dragsByScope[c],function(c){c.snap(a,b)})},this.getDragsForScope=function(a){returnthis._dragsByScope[a]},this.getDropsForScope=function(a){returnthis._dropsByScope[a]};varz=function(a,b,c){if(a=J(a),a[b]){vard=f.indexOf(a[b]);d>=0&&f.splice(d,1),j(a[b],c)&&y(a[b],function(a){a.destroy()}),deletea[b]}},B=function(a,b,c,d){a=J(a),a[b]&&a[b].off(c,d)};this.elementRemoved=function(a){this.destroyDraggable(a),this.destroyDroppable(a)},this.destroyDraggable=function(a,b,c){1===arguments.length?z(a,"_katavorioDrag",this._dragsByScope):B(a,"_katavorioDrag",b,c)},this.destroyDroppable=function(a,b,c){1===arguments.length?z(a,"_katavorioDrop",this._dropsByScope):B(a,"_katavorioDrop",b,c)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},f=[],g={},C={}};varC={},D=function(a,c,d){varf=e(c)?c:c.id,g=e(c)?!0:c.active!==!1,h=C[f]||function(){vara={name:f,members:[]};returnC[f]=a,a}();returny(a,function(a){if(a._katavorioDrag){if(d&&null!=a._katavorioDrag.posseRoles[h.name])return;b(h.members,a._katavorioDrag),b(a._katavorioDrag.posses,h.name),a._katavorioDrag.posseRoles[h.name]=g}}),h};this.addToPosse=function(a,b){for(varc=[],d=1;d<arguments.length;d++)c.push(D(a,arguments[d]));return1===c.length?c[0]:c},this.setPosse=function(a,b){for(varc=[],e=1;e<arguments.length;e++)c.push(D(a,arguments[e],!0).name);returny(a,function(a){if(a._katavorioDrag){varb=d(a._katavorioDrag.posses,c),e=[];Array.prototype.push.apply(e,a._katavorioDrag.posses);for(varf=0;f<b.length;f++)this.removeFromPosse(a,b[f])}}.bind(this)),1===c.length?c[0]:c},this.removeFromPosse=function(a,b){if(arguments.length<2)thrownewTypeError("No posse id provided for remove operation");for(vard=1;d<arguments.length;d++)b=arguments[d],y(a,function(a){if(a._katavorioDrag&&a._katavorioDrag.posses){vard=a._katavorioDrag;y(b,function(a){c(C[a].members,d),c(d.posses,a),deleted.posseRoles[a]})}})},this.removeFromAllPosses=function(a){y(a,function(a){if(a._katavorioDrag&&a._katavorioDrag.posses){varb=a._katavorioDrag;y(b.posses,function(a){c(C[a].members,b)}),b.posses.length=0,b.posseRoles={}}})},this.setPosseState=function(a,b,c){vard=C[b];d&&y(a,function(a){a._katavorioDrag&&a._katavorioDrag.posses&&(a._katavorioDrag.posseRoles[d.name]=c)})}},a.Katavorio.version="1.0.0","undefined"!=typeofexports&&(exports.Katavorio=a.Katavorio)}.call("undefined"!=typeofwindow?window:this),function(){functiona(a){return"[object Array]"===Object.prototype.toString.call(a)}functionb(a){return"[object Number]"===Object.prototype.toString.call(a)}functionc(a){return"string"==typeofa}functiond(a){return"boolean"==typeofa}functione(a){returnnull==a}functionf(a){returnnull==a?!1:"[object Object]"===Object.prototype.toString.call(a)}functiong(a){return"[object Date]"===Object.prototype.toString.call(a)}functionh(a){return"[object Function]"===Object.prototype.toString.call(a)}functioni(a){returnh(a)&&null!=a.name&&a.name.length>0}functionj(a){for(varbina)if(a.hasOwnProperty(b))return!1;return!0}functionk(b){if(c(b))return""+b;if(d(b))return!!b;if(g(b))returnnewDate(b.getTime());if(h(b))returnb;if(a(b)){for(vare=[],i=0;i<b.length;i++)e.push(k(b[i]));returne}if(f(b)){varj={};for(varlinb)j[l]=k(b[l]);returnj}returnb}functionl(b,e,g,h){vari,j,l={},m={};for(g=g||[],h=h||[],j=0;j<g.length;j++)l[g[j]]=!0;for(j=0;j<h.length;j++)m[h[j]]=!0;varn=k(b);for(jine)if(null==n[j]||m[j])n[j]=e[j];elseif(c(e[j])||d(e[j]))l[j]?(i=[],i.push.apply(i,a(n[j])?n[j]:[n[j]]),i.push.apply(i,d(e[j])?e[j]:[e[j]]),n[j]=i):n[j]=e[j];elseif(a(e[j]))i=[],a(n[j])&&i.push.apply(i,n[j]),i.push.apply(i,e[j]),n[j]=
varc=i.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"-"+this._jsPlumb.currentAnchorClass:"");this.removeClass(a),this.addClass(c),b.updateClasses(this.element,c,a)}.bind(this);this.prepareAnchor=function(a){varb=this._jsPlumb.instance.makeAnchor(a,this.elementId,i);returnb.bind("anchorChanged",function(a){this.fire("anchorChanged",{endpoint:this,anchor:a}),n()}.bind(this)),b},this.setPreparedAnchor=function(a,b){returnthis._jsPlumb.instance.continuousAnchorFactory.clear(this.elementId),this.anchor=a,n(),b||this._jsPlumb.instance.repaint(this.elementId),this},this.setAnchor=function(a,b){varc=this.prepareAnchor(a);returnthis.setPreparedAnchor(c,b),this};varo=function(a){if(this.connections.length>0)for(varb=0;b<this.connections.length;b++)this.connections[b].setHover(a,!1);elsethis.setHover(a)}.bind(this);this.bind("mouseover",function(){o(!0)}),this.bind("mouseout",function(){o(!1)}),a._transient||this._jsPlumb.instance.anchorManager.add(this,this.elementId),this.prepareEndpoint=function(d,e){varf,g=function(a,c){vard=i.getRenderMode();if(b.Endpoints[d][a])returnnewb.Endpoints[d][a](c);if(!i.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown endpoint type '"+a+"'"}},h={_jsPlumb:this._jsPlumb.instance,cssClass:a.cssClass,container:a.container,tooltip:a.tooltip,connectorTooltip:a.connectorTooltip,endpoint:this};returnc.isString(d)?f=g(d,h):c.isArray(d)?(h=c.merge(d[1],h),f=g(d[0],h)):f=d.clone(),f.clone=function(){returnc.isString(d)?g(d,h):c.isArray(d)?(h=c.merge(d[1],h),g(d[0],h)):void0}.bind(this),f.typeId=e,f},this.setEndpoint=function(a,b){varc=this.prepareEndpoint(a);this.setPreparedEndpoint(c,!0)},this.setPreparedEndpoint=function(a,b){null!=this.endpoint&&(this.endpoint.cleanup(),this.endpoint.destroy()),this.endpoint=a,this.type=this.endpoint.type,this.canvas=this.endpoint.canvas},b.extend(this,a,g),this.isSource=a.isSource||!1,this.isTemporarySource=a.isTemporarySource||!1,this.isTarget=a.isTarget||!1,this.connections=a.connections||[],this.connectorPointerEvents=a["connector-pointer-events"],this.scope=a.scope||i.getDefaultScope(),this.timestamp=null,this.reattachConnections=a.reattach||i.Defaults.ReattachConnections,this.connectionsDetachable=i.Defaults.ConnectionsDetachable,(a.connectionsDetachable===!1||a.detachable===!1)&&(this.connectionsDetachable=!1),this.dragAllowedWhenFull=a.dragAllowedWhenFull!==!1,a.onMaxConnections&&this.bind("maxConnections",a.onMaxConnections),this.addConnection=function(a){this.connections.push(a),this[(this.connections.length>0?"add":"remove")+"Class"](i.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](i.endpointFullClass)},this.detachFromConnection=function(a,b,c){b=null==b?this.connections.indexOf(a):b,b>=0&&(this.connections.splice(b,1),this[(this.connections.length>0?"add":"remove")+"Class"](i.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](i.endpointFullClass)),!c&&m&&0===this.connections.length&&i.deleteObject({endpoint:this,fireEvent:!1,deleteAttachedObjects:c!==!0})},this.deleteEveryConnection=function(a){for(varb=this.connections.length,c=0;b>c;c++)i.deleteConnection(this.connections[0],a)},this.detachFrom=function(a,b,c){for(vard=[],e=0;e<this.connections.length;e++)(this.connections[e].endpoints[1]===a||this.connections[e].endpoints[0]===a)&&d.push(this.connections[e]);for(varf=0,g=d.length;g>f;f++)i.deleteConnection(d[0]);returnthis},this.getElement=function(){returnthis.element},this.setElement=function(d){vare=this._jsPlumb.instance.getId(d),f=this.elementId;returnc.removeWithFunction(a.endpointsByElement[this.elementId],function(a){returna.id===this.id}.bind(this)),this.element=b.getElement(d),this.elementId=i.getId(this.element),i.anchorManager.rehomeEndpoint(this,f,this.element),i.dragManager.endpointAdded(this.element),c.addToList(a.endpointsByElement,e,this),this},this.makeInPlaceCopy=function(){varb=this.anchor.getCurrentLocation({element:this}),c=this.anchor.getOrientation(this),d=this.anchor.getCssClass(),e={bind:function(){},compute:function(){return[b[0],b[1]]},getCurrent