n8n-editor-ui
Version:
Workflow Editor UI for n8n
1 lines • 1.96 MB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"032a":function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"032e":function(e,t,n){"use strict";var r=n("3f48"),i=n("4a86"),o=n("4367"),a=n("aafc"),s=n("7868"),l=n("d335"),u=n("a505");e.exports=function(e){return new Promise((function(t,c){var d=e.data,h=e.headers;r.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",_=e.auth.password||"";h.Authorization="Basic "+btoa(p+":"+_)}var m=a(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),o(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?f.response:f.responseText,o={data:r,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};i(t,c,o),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var g=n("ca6e"),v=(e.withCredentials||l(m))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(h[e.xsrfHeaderName]=v)}if("setRequestHeader"in f&&r.forEach(h,(function(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete h[t]:f.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(b){if("json"!==e.responseType)throw b}"function"===typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===d&&(d=null),f.send(d)}))}},"0369":function(e,t,n){(function(){"undefined"==typeof Math.sgn&&(Math.sgn=function(e){return 0==e?0:e>0?1:-1});var e={subtract:function(e,t){return{x:e.x-t.x,y:e.y-t.y}},dotProduct:function(e,t){return e.x*t.x+e.y*t.y},square:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},scale:function(e,t){return{x:e.x*t,y:e.y*t}}},n=64,r=Math.pow(2,-n-1),i=function(t,n){for(var r=[],i=a(t,n),o=n.length-1,l=2*o-1,u=s(i,l,r,0),c=e.subtract(t,n[0]),h=e.square(c),f=0,p=0;p<u;p++){c=e.subtract(t,d(n,o,r[p],null,null));var _=e.square(c);_<h&&(h=_,f=r[p])}return c=e.subtract(t,n[o]),_=e.square(c),_<h&&(h=_,f=1),{location:f,distance:h}},o=function(e,t){var n=i(e,t);return{point:d(t,t.length-1,n.location,null,null),location:n.location}},a=function(t,n){for(var r=n.length-1,i=2*r-1,o=[],a=[],s=[],l=[],u=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],c=0;c<=r;c++)o[c]=e.subtract(n[c],t);for(c=0;c<=r-1;c++)a[c]=e.subtract(n[c+1],n[c]),a[c]=e.scale(a[c],3);for(var d=0;d<=r-1;d++)for(var h=0;h<=r;h++)s[d]||(s[d]=[]),s[d][h]=e.dotProduct(a[d],o[h]);for(c=0;c<=i;c++)l[c]||(l[c]=[]),l[c].y=0,l[c].x=parseFloat(c)/i;for(var f=r,p=r-1,_=0;_<=f+p;_++){var m=Math.max(0,_-p),g=Math.min(_,f);for(c=m;c<=g;c++){var v=_-c;l[c+v].y+=s[v][c]*u[v][c]}}return l},s=function(e,t,r,i){var o,a,h=[],f=[],p=[],_=[];switch(l(e,t)){case 0:return 0;case 1:if(i>=n)return r[0]=(e[0].x+e[t].x)/2,1;if(u(e,t))return r[0]=c(e,t),1;break}d(e,t,.5,h,f),o=s(h,t,p,i+1),a=s(f,t,_,i+1);for(var m=0;m<o;m++)r[m]=p[m];for(m=0;m<a;m++)r[m+o]=_[m];return o+a},l=function(e,t){var n,r,i=0;n=r=Math.sgn(e[0].y);for(var o=1;o<=t;o++)n=Math.sgn(e[o].y),n!=r&&i++,r=n;return i},u=function(e,t){var n,i,o,a,s,l,u,c,d,h,f,p,_,m,g,v,b,y;l=e[0].y-e[t].y,u=e[t].x-e[0].x,c=e[0].x*e[t].y-e[t].x*e[0].y,b=y=0;for(var x=1;x<t;x++){var w=l*e[x].x+u*e[x].y+c;w>b?b=w:w<y&&(y=w)}return f=0,p=1,_=0,m=l,g=u,v=c-b,d=f*g-m*p,h=1/d,i=(p*v-g*_)*h,m=l,g=u,v=c-y,d=f*g-m*p,h=1/d,o=(p*v-g*_)*h,a=Math.min(i,o),s=Math.max(i,o),n=s-a,n<r?1:0},c=function(e,t){var n=1,r=0,i=e[t].x-e[0].x,o=e[t].y-e[0].y,a=e[0].x-0,s=e[0].y-0,l=i*r-o*n,u=1/l,c=(i*s-o*a)*u;return 0+n*c},d=function(e,t,n,r,i){for(var o=[[]],a=0;a<=t;a++)o[0][a]=e[a];for(var s=1;s<=t;s++)for(a=0;a<=t-s;a++)o[s]||(o[s]=[]),o[s][a]||(o[s][a]={}),o[s][a].x=(1-n)*o[s-1][a].x+n*o[s-1][a+1].x,o[s][a].y=(1-n)*o[s-1][a].y+n*o[s-1][a+1].y;if(null!=r)for(a=0;a<=t;a++)r[a]=o[a][0];if(null!=i)for(a=0;a<=t;a++)i[a]=o[t-a][a];return o[t][0]},h={},f=function(e){var t=h[e];if(!t){t=[];var n=function(){return function(t){return Math.pow(t,e)}},r=function(){return function(t){return Math.pow(1-t,e)}},i=function(e){return function(t){return e}},o=function(){return function(e){return e}},a=function(){return function(e){return 1-e}},s=function(e){return function(t){for(var n=1,r=0;r<e.length;r++)n*=e[r](t);return n}};t.push(new n);for(var l=1;l<e;l++){for(var u=[new i(e)],c=0;c<e-l;c++)u.push(new o);for(c=0;c<l;c++)u.push(new a);t.push(new s(u))}t.push(new r),h[e]=t}return t},p=function(e,t){for(var n=f(e.length-1),r=0,i=0,o=0;o<e.length;o++)r+=e[o].x*n[o](t),i+=e[o].y*n[o](t);return{x:r,y:i}},_=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},m=function(e){return e[0].x===e[1].x&&e[0].y===e[1].y},g=function(e,t,n){if(m(e))return{point:e[0],location:t};var r=p(e,t),i=0,o=t,a=n>0?1:-1,s=null;while(i<Math.abs(n))o+=.005*a,s=p(e,o),i+=_(s,r),r=s;return{point:s,location:o}},v=function(e){var t=(new Date).getTime();if(m(e))return 0;var n=p(e,0),r=0,i=0,o=1,a=null;while(i<1)i+=.005*o,a=p(e,i),r+=_(a,n),n=a;return console.log("length",(new Date).getTime()-t),r},b=function(e,t,n){return g(e,t,n).point},y=function(e,t,n){return g(e,t,n).location},x=function(e,t){var n=p(e,t),r=p(e.slice(0,e.length-1),t),i=r.y-n.y,o=r.x-n.x;return 0===i?1/0:Math.atan(i/o)},w=function(e,t,n){var r=g(e,t,n);return r.location>1&&(r.location=1),r.location<0&&(r.location=0),x(e,r.location)},E=function(e,t,n,r){r=null==r?0:r;var i=g(e,t,r),o=x(e,i.location),a=Math.atan(-1/o),s=n/2*Math.sin(a),l=n/2*Math.cos(a);return[{x:i.point.x+l,y:i.point.y+s},{x:i.point.x-l,y:i.point.y-s}]},k=function(e,t,n,r,i){var o=r-t,a=e-n,s=e*(t-r)+t*(n-e),l=D(i),u=[o*l[0][0]+a*l[1][0],o*l[0][1]+a*l[1][1],o*l[0][2]+a*l[1][2],o*l[0][3]+a*l[1][3]+s],c=M.apply(null,u),d=[];if(null!=c)for(var h=0;h<3;h++){var f,p=c[h],_=Math.pow(p,2),m=Math.pow(p,3),g=[l[0][0]*m+l[0][1]*_+l[0][2]*p+l[0][3],l[1][0]*m+l[1][1]*_+l[1][2]*p+l[1][3]];f=n-e!==0?(g[0]-e)/(n-e):(g[1]-t)/(r-t),p>=0&&p<=1&&f>=0&&f<=1&&d.push(g)}return d},C=function(e,t,n,r,i){var o=[];return o.push.apply(o,k(e,t,e+n,t,i)),o.push.apply(o,k(e+n,t,e+n,t+r,i)),o.push.apply(o,k(e+n,t+r,e,t+r,i)),o.push.apply(o,k(e,t+r,e,t,i)),o},O=function(e,t){var n=[];return n.push.apply(n,k(e.x,e.y,e.x+e.w,e.y,t)),n.push.apply(n,k(e.x+e.w,e.y,e.x+e.w,e.y+e.h,t)),n.push.apply(n,k(e.x+e.w,e.y+e.h,e.x,e.y+e.h,t)),n.push.apply(n,k(e.x,e.y+e.h,e.x,e.y,t)),n};function P(e,t){return[-e[0][t]+3*e[1][t]+-3*e[2][t]+e[3][t],3*e[0][t]-6*e[1][t]+3*e[2][t],-3*e[0][t]+3*e[1][t],e[0][t]]}function D(e){return[P(e,"x"),P(e,"y")]}function S(e){return e<0?-1:e>0?1:0}function M(e,t,n,r){var i,o,a=t/e,s=n/e,l=r/e,u=(3*s-Math.pow(a,2))/9,c=(9*a*s-27*l-2*Math.pow(a,3))/54,d=Math.pow(u,3)+Math.pow(c,2),h=[];if(d>=0)i=S(c+Math.sqrt(d))*Math.pow(Math.abs(c+Math.sqrt(d)),1/3),o=S(c-Math.sqrt(d))*Math.pow(Math.abs(c-Math.sqrt(d)),1/3),h[0]=-a/3+(i+o),h[1]=-a/3-(i+o)/2,h[2]=-a/3-(i+o)/2,0!==Math.abs(Math.sqrt(3)*(i-o)/2)&&(h[1]=-1,h[2]=-1);else{var f=Math.acos(c/Math.sqrt(-Math.pow(u,3)));h[0]=2*Math.sqrt(-u)*Math.cos(f/3)-a/3,h[1]=2*Math.sqrt(-u)*Math.cos((f+2*Math.PI)/3)-a/3,h[2]=2*Math.sqrt(-u)*Math.cos((f+4*Math.PI)/3)-a/3}for(var p=0;p<3;p++)(h[p]<0||h[p]>1)&&(h[p]=-1);return h}var A=this.jsBezier={distanceFromCurve:i,gradientAtPoint:x,gradientAtPointAlongCurveFrom:w,nearestPointOnCurve:o,pointOnCurve:p,pointAlongCurveFrom:b,perpendicularToCurveAt:E,locationAlongCurveFrom:y,getLength:v,lineIntersection:k,boxIntersection:C,boundingBoxIntersection:O,version:"0.9.0"};t.jsBezier=A}).call("undefined"!==typeof window?window:this),function(){"use strict";var e=this,n=e.Biltong={version:"0.4.0"};t.Biltong=n;var r=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e,t,n){return e=r(e)?e:[e.x,e.y],t=r(t)?t:[t.x,t.y],n(e,t)},o=n.gradient=function(e,t){return i(e,t,(function(e,t){return t[0]==e[0]?t[1]>e[1]?1/0:-1/0:t[1]==e[1]?t[0]>e[0]?0:-0:(t[1]-e[1])/(t[0]-e[0])}))},a=(n.normal=function(e,t){return-1/o(e,t)},n.lineLength=function(e,t){return i(e,t,(function(e,t){return Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2))}))},n.quadrant=function(e,t){return i(e,t,(function(e,t){return t[0]>e[0]||t[0]==e[0]?t[1]>e[1]?2:1:t[1]>e[1]?3:4}))}),s=(n.theta=function(e,t){return i(e,t,(function(e,t){var n=o(e,t),r=Math.atan(n),i=a(e,t);return 4!=i&&3!=i||(r+=Math.PI),r<0&&(r+=2*Math.PI),r}))},n.intersects=function(e,t){var n=e.x,r=e.x+e.w,i=e.y,o=e.y+e.h,a=t.x,s=t.x+t.w,l=t.y,u=t.y+t.h;return n<=a&&a<=r&&i<=l&&l<=o||n<=s&&s<=r&&i<=l&&l<=o||n<=a&&a<=r&&i<=u&&u<=o||n<=s&&a<=r&&i<=u&&u<=o||a<=n&&n<=s&&l<=i&&i<=u||a<=r&&r<=s&&l<=i&&i<=u||a<=n&&n<=s&&l<=o&&o<=u||a<=r&&n<=s&&l<=o&&o<=u},n.encloses=function(e,t,n){var r=e.x,i=e.x+e.w,o=e.y,a=e.y+e.h,s=t.x,l=t.x+t.w,u=t.y,c=t.y+t.h,d=function(e,t,r,i){return n?e<=t&&r>=i:e<t&&r>i};return d(r,s,i,l)&&d(o,u,a,c)},[null,[1,-1],[1,1],[-1,1],[-1,-1]]),l=[null,[-1,-1],[-1,1],[1,1],[1,-1]];n.pointOnLine=function(e,t,n){var r=o(e,t),i=a(e,t),u=n>0?s[i]:l[i],c=Math.atan(r),d=Math.abs(n*Math.sin(c))*u[1],h=Math.abs(n*Math.cos(c))*u[0];return{x:e.x+h,y:e.y+d}},n.perpendicularLineTo=function(e,t,n){var r=o(e,t),i=Math.atan(-1/r),a=n/2*Math.sin(i),s=n/2*Math.cos(i);return[{x:t.x+s,y:t.y+a},{x:t.x-s,y:t.y-a}]}}.call("undefined"!==typeof window?window:this),function(){"use strict";function e(e,t,n,r,i,o,a,s){return new Touch({target:t,identifier:B(),pageX:n,pageY:r,screenX:i,screenY:o,clientX:a||i,clientY:s||o})}function n(){var e=[];return Array.prototype.push.apply(e,arguments),e.item=function(e){return this[e]},e}function r(t,r,i,o,a,s,l,u){return n(e.apply(null,arguments))}var i=this,o=function(e,t,n){n=n||e.parentNode;for(var r=n.querySelectorAll(t),i=0;i<r.length;i++)if(r[i]===e)return!0;return!1},a=function(e){return"string"==typeof e||e.constructor===String?document.getElementById(e):e},s=function(e){return e.srcElement||e.target},l=function(e,t,n,r){if(r){if("undefined"!==typeof e.path&&e.path.indexOf)return{path:e.path,end:e.path.indexOf(n)};var i={path:[],end:-1},o=function(e){i.path.push(e),e===n?i.end=i.path.length-1:null!=e.parentNode&&o(e.parentNode)};return o(t),i}return{path:[t],end:1}},u=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]==t)break;n<e.length&&e.splice(n,1)},c=1,d=function(e,t,n){var r=c++;return e.__ta=e.__ta||{},e.__ta[t]=e.__ta[t]||{},e.__ta[t][r]=n,n.__tauid=r,r},h=function(e,t,n){if(e.__ta&&e.__ta[t]&&delete e.__ta[t][n.__tauid],n.__taExtra){for(var r=0;r<n.__taExtra.length;r++)j(e,n.__taExtra[r][0],n.__taExtra[r][1]);n.__taExtra.length=0}n.__taUnstore&&n.__taUnstore()},f=function(e,t,n,r){if(null==e)return n;var i=e.split(","),a=function(r){a.__tauid=n.__tauid;var u=s(r),c=u,d=l(r,u,t,null!=e);if(-1!=d.end)for(var h=0;h<d.end;h++){c=d.path[h];for(var f=0;f<i.length;f++)o(c,i[f],t)&&n.apply(c,arguments)}};return p(n,r,a),a},p=function(e,t,n){e.__taExtra=e.__taExtra||[],e.__taExtra.push([t,n])},_=function(e,t,n,r){if(x&&E[t]){var i=f(r,e,n,E[t]);I(e,E[t],i,n)}"focus"===t&&null==e.getAttribute("tabindex")&&e.setAttribute("tabindex","1"),I(e,t,f(r,e,n,t),n)},m=function(e,t,n,r){if(null==e.__taSmartClicks){var i=function(t){e.__tad=P(t)},o=function(t){e.__tau=P(t)},a=function(t){if(e.__tad&&e.__tau&&e.__tad[0]===e.__tau[0]&&e.__tad[1]===e.__tau[1])for(var n=0;n<e.__taSmartClicks.length;n++)e.__taSmartClicks[n].apply(s(t),[t])};_(e,"mousedown",i,r),_(e,"mouseup",o,r),_(e,"click",a,r),e.__taSmartClicks=[]}e.__taSmartClicks.push(n),n.__taUnstore=function(){u(e.__taSmartClicks,n)}},g={tap:{touches:1,taps:1},dbltap:{touches:1,taps:2},contextmenu:{touches:2,taps:1}},v=function(e,t){return function(n,r,i,a){if("contextmenu"==r&&w)_(n,r,i,a);else{if(null==n.__taTapHandler){var c=n.__taTapHandler={tap:[],dbltap:[],contextmenu:[],down:!1,taps:0,downSelectors:[]},d=function(r){for(var i=s(r),u=l(r,i,n,null!=a),d=!1,h=0;h<u.end;h++){if(d)return;i=u.path[h];for(var _=0;_<c.downSelectors.length;_++)if(null==c.downSelectors[_]||o(i,c.downSelectors[_],n)){c.down=!0,setTimeout(f,e),setTimeout(p,t),d=!0;break}}},h=function(e){if(c.down){var t,r,i=s(e);c.taps++;var a=T(e);for(var u in g)if(g.hasOwnProperty(u)){var d=g[u];if(d.touches===a&&(1===d.taps||d.taps===c.taps))for(var h=0;h<c[u].length;h++){r=l(e,i,n,null!=c[u][h][1]);for(var f=0;f<r.end;f++)if(t=r.path[f],null==c[u][h][1]||o(t,c[u][h][1],n)){c[u][h][0].apply(t,[e]);break}}}}},f=function(){c.down=!1},p=function(){c.taps=0};_(n,"mousedown",d),_(n,"mouseup",h)}n.__taTapHandler.downSelectors.push(a),n.__taTapHandler[r].push([i,a]),i.__taUnstore=function(){u(n.__taTapHandler[r],i)}}}},b=function(e,t,n,r){for(var i in n.__tamee[e])n.__tamee[e].hasOwnProperty(i)&&n.__tamee[e][i].apply(r,[t])},y=function(){var e=[];return function(t,n,r,i){if(!t.__tamee){t.__tamee={over:!1,mouseenter:[],mouseexit:[]};var a=function(n){var r=s(n);(null==i&&r==t&&!t.__tamee.over||o(r,i,t)&&(null==r.__tamee||!r.__tamee.over))&&(b("mouseenter",n,t,r),r.__tamee=r.__tamee||{},r.__tamee.over=!0,e.push(r))},l=function(n){for(var r=s(n),i=0;i<e.length;i++)r!=e[i]||o(n.relatedTarget||n.toElement,"*",r)||(r.__tamee.over=!1,e.splice(i,1),b("mouseexit",n,t,r))};I(t,"mouseover",f(i,t,a,"mouseover"),a),I(t,"mouseout",f(i,t,l,"mouseout"),l)}r.__taUnstore=function(){delete t.__tamee[n][r.__tauid]},d(t,n,r),t.__tamee[n][r.__tauid]=r}},x="ontouchstart"in document.documentElement||navigator.maxTouchPoints,w="onmousedown"in document.documentElement,E={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},k=function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}return e}(),C=k>-1&&k<9,O=function(e,t){if(null==e)return[0,0];var n=A(e),r=M(n,0);return[r[t+"X"],r[t+"Y"]]},P=function(e){return null==e?[0,0]:C?[e.clientX+document.documentElement.scrollLeft,e.clientY+document.documentElement.scrollTop]:O(e,"page")},D=function(e){return O(e,"screen")},S=function(e){return O(e,"client")},M=function(e,t){return e.item?e.item(t):e[t]},A=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},T=function(e){return A(e).length},I=function(e,t,n,r){if(d(e,t,n),r.__tauid=n.__tauid,e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent){var i=t+n.__tauid;e["e"+i]=n,e[i]=function(){e["e"+i]&&e["e"+i](window.event)},e.attachEvent("on"+t,e[i])}},j=function(e,t,n){null!=n&&L(e,(function(){var r=a(this);if(h(r,t,n),null!=n.__tauid)if(r.removeEventListener)r.removeEventListener(t,n,!1),x&&E[t]&&r.removeEventListener(E[t],n,!1);else if(this.detachEvent){var i=t+n.__tauid;r[i]&&r.detachEvent("on"+t,r[i]),r[i]=null,r["e"+i]=null}n.__taTouchProxy&&j(e,n.__taTouchProxy[1],n.__taTouchProxy[0])}))},L=function(e,t){if(null!=e){e="undefined"!==typeof Window&&"unknown"!==typeof e.top&&e==e.top?[e]:"string"!==typeof e&&null==e.tagName&&null!=e.length?e:"string"===typeof e?document.querySelectorAll(e):[e];for(var n=0;n<e.length;n++)t.apply(e[n])}},B=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)}))};i.Mottle=function(e){e=e||{};var t=e.clickThreshold||250,n=e.dblClickThreshold||450,i=new y,o=new v(t,n),s=e.smartClicks,l=function(e,t,n,r){null!=n&&L(e,(function(){var e=a(this);s&&"click"===t?m(e,t,n,r):"tap"===t||"dbltap"===t||"contextmenu"===t?o(e,t,n,r):"mouseenter"===t||"mouseexit"==t?i(e,t,n,r):_(e,t,n,r)}))};this.remove=function(e){return L(e,(function(){var e=a(this);if(e.__ta)for(var t in e.__ta)if(e.__ta.hasOwnProperty(t))for(var n in e.__ta[t])e.__ta[t].hasOwnProperty(n)&&j(e,t,e.__ta[t][n]);e.parentNode&&e.parentNode.removeChild(e)})),this},this.on=function(e,t,n,r){var i=arguments[0],o=4==arguments.length?arguments[2]:null,a=arguments[1],s=arguments[arguments.length-1];return l(i,a,s,o),this},this.off=function(e,t,n){return j(e,t,n),this},this.trigger=function(e,t,n,i){var o=w&&("undefined"===typeof MouseEvent||null==n||n.constructor===MouseEvent),s=x&&!w&&E[t]?E[t]:t,l=!(x&&!w&&E[t]),u=P(n),c=D(n),d=S(n);return L(e,(function(){var e,h=a(this);n=n||{screenX:c[0],screenY:c[1],clientX:d[0],clientY:d[1]};var f=function(e){i&&(e.payload=i)},p={TouchEvent:function(e){var t=r(window,h,0,u[0],u[1],c[0],c[1],d[0],d[1]),n=e.initTouchEvent||e.initEvent;n(s,!0,!0,window,null,c[0],c[1],d[0],d[1],!1,!1,!1,!1,t,t,t,1,0)},MouseEvents:function(e){e.initMouseEvent(s,!0,!0,window,0,c[0],c[1],d[0],d[1],!1,!1,!1,!1,1,h)}};if(document.createEvent){var _=!l&&!o&&x&&E[t],m=_?"TouchEvent":"MouseEvents";e=document.createEvent(m),p[m](e),f(e),h.dispatchEvent(e)}else document.createEventObject&&(e=document.createEventObject(),e.eventType=e.eventName=s,e.screenX=c[0],e.screenY=c[1],e.clientX=d[0],e.clientY=d[1],f(e),h.fireEvent("on"+s,e))})),this}},i.Mottle.consume=function(e,t){e.stopPropagation?e.stopPropagation():e.returnValue=!1,!t&&e.preventDefault&&e.preventDefault()},i.Mottle.pageLocation=P,i.Mottle.setForceTouchEvents=function(e){x=e},i.Mottle.setForceMouseEvents=function(e){w=e},i.Mottle.version="0.8.0",t.Mottle=i.Mottle}.call("undefined"===typeof window?this:window),function(){"use strict";var e=this,n=function(e,t,n){return-1===e.indexOf(t)&&(n?e.unshift(t):e.push(t),!0)},r=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)},i=function(e,t){for(var n=[],r=0;r<e.length;r++)-1===t.indexOf(e[r])&&n.push(e[r]);return n},o=function(e){return null!=e&&("string"===typeof e||e.constructor===String)},a=function(e){var t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,i=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft,a=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0,l=t.top+i-a,u=t.left+o-s;return{top:Math.round(l),left:Math.round(u)}},s=function(e,t,n){n=n||e.parentNode;for(var r=n.querySelectorAll(t),i=0;i<r.length;i++)if(r[i]===e)return!0;return!1},l=function(e,t,n){if(s(t,n,e))return t;var r=t.parentNode;while(null!=r&&r!==e){if(s(r,n,e))return r;r=r.parentNode}},u=function(e,t,n){for(var r=null,i=t.getAttribute("katavorio-draggable"),o=null!=i?"[katavorio-draggable='"+i+"'] ":"",a=0;a<e.length;a++)if(r=l(t,n,o+e[a].selector),null!=r){if(e[a].filter){var u=s(n,e[a].filter,r),c=!0===e[a].filterExclude;if(c&&!u||u)return null}return[e[a],r]}return null},c=function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}return e}(),d=10,h=10,f=c>-1&&c<9,p=9===c,_=function(e){if(f)return[e.clientX+document.documentElement.scrollLeft,e.clientY+document.documentElement.scrollTop];var t=g(e),n=m(t,0);return p?[n.pageX||n.clientX,n.pageY||n.clientY]:[n.pageX,n.pageY]},m=function(e,t){return e.item?e.item(t):e[t]},g=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},v={delegatedDraggable:"katavorio-delegated-draggable",draggable:"katavorio-draggable",droppable:"katavorio-droppable",drag:"katavorio-drag",selected:"katavorio-drag-selected",active:"katavorio-drag-active",hover:"katavorio-drag-hover",noSelect:"katavorio-drag-no-select",ghostProxy:"katavorio-ghost-proxy",clonedDrag:"katavorio-clone-drag"},b="katavorio-drag-scope",y=["stop","start","drag","drop","over","out","beforeStart"],x=function(){},w=function(){return!0},E=function(e,t,n){for(var r=0;r<e.length;r++)e[r]!=n&&t(e[r])},k=function(e,t,n,r){E(e,(function(e){e.setActive(t),t&&e.updatePosition(),n&&e.setHover(r,t)}))},C=function(e,t){if(null!=e){e=o(e)||null!=e.tagName||null==e.length?[e]:e;for(var n=0;n<e.length;n++)t.apply(e[n],[e[n]])}},O=function(e){e.stopPropagation?(e.stopPropagation(),e.preventDefault()):e.returnValue=!1},P="input,textarea,select,button,option",D=function(e,t,n){var r=e.srcElement||e.target;return!s(r,n.getInputFilterSelector(),t)},S=function(e,t,n,r){this.params=t||{},this.el=e,this.params.addClass(this.el,this._class),this.uuid=j();var i=!0;return this.setEnabled=function(e){i=e},this.isEnabled=function(){return i},this.toggleEnabled=function(){i=!i},this.setScope=function(e){this.scopes=e?e.split(/\s+/):[r]},this.addScope=function(e){var t={};for(var n in C(this.scopes,(function(e){t[e]=!0})),C(e?e.split(/\s+/):[],(function(e){t[e]=!0})),this.scopes=[],t)this.scopes.push(n)},this.removeScope=function(e){var t={};for(var n in C(this.scopes,(function(e){t[e]=!0})),C(e?e.split(/\s+/):[],(function(e){delete t[e]})),this.scopes=[],t)this.scopes.push(n)},this.toggleScope=function(e){var t={};for(var n in C(this.scopes,(function(e){t[e]=!0})),C(e?e.split(/\s+/):[],(function(e){t[e]?delete t[e]:t[e]=!0})),this.scopes=[],t)this.scopes.push(n)},this.setScope(t.scope),this.k=t.katavorio,t.katavorio},M=function(){return!0},A=function(){return!1},T=function(e,t,n,r){this._class=n.draggable;var i=S.apply(this,arguments);this.rightButtonCanDrag=this.params.rightButtonCanDrag;var l,c,f,p,m,g,b=[0,0],y=null,x=null,E=[0,0],C=!1,P=[0,0],T=!1!==this.params.consumeStartEvent,I=this.el,B=this.params.clone,N=(this.params.scroll,!1!==t.multipleDrop),R=!1,$=null,q=[],U=null,F=t.ghostProxyParent;if(l=!0===t.ghostProxy?M:t.ghostProxy&&"function"===typeof t.ghostProxy?t.ghostProxy:function(e,t){return!(!U||!U.useGhostProxy)&&U.useGhostProxy(e,t)},c=t.makeGhostProxy?t.makeGhostProxy:function(e){return U&&U.makeGhostProxy?U.makeGhostProxy(e):e.cloneNode(!0)},t.selector){var W=e.getAttribute("katavorio-draggable");null==W&&(W=""+(new Date).getTime(),e.setAttribute("katavorio-draggable",W)),q.push(t)}var K,z=t.snapThreshold,V=function(e,t,n,r,i){var o=Math.floor(e[0]/t),a=t*o,s=a+t,l=Math.abs(e[0]-a)<=r?a:Math.abs(s-e[0])<=r?s:e[0],u=Math.floor(e[1]/n),c=n*u,d=c+n,h=Math.abs(e[1]-c)<=i?c:Math.abs(d-e[1])<=i?d:e[1];return[l,h]};this.posses=[],this.posseRoles={},this.toGrid=function(e){if(null==this.params.grid)return e;var t=this.params.grid?this.params.grid[0]/2:z||d/2,n=this.params.grid?this.params.grid[1]/2:z||h/2;return V(e,this.params.grid[0],this.params.grid[1],t,n)},this.snap=function(e,t){if(null!=I){e=e||(this.params.grid?this.params.grid[0]:d),t=t||(this.params.grid?this.params.grid[1]:h);var n=this.params.getPosition(I),r=this.params.grid?this.params.grid[0]/2:z,i=this.params.grid?this.params.grid[1]/2:z,o=V(n,e,t,r,i);return this.params.setPosition(I,o),o}},this.setUseGhostProxy=function(e){l=e?M:A};var H=function(e){return!1===t.allowNegative?[Math.max(0,e[0]),Math.max(0,e[1])]:e},G=function(e){K="function"===typeof e?e:e?function(e,t,n,r){return H([Math.max(0,Math.min(n.w-r[0],e[0])),Math.max(0,Math.min(n.h-r[1],e[1]))])}.bind(this):function(e){return H(e)}}.bind(this);G("function"===typeof this.params.constrain?this.params.constrain:this.params.constrain||this.params.containment),this.setConstrain=function(e){G(e)};var Y,X=function(e,t,n,r){return null!=U&&U.constrain&&"function"===typeof U.constrain?U.constrain(e,t,n,r):K(e,t,n,r)};this.setRevert=function(e){Y=e},this.params.revert&&(Y=this.params.revert);var Q=function(e){return"function"===typeof e?(e._katavorioId=j(),e._katavorioId):e},J={},Z=function(e){for(var t in J){var n=J[t],r=n[0](e);if(n[1]&&(r=!r),!r)return!1}return!0},ee=this.setFilter=function(t,n){if(t){var r=Q(t);J[r]=[function(n){var r,i=n.srcElement||n.target;return o(t)?r=s(i,t,e):"function"===typeof t&&(r=t(n,e)),r},!1!==n]}};this.addFilter=ee,this.removeFilter=function(e){var t="function"===typeof e?e._katavorioId:e;delete J[t]};this.clearAllFilters=function(){J={}},this.canDrag=this.params.canDrag||w;var te,ne=[],re=[];this.addSelector=function(e){e.selector&&q.push(e)},this.downListener=function(e){if(!e.defaultPrevented){var t=this.rightButtonCanDrag||3!==e.which&&2!==e.button;if(t&&this.isEnabled()&&this.canDrag()){var r=Z(e)&&D(e,this.el,this.k);if(r){if(U=null,$=null,q.length>0){var o=u(q,this.el,e.target||e.srcElement);if(null!=o&&(U=o[0],$=o[1]),null==$)return}else $=this.el;if(B)if(I=$.cloneNode(!0),this.params.addClass(I,v.clonedDrag),I.setAttribute("id",null),I.style.position="absolute",null!=this.params.parent){var s=this.params.getPosition(this.el);I.style.left=s[0]+"px",I.style.top=s[1]+"px",this.params.parent.appendChild(I)}else{var l=a($);I.style.left=l.left+"px",I.style.top=l.top+"px",document.body.appendChild(I)}else I=$;T&&O(e),b=_(e),I&&I.parentNode&&(P=[I.parentNode.scrollLeft,I.parentNode.scrollTop]),this.params.bind(document,"mousemove",this.moveListener),this.params.bind(document,"mouseup",this.upListener),i.markSelection(this),i.markPosses(this),this.params.addClass(document.body,n.noSelect),ae("beforeStart",{el:this.el,pos:y,e:e,drag:this})}else this.params.consumeFilteredEvents&&O(e)}}}.bind(this),this.moveListener=function(e){if(b){if(!C){var t=ae("start",{el:this.el,pos:y,e:e,drag:this});if(!1!==t){if(!b)return;this.mark(!0),C=!0}else this.abort()}if(b){re.length=0;var n=_(e),r=n[0]-b[0],o=n[1]-b[1],a=this.params.ignoreZoom?1:i.getZoom();I&&I.parentNode&&(r+=I.parentNode.scrollLeft-P[0],o+=I.parentNode.scrollTop-P[1]),r/=a,o/=a,this.moveBy(r,o,e),i.updateSelection(r,o,this),i.updatePosses(r,o,this)}}}.bind(this),this.upListener=function(e){b&&(b=null,this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.params.removeClass(document.body,n.noSelect),this.unmark(e),i.unmarkSelection(this,e),i.unmarkPosses(this,e),this.stop(e),i.notifyPosseDragStop(this,e),C=!1,re.length=0,B?(I&&I.parentNode&&I.parentNode.removeChild(I),I=null):Y&&!0===Y(I,this.params.getPosition(I))&&(this.params.setPosition(I,y),ae("revert",I)))}.bind(this),this.getFilters=function(){return J},this.abort=function(){null!=b&&this.upListener()},this.getDragElement=function(e){return e?$||this.el:I||this.el};var ie={start:[],drag:[],stop:[],over:[],out:[],beforeStart:[],revert:[]};t.events.start&&ie.start.push(t.events.start),t.events.beforeStart&&ie.beforeStart.push(t.events.beforeStart),t.events.stop&&ie.stop.push(t.events.stop),t.events.drag&&ie.drag.push(t.events.drag),t.events.revert&&ie.revert.push(t.events.revert),this.on=function(e,t){ie[e]&&ie[e].push(t)},this.off=function(e,t){if(ie[e]){for(var n=[],r=0;r<ie[e].length;r++)ie[e][r]!==t&&n.push(ie[e][r]);ie[e]=n}};var oe,ae=function(e,t){var n=null;if(U&&U[e])n=U[e](t);else if(ie[e])for(var r=0;r<ie[e].length;r++)try{var i=ie[e][r](t);null!=i&&(n=i)}catch(o){}return n};this.notifyStart=function(e){ae("start",{el:this.el,pos:this.params.getPosition(I),e:e,drag:this})},this.stop=function(e,t){if(t||C){var n=[],r=i.getSelection(),o=this.params.getPosition(I);if(r.length>0)for(var a=0;a<r.length;a++){var s=this.params.getPosition(r[a].el);n.push([r[a].el,{left:s[0],top:s[1]},r[a]])}else n.push([I,{left:o[0],top:o[1]},this]);ae("stop",{el:I,pos:oe||o,finalPos:o,e:e,drag:this,selection:n})}},this.mark=function(e){var t;y=this.params.getPosition(I),x=this.params.getPosition(I,!0),E=[x[0]-y[0],x[1]-y[1]],this.size=this.params.getSize(I),ne=i.getMatchingDroppables(this),k(ne,!0,!1,this),this.params.addClass(I,this.params.dragClass||n.drag),t=this.params.getConstrainingRectangle?this.params.getConstrainingRectangle(I):this.params.getSize(I.parentNode),te={w:t[0],h:t[1]},m=0,g=0,e&&i.notifySelectionDragStart(this)},this.unmark=function(e,r){if(k(ne,!1,!0,this),R&&l($,I)?(oe=[I.offsetLeft-m,I.offsetTop-g],I.parentNode.removeChild(I),I=$):oe=null,this.params.removeClass(I,this.params.dragClass||n.drag),ne.length=0,R=!1,!r){re.length>0&&oe&&t.setPosition($,oe),re.sort(L);for(var i=0;i<re.length;i++){var o=re[i].drop(this,e);if(!0===o)break}}},this.moveBy=function(e,n,r){re.length=0;var i=this.toGrid([y[0]+e,y[1]+n]),o=X(i,I,te,this.size);if(l(this.el,I))if(i[0]!==o[0]||i[1]!==o[1]){if(!R){var a=c($);t.addClass(a,v.ghostProxy),F?(F.appendChild(a),f=t.getPosition($.parentNode,!0),p=t.getPosition(t.ghostProxyParent,!0),m=f[0]-p[0],g=f[1]-p[1]):$.parentNode.appendChild(a),I=a,R=!0}o=i}else R&&(I.parentNode.removeChild(I),I=$,R=!1,f=null,p=null,m=0,g=0);var s={x:o[0],y:o[1],w:this.size[0],h:this.size[1]},u={x:s.x+E[0],y:s.y+E[1],w:s.w,h:s.h},d=null;this.params.setPosition(I,[o[0]+m,o[1]+g]);for(var h=0;h<ne.length;h++){var _={x:ne[h].pagePosition[0],y:ne[h].pagePosition[1],w:ne[h].size[0],h:ne[h].size[1]};this.params.intersects(u,_)&&(N||null==d||d===ne[h].el)&&ne[h].canDrop(this)?(d||(d=ne[h].el),re.push(ne[h]),ne[h].setHover(this,!0,r)):ne[h].isHover()&&ne[h].setHover(this,!1,r)}ae("drag",{el:this.el,pos:o,e:r,drag:this})},this.destroy=function(){this.params.unbind(this.el,"mousedown",this.downListener),this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.downListener=null,this.upListener=null,this.moveListener=null},this.params.bind(this.el,"mousedown",this.downListener),this.params.handle?ee(this.params.handle,!1):ee(this.params.filter,this.params.filterExclude)},I=function(e,t,n,r){this._class=n.droppable,this.params=t||{},this.rank=t.rank||0,this._activeClass=this.params.activeClass||n.active,this._hoverClass=this.params.hoverClass||n.hover,S.apply(this,arguments);var i=!1;this.allowLoopback=!1!==this.params.allowLoopback,this.setActive=function(e){this.params[e?"addClass":"removeClass"](this.el,this._activeClass)},this.updatePosition=function(){this.position=this.params.getPosition(this.el),this.pagePosition=this.params.getPosition(this.el,!0),this.size=this.params.getSize(this.el)},this.canDrop=this.params.canDrop||function(e){return!0},this.isHover=function(){return i},this.setHover=function(e,t,n){(t||null==this.el._katavorioDragHover||this.el._katavorioDragHover===e.el._katavorio)&&(this.params[t?"addClass":"removeClass"](this.el,this._hoverClass),this.el._katavorioDragHover=t?e.el._katavorio:null,i!==t&&this.params.events[t?"over":"out"]({el:this.el,e:n,drag:e,drop:this}),i=t)},this.drop=function(e,t){return this.params.events["drop"]({drag:e,e:t,drop:this})},this.destroy=function(){this._class=null,this._activeClass=null,this._hoverClass=null,i=null}},j=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,n="x"===e?t:3&t|8;return n.toString(16)}))},L=function(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:0},B=function(e){return null==e?null:(e="string"===typeof e||e.constructor===String?document.getElementById(e):e,null==e?null:(e._katavorio=e._katavorio||j(),e))};e.Katavorio=function(e){var t=[],a={};this._dragsByScope={},this._dropsByScope={};var s=1,l=function(e,t){C(e,(function(e){for(var n=0;n<e.scopes.length;n++)t[e.scopes[n]]=t[e.scopes[n]]||[],t[e.scopes[n]].push(e)}))},u=function(t,n){var r=0;return C(t,(function(t){for(var i=0;i<t.scopes.length;i++)if(n[t.scopes[i]]){var o=e.indexOf(n[t.scopes[i]],t);-1!==o&&(n[t.scopes[i]].splice(o,1),r++)}})),r>0},c=(this.getMatchingDroppables=function(e){for(var t=[],n={},r=0;r<e.scopes.length;r++){var i=this._dropsByScope[e.scopes[r]];if(i)for(var o=0;o<i.length;o++)!i[o].canDrop(e)||n[i[o].uuid]||!i[o].allowLoopback&&i[o].el===e.el||(n[i[o].uuid]=!0,t.push(i[o]))}return t.sort(L),t},function(t){t=t||{};var n,r={events:{}};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];for(n=0;n<y.length;n++)r.events[y[n]]=t[y[n]]||x;return r.katavorio=this,r}.bind(this)),d=function(e,t){for(var n=0;n<y.length;n++)t[y[n]]&&e.on(y[n],t[y[n]])}.bind(this),h={},f=e.css||{},p=e.scope||b;for(var _ in v)h[_]=v[_];for(var _ in f)h[_]=f[_];var m=e.inputFilterSelector||P;this.getInputFilterSelector=function(){return m},this.setInputFilterSelector=function(e){return m=e,this},this.draggable=function(t,n){var r=[];return C(t,function(t){if(t=B(t),null!=t)if(null==t._katavorioDrag){var i=c(n);t._katavorioDrag=new T(t,i,h,p),l(t._katavorioDrag,this._dragsByScope),r.push(t._katavorioDrag),e.addClass(t,i.selector?h.delegatedDraggable:h.draggable)}else d(t._katavorioDrag,n)}.bind(this)),r},this.droppable=function(t,n){var r=[];return C(t,function(t){if(t=B(t),null!=t){var i=new I(t,c(n),h,p);t._katavorioDrop=t._katavorioDrop||[],t._katavorioDrop.push(i),l(i,this._dropsByScope),r.push(i),e.addClass(t,h.droppable)}}.bind(this)),r},this.select=function(n){return C(n,(function(){var n=B(this);n&&n._katavorioDrag&&(a[n._katavorio]||(t.push(n._katavorioDrag),a[n._katavorio]=[n,t.length-1],e.addClass(n,h.selected)))})),this},this.deselect=function(n){return C(n,(function(){var n=B(this);if(n&&n._katavorio){var r=a[n._katavorio];if(r){for(var i=[],o=0;o<t.length;o++)t[o].el!==n&&i.push(t[o]);t=i,delete a[n._katavorio],e.removeClass(n,h.selected)}}})),this},this.deselectAll=function(){for(var n in a){var r=a[n];e.removeClass(r[0],h.selected)}t.length=0,a={}},this.markSelection=function(e){E(t,(function(e){e.mark()}),e)},this.markPosses=function(e){e.posses&&C(e.posses,(function(t){e.posseRoles[t]&&D[t]&&E(D[t].members,(function(e){e.mark()}),e)}))},this.unmarkSelection=function(e,n){E(t,(function(e){e.unmark(n)}),e)},this.unmarkPosses=function(e,t){e.posses&&C(e.posses,(function(n){e.posseRoles[n]&&D[n]&&E(D[n].members,(function(e){e.unmark(t,!0)}),e)}))},this.getSelection=function(){return t.slice(0)},this.updateSelection=function(e,n,r){E(t,(function(t){t.moveBy(e,n)}),r)};var g=function(e,t){t.posses&&C(t.posses,(function(n){t.posseRoles[n]&&D[n]&&E(D[n].members,(function(t){e(t)}),t)}))};this.updatePosses=function(e,t,n){g((function(n){n.moveBy(e,t)}),n)},this.notifyPosseDragStop=function(e,t){g((function(e){e.stop(t,!0)}),e)},this.notifySelectionDragStop=function(e,n){E(t,(function(e){e.stop(n,!0)}),e)},this.notifySelectionDragStart=function(e,n){E(t,(function(e){e.notifyStart(n)}),e)},this.setZoom=function(e){s=e},this.getZoom=function(){return s};var w=function(e,t,n,r){C(e,(function(e){u(e,n),e[r](t),l(e,n)}))};C(["set","add","remove","toggle"],function(e){this[e+"Scope"]=function(t,n){w(t._katavorioDrag,n,this._dragsByScope,e+"Scope"),w(t._katavorioDrop,n,this._dropsByScope,e+"Scope")}.bind(this),this[e+"DragScope"]=function(t,n){w(t.constructor===T?t:t._katavorioDrag,n,this._dragsByScope,e+"Scope")}.bind(this),this[e+"DropScope"]=function(t,n){w(t.constructor===I?t:t._katavorioDrop,n,this._dropsByScope,e+"Scope")}.bind(this)}.bind(this)),this.snapToGrid=function(e,t){for(var n in this._dragsByScope)E(this._dragsByScope[n],(function(n){n.snap(e,t)}))},this.getDragsForScope=function(e){return this._dragsByScope[e]},this.getDropsForScope=function(e){return this._dropsByScope[e]};var k=function(e,n,r){if(e=B(e),e[n]){var i=t.indexOf(e[n]);i>=0&&t.splice(i,1),u(e[n],r)&&C(e[n],(function(e){e.destroy()})),delete e[n]}},O=function(e,t,n,r){e=B(e),e[t]&&e[t].off(n,r)};this.elementRemoved=function(e){e["_katavorioDrag"]&&this.destroyDraggable(e),e["_katavorioDrop"]&&this.destroyDroppable(e)},this.destroyDraggable=function(e,t,n){1===arguments.length?k(e,"_katavorioDrag",this._dragsByScope):O(e,"_katavorioDrag",t,n)},this.destroyDroppable=function(e,t,n){1===arguments.length?k(e,"_katavorioDrop",this._dropsByScope):O(e,"_katavorioDrop",t,n)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},t=[],a={},D={}};var D={},S=function(e,t,r){var i=o(t)?t:t.id,a=!!o(t)||!1!==t.active,s=D[i]||function(){var e={name:i,members:[]};return D[i]=e,e}();return C(e,(function(e){if(e._katavorioDrag){if(r&&null!=e._katavorioDrag.posseRoles[s.name])return;n(s.members,e._katavorioDrag),n(e._katavorioDrag.posses,s.name),e._katavorioDrag.posseRoles[s.name]=a}})),s};this.addToPosse=function(e,t){for(var n=[],r=1;r<arguments.length;r++)n.push(S(e,arguments[r]));return 1===n.length?n[0]:n},this.setPosse=function(e,t){for(var n=[],r=1;r<arguments.length;r++)n.push(S(e,arguments[r],!0).name);return C(e,function(e){if(e._katavorioDrag){var t=i(e._katavorioDrag.posses,n),r=[];Array.prototype.push.apply(r,e._katavorioDrag.posses);for(var o=0;o<t.length;o++)this.removeFromPosse(e,t[o])}}.bind(this)),1===n.length?n[0]:n},this.removeFromPosse=function(e,t){if(arguments.length<2)throw new TypeError("No posse id provided for remove operation");for(var n=1;n<arguments.length;n++)t=arguments[n],C(e,(function(e){if(e._katavorioDrag&&e._katavorioDrag.posses){var n=e._katavorioDrag;C(t,(function(e){r(D[e].members,n),r(n.posses,e),delete n.posseRoles[e]}))}}))},this.removeFromAllPosses=function(e){C(e,(function(e){if(e._katavorioDrag&&e._katavorioDrag.posses){var t=e._katavorioDrag;C(t.posses,(function(e){r(D[e].members,t)})),t.posses.length=0,t.posseRoles={}}}))},this.setPosseState=function(e,t,n){var r=D[t];r&&C(e,(function(e){e._katavorioDrag&&e._katavorioDrag.posses&&(e._katavorioDrag.posseRoles[r.name]=n)}))}},e.Katavorio.version="1.0.0",t.Katavorio=e.Katavorio}.call("undefined"!==typeof window?window:this),function(){var e=this;e.jsPlumbUtil=e.jsPlumbUtil||{};var n=e.jsPlumbUtil;function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return"[object Number]"===Object.prototype.toString.call(e)}function o(e){return"string"===typeof e}function a(e){return"boolean"===typeof e}function s(e){return null==e}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return"[object Date]"===Object.prototype.toString.call(e)}function c(e){return"[object Function]"===Object.prototype.toString.call(e)}function d(e){return c(e)&&null!=e.name&&e.name.length>0}function h(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function f(e){if(o(e))return""+e;if(a(e))return!!e;if(u(e))return new Date(e.getTime());if(c(e))return e;if(r(e)){for(var t=[],n=0;n<e.length;n++)t.push(f(e[n]));return t}if(l(e)){var i={};for(var s in e)i[s]=f(e[s]);return i}return e}function p(e,t,n,i){var s,u,c={},d={};for(n=n||[],i=i||[],u=0;u<n.length;u++)c[n[u]]=!0;for(u=0;u<i.length;u++)d[i[u]]=!0;var h=f(e);for(u in t)if(null==h[u]||d[u])h[u]=t[u];else if(o(t[u])||a(t[u]))c[u]?(s=[],s.push.apply(s,r(h[u])?h[u]:[h[u]]),s.push.apply(s,a(t[u])?t[u]:[t[u]]),h[u]=s):h[u]=t[u];else if(r(t[u]))s=[],r(h[u])&&s.push.apply(s,h[u]),s.push.apply(s,t[u]),h[u]=s;else if(l(t[u]))for(var p in l(h[u])||(h[u]={}),t[u])h[u][p]=t[u][p];return h}function _(e,t,n){if(null!=e){var r=e,i=r;return t.replace(/([^\.])+/g,(function(e,t,r,o){var a=e.match(/([^\[0-9]+){1}(\[)([0-9+])/),s=r+e.length>=o.length,l=function(){return i[a[1]]||function(){return i[a[1]]=[],i[a[1]]}()};if(s)a?l()[a[3]]=n:i[e]=n;else if(a){var u=l();i=u[a[3]]||function(){return u[a[3]]={},u[a[3]]}()}else i=i[e]||function(){return i[e]={},i[e]}();return""})),e}}function m(e,t,n){for(var r=0;r<n.length;r++){var i=n[r][0][n[r][1]].apply(n[r][0],n[r][2]);if(i===t)return i}return e}function g(e,t,n,i){var a=function(e){var n=e.match(/(\${.*?})/g);if(null!=n)for(var r=0;r<n.length;r++){var i=t[n[r].substring(2,n[r].length-1)]||"";null!=i&&(e=e.replace(n[r],i))}return e},s=function(e){if(null!=e){if(o(e))return a(e);if(!c(e)||i||null!=n&&0!==(e.name||"").indexOf(n)){if(r(e)){for(var u=[],d=0;d<e.length;d++)u.push(s(e[d]));return u}if(l(e)){var h={};for(var f in e)h[f]=s(e[f]);return h}return e}return e(t)}};return s(e)}function v(e,t){if(e)for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function b(e,t){var n=v(e,t);return n>-1&&e.splice(n,1),-1!==n}function y(e,t){var n=e.indexOf(t);return n>-1&&e.splice(n,1),-1!==n}function x(e,t,n){-1===v(e,n)&&e.push(t)}function w(e,t,n,r){var i=e[t];return null==i&&(i=[],e[t]=i),i[r?"unshift":"push"](n),i}function E(e,t,n){return-1===e.indexOf(t)&&(n?e.unshift(t):e.push(t),!0)}function k(e,t,n){var i;t=r(t)?t:[t];var o=function(t){var n=t.__proto__;while(null!=n)if(null!=n.prototype){for(var r in n.prototype)n.prototype.hasOwnProperty(r)&&!e.prototype.hasOwnProperty(r)&&(e.prototype[r]=n.prototype[r]);n=n.prototype.__proto__}else n=null};for(i=0;i<t.length;i++){for(var a in t[i].prototype)t[i].prototype.hasOwnProperty(a)&&!e.prototype.hasOwnProperty(a)&&(e.prototype[a]=t[i].prototype[a]);o(t[i])}var s=function(e,n){return function(){for(i=0;i<t.length;i++)t[i].prototype[e]&&t[i].prototype[e].apply(this,arguments);return n.apply(this,arguments)}},l=function(t){for(var n in t)e.prototype[n]=s(n,t[n])};if(arguments.length>2)for(i=2;i<arguments.length;i++)l(arguments[i]);return e}t.jsPlumbUtil=n,n.isArray=r,n.isNumber=i,n.isString=o,n.isBoolean=a,n.isNull=s,n.isObject=l,n.isDate=u,n.isFunction=c,n.isNamedFunction=d,n.isEmpty=h,n.clone=f,n.merge=p,n.replace=_,n.functionChain=m,n.populate=g,n.findWithFunction=v,n.removeWithFunction=b,n.remove=y,n.addWithFunction=x,n.addToList=w,n.suggest=E,n.extend=k;for(var C=[],O=0;O<256;O++)C[O]=(O<16?"0":"")+O.toString(16);function P(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return C[255&e]+C[e>>8&255]+C[e>>16&255]+C[e>>24&255]+"-"+C[255&t]+C[t>>8&255]+"-"+C[t>>16&15|64]+C[t>>24&255]+"-"+C[63&n|128]+C[n>>8&255]+"-"+C[n>>16&255]+C[n>>24&255]+C[255&r]+C[r>>8&255]+C[r>>16&255]+C[r>>24&255]}function D(e){if(null==e)return null;var t=e.replace(/^\s\s*/,""),n=/\s/,r=t.length;while(n.test(t.charAt(--r)));return t.slice(0,r+1)}function S(e,t){e=null==e.length||"string"===typeof e?[e]:e;for(var n=0;n<e.length;n++)t(e[n])}function M(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t(e[r]));return n}function A(e,t,n){n=n||"parent";var r=function(e){return e?t[e]:null},i=function(e){return e?r(e[n]):null},o=function(e,t){if(null==e)return t;var n=["anchor","anchors","cssClass","connector","paintStyle","hoverPaintStyle","endpoint","endpoints"];"override"===t.mergeStrategy&&Array.prototype.push.apply(n,["events","overlays"]);var r=p(e,t,[],n);return o(i(e),r)},a=function(e){if(null==e)return{};if("string"===typeof e)return r(e);if(e.length){var t=!1,n=0,i=void 0;while(!t&&n<e.length)i=a(e[n]),i?t=!0:n++;return i}},s=a(e);return s?o(i(s),s):{}}function T(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.logEnabled&&"undefined"!==typeof console)try{var r=arguments[arguments.length-1];console.log(r)}catch(i){}}function I(e,t,n){return function(){var r=null;try{null!=t&&(r=t.apply(this,arguments))}catch(i){T("jsPlumb function failed : "+i)}if(null!=e&&(null==n||r!==n))try{r=e.apply(this,arguments)}catch(i){T("wrapped function failed : "+i)}return r}}n.uuid=P,n.fastTrim=D,n.each=S,n.map=M,n.mergeWithParents=A,n.logEnabled=!0,n.log=T,n.wrap=I;var j=function(){function e(){var e=this;this._listeners={},this.eventsSuspended=!1,this.tick=!1,this.eventsToDieOn={ready:!0},this.queue=[],this.bind=function(t,n,r){var i=function(t){w(e._listeners,t,n,r),n.__jsPlumb=n.__jsPlumb||{},n.__jsPlumb[P()]=t};if("string"===typeof t)i(t);else if(null!=t.length)for(var o=0;o<t.length;o++)i(t[o]);return e},this.fire=function(e,t,n){if(this.tick)this.queue.unshift(arguments);else{if(this.tick=!0,!this.eventsSuspended&&this._listeners[e]){var r=this._listeners[e].length,i=0,o=!1,a=null;if(!this.shouldFireEvent||this.shouldFireEvent(e,t,n))while(!o&&i<r&&!1!==a){if(this.eventsToDieOn[e])this._listeners[e][i].apply(this,[t,n]);else try{a=this._listeners[e][i].apply(this,[t,n])}catch(s){T("jsPlumb: fire failed for event "+e+" : "+s)}i++,null!=this._listeners&&null!=this._listeners[e]||(o=!0)}}this.tick=!1,this._drain()}return this},this._drain=function(){var t=e.queue.pop();t&&e.fire.apply(e,t)},this.unbind=function(e,t){if(0===arguments.length)this._listeners={};else if(1===arguments.length){if("string"===typeof e)delete this._listeners[e];else if(e.__jsPlumb){var n=void 0;for(var r in e.__jsPlumb)n=e.__jsPlumb[r],y(this._listeners[n]||[],e)}}else 2===arguments.length&&y(this._listeners[e]||[],t);return this},this.getListener=function(t){return e._listeners[t]},this.setSuspendEvents=function(t){e.eventsSuspended=t},this.isSuspendEvents=function(){return e.eventsSuspended},this.silently=function(t){e.setSuspendEvents(!0);try{t()}catch(n){T("Cannot execute silent function "+n)}e.setSuspendEvents(!1)},this.cleanupListeners=function(){for(var t in e._listeners)e._listeners[t]=null}}return e}();function L(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.cos(n/360*Math.PI*2),o=Math.sin(n/360*Math.PI*2);return[r[0]*i-r[1]*o+t[0],r[1]*i+r[0]*o+t[1],i,o]}function B(e,t){var n=L(e,[0,0],t);return[Math.round(n[0]),Math.round(n[1])]}n.EventGenerator=j,n.rotatePoint=L,n.rotateAnchorOrientation=B}.call("undefined"!==typeof window?window:this),function(){"use strict";var e=this;e.jsPlumbUtil.matchesSelector=function(e,t,n){n=n||e.parentNode;for(var r=n.querySelectorAll(t),i=0;i<r.length;i++)if(r[i]===e)return!0;return!1},e.jsPlumbUtil.consume=function(e,t){e.stopPropagation?e.stopPropagation():e.returnValue=!1,!t&&e.preventDefault&&e.preventDefault()},e.jsPlumbUtil.sizeElement=function(e,t,n,r,i){e&&(e.style.height=i+"px",e.height=i,e.style.width=r+"px",e.width=r,e.style.left=t+"px",e.style.top=n+"px")}}.call("undefined"!==typeof window?window:this),function(){var e={deriveAnchor:function(e,t,n,r){return{top:["TopRight","TopLeft"],bottom:["BottomRight","BottomLeft"]}[e][t]}},t=this,n=function(e,t){this.count=0,this.instance=e,this.lists={},this.options=t||{},this.instance.addList=function(e,t){return this.listManager.addList(e,t)},this.instance.removeList=function(e){this.listManager.removeList(e)},this.instance.bind("manageElement",function(e){for(var t=this.instance.getSelector(e.el,"[jtk-scrollable-list]"),n=0;n<t.length;n++)this.addList(t[n])}.bind(this)),this.instance.bind("unmanageElement",(function(e){this.removeList(e.el)})),this.instance.bind("connection",function(e,t){null==t&&(this._maybeUpdateParentList(e.source),this._maybeUpdateParentList(e.target))}.bind(this))};t.jsPlumbListManager=n,n.prototype={addList:function(t,n){var i=this.instance.extend({},e);this.instance.extend(i,this.options),n=this.instance.extend(i,n||{});var o=[this.instance.getInstanceIndex(),this.count++].join("_");this.lists[o]=new r(this.instance,t,n,o)},removeList:function(e){var t=this.lists[e._jsPlumbList];t&&(t.destroy(),delete this.lists[e._jsPlumbList])},_maybeUpdateParentList:function(e){var t=e.parentNode,n=this.instance.getContainer();while(null!=t&&t!==n){if(null!=t._jsPlumbList&&null!=this.lists[t._jsPlumbList])return void t._jsPlumbScrollHandler();t=t.parentNode}}};var r=function(e,t,n,r){function i(e,t,r,i){return n.anchor?n.anchor:n.deriveAnchor(e,t,r,i)}function o(e,t,r,i){return n.deriveEndpoint?n.deriveEndpoint(e,t,r,i):n.endpoint?n.endpoint:r.type}function a(t){var n=t.parentNode,r=e.getContainer();while(null!=n&&n!==r){if(e.hasClass(n,"jtk-managed"))return void e.recalculateOffsets(n);n=n.parentNode}}t["_jsPlumbList"]=r;var s=function(n){for(var r=e.getSelector(t,".jtk-managed"),s=e.getId(t),l=0;l<r.length;l++){if(r[l].offsetTop<t.scrollTop)r[l]._jsPlumbProxies||(r[l]._jsPlumbProxies=r[l]._jsPlumbProxies||[],e.select({source:r[l]}).each((function(n){e.proxyConnection(n,0,t,s,(function(){return o("top",0,n.endpoints[0],n)}),(function(){return i("top",0,n.endpoints[0],n)})),r[l]._jsPlumbProxies.push([n,0])})),e.select({target:r[l]}).each((function(n){e.proxyConnection(n,1,t,s,(function(){return o("top",1,n.endpoints[1],n)}),(function(){return i("top",1,n.endpoints[1],n)})),r[l]._jsPlumbProxies.push([n,1])})));else if(r[l].offsetTop+r[l].offsetHeight>t.scrollTop+t.offsetHeight)r[l]._jsPlumbProxies||(r[l]._jsPlumbProxies=r[l]._jsPlumbProxies||[],e.select({source:r[l]}).each((function(n){e.proxyConnection(n,0,t,s,(function(){return o("bottom",0,n.endpoints[0],n)}),(function(){return i("bottom",0,n.endpoints[0],n)})),r[l]._jsPlumbProxies.push([n,0])})),e.select({target:r[l]}).each((function(n){e.proxyConnection(n,1,t,s,(function(){return o("bottom",1,n.endpoints[1],n)}),(function(){return i("bottom",1,n.endpoints[1],n)})),r[l]._jsPlumbProxies.push([n,1])})));else if(r[l]._jsPlumbProxies){for(var u=0;u<r[l]._jsPlumbProxies.length;u++)e.unproxyConnection(r[l]._jsPlumbProxies[u][0],r[l]._jsPlumbProxies[u][1],s);delete r[l]._jsPlumbProxies}e.revalidate(r[l])}a(t)};e.setAttribute(t,"jtk-scrollable-list","true"),t._jsPlumbScrollHandler=s,e.on(t,"scroll",s),s(),this.destroy=function(){e.off(t,"scroll",s),delete t._jsPlumbScrollHandler;for(var n=e.getSelector(t,".jtk-managed"),r=e.getId(t),i=0;i<n.length;i++)if(n[i]._jsPlumbProxies){for(var o=0;o<n[i]._jsPlumbProxies.length;o++)e.unproxyConnection(n[i]._jsPlumbProxies[o][0],n[i]._jsPlumbProxies[o][1],r);delete n[i]._jsPlumbProxies}}}}.call("undefined"!==typeof window?window:this),function(){"use strict";var e=this,n=e.jsPlumbUtil,r=function(e){if(e._jsPlumb.paintStyle&&e._jsPlumb.hoverPaintStyle){var t={};p.extend(t,e._jsPlumb.paintStyle),p.extend(t,e._jsPlumb.hoverPaintStyle),delete e._jsPlumb.hoverPaintStyle,t.gradient&&e._jsPlumb.paintStyle.fill&&delete t.gradient,e._jsPlumb.hoverPaintStyle=t}},i=["tap","dbltap","click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu"],o=function(e,t,n,r){var i=e.getAttachedElements();if(i)for(var o=0,a=i.length;o<a;o++)r&&r===i[o]||i[o].setHover(t,!0,n)},a=function(e){return null==e?null:e.split(" ")},s=function(e,t,n){for(var r in t)e[r]=n},l=function(e,t,r){if(e.getDefaultType){var i=e.getTypeDescriptor(),o={},a=e.getDefaultType(),l=n.merge({},a);s(o,a,"__default");for(var u=0,c=e._jsPlumb.types.length;u<c;u++){var d=e._jsPlumb.types[u];if("__default"!==d){var h=e._jsPlumb.instance.getType(d,i);if(null!=h){var f=["anchor","anchors","connector","paintStyle","hoverPaintStyle","endpoint","endpoints","connectorOverlays","connectorStyle","connectorHoverStyle","endpointStyle","endpo