UNPKG

ms-advance-chart

Version:

Making diagrams or flows is easy using ms-advance-chart

1 lines 361 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.standalone=e(require("react"),require("react-dom")):t.standalone=e(t.React,t.ReactDOM)}(this,(function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=57)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!t){var o;if(void 0===e)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(o=new Error(e.replace(/%s/g,(function(){return r[s++]})))).name="Invariant Violation"}throw o.framesToPop=1,o}}n.d(e,"a",(function(){return r}))},function(t,e,n){(function(){void 0===Math.sgn&&(Math.sgn=function(t){return 0==t?0:t>0?1:-1});var t=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},n=function(t,e){return t.x*e.x+t.y*e.y},r=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i=function(t,e){return{x:t.x*e,y:t.y*e}},o=Math.pow(2,-65),s=function(e,n){for(var i=[],o=a(e,n),s=n.length-1,l=u(o,2*s-1,i,0),c=t(e,n[0]),h=r(c),f=0,p=0;p<l;p++){c=t(e,d(n,s,i[p],null,null));var g=r(c);g<h&&(h=g,f=i[p])}return c=t(e,n[s]),(g=r(c))<h&&(h=g,f=1),{location:f,distance:h}},a=function(e,r){for(var o=r.length-1,s=2*o-1,a=[],u=[],l=[],c=[],h=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],d=0;d<=o;d++)a[d]=t(r[d],e);for(d=0;d<=o-1;d++)u[d]=t(r[d+1],r[d]),u[d]=i(u[d],3);for(var f=0;f<=o-1;f++)for(var p=0;p<=o;p++)l[f]||(l[f]=[]),l[f][p]=n(u[f],a[p]);for(d=0;d<=s;d++)c[d]||(c[d]=[]),c[d].y=0,c[d].x=parseFloat(d)/s;for(var g=o,v=o-1,m=0;m<=g+v;m++){var y=Math.max(0,m-v),b=Math.min(m,g);for(d=y;d<=b;d++){var P=m-d;c[d+P].y+=l[P][d]*h[P][d]}}return c},u=function(t,e,n,r){var i,o,s=[],a=[],f=[],p=[];switch(l(t,e)){case 0:return 0;case 1:if(r>=64)return n[0]=(t[0].x+t[e].x)/2,1;if(c(t,e))return n[0]=h(t,e),1}d(t,e,.5,s,a),i=u(s,e,f,r+1),o=u(a,e,p,r+1);for(var g=0;g<i;g++)n[g]=f[g];for(g=0;g<o;g++)n[g+i]=p[g];return i+o},l=function(t,e){var n,r,i=0;n=r=Math.sgn(t[0].y);for(var o=1;o<=e;o++)(n=Math.sgn(t[o].y))!=r&&i++,r=n;return i},c=function(t,e){var n,r,i,s,a,u,l,c,h;s=t[0].y-t[e].y,a=t[e].x-t[0].x,u=t[0].x*t[e].y-t[e].x*t[0].y,c=h=0;for(var d=1;d<e;d++){var f=s*t[d].x+a*t[d].y+u;f>c?c=f:f<h&&(h=f)}return n=(1*(u-c)-0*(l=a))*(1/(0*l-1*s)),r=(1*(u-h)-0*(l=a))*(1/(0*l-1*s)),i=Math.min(n,r),Math.max(n,r)-i<o?1:0},h=function(t,e){var n=t[e].x-t[0].x,r=t[e].y-t[0].y,i=t[0].x-0;return 0+1*((n*(t[0].y-0)-r*i)*(1/(0*n-1*r)))},d=function(t,e,n,r,i){for(var o=[[]],s=0;s<=e;s++)o[0][s]=t[s];for(var a=1;a<=e;a++)for(s=0;s<=e-a;s++)o[a]||(o[a]=[]),o[a][s]||(o[a][s]={}),o[a][s].x=(1-n)*o[a-1][s].x+n*o[a-1][s+1].x,o[a][s].y=(1-n)*o[a-1][s].y+n*o[a-1][s+1].y;if(null!=r)for(s=0;s<=e;s++)r[s]=o[s][0];if(null!=i)for(s=0;s<=e;s++)i[s]=o[e-s][s];return o[e][0]},f={},p=function(t,e){for(var n=function(t){var e=f[t];if(!e){var n=function(t){return function(e){return t}},r=function(){return function(t){return t}},i=function(){return function(t){return 1-t}},o=function(t){return function(e){for(var n=1,r=0;r<t.length;r++)n*=t[r](e);return n}};(e=[]).push(new function(){return function(e){return Math.pow(e,t)}});for(var s=1;s<t;s++){for(var a=[new n(t)],u=0;u<t-s;u++)a.push(new r);for(u=0;u<s;u++)a.push(new i);e.push(new o(a))}e.push(new function(){return function(e){return Math.pow(1-e,t)}}),f[t]=e}return e}(t.length-1),r=0,i=0,o=0;o<t.length;o++)r+=t[o].x*n[o](e),i+=t[o].y*n[o](e);return{x:r,y:i}},g=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},v=function(t){return t[0].x===t[1].x&&t[0].y===t[1].y},m=function(t,e,n){if(v(t))return{point:t[0],location:e};for(var r=p(t,e),i=0,o=e,s=n>0?1:-1,a=null;i<Math.abs(n);)a=p(t,o+=.005*s),i+=g(a,r),r=a;return{point:a,location:o}},y=function(t,e){var n=p(t,e),r=p(t.slice(0,t.length-1),e),i=r.y-n.y,o=r.x-n.x;return 0===i?1/0:Math.atan(i/o)},b=function(t,e,n,r,i){var o=r-e,s=t-n,a=t*(e-r)+e*(n-t),u=function(t){return[P(t,"x"),P(t,"y")]}(i),l=[o*u[0][0]+s*u[1][0],o*u[0][1]+s*u[1][1],o*u[0][2]+s*u[1][2],o*u[0][3]+s*u[1][3]+a],c=S.apply(null,l),h=[];if(null!=c)for(var d=0;d<3;d++){var f,p=c[d],g=Math.pow(p,2),v=Math.pow(p,3),m=[u[0][0]*v+u[0][1]*g+u[0][2]*p+u[0][3],u[1][0]*v+u[1][1]*g+u[1][2]*p+u[1][3]];f=n-t!=0?(m[0]-t)/(n-t):(m[1]-e)/(r-e),p>=0&&p<=1&&f>=0&&f<=1&&h.push(m)}return h};function P(t,e){return[-t[0][e]+3*t[1][e]+-3*t[2][e]+t[3][e],3*t[0][e]-6*t[1][e]+3*t[2][e],-3*t[0][e]+3*t[1][e],t[0][e]]}function x(t){return t<0?-1:t>0?1:0}function S(t,e,n,r){var i,o,s=e/t,a=n/t,u=r/t,l=(3*a-Math.pow(s,2))/9,c=(9*s*a-27*u-2*Math.pow(s,3))/54,h=Math.pow(l,3)+Math.pow(c,2),d=[];if(h>=0)i=x(c+Math.sqrt(h))*Math.pow(Math.abs(c+Math.sqrt(h)),1/3),o=x(c-Math.sqrt(h))*Math.pow(Math.abs(c-Math.sqrt(h)),1/3),d[0]=-s/3+(i+o),d[1]=-s/3-(i+o)/2,d[2]=-s/3-(i+o)/2,0!==Math.abs(Math.sqrt(3)*(i-o)/2)&&(d[1]=-1,d[2]=-1);else{var f=Math.acos(c/Math.sqrt(-Math.pow(l,3)));d[0]=2*Math.sqrt(-l)*Math.cos(f/3)-s/3,d[1]=2*Math.sqrt(-l)*Math.cos((f+2*Math.PI)/3)-s/3,d[2]=2*Math.sqrt(-l)*Math.cos((f+4*Math.PI)/3)-s/3}for(var p=0;p<3;p++)(d[p]<0||d[p]>1)&&(d[p]=-1);return d}var j=this.jsBezier={distanceFromCurve:s,gradientAtPoint:y,gradientAtPointAlongCurveFrom:function(t,e,n){var r=m(t,e,n);return r.location>1&&(r.location=1),r.location<0&&(r.location=0),y(t,r.location)},nearestPointOnCurve:function(t,e){var n=s(t,e);return{point:d(e,e.length-1,n.location,null,null),location:n.location}},pointOnCurve:p,pointAlongCurveFrom:function(t,e,n){return m(t,e,n).point},perpendicularToCurveAt:function(t,e,n,r){var i=m(t,e,r=null==r?0:r),o=y(t,i.location),s=Math.atan(-1/o),a=n/2*Math.sin(s),u=n/2*Math.cos(s);return[{x:i.point.x+u,y:i.point.y+a},{x:i.point.x-u,y:i.point.y-a}]},locationAlongCurveFrom:function(t,e,n){return m(t,e,n).location},getLength:function(t){(new Date).getTime();if(v(t))return 0;for(var e=p(t,0),n=0,r=0,i=null;r<1;)i=p(t,r+=.005),n+=g(i,e),e=i;return n},lineIntersection:b,boxIntersection:function(t,e,n,r,i){var o=[];return o.push.apply(o,b(t,e,t+n,e,i)),o.push.apply(o,b(t+n,e,t+n,e+r,i)),o.push.apply(o,b(t+n,e+r,t,e+r,i)),o.push.apply(o,b(t,e+r,t,e,i)),o},boundingBoxIntersection:function(t,e){var n=[];return n.push.apply(n,b(t.x,t.y,t.x+t.w,t.y,e)),n.push.apply(n,b(t.x+t.w,t.y,t.x+t.w,t.y+t.h,e)),n.push.apply(n,b(t.x+t.w,t.y+t.h,t.x,t.y+t.h,e)),n.push.apply(n,b(t.x,t.y+t.h,t.x,t.y,e)),n},version:"0.9.0"};e.jsBezier=j}).call("undefined"!=typeof window?window:this),function(){"use strict";var t=this.Biltong={version:"0.4.0"};e.Biltong=t;var n=function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=function(t,e,r){return r(t=n(t)?t:[t.x,t.y],e=n(e)?e:[e.x,e.y])},i=t.gradient=function(t,e){return r(t,e,(function(t,e){return e[0]==t[0]?e[1]>t[1]?1/0:-1/0:e[1]==t[1]?e[0]>t[0]?0:-0:(e[1]-t[1])/(e[0]-t[0])}))},o=(t.normal=function(t,e){return-1/i(t,e)},t.lineLength=function(t,e){return r(t,e,(function(t,e){return Math.sqrt(Math.pow(e[1]-t[1],2)+Math.pow(e[0]-t[0],2))}))},t.quadrant=function(t,e){return r(t,e,(function(t,e){return e[0]>t[0]||e[0]==t[0]?e[1]>t[1]?2:1:e[1]>t[1]?3:4}))}),s=(t.theta=function(t,e){return r(t,e,(function(t,e){var n=i(t,e),r=Math.atan(n),s=o(t,e);return 4!=s&&3!=s||(r+=Math.PI),r<0&&(r+=2*Math.PI),r}))},t.intersects=function(t,e){var n=t.x,r=t.x+t.w,i=t.y,o=t.y+t.h,s=e.x,a=e.x+e.w,u=e.y,l=e.y+e.h;return n<=s&&s<=r&&i<=u&&u<=o||n<=a&&a<=r&&i<=u&&u<=o||n<=s&&s<=r&&i<=l&&l<=o||n<=a&&s<=r&&i<=l&&l<=o||s<=n&&n<=a&&u<=i&&i<=l||s<=r&&r<=a&&u<=i&&i<=l||s<=n&&n<=a&&u<=o&&o<=l||s<=r&&n<=a&&u<=o&&o<=l},t.encloses=function(t,e,n){var r=t.x,i=t.x+t.w,o=t.y,s=t.y+t.h,a=e.x,u=e.x+e.w,l=e.y,c=e.y+e.h,h=function(t,e,r,i){return n?t<=e&&r>=i:t<e&&r>i};return h(r,a,i,u)&&h(o,l,s,c)},[null,[1,-1],[1,1],[-1,1],[-1,-1]]),a=[null,[-1,-1],[-1,1],[1,1],[1,-1]];t.pointOnLine=function(t,e,n){var r=i(t,e),u=o(t,e),l=n>0?s[u]:a[u],c=Math.atan(r),h=Math.abs(n*Math.sin(c))*l[1],d=Math.abs(n*Math.cos(c))*l[0];return{x:t.x+d,y:t.y+h}},t.perpendicularLineTo=function(t,e,n){var r=i(t,e),o=Math.atan(-1/r),s=n/2*Math.sin(o),a=n/2*Math.cos(o);return[{x:e.x+a,y:e.y+s},{x:e.x-a,y:e.y-s}]}}.call("undefined"!=typeof window?window:this),function(){"use strict";function t(t,e,n,r,i,o,s,a){return new Touch({target:e,identifier:I(),pageX:n,pageY:r,screenX:i,screenY:o,clientX:s||i,clientY:a||o})}function n(e,n,r,i,o,s,a,u){return function(){var t=[];return Array.prototype.push.apply(t,arguments),t.item=function(t){return this[t]},t}(t.apply(null,arguments))}var r=this,i=function(t,e,n){for(var r=(n=n||t.parentNode).querySelectorAll(e),i=0;i<r.length;i++)if(r[i]===t)return!0;return!1},o=function(t){return"string"==typeof t||t.constructor===String?document.getElementById(t):t},s=function(t){return t.srcElement||t.target},a=function(t,e,n,r){if(r){if(void 0!==t.path&&t.path.indexOf)return{path:t.path,end:t.path.indexOf(n)};var i={path:[],end:-1},o=function(t){i.path.push(t),t===n?i.end=i.path.length-1:null!=t.parentNode&&o(t.parentNode)};return o(e),i}return{path:[e],end:1}},u=function(t,e){for(var n=0,r=t.length;n<r&&t[n]!=e;n++);n<t.length&&t.splice(n,1)},l=1,c=function(t,e,n){var r=l++;return t.__ta=t.__ta||{},t.__ta[e]=t.__ta[e]||{},t.__ta[e][r]=n,n.__tauid=r,r},h=function(t,e,n,r){if(null==t)return n;var o=t.split(","),u=function(r){u.__tauid=n.__tauid;var l=s(r),c=l,h=a(r,l,e,null!=t);if(-1!=h.end)for(var d=0;d<h.end;d++){c=h.path[d];for(var f=0;f<o.length;f++)i(c,o[f],e)&&n.apply(c,arguments)}};return d(n,r,u),u},d=function(t,e,n){t.__taExtra=t.__taExtra||[],t.__taExtra.push([e,n])},f=function(t,e,n,r){if(y&&P[e]){var i=h(r,t,n,P[e]);_(t,P[e],i,n)}"focus"===e&&null==t.getAttribute("tabindex")&&t.setAttribute("tabindex","1"),_(t,e,h(r,t,n,e),n)},p={tap:{touches:1,taps:1},dbltap:{touches:1,taps:2},contextmenu:{touches:2,taps:1}},g=function(t,e){return function(n,r,o,l){if("contextmenu"==r&&b)f(n,r,o,l);else{if(null==n.__taTapHandler){var c=n.__taTapHandler={tap:[],dbltap:[],contextmenu:[],down:!1,taps:0,downSelectors:[]},h=function(){c.down=!1},d=function(){c.taps=0};f(n,"mousedown",(function(r){for(var o=s(r),u=a(r,o,n,null!=l),f=!1,p=0;p<u.end;p++){if(f)return;o=u.path[p];for(var g=0;g<c.downSelectors.length;g++)if(null==c.downSelectors[g]||i(o,c.downSelectors[g],n)){c.down=!0,setTimeout(h,t),setTimeout(d,e),f=!0;break}}})),f(n,"mouseup",(function(t){if(c.down){var e,r,o=s(t);c.taps++;var u=O(t);for(var l in p)if(p.hasOwnProperty(l)){var h=p[l];if(h.touches===u&&(1===h.taps||h.taps===c.taps))for(var d=0;d<c[l].length;d++){r=a(t,o,n,null!=c[l][d][1]);for(var f=0;f<r.end;f++)if(e=r.path[f],null==c[l][d][1]||i(e,c[l][d][1],n)){c[l][d][0].apply(e,[t]);break}}}}}))}n.__taTapHandler.downSelectors.push(l),n.__taTapHandler[r].push([o,l]),o.__taUnstore=function(){u(n.__taTapHandler[r],o)}}}},v=function(t,e,n,r){for(var i in n.__tamee[t])n.__tamee[t].hasOwnProperty(i)&&n.__tamee[t][i].apply(r,[e])},m=function(){var t=[];return function(e,n,r,o){if(!e.__tamee){e.__tamee={over:!1,mouseenter:[],mouseexit:[]};var a=function(n){var r=s(n);(null==o&&r==e&&!e.__tamee.over||i(r,o,e)&&(null==r.__tamee||!r.__tamee.over))&&(v("mouseenter",n,e,r),r.__tamee=r.__tamee||{},r.__tamee.over=!0,t.push(r))},u=function(n){for(var r=s(n),o=0;o<t.length;o++)r!=t[o]||i(n.relatedTarget||n.toElement,"*",r)||(r.__tamee.over=!1,t.splice(o,1),v("mouseexit",n,e,r))};_(e,"mouseover",h(o,e,a,"mouseover"),a),_(e,"mouseout",h(o,e,u,"mouseout"),u)}r.__taUnstore=function(){delete e.__tamee[n][r.__tauid]},c(e,n,r),e.__tamee[n][r.__tauid]=r}},y="ontouchstart"in document.documentElement||navigator.maxTouchPoints,b="onmousedown"in document.documentElement,P={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},x=function(){var t=-1;if("Microsoft Internet Explorer"==navigator.appName){var e=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))}return t}(),S=x>-1&&x<9,j=function(t,e){if(null==t)return[0,0];var n=w(t),r=E(n,0);return[r[e+"X"],r[e+"Y"]]},C=function(t){return null==t?[0,0]:S?[t.clientX+document.documentElement.scrollLeft,t.clientY+document.documentElement.scrollTop]:j(t,"page")},E=function(t,e){return t.item?t.item(e):t[e]},w=function(t){return t.touches&&t.touches.length>0?t.touches:t.changedTouches&&t.changedTouches.length>0?t.changedTouches:t.targetTouches&&t.targetTouches.length>0?t.targetTouches:[t]},O=function(t){return w(t).length},_=function(t,e,n,r){if(c(t,e,n),r.__tauid=n.__tauid,t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent){var i=e+n.__tauid;t["e"+i]=n,t[i]=function(){t["e"+i]&&t["e"+i](window.event)},t.attachEvent("on"+e,t[i])}},D=function(t,e,n){null!=n&&k(t,(function(){var r=o(this);if(function(t,e,n){if(t.__ta&&t.__ta[e]&&delete t.__ta[e][n.__tauid],n.__taExtra){for(var r=0;r<n.__taExtra.length;r++)D(t,n.__taExtra[r][0],n.__taExtra[r][1]);n.__taExtra.length=0}n.__taUnstore&&n.__taUnstore()}(r,e,n),null!=n.__tauid)if(r.removeEventListener)r.removeEventListener(e,n,!1),y&&P[e]&&r.removeEventListener(P[e],n,!1);else if(this.detachEvent){var i=e+n.__tauid;r[i]&&r.detachEvent("on"+e,r[i]),r[i]=null,r["e"+i]=null}n.__taTouchProxy&&D(t,n.__taTouchProxy[1],n.__taTouchProxy[0])}))},k=function(t,e){if(null!=t){t="undefined"!=typeof Window&&"unknown"!=typeof t.top&&t==t.top?[t]:"string"!=typeof t&&null==t.tagName&&null!=t.length?t:"string"==typeof t?document.querySelectorAll(t):[t];for(var n=0;n<t.length;n++)e.apply(t[n])}},I=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))};r.Mottle=function(t){var e=(t=t||{}).clickThreshold||250,r=t.dblClickThreshold||450,i=new m,a=new g(e,r),l=t.smartClicks,c=function(t,e,n,r){null!=n&&k(t,(function(){var t=o(this);l&&"click"===e?function(t,e,n,r){null==t.__taSmartClicks&&(f(t,"mousedown",(function(e){t.__tad=C(e)}),r),f(t,"mouseup",(function(e){t.__tau=C(e)}),r),f(t,"click",(function(e){if(t.__tad&&t.__tau&&t.__tad[0]===t.__tau[0]&&t.__tad[1]===t.__tau[1])for(var n=0;n<t.__taSmartClicks.length;n++)t.__taSmartClicks[n].apply(s(e),[e])}),r),t.__taSmartClicks=[]);t.__taSmartClicks.push(n),n.__taUnstore=function(){u(t.__taSmartClicks,n)}}(t,0,n,r):"tap"===e||"dbltap"===e||"contextmenu"===e?a(t,e,n,r):"mouseenter"===e||"mouseexit"==e?i(t,e,n,r):f(t,e,n,r)}))};this.remove=function(t){return k(t,(function(){var t=o(this);if(t.__ta)for(var e in t.__ta)if(t.__ta.hasOwnProperty(e))for(var n in t.__ta[e])t.__ta[e].hasOwnProperty(n)&&D(t,e,t.__ta[e][n]);t.parentNode&&t.parentNode.removeChild(t)})),this},this.on=function(t,e,n,r){return c(arguments[0],arguments[1],arguments[arguments.length-1],4==arguments.length?arguments[2]:null),this},this.off=function(t,e,n){return D(t,e,n),this},this.trigger=function(t,e,r,i){var s=b&&("undefined"==typeof MouseEvent||null==r||r.constructor===MouseEvent),a=y&&!b&&P[e]?P[e]:e,u=!(y&&!b&&P[e]),l=C(r),c=j(r,"screen"),h=function(t){return j(t,"client")}(r);return k(t,(function(){var t,d=o(this);r=r||{screenX:c[0],screenY:c[1],clientX:h[0],clientY:h[1]};var f=function(t){i&&(t.payload=i)},p={TouchEvent:function(t){var e=n(window,d,0,l[0],l[1],c[0],c[1],h[0],h[1]);(t.initTouchEvent||t.initEvent)(a,!0,!0,window,null,c[0],c[1],h[0],h[1],!1,!1,!1,!1,e,e,e,1,0)},MouseEvents:function(t){t.initMouseEvent(a,!0,!0,window,0,c[0],c[1],h[0],h[1],!1,!1,!1,!1,1,d)}};if(document.createEvent){var g=!u&&!s&&y&&P[e]?"TouchEvent":"MouseEvents";t=document.createEvent(g),p[g](t),f(t),d.dispatchEvent(t)}else document.createEventObject&&((t=document.createEventObject()).eventType=t.eventName=a,t.screenX=c[0],t.screenY=c[1],t.clientX=h[0],t.clientY=h[1],f(t),d.fireEvent("on"+a,t))})),this}},r.Mottle.consume=function(t,e){t.stopPropagation?t.stopPropagation():t.returnValue=!1,!e&&t.preventDefault&&t.preventDefault()},r.Mottle.pageLocation=C,r.Mottle.setForceTouchEvents=function(t){y=t},r.Mottle.setForceMouseEvents=function(t){b=t},r.Mottle.version="0.8.0",e.Mottle=r.Mottle}.call("undefined"==typeof window?this:window),function(){"use strict";var t=this,n=function(t,e,n){return-1===t.indexOf(e)&&(n?t.unshift(e):t.push(e),!0)},r=function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)},i=function(t){return null!=t&&("string"==typeof t||t.constructor===String)},o=function(t,e,n){for(var r=(n=n||t.parentNode).querySelectorAll(e),i=0;i<r.length;i++)if(r[i]===t)return!0;return!1},s=function(t,e,n){if(o(e,n,t))return e;for(var r=e.parentNode;null!=r&&r!==t;){if(o(r,n,t))return r;r=r.parentNode}},a=function(){var t=-1;if("Microsoft Internet Explorer"===navigator.appName){var e=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))}return t}(),u=a>-1&&a<9,l=9===a,c=function(t){if(u)return[t.clientX+document.documentElement.scrollLeft,t.clientY+document.documentElement.scrollTop];var e=d(t),n=h(e,0);return l?[n.pageX||n.clientX,n.pageY||n.clientY]:[n.pageX,n.pageY]},h=function(t,e){return t.item?t.item(e):t[e]},d=function(t){return t.touches&&t.touches.length>0?t.touches:t.changedTouches&&t.changedTouches.length>0?t.changedTouches:t.targetTouches&&t.targetTouches.length>0?t.targetTouches:[t]},f={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"},p=["stop","start","drag","drop","over","out","beforeStart"],g=function(){},v=function(){return!0},m=function(t,e,n){for(var r=0;r<t.length;r++)t[r]!=n&&e(t[r])},y=function(t,e,n,r){m(t,(function(t){t.setActive(e),e&&t.updatePosition(),n&&t.setHover(r,e)}))},b=function(t,e){if(null!=t){t=i(t)||null!=t.tagName||null==t.length?[t]:t;for(var n=0;n<t.length;n++)e.apply(t[n],[t[n]])}},P=function(t){t.stopPropagation?(t.stopPropagation(),t.preventDefault()):t.returnValue=!1},x=function(t,e,n,r){this.params=e||{},this.el=t,this.params.addClass(this.el,this._class),this.uuid=w();var i=!0;return this.setEnabled=function(t){i=t},this.isEnabled=function(){return i},this.toggleEnabled=function(){i=!i},this.setScope=function(t){this.scopes=t?t.split(/\s+/):[r]},this.addScope=function(t){var e={};for(var n in b(this.scopes,(function(t){e[t]=!0})),b(t?t.split(/\s+/):[],(function(t){e[t]=!0})),this.scopes=[],e)this.scopes.push(n)},this.removeScope=function(t){var e={};for(var n in b(this.scopes,(function(t){e[t]=!0})),b(t?t.split(/\s+/):[],(function(t){delete e[t]})),this.scopes=[],e)this.scopes.push(n)},this.toggleScope=function(t){var e={};for(var n in b(this.scopes,(function(t){e[t]=!0})),b(t?t.split(/\s+/):[],(function(t){e[t]?delete e[t]:e[t]=!0})),this.scopes=[],e)this.scopes.push(n)},this.setScope(e.scope),this.k=e.katavorio,e.katavorio},S=function(){return!0},j=function(){return!1},C=function(t,e,n,r){this._class=n.draggable;var a=x.apply(this,arguments);this.rightButtonCanDrag=this.params.rightButtonCanDrag;var u,l,h,d,p,g,m=[0,0],b=null,C=null,E=[0,0],_=!1,D=[0,0],k=!1!==this.params.consumeStartEvent,I=this.el,T=this.params.clone,A=(this.params.scroll,!1!==e.multipleDrop),M=!1,R=null,N=[],L=null,F=e.ghostProxyParent;if(u=!0===e.ghostProxy?S:e.ghostProxy&&"function"==typeof e.ghostProxy?e.ghostProxy:function(t,e){return!(!L||!L.useGhostProxy)&&L.useGhostProxy(t,e)},l=e.makeGhostProxy?e.makeGhostProxy:function(t){return L&&L.makeGhostProxy?L.makeGhostProxy(t):t.cloneNode(!0)},e.selector){var U=t.getAttribute("katavorio-draggable");null==U&&(U=""+(new Date).getTime(),t.setAttribute("katavorio-draggable",U)),N.push(e)}var G,H=e.snapThreshold,B=function(t,e,n,r,i){var o=e*Math.floor(t[0]/e),s=o+e,a=Math.abs(t[0]-o)<=r?o:Math.abs(s-t[0])<=r?s:t[0],u=n*Math.floor(t[1]/n),l=u+n;return[a,Math.abs(t[1]-u)<=i?u:Math.abs(l-t[1])<=i?l:t[1]]};this.posses=[],this.posseRoles={},this.toGrid=function(t){if(null==this.params.grid)return t;var e=this.params.grid?this.params.grid[0]/2:H||5,n=this.params.grid?this.params.grid[1]/2:H||5;return B(t,this.params.grid[0],this.params.grid[1],e,n)},this.snap=function(t,e){if(null!=I){t=t||(this.params.grid?this.params.grid[0]:10),e=e||(this.params.grid?this.params.grid[1]:10);var n=this.params.getPosition(I),r=this.params.grid?this.params.grid[0]/2:H,i=this.params.grid?this.params.grid[1]/2:H,o=B(n,t,e,r,i);return this.params.setPosition(I,o),o}},this.setUseGhostProxy=function(t){u=t?S:j};var W=function(t){return!1===e.allowNegative?[Math.max(0,t[0]),Math.max(0,t[1])]:t},X=function(t){G="function"==typeof t?t:t?function(t,e,n,r){return W([Math.max(0,Math.min(n.w-r[0],t[0])),Math.max(0,Math.min(n.h-r[1],t[1]))])}.bind(this):function(t){return W(t)}}.bind(this);X("function"==typeof this.params.constrain?this.params.constrain:this.params.constrain||this.params.containment),this.setConstrain=function(t){X(t)};var Y;this.setRevert=function(t){Y=t},this.params.revert&&(Y=this.params.revert);var z={},V=this.setFilter=function(e,n){if(e){var r="function"==typeof(s=e)?(s._katavorioId=w(),s._katavorioId):s;z[r]=[function(n){var r,s=n.srcElement||n.target;return i(e)?r=o(s,e,t):"function"==typeof e&&(r=e(n,t)),r},!1!==n]}var s};this.addFilter=V,this.removeFilter=function(t){var e="function"==typeof t?t._katavorioId:t;delete z[e]};this.clearAllFilters=function(){z={}},this.canDrag=this.params.canDrag||v;var q,$=[],J=[];this.addSelector=function(t){t.selector&&N.push(t)},this.downListener=function(t){var e,r,i,u,l,h,d,p,g;if(!t.defaultPrevented&&((this.rightButtonCanDrag||3!==t.which&&2!==t.button)&&this.isEnabled()&&this.canDrag())){var v=function(t){for(var e in z){var n=z[e],r=n[0](t);if(n[1]&&(r=!r),!r)return!1}return!0}(t)&&function(t,e,n){var r=t.srcElement||t.target;return!o(r,n.getInputFilterSelector(),e)}(t,this.el,this.k);if(v){if(L=null,R=null,N.length>0){var y=function(t,e,n){for(var r=null,i=e.getAttribute("katavorio-draggable"),a=null!=i?"[katavorio-draggable='"+i+"'] ":"",u=0;u<t.length;u++)if(null!=(r=s(e,n,a+t[u].selector))){if(t[u].filter){var l=o(n,t[u].filter,r);if(!0===t[u].filterExclude&&!l||l)return null}return[t[u],r]}return null}(N,this.el,t.target||t.srcElement);if(null!=y&&(L=y[0],R=y[1]),null==R)return}else R=this.el;if(T)if(I=R.cloneNode(!0),this.params.addClass(I,f.clonedDrag),I.setAttribute("id",null),I.style.position="absolute",null!=this.params.parent){var x=this.params.getPosition(this.el);I.style.left=x[0]+"px",I.style.top=x[1]+"px",this.params.parent.appendChild(I)}else{var S=(e=R.getBoundingClientRect(),r=document.body,i=document.documentElement,u=window.pageYOffset||i.scrollTop||r.scrollTop,l=window.pageXOffset||i.scrollLeft||r.scrollLeft,h=i.clientTop||r.clientTop||0,d=i.clientLeft||r.clientLeft||0,p=e.top+u-h,g=e.left+l-d,{top:Math.round(p),left:Math.round(g)});I.style.left=S.left+"px",I.style.top=S.top+"px",document.body.appendChild(I)}else I=R;k&&P(t),m=c(t),I&&I.parentNode&&(D=[I.parentNode.scrollLeft,I.parentNode.scrollTop]),this.params.bind(document,"mousemove",this.moveListener),this.params.bind(document,"mouseup",this.upListener),a.markSelection(this),a.markPosses(this),this.params.addClass(document.body,n.noSelect),Q("beforeStart",{el:this.el,pos:b,e:t,drag:this})}else this.params.consumeFilteredEvents&&P(t)}}.bind(this),this.moveListener=function(t){if(m){if(!_)if(!1!==Q("start",{el:this.el,pos:b,e:t,drag:this})){if(!m)return;this.mark(!0),_=!0}else this.abort();if(m){J.length=0;var e=c(t),n=e[0]-m[0],r=e[1]-m[1],i=this.params.ignoreZoom?1:a.getZoom();I&&I.parentNode&&(n+=I.parentNode.scrollLeft-D[0],r+=I.parentNode.scrollTop-D[1]),n/=i,r/=i,this.moveBy(n,r,t),a.updateSelection(n,r,this),a.updatePosses(n,r,this)}}}.bind(this),this.upListener=function(t){m&&(m=null,this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.params.removeClass(document.body,n.noSelect),this.unmark(t),a.unmarkSelection(this,t),a.unmarkPosses(this,t),this.stop(t),a.notifyPosseDragStop(this,t),_=!1,J.length=0,T?(I&&I.parentNode&&I.parentNode.removeChild(I),I=null):Y&&!0===Y(I,this.params.getPosition(I))&&(this.params.setPosition(I,b),Q("revert",I)))}.bind(this),this.getFilters=function(){return z},this.abort=function(){null!=m&&this.upListener()},this.getDragElement=function(t){return t?R||this.el:I||this.el};var K={start:[],drag:[],stop:[],over:[],out:[],beforeStart:[],revert:[]};e.events.start&&K.start.push(e.events.start),e.events.beforeStart&&K.beforeStart.push(e.events.beforeStart),e.events.stop&&K.stop.push(e.events.stop),e.events.drag&&K.drag.push(e.events.drag),e.events.revert&&K.revert.push(e.events.revert),this.on=function(t,e){K[t]&&K[t].push(e)},this.off=function(t,e){if(K[t]){for(var n=[],r=0;r<K[t].length;r++)K[t][r]!==e&&n.push(K[t][r]);K[t]=n}};var Z,Q=function(t,e){var n=null;if(L&&L[t])n=L[t](e);else if(K[t])for(var r=0;r<K[t].length;r++)try{var i=K[t][r](e);null!=i&&(n=i)}catch(t){}return n};this.notifyStart=function(t){Q("start",{el:this.el,pos:this.params.getPosition(I),e:t,drag:this})},this.stop=function(t,e){if(e||_){var n=[],r=a.getSelection(),i=this.params.getPosition(I);if(r.length>0)for(var o=0;o<r.length;o++){var s=this.params.getPosition(r[o].el);n.push([r[o].el,{left:s[0],top:s[1]},r[o]])}else n.push([I,{left:i[0],top:i[1]},this]);Q("stop",{el:I,pos:Z||i,finalPos:i,e:t,drag:this,selection:n})}},this.mark=function(t){var e;b=this.params.getPosition(I),C=this.params.getPosition(I,!0),E=[C[0]-b[0],C[1]-b[1]],this.size=this.params.getSize(I),$=a.getMatchingDroppables(this),y($,!0,!1,this),this.params.addClass(I,this.params.dragClass||n.drag),e=this.params.getConstrainingRectangle?this.params.getConstrainingRectangle(I):this.params.getSize(I.parentNode),q={w:e[0],h:e[1]},p=0,g=0,t&&a.notifySelectionDragStart(this)},this.unmark=function(t,r){if(y($,!1,!0,this),M&&u(R,I)?(Z=[I.offsetLeft-p,I.offsetTop-g],I.parentNode.removeChild(I),I=R):Z=null,this.params.removeClass(I,this.params.dragClass||n.drag),$.length=0,M=!1,!r){J.length>0&&Z&&e.setPosition(R,Z),J.sort(O);for(var i=0;i<J.length;i++){if(!0===J[i].drop(this,t))break}}},this.moveBy=function(t,n,r){J.length=0;var i=this.toGrid([b[0]+t,b[1]+n]),o=function(t,e,n,r){return null!=L&&L.constrain&&"function"==typeof L.constrain?L.constrain(t,e,n,r):G(t,e,n,r)}(i,I,q,this.size);if(u(this.el,I))if(i[0]!==o[0]||i[1]!==o[1]){if(!M){var s=l(R);e.addClass(s,f.ghostProxy),F?(F.appendChild(s),h=e.getPosition(R.parentNode,!0),d=e.getPosition(e.ghostProxyParent,!0),p=h[0]-d[0],g=h[1]-d[1]):R.parentNode.appendChild(s),I=s,M=!0}o=i}else M&&(I.parentNode.removeChild(I),I=R,M=!1,h=null,d=null,p=0,g=0);var a={x:o[0],y:o[1],w:this.size[0],h:this.size[1]},c={x:a.x+E[0],y:a.y+E[1],w:a.w,h:a.h},v=null;this.params.setPosition(I,[o[0]+p,o[1]+g]);for(var m=0;m<$.length;m++){var y={x:$[m].pagePosition[0],y:$[m].pagePosition[1],w:$[m].size[0],h:$[m].size[1]};this.params.intersects(c,y)&&(A||null==v||v===$[m].el)&&$[m].canDrop(this)?(v||(v=$[m].el),J.push($[m]),$[m].setHover(this,!0,r)):$[m].isHover()&&$[m].setHover(this,!1,r)}Q("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?V(this.params.handle,!1):V(this.params.filter,this.params.filterExclude)},E=function(t,e,n,r){this._class=n.droppable,this.params=e||{},this.rank=e.rank||0,this._activeClass=this.params.activeClass||n.active,this._hoverClass=this.params.hoverClass||n.hover,x.apply(this,arguments);var i=!1;this.allowLoopback=!1!==this.params.allowLoopback,this.setActive=function(t){this.params[t?"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(t){return!0},this.isHover=function(){return i},this.setHover=function(t,e,n){(e||null==this.el._katavorioDragHover||this.el._katavorioDragHover===t.el._katavorio)&&(this.params[e?"addClass":"removeClass"](this.el,this._hoverClass),this.el._katavorioDragHover=e?t.el._katavorio:null,i!==e&&this.params.events[e?"over":"out"]({el:this.el,e:n,drag:t,drop:this}),i=e)},this.drop=function(t,e){return this.params.events.drop({drag:t,e:e,drop:this})},this.destroy=function(){this._class=null,this._activeClass=null,this._hoverClass=null,i=null}},w=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},O=function(t,e){return t.rank<e.rank?1:t.rank>e.rank?-1:0},_=function(t){return null==t||null==(t="string"==typeof t||t.constructor===String?document.getElementById(t):t)?null:(t._katavorio=t._katavorio||w(),t)};t.Katavorio=function(t){var e=[],o={};this._dragsByScope={},this._dropsByScope={};var s=1,a=function(t,e){b(t,(function(t){for(var n=0;n<t.scopes.length;n++)e[t.scopes[n]]=e[t.scopes[n]]||[],e[t.scopes[n]].push(t)}))},u=function(e,n){var r=0;return b(e,(function(e){for(var i=0;i<e.scopes.length;i++)if(n[e.scopes[i]]){var o=t.indexOf(n[e.scopes[i]],e);-1!==o&&(n[e.scopes[i]].splice(o,1),r++)}})),r>0},l=(this.getMatchingDroppables=function(t){for(var e=[],n={},r=0;r<t.scopes.length;r++){var i=this._dropsByScope[t.scopes[r]];if(i)for(var o=0;o<i.length;o++)!i[o].canDrop(t)||n[i[o].uuid]||!i[o].allowLoopback&&i[o].el===t.el||(n[i[o].uuid]=!0,e.push(i[o]))}return e.sort(O),e},function(e){e=e||{};var n,r={events:{}};for(n in t)r[n]=t[n];for(n in e)r[n]=e[n];for(n=0;n<p.length;n++)r.events[p[n]]=e[p[n]]||g;return r.katavorio=this,r}.bind(this)),c=function(t,e){for(var n=0;n<p.length;n++)e[p[n]]&&t.on(p[n],e[p[n]])}.bind(this),h={},d=t.css||{},v=t.scope||"katavorio-drag-scope";for(var y in f)h[y]=f[y];for(var y in d)h[y]=d[y];var P=t.inputFilterSelector||"input,textarea,select,button,option";this.getInputFilterSelector=function(){return P},this.setInputFilterSelector=function(t){return P=t,this},this.draggable=function(e,n){var r=[];return b(e,function(e){if(null!=(e=_(e)))if(null==e._katavorioDrag){var i=l(n);e._katavorioDrag=new C(e,i,h,v),a(e._katavorioDrag,this._dragsByScope),r.push(e._katavorioDrag),t.addClass(e,i.selector?h.delegatedDraggable:h.draggable)}else c(e._katavorioDrag,n)}.bind(this)),r},this.droppable=function(e,n){var r=[];return b(e,function(e){if(null!=(e=_(e))){var i=new E(e,l(n),h,v);e._katavorioDrop=e._katavorioDrop||[],e._katavorioDrop.push(i),a(i,this._dropsByScope),r.push(i),t.addClass(e,h.droppable)}}.bind(this)),r},this.select=function(n){return b(n,(function(){var n=_(this);n&&n._katavorioDrag&&(o[n._katavorio]||(e.push(n._katavorioDrag),o[n._katavorio]=[n,e.length-1],t.addClass(n,h.selected)))})),this},this.deselect=function(n){return b(n,(function(){var n=_(this);if(n&&n._katavorio&&o[n._katavorio]){for(var r=[],i=0;i<e.length;i++)e[i].el!==n&&r.push(e[i]);e=r,delete o[n._katavorio],t.removeClass(n,h.selected)}})),this},this.deselectAll=function(){for(var n in o){var r=o[n];t.removeClass(r[0],h.selected)}e.length=0,o={}},this.markSelection=function(t){m(e,(function(t){t.mark()}),t)},this.markPosses=function(t){t.posses&&b(t.posses,(function(e){t.posseRoles[e]&&D[e]&&m(D[e].members,(function(t){t.mark()}),t)}))},this.unmarkSelection=function(t,n){m(e,(function(t){t.unmark(n)}),t)},this.unmarkPosses=function(t,e){t.posses&&b(t.posses,(function(n){t.posseRoles[n]&&D[n]&&m(D[n].members,(function(t){t.unmark(e,!0)}),t)}))},this.getSelection=function(){return e.slice(0)},this.updateSelection=function(t,n,r){m(e,(function(e){e.moveBy(t,n)}),r)};var x=function(t,e){e.posses&&b(e.posses,(function(n){e.posseRoles[n]&&D[n]&&m(D[n].members,(function(e){t(e)}),e)}))};this.updatePosses=function(t,e,n){x((function(n){n.moveBy(t,e)}),n)},this.notifyPosseDragStop=function(t,e){x((function(t){t.stop(e,!0)}),t)},this.notifySelectionDragStop=function(t,n){m(e,(function(t){t.stop(n,!0)}),t)},this.notifySelectionDragStart=function(t,n){m(e,(function(t){t.notifyStart(n)}),t)},this.setZoom=function(t){s=t},this.getZoom=function(){return s};var S=function(t,e,n,r){b(t,(function(t){u(t,n),t[r](e),a(t,n)}))};b(["set","add","remove","toggle"],function(t){this[t+"Scope"]=function(e,n){S(e._katavorioDrag,n,this._dragsByScope,t+"Scope"),S(e._katavorioDrop,n,this._dropsByScope,t+"Scope")}.bind(this),this[t+"DragScope"]=function(e,n){S(e.constructor===C?e:e._katavorioDrag,n,this._dragsByScope,t+"Scope")}.bind(this),this[t+"DropScope"]=function(e,n){S(e.constructor===E?e:e._katavorioDrop,n,this._dropsByScope,t+"Scope")}.bind(this)}.bind(this)),this.snapToGrid=function(t,e){for(var n in this._dragsByScope)m(this._dragsByScope[n],(function(n){n.snap(t,e)}))},this.getDragsForScope=function(t){return this._dragsByScope[t]},this.getDropsForScope=function(t){return this._dropsByScope[t]};var j=function(t,n,r){if((t=_(t))[n]){var i=e.indexOf(t[n]);i>=0&&e.splice(i,1),u(t[n],r)&&b(t[n],(function(t){t.destroy()})),delete t[n]}},w=function(t,e,n,r){(t=_(t))[e]&&t[e].off(n,r)};this.elementRemoved=function(t){t._katavorioDrag&&this.destroyDraggable(t),t._katavorioDrop&&this.destroyDroppable(t)},this.destroyDraggable=function(t,e,n){1===arguments.length?j(t,"_katavorioDrag",this._dragsByScope):w(t,"_katavorioDrag",e,n)},this.destroyDroppable=function(t,e,n){1===arguments.length?j(t,"_katavorioDrop",this._dropsByScope):w(t,"_katavorioDrop",e,n)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},e=[],o={},D={}};var D={},k=function(t,e,r){var o,s=i(e)?e:e.id,a=!!i(e)||!1!==e.active,u=D[s]||(o={name:s,members:[]},D[s]=o,o);return b(t,(function(t){if(t._katavorioDrag){if(r&&null!=t._katavorioDrag.posseRoles[u.name])return;n(u.members,t._katavorioDrag),n(t._katavorioDrag.posses,u.name),t._katavorioDrag.posseRoles[u.name]=a}})),u};this.addToPosse=function(t,e){for(var n=[],r=1;r<arguments.length;r++)n.push(k(t,arguments[r]));return 1===n.length?n[0]:n},this.setPosse=function(t,e){for(var n=[],r=1;r<arguments.length;r++)n.push(k(t,arguments[r],!0).name);return b(t,function(t){if(t._katavorioDrag){var e=function(t,e){for(var n=[],r=0;r<t.length;r++)-1===e.indexOf(t[r])&&n.push(t[r]);return n}(t._katavorioDrag.posses,n);Array.prototype.push.apply([],t._katavorioDrag.posses);for(var r=0;r<e.length;r++)this.removeFromPosse(t,e[r])}}.bind(this)),1===n.length?n[0]:n},this.removeFromPosse=function(t,e){if(arguments.length<2)throw new TypeError("No posse id provided for remove operation");for(var n=1;n<arguments.length;n++)e=arguments[n],b(t,(function(t){if(t._katavorioDrag&&t._katavorioDrag.posses){var n=t._katavorioDrag;b(e,(function(t){r(D[t].members,n),r(n.posses,t),delete n.posseRoles[t]}))}}))},this.removeFromAllPosses=function(t){b(t,(function(t){if(t._katavorioDrag&&t._katavorioDrag.posses){var e=t._katavorioDrag;b(e.posses,(function(t){r(D[t].members,e)})),e.posses.length=0,e.posseRoles={}}}))},this.setPosseState=function(t,e,n){var r=D[e];r&&b(t,(function(t){t._katavorioDrag&&t._katavorioDrag.posses&&(t._katavorioDrag.posseRoles[r.name]=n)}))}},t.Katavorio.version="1.0.0",e.Katavorio=t.Katavorio}.call("undefined"!=typeof window?window:this),function(){var t=this;t.jsPlumbUtil=t.jsPlumbUtil||{};var n=t.jsPlumbUtil;function r(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return"string"==typeof t}function o(t){return"boolean"==typeof t}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return"[object Date]"===Object.prototype.toString.call(t)}function u(t){return"[object Function]"===Object.prototype.toString.call(t)}function l(t){if(i(t))return""+t;if(o(t))return!!t;if(a(t))return new Date(t.getTime());if(u(t))return t;if(r(t)){for(var e=[],n=0;n<t.length;n++)e.push(l(t[n]));return e}if(s(t)){var c={};for(var h in t)c[h]=l(t[h]);return c}return t}function c(t,e,n,a){var u,c,h={},d={};for(n=n||[],a=a||[],c=0;c<n.length;c++)h[n[c]]=!0;for(c=0;c<a.length;c++)d[a[c]]=!0;var f=l(t);for(c in e)if(null==f[c]||d[c])f[c]=e[c];else if(i(e[c])||o(e[c]))h[c]?((u=[]).push.apply(u,r(f[c])?f[c]:[f[c]]),u.push.apply(u,o(e[c])?e[c]:[e[c]]),f[c]=u):f[c]=e[c];else if(r(e[c]))u=[],r(f[c])&&u.push.apply(u,f[c]),u.push.apply(u,e[c]),f[c]=u;else if(s(e[c]))for(var p in s(f[c])||(f[c]={}),e[c])f[c][p]=e[c][p];return f}function h(t,e){if(t)for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}function d(t,e){var n=t.indexOf(e);return n>-1&&t.splice(n,1),-1!==n}function f(t,e,n,r){var i=t[e];return null==i&&(i=[],t[e]=i),i[r?"unshift":"push"](n),i}e.jsPlumbUtil=n,n.isArray=r,n.isNumber=function(t){return"[object Number]"===Object.prototype.toString.call(t)},n.isString=i,n.isBoolean=o,n.isNull=function(t){return null==t},n.isObject=s,n.isDate=a,n.isFunction=u,n.isNamedFunction=function(t){return u(t)&&null!=t.name&&t.name.length>0},n.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},n.clone=l,n.merge=c,n.replace=function(t,e,n){if(null!=t){var r=t;return e.replace(/([^\.])+/g,(function(t,e,i,o){var s=t.match(/([^\[0-9]+){1}(\[)([0-9+])/),a=function(){return r[s[1]]||(r[s[1]]=[],r[s[1]])};if(i+t.length>=o.length)s?a()[s[3]]=n:r[t]=n;else if(s){var u=a();r=u[s[3]]||(u[s[3]]={},u[s[3]])}else r=r[t]||(r[t]={},r[t]);return""})),t}},n.functionChain=function(t,e,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===e)return i}return t},n.populate=function(t,e,n,o){var a=function(t){if(null!=t){if(i(t))return function(t){var n=t.match(/(\${.*?})/g);if(null!=n)for(var r=0;r<n.length;r++){var i=e[n[r].substring(2,n[r].length-1)]||"";null!=i&&(t=t.replace(n[r],i))}return t}(t);if(!u(t)||o||null!=n&&0!==(t.name||"").indexOf(n)){if(r(t)){for(var l=[],c=0;c<t.length;c++)l.push(a(t[c]));return l}if(s(t)){var h={};for(var d in t)h[d]=a(t[d]);return h}return t}return t(e)}};return a(t)},n.findWithFunction=h,n.removeWithFunction=function(t,e){var n=h(t,e);return n>-1&&t.splice(n,1),-1!==n},n.remove=d,n.addWithFunction=function(t,e,n){-1===h(t,n)&&t.push(e)},n.addToList=f,n.suggest=function(t,e,n){return-1===t.indexOf(e)&&(n?t.unshift(e):t.push(e),!0)},n.extend=function(t,e,n){var i;e=r(e)?e:[e];var o=function(e){for(var n=e.__proto__;null!=n;)if(null!=n.prototype){for(var r in n.prototype)n.prototype.hasOwnProperty(r)&&!t.prototype.hasOwnProperty(r)&&(t.prototype[r]=n.prototype[r]);n=n.prototype.__proto__}else n=null};for(i=0;i<e.length;i++){for(var s in e[i].prototype)e[i].prototype.hasOwnProperty(s)&&!t.prototype.hasOwnProperty(s)&&(t.prototype[s]=e[i].prototype[s]);o(e[i])}var a=function(t,n){return function(){for(i=0;i<e.length;i++)e[i].prototype[t]&&e[i].prototype[t].apply(this,arguments);return n.apply(this,arguments)}},u=function(e){for(var n in e)t.prototype[n]=a(n,e[n])};if(arguments.length>2)for(i=2;i<arguments.length;i++)u(arguments[i]);return t};for(var p=[],g=0;g<256;g++)p[g]=(g<16?"0":"")+g.toString(16);function v(){var t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return p[255&t]+p[t>>8&255]+p[t>>16&255]+p[t>>24&255]+"-"+p[255&e]+p[e>>8&255]+"-"+p[e>>16&15|64]+p[e>>24&255]+"-"+p[63&n|128]+p[n>>8&255]+"-"+p[n>>16&255]+p[n>>24&255]+p[255&r]+p[r>>8&255]+p[r>>16&255]+p[r>>24&255]}function m(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(n.logEnabled&&"undefined"!=typeof console)try{}catch(t){}}n.uuid=v,n.fastTrim=function(t){if(null==t)return null;for(var e=t.replace(/^\s\s*/,""),n=/\s/,r=e.length;n.test(e.charAt(--r)););return e.slice(0,r+1)},n.each=function(t,e){t=null==t.length||"string"==typeof t?[t]:t;for(var n=0;n<t.length;n++)e(t[n])},n.map=function(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e(t[r]));return n},n.mergeWithParents=function(t,e,n){n=n||"parent";var r=function(t){return t?e[t]:null},i=function(t){return t?r(t[n]):null},o=function(t,e){if(null==t)return e;var n=["anchor","anchors","cssClass","connector","paintStyle","hoverPaintStyle","endpoint","endpoints"];"override"===e.mergeStrategy&&Array.prototype.push.apply(n,["events","overlays"]);var r=c(t,e,[],n);return o(i(t),r)},s=function(t){if(null==t)return{};if("string"==typeof t)return r(t);if(t.length){for(var e=!1,n=0,i=void 0;!e&&n<t.length;)(i=s(t[n]))?e=!0:n++;return i}},a=s(t);return a?o(i(a),a):{}},n.logEnabled=!0,n.log=m,n.wrap=function(t,e,n){return function(){var r=null;try{null!=e&&(r=e.apply(this,arguments))}catch(t){m("jsPlumb function failed : "+t)}if(null!=t&&(null==n||r!==n))try{r=t.apply(this,arguments)}catch(t){m("wrapped function failed : "+t)}return r}};var y=function(){var t=this;this._listeners={},this.eventsSuspended=!1,this.tick=!1,this.eventsToDieOn={ready:!0},this.queue=[],this.bind=function(e,n,r){var i=function(e){f(t._listeners,e,n,r),n.__jsPlumb=n.__jsPlumb||{},n.__jsPlumb[v()]=e};if("string"==typeof e)i(e);else if(null!=e.length)for(var o=0;o<e.length;o++)i(e[o]);return t},this.fire=function(t,e,n){if(this.tick)this.queue.unshift(arguments);else{if(this.tick=!0,!this.eventsSuspended&&this._listeners[t]){var r=this._listeners[t].length,i=0,o=!1,s=null;if(!this.shouldFireEvent||this.shouldFireEvent(t,e,n))for(;!o&&i<r&&!1!==s;){if(this.eventsToDieOn[t])this._listeners[t][i].apply(this,[e,n]);else try{s=this._listeners[t][i].apply(this,[e,n])}catch(e){m("jsPlumb: fire failed for event "+t+" : "+e)}i++,null!=this._listeners&&null!=this._listeners[t]||(o=!0)}}this.tick=!1,this._drain()}return this},this._drain=function(){var e=t.queue.pop();e&&t.fire.apply(t,e)},this.unbind=function(t,e){if(0===arguments.length)this._listeners={};else if(1===arguments.length){if("string"==typeof t)delete this._listeners[t];else if(t.__jsPlumb){var n=void 0;for(var r in t.__jsPlumb)n=t.__jsPlumb[r],d(this._listeners[n]||[],t)}}else 2===arguments.length&&d(this._listeners[t]||[],e);return this},this.getListener=function(e){return t._listeners[e]},this.setSuspendEvents=function(e){t.eventsSuspended=e},this.isSuspendEvents=function(){return t.eventsSuspended},this.silently=function(e){t.setSuspendEvents(!0);try{e()}catch(t){m("Cannot execute silent function "+t)}t.setSuspendEvents(!1)},this.cleanupListeners=function(){for(var e in t._listeners)t._listeners[e]=null}};function b(t,e,n){var r=[t[0]-e[0],t[1]-e[1]],i=Math.cos(n/360*Math.PI*2),o=Math.sin(n/360*Math.PI*2);return[r[0]*i-r[1]*o+e[0],r[1]*i+r[0]*o+e[1],i,o]}n.EventGenerator=y,n.rotatePoint=b,n.rotateAnchorOrientation=function(t,e){var n=b(t,[0,0],e);return[Math.round(n[0]),Math.round(n[1])]}}.call("undefined"!=typeof window?window:this),function(){"use strict";var t=this;t.jsPlumbUtil.matchesSelector=function(t,e,n){for(var r=(n=n||t.parentNode).querySelectorAll(e),i=0;i<r.length;i++)if(r[i]===t)return!0;return!1},t.jsPlumbUtil.consume=function(t,e){t.stopPropagation?t.stopPropagation():t.returnValue=!1,!e&&t.preventDefault&&t.preventDefault()},t.jsPlumbUtil.sizeElement=function(t,e,n,r,i){t&&(t.style.height=i+"px",t.height=i,t.style.width=r+"px",t.width=r,t.style.left=e+"px",t.style.top=n+"px")}}.call("undefined"!=typeof window?window:this),function(){var t={deriveAnchor:function(t,e,n,r){return{top:["TopRight","TopLeft"],bottom:["BottomRight","BottomLeft"]}[t][e]}},e=function(t,e){this.count=0,this.instance=t,this.lists={},this.options=e||{},this.instance.addList=function(t,e){return this.listManager.addList(t,e)},this.instance.removeList=function(t){this.listManager.removeList(t)},this.instance.bind("manageElement",function(t){for(var e=this.instance.getSelector(t.el,"[jtk-scrollable-list]"),n=0;n<e.length;n++)this.addList(e[n])}.bind(this)),this.instance.bind("unmanageElement",(function(t){this.removeList(t.el)})),this.instance.bind("connection",function(t,e){null==e&&(this._maybeUpdateParentList(t.source),this._maybeUpdateParentList(t.target))}.bind(this))};this.jsPlumbListManager=e,e.prototype={addList:function(e,r){var i=this.instance.extend({},t);this.instance.extend(i,this.options),r=this.instance.extend(i,r||{});var o=[this.instance.getInstanceIndex(),this.count++].join("_");this.lists[o]=new n(this.instance,e,r,o)},removeList:function(t){var e=this.lists[t._jsPlumbList];e&&(e.destroy(),delete this.lists[t._jsPlumbList])},_maybeUpdateParentList:function(t){for(var e=t.parentNode,n=this.instance.getContainer();null!=e&&e!==n;){if(null!=e._jsPlumbList&&null!=this.lists[e._jsPlumbList])return void e._jsPlumbScrollHandler();e=e.parentNode}}};var n=function(t,e,n,r){function i(t,e,r,i){return n.anchor?n.anchor:n.deriveAnchor(t,e,r,i)}function o(t,e,r,i){return n.deriveEndpoint?n.deriveEndpoint(t,e,r,i):n.endpoint?n.endpoint:r.type}e._jsPlumbList=r;var s=function(n){for(var r=t.getSelector(e,".jtk-managed"),s=t.getId(e),a=0;a<r.length;a++){if(r[a].offsetTop<e.scrollTop)r[a]._jsPlumbProxies||(r[a]._jsPlumbProxies=r[a]._jsPlumbProxies||[],t.select({source:r[a]}).each((function(n){t.proxyConnection(n,0,e,s,(function(){return o("top",0,n.endpoints[0],n)}),(function(){return i("top",0,n.endpoints[0],n)})),r[a]._jsPlumbProxies.push([n,0])})),t.select({target:r[a]}).each((function(n){t.proxyConnection(n,1,e,s,(function(){return o("top",1,n.endpoints[1],n)}),(function(){return i("top",1,n.endpoints[1],n)})),r[a]._jsPlumbProxies.push([n,1])})));else if(r[a].offsetTop+r[a].offsetHeight>e.scrollTop+e.offsetHeight)r[a]._jsPlumbProxies||(r[a]._jsPlumbProxies=r[a]._jsPlumbProxies||[],t.select({source:r[a]}).each((function(n){t.proxyConnection(n,0,e,s,(function(){return o("bottom",0,n.endpoints[0],n)}),(function(){return i("bottom",0,n.endpoints[0],n)})),r[a]._jsPlumbProxies.push([n,0])})),t.select({target:r[a]}).each((function(n){t.proxyConnection(n,1,e,s,(function(){return o("bottom",1,n.endpoints[1],n)}),(function(){return i("bottom",1,n.endpoints[1],n)})),r[a]._jsPlumbProxies.push([n,1])})));else if(r[a]._jsPlumbProxies){for(var u=0;u<r[a]._jsPlumbProxies.length;u++)t.unproxyConnection(r[a]._jsPlumbProxies[u][0],r[a]._jsPlumbProxies[u][1],s);delete r[a]._jsPlumbProxies}t.revalidate(r[a])}!function(e){for(var n=e.parentNode,r=t.getContainer();null!=n&&n!==r;){if(t.hasClass(n,"jtk-managed"))return void t.recalculateOffsets(n);n=n.parentNode}}(e)};t.setAttribute(e,"jtk-scrollable-list","true"),e._jsPlumbScrollHandler=s,t.on(e,"scroll",s),s(),this.destroy=function(){t.off(e,"scroll",s),delete e._jsPlumbScrollHandler;for(var n=t.getSelector(e,".jtk-managed"),r=t.getId(e),i=0;i<n.length;i++)if(n[i]._jsPlumbProxies){for(var o=0;o<n[i]._jsPlumbProxies.length;o++)t.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 t=this,n=t.jsPlumbUtil,r=function(t){if(t._jsPlumb.paintStyle&&t._jsPlumb.hoverPaintStyle){var e={};d.extend(e,t._jsPlumb.paintStyle),d.extend(e,t._jsPlumb.hoverPaintStyle),delete t._jsPlumb.hoverPaintStyle,e.gradient&&t._jsPlumb.paintStyle.fill&&delete e.gradient,t._jsPlumb.hoverPaintStyle=e}},i=["tap","dbltap","click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu"],o=function(t){return null==t?null:t.split(" ")},s=function(t,e,n){for(var r in e)t[r]=n},a=function(t,e,r){if(t.getDefaultType){var i=t.getTypeDescriptor(),o={},a=t.getDefaultType(),u=n.merge({},a);s(o,a,"__default");for(var l=0,c=t._jsPlumb.types.length;l<c;l++){var h=t._jsPlumb.types[l];if("__default"!==h){var d=t._jsPlumb.instance.getType(h,i);if(null!=d){var f=["anchor","anchors","connector","paintStyle","hoverPaintStyle","endpoint","endpoints","connectorOverlays","connectorStyle","connectorHoverStyle","endpointStyle","endpointHoverStyle"],p=[];"override"===d.mergeStrategy?Array.prototype.push.apply(f,["events","overlays","cssClass"]):p.push("cssClass"),u=n.merge(u,d,p,f),s(o,d,h)}}}e&&(u=n.populate(u,e,"_")),t.applyType(u,r,o),r||t.repaint()}},u=t.jsPlumbUIComponent=function(t){n.EventGenerator.apply(this,arguments);var e=arguments,r=this.idPrefix+(new Date).getTime();this._jsPlumb={instance:t._jsPlumb,parameters:t.parameters||{},paintStyle:null,hoverPaintStyle:null,paintStyleInUse:null,hover:!1,beforeDetach:t.beforeDetach,beforeDrop:t.beforeDrop,overlayPlacements:[],hoverClass:t.hoverClass||t._jsPlumb.Defaults.HoverClass,types:[],typeCache:{}},this.cacheTypeItem=function(t,e,n){this._jsPlumb.typeCache[n]=this._jsPlumb.typeCache[n]||{},this._jsPlumb.typeCache[n][t]=e},this.getCachedTypeItem=function(t,e){return this._jsPlumb.typeCache[e]?this._jsPlumb.typeCache[e][t]:null},this.getId=function(){return r};var i=t.overlays||[],o={};if(this.defaultOverlayKeys){for(var s=0;s<this.defaultOverlayKeys.length;s++)Array.prototype.push.apply(i,this._jsPlumb.instance.Defaults[this.defaultOverlayKeys[s]]||[]);for(s=0;s<i.length;s++){var a=d.convertToFullOverlaySpec(i[s]);o[a[1].id]=a}}var u={overlays:o,parameters:t.parameters||{},scope:t.scope||this._jsPlumb.instance.getDefaultScope()};if(this.getDefaultType=function(){return u},this.appendToDefaultType=function(t){for(var e in t)u[