gc.spread.views.gantt.10.0.0.min.js 89 KB

123456789101112131415
  1. /*!
  2. *
  3. * SpreadJS Library 10.0.0
  4. *
  5. * Copyright(c) GrapeCity, Inc. All rights reserved.
  6. *
  7. * Licensed under the SpreadJS Commercial License.
  8. * spread.sales@grapecity.com
  9. * http://spread.grapecity.com/Pages/Spread-JS-License/
  10. *
  11. *
  12. */
  13. !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Gantt=e():(t.GC=t.GC||{},t.GC.Spread=t.GC.Spread||{},t.GC.Spread.Views=t.GC.Spread.Views||{},t.GC.Spread.Views.Plugins=t.GC.Spread.Views.Plugins||{},t.GC.Spread.Views.Plugins.Gantt=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="/assets/",e(0)}([function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}!function(){function e(t,e){var n=this;n.svg=et,n.options_=tt.defaults(e||{},{id:"id",start:"start",end:"end",text:"text",parentID:"parentID",predecessorID:"predecessorID",timeLineScale:"week",percentComplete:"percentComplete",headerHeight:rt,rowHeight:rt,scale:100}),n.options("data")&&(n.ganttData_=new Nt(n,n.options("data"))),n.ganttLayout_=new Lt(n,t),n.container_(n.options("container")),n.grid=t,n.name="GanttView",n.elementMap_={},n.renderedList_=[],n.actionStatus_="idle"}function a(t,e,n,r,i){var a=this,u=a.getItem(e);if(!u)return null;var c=o.call(a,e),s=i?8:4,l=i?8:0,f=30,d=c[u.id];if(d){var h=d&&d.bbox();if(0!==u.duration&&r>=h.y&&r<=h.y2){var g=h.x2-s<=n&&h.x2+s>n,p=h.x-s<=n&&h.x+s>n;if(!g||!p){var v=c[u.id+"_percentComplete"]&&c[u.id+"_percentComplete"].bbox();if(v&&v.x2-s<=n&&v.x2+s>n)return{row:e,action:"resizingPercentComplete",onTaskBody:!0,showIndicator:!0}}if(g)return{row:e,action:"resizingRight",onTaskBody:!0,showIndicator:!0};if(p)return{row:e,action:"resizingLeft",onTaskBody:!0,showIndicator:!0}}if(d.contains(n,r,l))return{row:e,action:"dragging",onTaskBody:!0,showIndicator:!0};var m=c.connectorLeft;if(m&&m.contains(n,r))return{row:e,action:"connectingLeft",showIndicator:!0};var y=c.connectorRight;if(y&&y.contains(n,r))return{row:e,action:"connectingRight",showIndicator:!0};if(n>=h.x-f&&n<h.x2+f&&r>=h.y&&r<h.y2)return{row:e,showIndicator:!0}}for(var _ in c)if(c.hasOwnProperty(_)){var x=c[_];if(x&&x.contains(n,r)&&t.target===x.node)return{row:e,element:x}}}function o(t){var e,n=this;if(tt.isNil(t))return[];var i=n.getItem(t),a=n.elementMap_,o=(e={},r(e,i.id,a[i.id]),r(e,i.id+"_text",a[i.id+"_text"]),r(e,i.id+"_percentComplete",a[i.id+"_percentComplete"]),r(e,"connectorLeft",a.connectorLeft),r(e,"connectorRight",a.connectorRight),e);return tt.each(p.call(n,t),function(t){var e=n.getItem(t[0]),r=n.getItem(t[1]);if(e&&r){var i=e.id+"_to_"+r.id;o[i]=a[i],o[i+"_arrow"]=a[i+"_arrow"]}}),o}function u(t,e){var n=this,r=n.elementMap_,i=n.getItem(t);i=i&&i.id;var a=n.getItem(e);return a=a&&a.id,!(r[i]||r[a])}function c(t,e,n,r){return"<div "+s(t,e,"gc-column-header-cell gc-cell-border "+n)+">"+r+"</div>"}function s(t,e,n){var r=tt.defaults(e||{},{position:"absolute"}),i=tt.map(t,function(t,e){return e+":"+t+"px;"}).join("");return'class="'+n+'" style="'+i+tt.map(r,function(t,e){return e+":"+t+";"}).join("")+'"'}function l(t){var e=this,n=e.ganttData_,r=e.getItem(t);if(r&&St.isValidNumber(r.startDay)&&!n.isCollapsed(t,!1)){var i=e.ganttLayout_,a=[],o=e.getTimeSpan(),u=i.getRowHeight(t),c=i.getItemHeight(t),s=e.scale_(),l=(r.startDay-o.startDay)*s,f=i.getOffsetByIndex(t)+(u-c)/2;if(0===r.duration){var d=c/2,h=[[d+l,f],[c+l,d+f],[d+l,c+f],[l,d+f],[d+l,f]];a.push({id:r.id,construct:"polyline",param:h.join(" "),operations:[{type:"addClass",param:"gc-gantt-item gc-gantt-item-stamp r"+t},{type:"move",param:[l,f]}]})}else{var g=r.duration*s;a.push({id:r.id,construct:"rect",param:[g,c],operations:[{type:"addClass",param:"gc-gantt-item"+(r.type>0?" gc-gantt-item-parent":" gc-gantt-item-child")+" r"+t},{type:"move",param:[l,f]}]});var p=g*r.percentComplete;a.push({id:r.id+"_percentComplete",construct:"rect",param:[St.isValidNumber(p)?p:0,c],operations:[{type:"addClass",param:r.type>0?"gc-gantt-parent-percentComplete":"gc-gantt-child-percentComplete"},{type:"move",param:[l,f]}]}),a.push({id:r.id+"_text",construct:"text",param:r.text,operations:[{type:"addClass",param:"gc-gantt-item-text r"+t},{type:"center",param:[l+g/2,f+c/2]}]})}return a}}function f(t){var e=this,n=e.ganttData_,r=tt.map(t,function(t){return n.getItemBySourceIndex(t)}),i=[],a=[];tt.each(r,function(t){tt.each(t.predecessorIndexes_,function(t){i[t]=!0}),tt.each(t.successorIndexes_,function(t){a[t]=!0})}),tt.each(t,function(t){i[t]=!1,a[t]=!1});var o=[],u=[];return tt.each(i,function(t,e){t&&o.push(Number(e))}),tt.each(a,function(t,e){t&&u.push(Number(e))}),{entries:o,exits:u}}function d(t,e,n){var r=this,i=[],a=r.ganttData_;tt.isArray(t)||(t=[t]),tt.isArray(e)||(e=[e]),tt.each(t,function(t){i.push({path:[t],forward:!0}),i.push({path:[t],forward:!1})});for(var o=[],u=t.concat(e).concat(n),c=function(t,r){return function(a){if(!n||tt.indexOf(u,a)>-1){var c=tt.clone(t);c.push(a),tt.indexOf(e,a)>-1?(r.forward||c.reverse(),o.push(c)):i.push({path:c,forward:r.forward})}}};i.length>0;){var s=i.pop(),l=s.path,f=a.getItemBySourceIndex(l[l.length-1]),d=s.forward?f.successorIndexes_:f.predecessorIndexes_;tt.each(d,c(l,s))}return o}function h(t){var e=this,n=e.collapsedLines_;if(t||!n){for(var r=e.ganttData_,i=[],a=0,o=e.getItemCount(!0);o>a;++a)r.isCollapsed(a)&&i.push(a);n||!function(){var t=f.call(e,i),r=d.call(e,t.entries,t.exits,i),a=[];tt.each(r,function(t){var e=t[0],n=t[t.length-1];tt.some(a,function(t){return t[0]===e&&t[1]===n})||a.push([e,n])}),n=e.collapsedLines_=a}();var u=[];return tt.each(n,function(t){u=u.concat(v.call(e,r.mapToViewIndex(t[0]),r.mapToViewIndex(t[1])))}),e.drawElements_(u,"arrow",!0),e}}function g(){var t=this,e=t.collapsedLines_;if(e){t.collapsedLines_=null;var n=[];tt.each(e,function(e){n=n.concat(m.call(t,e[0],e[1]))}),t.removeElements_(n)}}function p(t){var e=this,n=e.getItem(t),r=n.predecessorIndexes_||[],i=n.successorIndexes_||[],a=e.ganttData_;return r=r.length>0?tt.map(r,function(e){return[a.mapToViewIndex(e),t]}):[],i=i.length>0?tt.map(i,function(e){return[t,a.mapToViewIndex(e)]}):[],r.concat(i)}function v(t,e){var n=this,r=n.getItem(t),i=n.getItem(e);if(r&&i&&St.isValidNumber(r.startDay)&&St.isValidNumber(i.startDay)){var a=r.id+"_to_"+i.id,o=n.ganttLayout_,u=[],c=n.getTimeSpan(),s=o.getRowHeight(t),l=o.getRowHeight(e),f=n.scale_(),d=(r.endDay-c.startDay)*f+(0===r.duration?o.getItemHeight(r):0),h=o.getOffsetByIndex(t)+.5*s,g=(i.startDay-c.startDay)*f,p=o.getOffsetByIndex(e)+.5*l,v=vt(d+ht,g-ht),m=h+_t(p-h)*(.5*s),y=[[d,h],[d+ht,h],[d+ht,m],[v,m],[v,p],[g,p]],_=gt.map(function(t){return[t[0]+g,t[1]+p]});return u.push({id:a,construct:"polyline",param:y.join(" "),operations:[{type:"addClass",param:"gc-gantt-arrow-line f"+t+"t"+e}]}),u.push({id:a+"_arrow",construct:"polygon",param:_.join(" "),operations:[{type:"addClass",param:"gc-gantt-arrow-head f"+t+"t"+e}]}),u}}function m(t,e){var n=this,r=n.getItem(t),i=n.getItem(e);if(r&&i){var a=r.id+"_to_"+i.id;return[a,a+"_arrow"]}}function y(t,e){var n=this,r=n.getItem(t),i=n.elementMap_,a=i.resizeLeft,o=i.resizeRight,u=i.resizePercent,c=i.connectorLeft,s=i.connectorRight;if(e||!a||!o||!u){var l=n.indicatorNode_,f=i[r.id],d=i[r.id+"_percentComplete"];if(f){var h=f.bbox();if(d){var g=d.bbox();u?u.plot(g.x2,g.y,g.x2,g.y2):g&&(u=i.resizePercent=l.line(g.x2,g.y,g.x2,g.y2).addClass("gc-gantt-resize-indicator")),a?a.plot(h.x,h.y,h.x,h.y2):a=i.resizeLeft=l.line(h.x,h.y,h.x,h.y2).addClass("gc-gantt-resize-indicator"),o?o.plot(h.x2,h.y,h.x2,h.y2):o=i.resizeRight=l.line(h.x2,h.y,h.x2,h.y2).addClass("gc-gantt-resize-indicator")}var p=(h.y2-h.y)*wt,v=(h.y2-h.y)*(1-wt)/2;return c?c.plot(p).move(h.x-p-bt,h.y+v):c=i.connectorLeft=l.circle(p).move(h.x-p-bt,h.y+v).addClass("gc-gantt-connect-indicator"),s?s.plot(p).move(h.x2+bt,h.y+v):s=i.connectorRight=l.circle(p).move(h.x2+bt,h.y+v).addClass("gc-gantt-connect-indicator"),{resizeLeft:a,resizeRight:o,resizePercent:u,connectorLeft:c,connectorRight:s}}return null}}function _(){var t=this,e=t.elementMap_,n=e.resizeLeft,r=e.resizeRight,i=e.resizePercent,a=e.connectorLeft,o=e.connectorRight;n&&(n.remove(),delete e.resizeLeft),r&&(r.remove(),delete e.resizeRight),i&&(i.remove(),delete e.resizePercent),a&&(a.remove(),delete e.connectorLeft),o&&(o.remove(),delete e.connectorRight)}function x(){var t=this.elementMap_;return tt.some([t.resizeLeft,t.resizeRight,t.resizePercent,t.connectorLeft,t.connectorRight])}function b(t){var e=this,n=e.elementMap_,r=n.connectorLeft,i=n.connectorRight;if(i||i){var a=e.hT_(t),o=e.actionStartInfo_&&e.actionStartInfo_.index,u=a&&a.row;if(!tt.isNil(o)&&!tt.isNil(u)){var c=n.connectorLine,s=e.indicatorNode_,l=void 0,f=void 0;if("connectingLeft"===e.actionStatus_?(l=r.cx(),f=r.cy()):"connectingRight"===e.actionStatus_&&(l=i.cx(),f=i.cy()),a.onTaskBody&&o!==u)D.call(e),C.call(e,u),"connectingRight"===e.actionStatus_?w.call(e,o,u):"connectingLeft"===e.actionStatus_&&w.call(e,u,o);else{e.embossedItem_&&(I.call(e),S.call(e));var d=e.container_().getBoundingClientRect(),h=t.clientX-d.left,g=t.clientY-d.top;c?c.plot(l,f,h,g):c=n.connectorLine=s.line(l,f,h,g).addClass("gc-gantt-connect-line")}return{connectorLine:c}}}}function w(t,e){var n=this,r=n.elementMap_,i=n.getItem(t),a=n.getItem(e),o=n.ganttData_;if(i&&a&&St.isValidNumber(i.startDay)&&St.isValidNumber(a.startDay)&&!o.isCollapsed(e,!1)&&!o.isCollapsed(t,!1)){var u="indicatingArrow",c=r[u],s=r[u+"_arrow"];if(!c||!s){var l=n.ganttLayout_,f=n.indicatorNode_,d=n.getTimeSpan(),h=l.getRowHeight(t),g=l.getRowHeight(e),p=n.scale_(),v=(i.endDay-d.startDay)*p+(0===i.duration?l.getItemHeight(i):0),m=l.getOffsetByIndex(t)+.5*h,y=(a.startDay-d.startDay)*p,_=l.getOffsetByIndex(e)+.5*g,x=vt(v+ht,y-ht),b=m+_t(_-m)*(.5*h),w=[[v,m],[v+ht,m],[v+ht,b],[x,b],[x,_],[y,_]],I=gt.map(function(t){return[t[0]+y,t[1]+_]});return c?c.plot(w.join(" ")):c=r[u]=f.polyline(w.join(" ")).addClass("gc-gantt-arrow-line gc-gantt-emboss"),s?s.plot(I.join(" ")):s=r[u+"_arrow"]=n.elementMap_[u+"_arrow"]=f.polygon(I.join(" ")).addClass("gc-gantt-arrow-head gc-gantt-emboss"),{line:c,arrow:s}}}}function I(){var t=this,e=t.elementMap_,n="indicatingArrow",r=e[n],i=e[n+"_arrow"];r&&(r.remove(),delete e[n]),i&&(i.remove(),delete e[n+"_arrow"])}function D(){var t=this,e=t.elementMap_,n=e.connectorLine;n&&(n.remove(),delete e.connectorLine)}function C(t){var e=this;if(e.embossedItem_){if(e.embossedItem_.index===t)return;S.call(e)}var n=e.getItem(t),r=e.elementMap_,i=r[n&&n.id];i&&(e.embossedItem_=n,i.addClass("gc-gantt-emboss"))}function S(){var t=this;if(t.embossedItem_){var e=t.elementMap_,n=e[t.embossedItem_.id];n&&(t.embossedItem_=null,n.removeClass("gc-gantt-emboss"))}}function N(t,e){var n;switch(t){case"hour":return St.isValidNumber(e)?yt(e)+":00":e;case"day":return St.isValidNumber(e)?yt(e)+"":e;case"week":return n=lt[e],tt.isNil(n)?e:n;case"month":return n=ft[e],tt.isNil(n)?e:n;case"year":return St.isValidNumber(e)?yt(e)+1900+"":e}return e}function L(t,e,n,r){var i;return tt.map(n,function(n){if(tt.isFunction(n))return n(t,e);switch(n){case"hour":i=t.getHours();break;case"day":i=t.getDate();break;case"week":i=t.getDay();break;case"month":i=t.getMonth();break;case"year":i=t.getYear();break;case"end-hour":i=e.getHours();break;case"end-day":i=e.getDate();break;case"end-week":i=e.getDay();break;case"end-month":i=e.getMonth();break;case"end-year":i=e.getYear();break;default:return n}return N(n.replace("end-",""),i)}).join(r||" ")}function j(t,e,n){var r=st[e];if(tt.isNil(r))return null;for(var i=[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()],a=[0,0,1,0,0],o=0;r>=o;++o)a[o]=i[o];if("yearQuarter"===e)a[1]=3*yt(a[1]/3),"ceil"===n?a[1]+=3:"top"===n&&(a[1]+=2);else if("hourQuarter"===e)a[4]=15*yt(a[4]/15),"ceil"===n?a[4]+=15:"top"===n&&(a[4]+=14);else if("week"===e){var u=t.getDay();"ceil"===n?a[2]+=7-u:"top"===n?a[2]+=6-u:a[2]-=u}else"ceil"===n&&a[r]++;return new(Function.prototype.bind.apply(Date,[null].concat(a)))}function O(t){return["hour","day","week","month","quarter","year"].some(function(e){return e.trim().toLowerCase()===t})}function T(t,e){var n=e?t.startDate||E(t.start):t.startDate,r=e?t.endDate||E(t.end):t.endDate;return n>r&&(r=n),t.startDate=n,t.endDate=r,n&&r?(t.startDay=St.timeToDay(n),t.endDay=St.timeToDay(r),t.duration=k(n,r)):(t.startDay=t.endDay=St.timeToDay(n||r),t.duration=tt.isNumber(t.startDay)?0:it),t}function k(t,e){var n=St.timeToDay(t),r=St.timeToDay(e);return tt.isNumber(n)&&tt.isNumber(r)?r-n:it}function E(t){if(tt.isNil(t))return it;var e=t instanceof Date?t:nt.toDate(t);return tt.isNaN(e.getTime())?it:e}function A(t){var e=this;e.grid&&!e.grid.tapPoint_&&Y.call(e,e.grid,t)}function P(t){var e=this;e.grid&&!e.grid.tapPoint_&&W.call(e,e.grid,t)}function B(t){var e=this;e.grid&&!e.grid.tapPoint_&&$.call(e,e.grid,t)}function R(t,e){var n=this,r=n.hT_(t);if("idle"===e)r.showIndicator?y.call(n,r.row):_.call(n),r&&"resizingRight"===r.action||"resizingLeft"===r.action||"resizingPercentComplete"===r.action?F.call(n,"col-resize"):F.call(n,"default");else{var i=n.actionStartInfo_;y.call(n,i.index,!0)}}function z(t,e){var n=this,r=n.hT_(t,!0);if("tap"===e)r.onTaskBody?y.call(n,r.row,!0):_.call(n);else if("idle"!==e){var i=n.actionStartInfo_;x.call(n)&&y.call(n,i.index,!0)}}function F(t){var e=this;return e.cursor_===t?e:void(document.querySelector(".gc-grid").style.cursor=e.cursor_=t)}function H(t,e){var n=this,r=n.elementMap_,i=n.hT_(t,e);if(i&&"dragging"===i.action||"resizingRight"===i.action||"resizingLeft"===i.action||"resizingPercentComplete"===i.action||"connectingLeft"===i.action||"connectingRight"===i.action){var a=n.getItem(i.row),o=r[a.id+"_percentComplete"];return n.capturedElement_=r[a.id],n.actionStartInfo_={index:i.row,item:a,x:t.clientX,y:t.clientY,rect:n.capturedElement_.bbox(),percentCompleteRect:o&&o.bbox(),isTouchEvent:e,scrollOffset:tt.clone(n.grid.gSO_("gantt"))},x.call(n)?n.actionStatus_=i.action:n.actionStatus_="dragging",!0}_.call(n)}function M(t,e){var n=this;if(!e){if(J.call(n,t,!1,!0),!n.actionStartInfo_)return!1;"connectingLeft"!==n.actionStatus_&&"connectingRight"!==n.actionStatus_||U.call(n,t,!0),n.label_=null,G.call(n,t)}return n.capturedElement_=null,n.actionStartInfo_=null,n.actionStatus_="idle",!0}function G(){var t=this,e=t.actionStartInfo_.index;t.ganttData_.commitItemChange(e)}function V(t){var e=this,n=e.actionStartInfo_,r=e.grid.gSO_("gantt"),i=t.clientX-n.x+r.left-n.scrollOffset.left,a=n.item;if(0!==i&&a){var o=n.rect,u=void 0;switch(e.actionStatus_){case"dragging":e.moveItem_(n.index,o,o.x+i);break;case"resizingLeft":u=vt(o.x+i,o.x2-xt),e.moveItem_(n.index,o,u,o.x2);break;case"resizingRight":u=mt(o.x2+i,o.x+xt),e.moveItem_(n.index,o,null,u);break;case"resizingPercentComplete":var c=n.percentCompleteRect;u=mt(vt(o.x2,c.x2+i),o.x),u=(u-o.x)/(o.x2-o.x),e.editItem_(n.index,"percentComplete",isNaN(u)?it:u),y.call(e,n.index,!0)}}}function U(t,e){var n=this;if(e){D.call(n);var r=n.hT_(t);r&&r.onTaskBody&&r.row>-1&&("connectingLeft"===n.actionStatus_?n.ganttData_.addPredecessor(n.actionStartInfo_.index,r.row):"connectingRight"===n.actionStatus_&&n.ganttData_.addPredecessor(r.row,n.actionStartInfo_.index))}else b.call(n,t)}function Y(t,e,n){var r=this;return"idle"===r.actionStatus_?H.call(r,e,n):M.call(r,e)}function $(t,e,n){var r=this,i=r.actionStatus_;"dragging"===i||"resizingRight"===i||"resizingLeft"===i||"resizingPercentComplete"===i?(V.call(r,e),n||J.call(r,e)):"connectingLeft"!==i&&"connectingRight"!==i||(U.call(r,e,!1),n||J.call(r,e,!0)),n?z.call(r,e,i):R.call(r,e,i)}function W(t,e){var n=this;"idle"!==n.actionStatus_&&M.call(n,e)}function q(t,e){var n=tt.pick(e.targetTouches[0],It);Y.call(this,t,n,!0)&&(e.handled=!0)}function Q(t,e){var n=tt.pick(e.targetTouches[0],It);$.call(this,t,n,!0)}function X(t,e){var n=tt.pick(e.changedTouches[0],It);W.call(this,t,n,!0)&&(e.handled=!0)}function K(t,e){if("touch"===e.deviceType){var n=this;M.call(n,e,!0),z.call(n,e,"tap")}}function J(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],r=this,i=r.grid,a=i.ods_;if(n)return void a.raise(i,{cancel:!0});var o=i.getLayoutInfo().gantt,u=i.gCI_().contentRect,c=t.pageX-o.left-u.left,s=t.pageY-o.top-u.top,l=function(t,e,n){return n=Math.max(e,n),t=e>t?t-e:t>n?t-n:0,Math.log((Math.abs(t)+Dt)/Dt)/Math.log(2)*(t>0?Ct:-Ct)},f=l(c,0,o.width),d=l(s,0,o.height);0!==f||e&&0!==d?(r.dragScrollFlag=!0,a.raise(i,{area:"gantt",moveOffset:function(t){return e?{left:t.left+f,top:t.top+d}:{left:t.left+f}}})):r.dragScrollFlag&&a.raise(i,{cancel:!0})}function Z(t,e){var n=this;n.grid.data.isRefreshSuspended()||n.reload_()}var tt=n(1);n(3);var et=n(7),nt=(n(8).Event,n(9)),rt=40,it=void 0,at=864e5,ot=100,ut={hour:"hourQuarter",day:"hour",week:"day",month:"week",quarter:"month",year:"month"},ct={minute:1440,hourQuarter:96,hour:24,day:1,week:1/7,month:1/30,yearQuarter:1/90,year:1/365},st={year:0,yearQuarter:1,month:1,week:2,day:2,hour:3,hourQuarter:4,minute:4},lt=["Su","Mo","Tu","We","Th","Fr","Sa"],ft=["January","February","March","April","May","June","July","August","September","October","November","December"],dt=Number.POSITIVE_INFINITY,ht=12,gt=[[0,0],[-9,3],[-9,-3]],pt=/[\s,]+/,vt=Math.min,mt=Math.max,yt=Math.floor,_t=Math.sign||function(t){return t>0?1:0>t?-1:0},xt=3,bt=5,wt=.6,It=["pageX","pageY","clientX","clientY","target"],Dt=50,Ct=10,St={isValidDate:function(t){return t instanceof Date&&!isNaN(t.getTime())},parseString2Array:function(t){var e;return tt.isArray(t)?e=t:tt.isString(t)&&(e=t.split(pt)),e?e:[]},isValidNumber:function(t){return tt.isNumber(t)&&isFinite(t)},isDomElem:function(t){return t instanceof HTMLElement},clearElementChildren:function(t){if(this.isDomElem(t))for(;t.firstChild;)t.removeChild(t.firstChild);return t},getDifferenceIndices:function(t,e){tt.isArray(t)||(t=[t]),tt.isArray(e)||(e=[e]);var n=[];tt.forEach(t,function(t){n[t]||(n[t]=1)});var r=[],i=[];return tt.forEach(e,function(t){n[t]?n[t]=2:r.push(t)}),tt.forEach(n,function(t,e){1===t&&i.push(Number(e))}),{add:r,remove:i}},timeToDay:function(t){return t instanceof Date?t.getTime()/at:it},expandID_:function(t,e){var n=t?t.split(","):[];return tt.isArray(e)||(e=[e]),tt.each(e,function(t){-1===tt.indexOf(n,t)&&n.push(t)}),n.join(",")}},Nt=function(){var t=function(t,e){var n=this;n.gantt_=t,n.reload(e)},e=t.prototype;return e.reload=function(t){var e=this,n=t?t:e.sourceData_;if(n){e.cachedItems_&&(e.cachedItems_.length=0),e.sourceData_=n,e.validation=e.getSourceDataValidationInfo(),e.cachedItems_=[];var r=dt,i=0,a=e.validation.itemMethods?n.sourceCollection||[]:n;return tt.each(a,function(t,a){var o=void 0;o=e.validation.itemMethods?n.mapToGlobalIndex_(a):a;var u=e.parseItem(t,o,a);r>u.startDay&&(r=u.startDay,e.startDate_=0===u.duration?u.startDate||u.endDate:u.startDate),i<u.endDay&&(i=u.endDay,e.endDate_=0===u.duration?u.startDate||u.endDate:u.endDate),e.cachedItems_[a]=u}),tt.each(e.cachedItems_,function(t){t&&(0===t.type&&e.updateItemParent(t),e.updateItemPredecessor(t))}),e}},e.getSourceDataValidationInfo=function(){var t=this,e={itemMethods:{basePath:[],methodNameList:["getItem","getItems","getSourceRowIndex_","mVI_"],propertyNameList:["expandedItemCount","itemCount"]},dataRefreshMethods:{basePath:[],methodNameList:["refresh","removeEmptyGroup"]},groupMethods:{basePath:["rootGroup_","calcGroup_"],methodNameList:["getItem"],propertyNameList:["displayItemCount","itemCount"]},treeMethods:{basePath:["rootNode_"],methodNameList:["getItem"],alternate:function(){return!!t.sourceData_.isHierarchical}}};return tt.mapValues(e,function(e,n){var r=t.sourceData_,i=!0,a=e.basePath;if(tt.isArray(a))for(var o=0,u=a.length;u>o;++o)if(r=r[a[o]],!r){i=!1;break}if(i){var c=tt.every(e.methodNameList,function(t){return tt.isFunction(r[t])},!0),s=tt.every(e.propertyNameList,function(t){return t in r},!0);return c&&s}return e.alternate?e.alternate(t.sourceData_):!1})},e.getItems=function(){var t=this,e=t.getItemCount(),n=[];n.length=e;for(var r=0;e>r;++r)n[r]=t.getItem(r);return n},e.getItem=function(){var t=this;if(arguments.length>1){var e=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1];if(t.gantt_&&t.gantt_.grid){var r=tt.find(t.gantt_.grid.columns,tt.mP("id",e));if(r){var i=r.dataType,a=nt.getType(n);a!==i&&("string"===a&&"number"===i?n=+n:"number"===a&&"string"===i&&(n=n.toString()))}}return tt.find(t.cachedItems_,tt.mP(e,n))}return 1===arguments.length?t.cachedItems_[t.mapToSourceIndex(arguments.length<=0?void 0:arguments[0])]:t.cachedItems_},e.getGroup=function(t,e){var n=this,r=function(t,e){return e?t.itemCount:t.displayItemCount};if(n.validation.groupMethods){var i=n.sourceData_.rootGroup_,a=i,o=t;if(0>o||o>=r(i,e)||!St.isValidNumber(o)||!i)return;if(!i.isBottomLevel)for(var u=!0,c=void 0,s=0,l=void 0;u;)c=a.groups[s],(l=r(c,!0))>o?(a=c,u=!a.isBottomLevel,s=0):(o-=l,++s);return{group:a,relativeIndex:o}}},e.getTree=function(t){var e=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n=this;if(n.validation.treeMethods){var r=void 0,i=t;if(n.validation.groupMethods){var a=n.getGroup(t);a&&(r=a.group.rootNode,i=a.relativeIndex)}else r=n.sourceData_.rootNode;if(!r)return;if(St.isValidNumber(i)){for(var o=[],u=r.children.length-1;u>-1;--u)o.push(r.children[u]);for(var c=r;o.length>0&&i>-1;){c=o.pop();var s=c.children.length;if(--i,(e||!c.collapsed)&&0!==s)for(var l=s-1;l>-1;--l)o.push(c.children[l])}return o.length=0,c}return r}},e.commitItemChange=function(t){var e=this,n=e.getItem(t),r=e.gantt_.options(),i=e.sourceData_,a=i.getItem(t),o=i.getSourceRowIndex_(t,!0),u=["startDate","endDate","text","percentComplete","parentID","predecessorID"],c=tt.clone(a.dataItem),s=[r.start,r.end,r.text,r.percentComplete,r.parentID,r.predecessorID];return tt.each(s,function(t,e){c[t]=n[u[e]]}),i.updateItem(o,c),e},e.getItemBySourceIndex=function(t){return this.cachedItems_[t]},e.getItemCount=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this;return e.validation.itemMethods?t?e.sourceData_.itemCount:e.sourceData_.expandedItemCount:e.sourceData_.length},e.clearCache=function(){var t=this;return t.mapToSourceIndexFn_=null,t},e.parseItem=function(t,e,n){var r=this,i=r.gantt_.options();return T({index:e,sourceIndex:n,id:i.id?t[i.id]:e,type:0,start:t[i.start],end:t[i.end],text:t[i.text],percentComplete:t[i.percentComplete],parentID:t[i.parentID],predecessorID:t[i.predecessorID]},!0)},e.isCollapsed=function(t,e){var n=this,r=n.getGroup(t,e),i=n.getTree(t,e);return r&&r.group&&(r=r.group),i&&(i=i.parent),r&&i?r.collapsed||i.collapsed:r?r.collapsed:i?i.collapsed:!1},e.mapToSourceIndex=function(t){var e=this;return e.validation.itemMethods?(e.mapToSourceIndexFn_||(e.mapToSourceIndexFn_=e.sourceData_.getSourceRowIndex_.bind(e.sourceData_)),e.mapToSourceIndexFn_(t,!0,!1)):t},e.mapToViewIndex=function(t){var e=this,n=e.getItemBySourceIndex(t).index,r=e.validation.itemMethods?e.sourceData_.mVI_(t,!0,!1):n;return e.isCollapsed(n)?it:r},e.updateItemParent=function(t){var e=this,n=t,r=n.sourceIndex,a=void 0;tt.isNil(n.parentIndex_)?(a=n.parentID&&e.getItem("id",n.parentID),n.parentIndex_=a&&a.sourceIndex):a=e.getItem(n.parentIndex_);for(var o=function(t){var n=e.getItem("id",t);n&&a.childrenIndexes_.push(n.sourceIndex)},u=[],c=[],s=[],l=function(t){St.isValidDate(t.startDate)&&s.push(t.startDate),St.isValidDate(t.endDate)&&s.push(t.endDate)},f=e.getItemBySourceIndex.bind(e);a&&a.sourceIndex!==r;){c.push(a.sourceIndex),a.type=mt(a.type,n.type+1),tt.isNil(a.childrenIndexes_)&&(a.childrenIndexes_=[],tt.each(St.parseString2Array(a.childrenID),o)),a.childrenIndexes_.indexOf(r)<0&&a.childrenIndexes_.push(r),u=tt.map(a.childrenIndexes_,f);var d=a.startDate,h=a.endDate;if(s=[],St.isValidDate(d)&&s.push(d),St.isValidDate(h)&&s.push(h),tt.forEach(u,l),d=vt.apply(void 0,i(s)),h=mt.apply(void 0,i(s)),s.length=0,d=new Date(d),h=new Date(h),St.isValidDate(d)){var g=E(a.start);a.startDate=d>g?g:d}if(St.isValidDate(h)){var p=E(a.end);a.endDate=p>h?p:h}T(a),n=a,r=n.sourceIndex,tt.isNil(a.parentIndex_)?(a=a.parentID&&e.getItem("id",n.parentID),n.parentIndex_=a&&a.sourceIndex):a=e.getItemBySourceIndex(a.parentIndex_)}return c},e.updateItemPredecessor=function(t){var e=this,n=t.sourceIndex,r=[];return tt.isNil(t.predecessorIndexes_)&&(t.predecessorIndexes_=[],tt.each(St.parseString2Array(t.predecessorID),function(n){var r=e.getItem("id",n);r&&t.predecessorIndexes_.push(r.sourceIndex)})),tt.each(tt.map(t.predecessorIndexes_,function(t){return e.getItemBySourceIndex(t)}),function(t){tt.isNil(t.successorIndexes_)&&(t.successorIndexes_=[],tt.each(St.parseString2Array(t.successorID),function(n){var r=e.getItem("id",n);t.successorIndexes_.push(r.sourceIndex)})),t.successorIndexes_.indexOf(n)<0&&(r.push(t.sourceIndex),t.successorIndexes_.push(n))}),r},e.addPredecessor=function(t,e){if(t!==e){var n=this,r=n.getItem(t),i=n.getItem(e);r.predecessorID=St.expandID_(r.predecessorID,i.id),-1===tt.indexOf(r.predecessorIndexes_,i.sourceIndex)&&r.predecessorIndexes_.push(i.sourceIndex),n.updateItemPredecessor(r),n.commitItemChange(t)}},t}(),Lt=function(){var t=function(t,e){var n=this;n.gantt_=t,n.grid=e,n.cachedPosition=[]},e=t.prototype;return e.container=function(t){var e=this;if(tt.isNil(t))return e.cachedContainer_;var n;return St.isDomElem(t)?n=t:"string"==typeof t&&(n=document.getElementById(t)),(tt.isNil(e.cachedContainer_)||e.cachedContainer_!==n)&&(e.cachedContainer_=n),e},e.clearCache=function(){var t=this;t.cachedPosition.length=0,t.bounding_=null,t.contentBounding_=null},e.getBounding=function(){var t=this;if(t.bounding_)return t.bounding_;var e=t.container(),n=e&&e.getBoundingClientRect();return t.bounding_=n?{left:n.left,top:n.top,width:n.width,height:n.height}:{left:0,top:0,width:0,height:0},t.bounding_},e.getContentBounding=function(){var t=this;if(t.contentBounding_)return t.contentBounding_;var e=t.gantt_,n=t.getBounding();return e.ganttData_?t.contentBounding_={left:n.left,top:n.top,width:yt(e.getTimeSpan().duration*e.scale_()),height:yt(t.getTotalHeight())}:t.contentBounding_={left:0,top:0,width:0,height:0},t.contentBounding_},e.getTotalHeight=function(){var t=this,e=t.grid.gI_;if(e){for(var n=0,r=0,i=e.length;i>r;++r)n+=e[r].height;return n}for(var a=t.gantt_.getItemCount(!0),o=0,u=t.gantt_.ganttData_,c=0;a>c;++c)u.isCollapsed(c)||(o+=t.getRowHeight(c));return o},e.getHeaderHeight=function(t){var e=this.gantt_.options("headerHeight");return tt.isFunction(e)?e(t):e},e.getRowHeight=function(t){var e=this.gantt_.options("rowHeight");return tt.isFunction(e)?e(t):e},e.getItemHeight=function(t){return yt(.6*this.getRowHeight(t))},e.getIndexByOffsetY=function(t){var e=this,n=e.grid,r=t,i=e.grid.gI_,a=e.gantt_.getItemCount(!0);if(i){for(var o=!1;!o;){for(var u=0,c=i.length;r>i[u].height;)if(r-=i[u++].height,u>=c){u=c-1;break}i[u].isBottomLevel?(i=i[u],o=!0):(r-=n.layoutEngine.gGHH_(i[u].data),i=i[u].children)}var s=0,l=i.data.toGlobalIndex_(0);for(r-=n.layoutEngine.gGHH_(i.data);r>=0;){var f=i.data.toGlobalIndex_(s++);if(tt.isNil(f))break;l=f,r-=e.getRowHeight(l)}return vt(l,a-1)}var d=-1;do r-=e.getRowHeight(++d);while(r>=0);return vt(d,a-1)},e.getOffsetByIndex=function(t){var e=this,n=e.grid;if(n.gI_){for(var r=0,i=n.gI_,a=!1,o=t;!a;){for(var u=0,c=i.length;o>=i[u].data.itemCount;)if(r+=i[u].height,o-=i[u++].data.itemCount,u>=c){u=c-1;break}i[u].isBottomLevel?(i=i[u],a=!0):(r+=n.layoutEngine.gGHH_(i[u].data),i=i[u].children)}r+=n.layoutEngine.gGHH_(i.data),i=i.data.calcGroup_;for(var s=0,l=0;o>l;++l){var f=i.items[l];e.cachedPosition[f]=s,s+=e.getRowHeight(f)}return r+s}for(var d=0,h=0,g=t;g>h;++h)d+=e.getRowHeight(h);return d},e.getPerceptiveItemIndices=function(t,e,n,r){var i=this;t=t||0,e=e||0,n=n||0,r=r||0;for(var a=i.getIndexByOffsetY(e),o=i.getIndexByOffsetY(r),u=[];o>=a;)u.push(a++);return u},t}();e.prototype={options:function(t,e){var n=this;if(tt.isNil(t))return n.options_;if(tt.isString(t)){if(!e)return n.options_[t];n.options_[t]=e}else n.options_=tt.defaults(t,n.options_);return n.ganttData_&&n.ganttData_.reload(),n},container_:function(t){var e=this.ganttLayout_.container(t);return t?this:e},scale_:function(t,e){var n=this,r=n.options();if(tt.isNil(t))return ct[ut[r.timeLineScale]]*r.scale;if("scale"===t||"timeLineScale"===t){if(tt.isNil(e))return r[t];r[t]=e}else if(t){var i={};tt.isNumber(t.scale)&&!tt.isNaN(t.scale)&&(i.scale=t.scale),O(t.timeLineScale)&&(i.timeLineScale=t.timeLineScale),n.options(i)}return n},timeToPosition:function(t){function e(t){return(St.timeToDay(t)-r)*i+ot}var n=this,r=n.getTimeSpan().taskStartDay,i=n.scale_();return tt.isArray(t)?tt.map(t,e):e(t)},positionToTime:function(t){function e(t){return new Date(((t-ot)/i+r)*at)}var n=this,r=n.getTimeSpan().taskStartDay,i=n.scale_();return tt.isArray(t)?tt.map(t,e):e(t)},hT_:function(t,e){var n=this,r=n.ganttLayout_,i=n.container_().getBoundingClientRect(),o=t.clientX-i.left,u=t.clientY-i.top,c=r.getIndexByOffsetY(u),s=a.call(n,t,c,o,u,e);return s||{row:c}},clearCache:function(t){var e=this;return t&&(tt.each(e.elementMap_,function(t){t.remove()}),e.elementMap_={}),e.timeSpan_=null,e.ganttLayout_.clearCache(),e.cachedHeaderRects_=null,e.renderedList_.length=0,e},updateContentWrapper_:function(){var t=this,e=t.container_();if(t.ganttData_&&e){t.unregisterEvents_(),t.clearCache(!0),St.clearElementChildren(e);var n=t.getBounding(),r=t.getContentBounding(),i=mt(r.width,n.width),a=r.height;t.svgNode_=et(e).size(i,a).attr({viewBox:"0 0 "+i+" "+a,"enable-background":"new 0 0 "+i+" "+a,"xml:space":"preserve",preserveAspectRatio:"xMidYMid meet"}),t.backgroudNode_=t.svgNode_.group().size(r.width,r.height),t.arrowNode_=t.svgNode_.group().size(r.width,r.height),t.taskNode_=t.svgNode_.group().size(r.width,r.height),t.indicatorNode_=t.svgNode_.group().size(r.width,r.height),t.registerEvents_()}return t},registerEvents_:function(){var t=this,e=t.container_(),n=t.grid;n&&(n.data.collectionChanged_.addHandler(Z,t,2),n.otos_.addHandler(q,t),n.otm_.addHandler(Q,t),n.ote_.addHandler(X,t),n.onMouseClick_.addHandler(K,t)),t.mdFn_=A.bind(t),t.muFn_=P.bind(t),t.mvFn_=B.bind(t),nt.regist(e,"mousedown",t.mdFn_),nt.regist(document,"mousemove",t.mvFn_),nt.regist(document,"mouseup",t.muFn_)},unregisterEvents_:function(){var t=this,e=t.container_(),n=t.grid;n&&(n.data.collectionChanged_.removeHandler(Z,t,2),n.otos_.removeHandler(q,t),n.otm_.removeHandler(Q,t),n.ote_.removeHandler(X,t),n.onMouseClick_.removeHandler(K,t)),nt.unRegist(e,"mousedown",t.mdFn_),nt.unRegist(document,"mousemove",t.mvFn_),nt.unRegist(document,"mouseup",t.muFn_),t.mdFn_=null,t.muFn_=null,t.mvFn_=null},getItem:function(){var t;return(t=this.ganttData_).getItem.apply(t,arguments)},getItems:function(){return this.ganttData_.getItems()},getItemCount:function(t){return this.ganttData_.getItemCount(t)},reload_:function(t){var e=this;return e.label_=null,e.ganttData_.reload(t)},getBounding:function(){return this.ganttLayout_.getBounding()},getContentBounding:function(){return this.ganttLayout_.getContentBounding()},getLabel:function(t){var e=this;if(e.label_)return e.label_;var n,r=e.options("timeLineScale");if(O(r))n=e.getDefaultLabel_(r,t);else if(tt.isFunction(e.timeLineScale)){n=[];var i=e.timeLineScale;if(i.next){for(var a=i.next();a;)n.push(a),a=i.next();n=[n]}else n=e.getDefaultLabel_(null,t)}else n=e.timeLineScale;return e.label_=n,e.label_},getDefaultLabel_:function(t,e){var n=this,r=[];switch(t){case"day":r.push(n.labelGenerator_("day",e,"month","day")),r.push(n.labelGenerator_("hour",e));break;case"month":r.push(n.labelGenerator_("month",e)),r.push(n.labelGenerator_("week",e,"month","day","-","end-month",function(t,e){return e.getDate()}));break;case"hour":r.push(n.labelGenerator_("hour",e)),r.push(n.labelGenerator_("hourQuarter",e,function(t){return t.getMinutes()}));break;case"quarter":r.push(n.labelGenerator_("year",e)),
  14. r.push(n.labelGenerator_("yearQuarter",e,function(t){var e=t.getMonth();return"Season "+yt(e/3+1)})),r.push(n.labelGenerator_("month",e));break;case"year":r.push(n.labelGenerator_("year",e)),r.push(n.labelGenerator_("month",e));break;default:r.push(n.labelGenerator_("week",e,"month","day","-","end-month",function(t,e){return e.getDate()})),r.push(n.labelGenerator_("day",e,"month","day"))}return r},draw:function(t){var e=this;if(e.updateContentWrapper_().drawBackground(t),e.renderedList_.length=0,t)e.drawArea(t.x1,t.y1,t.x2,t.y2);else{var n=e.getItemCount(),r=[];r.length=n;for(var i=0;n>i;++i)r[i]=i;e.drawItems(r),e.renderedList_=r}return e},drawArea:function(t,e,n,r){var i=this,a=i.ganttLayout_,o=a.getPerceptiveItemIndices(t,e,n,r),u=i.actionStartInfo_&&i.actionStartInfo_.index;u&&o.push(u);var c=St.getDifferenceIndices(i.renderedList_,o);return i.renderedList_=o,i.drawItems(c.add),i.removeItems(c.remove),h.call(i),i},drawHeader:function(t){var e=this;return St.isDomElem(t)&&(t.innerHTML=e.getHeaderRects_().join("")),e},drawBackground:function(t){var e=this,n=e.ganttLayout_,r=t&&t.width;r=isNaN(+r)?0:+r;var i=e.getBounding(),a=e.getContentBounding(),o=mt(i.width,a.width,r),u=e.getLabel(r),c=e.elementMap_,s=e.backgroudNode_,l=void 0,f=a.height,d=void 0,h=e.getItemCount();for(d=0;h>=d;++d){var g=n.getOffsetByIndex(d);c[d+"_horizontal_border"]||(c[d+"_horizontal_border"]=s.line(0,g,o,g).addClass("gc-gantt-border"))}return u[u.length-1].spans.forEach(function(t,n){l=e.timeToPosition(t.start),c[n+"_vertical_border"]||(c[n+"_vertical_border"]=s.line(l,0,l,f).addClass("gc-gantt-border"))}),e},drawItems:function(t,e){var n=this;g.call(n);var r=tt.isArray(t)?tt.uniq(t):tt.uniq([t]),i=[],a=[],o=n.ganttData_;return tt.forEach(r,function(t){var e=l.call(n,t);e&&e.length>0&&(i=i.concat(e),p.call(n,t).forEach(function(t){o.isCollapsed(t[0],!1)||o.isCollapsed(t[1],!1)||(a=a.concat(v.call(n,t[0],t[1])))}))}),n.drawElements_(i,"task",e),n.drawElements_(a,"arrow",e),n},removeItems:function(t,e){var n=this,r=tt.isArray(t)?tt.uniq(t):tt.uniq([t]),i=[];return tt.forEach(r,function(t){var r=n.getItem(t);r&&(i=i.concat([r.id,r.id+"_text",r.id+"_percentComplete"]),p.call(n,t).forEach(function(t){(e||u.call(n,t[0],t[1]))&&(i=i.concat(m.call(n,t[0],t[1])))}))}),n.removeElements_(i),n},moveItem_:function(t,e,n,r){var i=this,a=i.getItem(t);if(0===a.duration){var o=i.positionToTime(n);a.startDate&&(a.startDate=o),a.endDate&&(a.endDate=o)}else{var u=a.startDate.getTime();tt.isNil(n)||n===e.x||(a.startDate=i.positionToTime(n)),tt.isNil(r)?a.endDate=new Date(a.startDate.getTime()+a.endDate.getTime()-u):r!==e.x2&&(a.endDate=i.positionToTime(r))}T(a);var c=i.ganttData_.updateItemParent(a);return c.push(t),tt.forEach(tt.uniq(c),function(t){i.drawItems(t,!0)}),h.call(i,!0),i},editItem_:function(t,e,n){var r=this,i=r.getItem(t);i&&i[e]!==n&&(i[e]=n),r.drawItems(t,!0)},drawElements_:function(t){var e=arguments.length<=1||void 0===arguments[1]?"task":arguments[1],n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],r=this,a=tt.isArray(t)?t:[t],o=r.elementMap_,u=r[e+"Node_"];if(!o||!u)return!1;var c=!1;return tt.forEach(a,function(t){if(t&&t.id){var e=o[t.id];if(n||!e){if(tt.isFunction(u[t.construct])){var r=tt.isArray(t.param)?t.param:[t.param];if(e){if(tt.isFunction(e.plot)){var a;(a=e).plot.apply(a,i(r))}}else o[t.id]=e=u[t.construct].apply(u,i(r))}if(e){if(t.attr&&e.attr(t.attr),t.operations){var s=tt.isArray(t.operations)?t.operations:[t.operations];tt.forEach(s,function(t){if(tt.isFunction(e[t.type])){var n,r=tt.isArray(t.param)?t.param:[t.param];(n=e)[t.type].apply(n,i(r))}})}c=!0}}}}),c},removeElements_:function(t){var e=this,n=e.elementMap_;tt.forEach(t,function(t){if(t){var e=tt.isString(t)?t:t.id,r=n[e];r&&(r.remove(),delete n[e])}})},getTimeSpan:function(){var t=this;if(t.timeSpan_)return t.timeSpan_;var e=ct[ut[t.options("timeLineScale")]],n=ot/t.scale_("scale")*at/e,r=t.ganttData_.startDate_||Date.now(),i=t.ganttData_.endDate_||Date.now();r=new Date(r-n),i=new Date(+i+n);var a=St.timeToDay(r),o=St.timeToDay(i);return t.timeSpan_={start:r,end:i,startDay:a,endDay:o,taskStartDay:St.timeToDay(t.ganttData_.startDate_),taskEndDay:St.timeToDay(t.ganttData_.endDate),duration:o-a},t.timeSpan_},getHeaderRects_:function(t){var e=this;if(e.cachedHeaderRects_)return e.cachedHeaderRects_;var n=e.ganttLayout_,r=e.getBounding(),i=e.getContentBounding(),a=isNaN(+t)?e.getLabel():e.getLabel(+t),o=mt(r.width,i.width,isNaN(+t)?0:+t),u=n.getHeaderHeight(),s=void 0,l=void 0,f=0,d=[];return a.forEach(function(t,n){t.spans.forEach(function(t,r){s=yt(mt(0,e.timeToPosition(t.start))),l=yt(vt(o,e.timeToPosition(t.end))),d.push(c.call(e,{left:s,top:f,width:l-s,height:u},null,"l"+n+" c"+r,t.content))}),f+=u}),e.cachedHeaderRects_=d,d},labelGenerator_:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];var i=n[0],a=t.getBounding(),o=t.getContentBounding(),u=isNaN(+n[1]),c=mt(o.width,a.width,u?0:+n[1]),s=n.slice(2);0===s.length&&(s=[i]);var l,f,d,h=t.getTimeSpan(),g=h.start,p=g.getTime()+c*at/t.scale_(),v=[];if(l=j(g,i,"floor"))for(;p>l;)d=l,l=j(d,i,"ceil"),f=j(d,i,"top"),v.push({start:d,end:l,content:L.call(t,d,f,s)});return{spans:v}},destroy:function(){var t=this;t.unregisterEvents_(),t.clearCache(!0),St.clearElementChildren(t.container_())},isScroll:function(){return!this.actionStartInfo_}},t.exports=e}()},function(t,e,n){(function(t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function i(t,e){return t.set(e[0],e[1]),t}function a(t,e){return t.add(e),t}function o(t,e,n){var r=n.length;switch(r){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function u(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function c(t,e){for(var n=t?t.length:0;n--&&e(t[n],n,t)!==!1;);return t}function s(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(!e(t[n],n,t))return!1;return!0}function l(t,e){for(var n=-1,r=t?t.length:0,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}function f(t,e){var n=t?t.length:0;return!!n&&y(t,e,0)>-1}function d(t,e,n){for(var r=-1,i=t?t.length:0;++r<i;)if(n(e,t[r]))return!0;return!1}function h(t,e){for(var n=-1,r=t?t.length:0,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function g(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function p(t,e,n,r){var i=-1,a=t?t.length:0;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function v(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function m(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function y(t,e,n){if(e!==e)return O(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function _(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n}function x(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function b(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function w(t){return function(e){return t(e)}}function I(t,e){return h(e,function(e){return t[e]})}function D(t,e){return t.has(e)}function C(t,e){for(var n=-1,r=t.length;++n<r&&y(e,t[n],0)>-1;);return n}function S(t,e){for(var n=t.length;n--&&y(e,t[n],0)>-1;);return n}function N(t){return t&&t.Object===Object?t:null}function L(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&r++;return r}function j(t,e){return null==t?Mr:t[e]}function O(t,e,n){for(var r=t.length,i=e+(n?1:-1);n?i--:++i<r;){var a=t[i];if(a!==a)return i}return-1}function T(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}function k(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function E(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function A(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n];o!==e&&o!==$r||(t[n]=$r,a[i++]=n)}return a}function P(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function B(t){return t.match(va)}function R(){}function z(){}function F(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fi,this.__views__=[]}function H(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function M(){this.__data__=ro?ro(null):{}}function G(t){return this.has(t)&&delete this.__data__[t]}function V(t){var e=this.__data__;if(ro){var n=e[t];return n===Yr?Mr:n}return ka.call(e,t)?e[t]:Mr}function U(t){var e=this.__data__;return ro?e[t]!==Mr:ka.call(e,t)}function Y(t,e){var n=this.__data__;return n[t]=ro&&e===Mr?Yr:e,this}function $(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function W(){this.__data__=[]}function q(t){var e=this.__data__,n=vt(e,t);if(0>n)return!1;var r=e.length-1;return n==r?e.pop():Ya.call(e,n,1),!0}function Q(t){var e=this.__data__,n=vt(e,t);return 0>n?Mr:e[n][1]}function X(t){return vt(this.__data__,t)>-1}function K(t,e){var n=this.__data__,r=vt(n,t);return 0>r?n.push([t,e]):n[r][1]=e,this}function J(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Z(){this.__data__={hash:new H,map:new(Za||$),string:new H}}function tt(t){return Ye(this,t)["delete"](t)}function et(t){return Ye(this,t).get(t)}function nt(t){return Ye(this,t).has(t)}function rt(t,e){return Ye(this,t).set(t,e),this}function it(t){var e=-1,n=t?t.length:0;for(this.__data__=new J;++e<n;)this.add(t[e])}function at(t){return this.__data__.set(t,Yr),this}function ot(t){return this.__data__.has(t)}function ut(t){this.__data__=new $(t)}function ct(){this.__data__=new $}function st(t){return this.__data__["delete"](t)}function lt(t){return this.__data__.get(t)}function ft(t){return this.__data__.has(t)}function dt(t,e){var n=this.__data__;return n instanceof $&&n.__data__.length==Vr&&(n=this.__data__=new J(n.__data__)),n.set(t,e),this}function ht(t,e,n,r){return t===Mr||qn(t,La[n])&&!ka.call(r,n)?e:t}function gt(t,e,n){(n===Mr||qn(t[e],n))&&("number"!=typeof e||n!==Mr||e in t)||(t[e]=n)}function pt(t,e,n){var r=t[e];ka.call(t,e)&&qn(r,n)&&(n!==Mr||e in t)||(t[e]=n)}function vt(t,e){for(var n=t.length;n--;)if(qn(t[n][0],e))return n;return-1}function mt(t,e){return t&&De(e,Dr(e),t)}function yt(t,e){for(var n=-1,r=null==t,i=e.length,a=Array(i);++n<i;)a[n]=r?Mr:wr(t,e[n]);return a}function _t(t,e,n){return t===t&&(n!==Mr&&(t=n>=t?t:n),e!==Mr&&(t=t>=e?t:e)),t}function xt(t,e,n,r,i,a,o){var c;if(r&&(c=a?r(t,i,a,o):r(t)),c!==Mr)return c;if(!ar(t))return t;var s=Ro(t);if(s){if(c=Je(t),!e)return Ie(t,c)}else{var l=Xe(t),f=l==_i||l==xi;if(zo(t))return fe(t,e);if(l==Ii||l==gi||f&&!a){if(T(t))return a?t:{};if(c=Ze(f?{}:t),!e)return Ce(t,mt(c,t))}else{if(!ya[l])return a?t:{};c=tn(t,l,xt,e)}}o||(o=new ut);var d=o.get(t);if(d)return d;if(o.set(t,c),!s)var h=n?Me(t):Dr(t);return u(h||t,function(i,a){h&&(a=i,i=t[a]),pt(c,a,xt(i,e,n,r,a,t,o))}),c}function bt(t){return ar(t)?Va(t):{}}function wt(t,e,n,r){var i=-1,a=f,o=!0,u=t.length,c=[],s=e.length;if(!u)return c;n&&(e=h(e,w(n))),r?(a=d,o=!1):e.length>=Vr&&(a=D,o=!1,e=new it(e));t:for(;++i<u;){var l=t[i],g=n?n(l):l;if(l=r||0!==l?l:0,o&&g===g){for(var p=s;p--;)if(e[p]===g)continue t;c.push(l)}else a(e,g,r)||c.push(l)}return c}function It(t,e){var n=!0;return vo(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Dt(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],o=e(a);if(null!=o&&(u===Mr?o===o&&!hr(o):n(o,u)))var u=o,c=a}return c}function Ct(t,e,n,r){var i=t.length;for(n=mr(n),0>n&&(n=-n>i?0:i+n),r=r===Mr||r>i?i:mr(r),0>r&&(r+=i),r=n>r?0:yr(r);r>n;)t[n++]=e;return t}function St(t,e){var n=[];return vo(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Nt(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=nn),i||(i=[]);++a<o;){var u=t[a];e>0&&n(u)?e>1?Nt(u,e-1,n,r,i):g(i,u):r||(i[i.length]=u)}return i}function Lt(t,e){return t&&yo(t,e,Dr)}function jt(t,e){return t&&_o(t,e,Dr)}function Ot(t,e){e=un(e,t)?[e]:se(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[yn(e[n++])];return n&&n==r?t:Mr}function Tt(t,e,n){var r=e(t);return Ro(t)?r:g(r,n(t))}function kt(t,e){return t>e}function Et(t,e){return null!=t&&(ka.call(t,e)||"object"==("undefined"==typeof t?"undefined":r(t))&&e in t&&null===qe(t))}function At(t,e){return null!=t&&e in Object(t)}function Pt(t,e,n){for(var r=n?d:f,i=t[0].length,a=t.length,o=a,u=Array(a),c=1/0,s=[];o--;){var l=t[o];o&&e&&(l=h(l,w(e))),c=Ka(l.length,c),u[o]=!n&&(e||i>=120&&l.length>=120)?new it(o&&l):Mr}l=t[0];var g=-1,p=u[0];t:for(;++g<i&&s.length<c;){var v=l[g],m=e?e(v):v;if(v=n||0!==v?v:0,!(p?D(p,m):r(s,m,n))){for(o=a;--o;){var y=u[o];if(!(y?D(y,m):r(t[o],m,n)))continue t}p&&p.push(m),s.push(v)}}return s}function Bt(t,e,n,r,i){return t===e?!0:null==t||null==e||!ar(t)&&!or(e)?t!==t&&e!==e:Rt(t,e,Bt,n,r,i)}function Rt(t,e,n,r,i,a){var o=Ro(t),u=Ro(e),c=pi,s=pi;o||(c=Xe(t),c=c==gi?Ii:c),u||(s=Xe(e),s=s==gi?Ii:s);var l=c==Ii&&!T(t),f=s==Ii&&!T(e),d=c==s;if(d&&!l)return a||(a=new ut),o||gr(t)?ze(t,e,n,r,i,a):Fe(t,e,c,n,r,i,a);if(!(i&ii)){var h=l&&ka.call(t,"__wrapped__"),g=f&&ka.call(e,"__wrapped__");if(h||g){var p=h?t.value():t,v=g?e.value():e;return a||(a=new ut),n(p,v,r,i,a)}}return d?(a||(a=new ut),He(t,e,n,r,i,a)):!1}function zt(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var u=n[i];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){u=n[i];var c=u[0],s=t[c],l=u[1];if(o&&u[2]){if(s===Mr&&!(c in t))return!1}else{var f=new ut;if(r)var d=r(s,l,c,t,e,f);if(!(d===Mr?Bt(l,s,r,ri|ii,f):d))return!1}}return!0}function Ft(t){if(!ar(t)||ln(t))return!1;var e=rr(t)||T(t)?Ba:Xi;return e.test(_n(t))}function Ht(t){return"function"==typeof t?t:null==t?Tr:"object"==("undefined"==typeof t?"undefined":r(t))?Ro(t)?$t(t[0],t[1]):Yt(t):Pr(t)}function Mt(t){return Qa(Object(t))}function Gt(t){t=null==t?t:Object(t);var e=[];for(var n in t)e.push(n);return e}function Vt(t,e){return e>t}function Ut(t,e){var n=-1,r=Xn(t)?Array(t.length):[];return vo(t,function(t,i,a){r[++n]=e(t,i,a)}),r}function Yt(t){var e=$e(t);return 1==e.length&&e[0][2]?hn(e[0][0],e[0][1]):function(n){return n===t||zt(n,t,e)}}function $t(t,e){return un(t)&&dn(e)?hn(yn(t),e):function(n){var r=wr(n,t);return r===Mr&&r===e?Ir(n,t):Bt(e,r,Mr,ri|ii)}}function Wt(t,e,n,r,i){if(t!==e){if(!Ro(e)&&!gr(e))var a=Cr(e);u(a||e,function(o,u){if(a&&(u=o,o=e[u]),ar(o))i||(i=new ut),qt(t,e,u,n,Wt,r,i);else{var c=r?r(t[u],o,u+"",t,e,i):Mr;c===Mr&&(c=o),gt(t,u,c)}})}}function qt(t,e,n,r,i,a,o){var u=t[n],c=e[n],s=o.get(c);if(s)return void gt(t,n,s);var l=a?a(u,c,n+"",t,e,o):Mr,f=l===Mr;f&&(l=c,Ro(c)||gr(c)?Ro(u)?l=u:Kn(u)?l=Ie(u):(f=!1,l=xt(c,!0)):fr(c)||Qn(c)?Qn(u)?l=xr(u):!ar(u)||r&&rr(u)?(f=!1,l=xt(c,!0)):l=u:f=!1),o.set(c,l),f&&i(l,c,r,a,o),o["delete"](c),gt(t,n,l)}function Qt(t,e,n){var r=-1;e=h(e.length?e:[Tr],w(Ue()));var i=Ut(t,function(t,n,i){var a=h(e,function(e){return e(t)});return{criteria:a,index:++r,value:t}});return x(i,function(t,e){return xe(t,e,n)})}function Xt(t,e){return t=Object(t),p(e,function(e,n){return n in t&&(e[n]=t[n]),e},{})}function Kt(t){return function(e){return null==e?Mr:e[t]}}function Jt(t){return function(e){return Ot(e,t)}}function Zt(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==a){var a=i;if(an(i))Ya.call(t,i,1);else if(un(i,t))delete t[yn(i)];else{var o=se(i),u=vn(t,o);null!=u&&delete u[yn(Dn(o))]}}}return t}function te(t,e,n,r){e=un(e,t)?[e]:se(e);for(var i=-1,a=e.length,o=a-1,u=t;null!=u&&++i<a;){var c=yn(e[i]);if(ar(u)){var s=n;if(i!=o){var l=u[c];s=r?r(l,c,u):Mr,s===Mr&&(s=null==l?an(e[i+1])?[]:{}:l)}pt(u,c,s)}u=u[c]}return t}function ee(t,e,n){var r=-1,i=t.length;0>e&&(e=-e>i?0:i+e),n=n>i?i:n,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=t[r+e];return a}function ne(t,e){var n;return vo(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function re(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e===e&&hi>=i){for(;i>r;){var a=r+i>>>1,o=t[a];null!==o&&!hr(o)&&(n?e>=o:e>o)?r=a+1:i=a}return i}return ie(t,e,Tr,n)}function ie(t,e,n,r){e=n(e);for(var i=0,a=t?t.length:0,o=e!==e,u=null===e,c=hr(e),s=e===Mr;a>i;){var l=$a((i+a)/2),f=n(t[l]),d=f!==Mr,h=null===f,g=f===f,p=hr(f);if(o)var v=r||g;else v=s?g&&(r||d):u?g&&d&&(r||!h):c?g&&d&&!h&&(r||!p):h||p?!1:r?e>=f:e>f;v?i=l+1:a=l}return Ka(a,di)}function ae(t){if("string"==typeof t)return t;if(hr(t))return po?po.call(t):"";var e=t+"";return"0"==e&&1/t==-ui?"-0":e}function oe(t,e,n){var r=-1,i=f,a=t.length,o=!0,u=[],c=u;if(n)o=!1,i=d;else if(a>=Vr){var s=e?null:bo(t);if(s)return P(s);o=!1,i=D,c=new it}else c=e?[]:u;t:for(;++r<a;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,o&&h===h){for(var g=c.length;g--;)if(c[g]===h)continue t;e&&c.push(h),u.push(l)}else i(c,h,n)||(c!==u&&c.push(h),u.push(l))}return u}function ue(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var u=a>r?e[r]:Mr;n(o,t[r],u)}return o}function ce(t){return Kn(t)?t:[]}function se(t){return Ro(t)?t:Co(t)}function le(t,e,n){var r=t.length;return n=n===Mr?r:n,!e&&n>=r?t:ee(t,e,n)}function fe(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function de(t){var e=new t.constructor(t.byteLength);return new Ha(e).set(new Ha(t)),e}function he(t,e){var n=e?de(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function ge(t,e,n){var r=e?n(E(t),!0):E(t);return p(r,i,new t.constructor)}function pe(t){var e=new t.constructor(t.source,Wi.exec(t));return e.lastIndex=t.lastIndex,e}function ve(t,e,n){var r=e?n(P(t),!0):P(t);return p(r,a,new t.constructor)}function me(t){return go?Object(go.call(t)):{}}function ye(t,e){var n=e?de(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function _e(t,e){if(t!==e){var n=t!==Mr,r=null===t,i=t===t,a=hr(t),o=e!==Mr,u=null===e,c=e===e,s=hr(e);if(!u&&!s&&!a&&t>e||a&&o&&c&&!u&&!s||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!s&&e>t||s&&n&&i&&!r&&!a||u&&n&&i||!o&&i||!c)return-1}return 0}function xe(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,o=i.length,u=n.length;++r<o;){var c=_e(i[r],a[r]);if(c){if(r>=u)return c;var s=n[r];return c*("desc"==s?-1:1)}}return t.index-e.index}function be(t,e,n,r){for(var i=-1,a=t.length,o=n.length,u=-1,c=e.length,s=Xa(a-o,0),l=Array(c+s),f=!r;++u<c;)l[u]=e[u];for(;++i<o;)(f||a>i)&&(l[n[i]]=t[i]);for(;s--;)l[u++]=t[i++];return l}function we(t,e,n,r){for(var i=-1,a=t.length,o=-1,u=n.length,c=-1,s=e.length,l=Xa(a-u,0),f=Array(l+s),d=!r;++i<l;)f[i]=t[i];for(var h=i;++c<s;)f[h+c]=e[c];for(;++o<u;)(d||a>i)&&(f[h+n[o]]=t[i++]);return f}function Ie(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function De(t,e,n,r){n||(n={});for(var i=-1,a=e.length;++i<a;){var o=e[i],u=r?r(n[o],t[o],o,n,t):t[o];pt(n,o,u)}return n}function Ce(t,e){return De(t,Qe(t),e)}function Se(t){return Un(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:Mr,o=i>2?n[2]:Mr;for(a=t.length>3&&"function"==typeof a?(i--,a):Mr,o&&on(n[0],n[1],o)&&(a=3>i?Mr:a,i=1),e=Object(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e})}function Ne(t,e){return function(n,r){if(null==n)return n;if(!Xn(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function Le(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),u=o.length;u--;){var c=o[t?u:++i];if(n(a[c],c,a)===!1)break}return e}}function je(t,e,n){function r(){var e=this&&this!==Sa&&this instanceof r?a:t;return e.apply(i?n:this,arguments)}var i=e&Wr,a=Oe(t);return r}function Oe(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=bt(t.prototype),r=t.apply(n,e);return ar(r)?r:n}}function Te(t,e,n){function r(){for(var a=arguments.length,u=Array(a),c=a,s=Ve(r);c--;)u[c]=arguments[c];var l=3>a&&u[0]!==s&&u[a-1]!==s?[]:A(u,s);if(a-=l.length,n>a)return Be(t,e,Ee,r.placeholder,Mr,u,l,Mr,Mr,n-a);var f=this&&this!==Sa&&this instanceof r?i:t;return o(f,this,u)}var i=Oe(t);return r}function ke(t){return function(e,n,r){var i=Object(e);if(n=Ue(n,3),!Xn(e))var a=Dr(e);var o=t(a||e,function(t,e){return a&&(e=t,t=i[e]),n(t,e,i)},r);return o>-1?e[a?a[o]:o]:Mr}}function Ee(t,e,n,r,i,a,o,u,c,s){function l(){for(var m=arguments.length,y=Array(m),_=m;_--;)y[_]=arguments[_];if(g)var x=Ve(l),b=L(y,x);if(r&&(y=be(y,r,i,g)),a&&(y=we(y,a,o,g)),m-=b,g&&s>m){var w=A(y,x);return Be(t,e,Ee,l.placeholder,n,y,w,u,c,s-m)}var I=d?n:this,D=h?I[t]:t;return m=y.length,u?y=mn(y,u):p&&m>1&&y.reverse(),f&&m>c&&(y.length=c),this&&this!==Sa&&this instanceof l&&(D=v||Oe(D)),D.apply(I,y)}var f=e&ti,d=e&Wr,h=e&qr,g=e&(Xr|Kr),p=e&ni,v=h?Mr:Oe(t);return l}function Ae(t,e,n,r){function i(){for(var e=-1,c=arguments.length,s=-1,l=r.length,f=Array(l+c),d=this&&this!==Sa&&this instanceof i?u:t;++s<l;)f[s]=r[s];for(;c--;)f[s++]=arguments[++e];return o(d,a?n:this,f)}var a=e&Wr,u=Oe(t);return i}function Pe(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=_r(e),n=_r(n)),t(e,n)}}function Be(t,e,n,r,i,a,o,u,c,s){var l=e&Xr,f=l?o:Mr,d=l?Mr:o,h=l?a:Mr,g=l?Mr:a;e|=l?Jr:Zr,e&=~(l?Zr:Jr),e&Qr||(e&=~(Wr|qr));var p=[t,e,i,h,f,g,d,u,c,s],v=n.apply(Mr,p);return sn(t)&&Do(v,p),v.placeholder=r,v}function Re(t,e,n,r,i,a,o,u){var c=e&qr;if(!c&&"function"!=typeof t)throw new TypeError(Ur);var s=r?r.length:0;if(s||(e&=~(Jr|Zr),r=i=Mr),o=o===Mr?o:Xa(mr(o),0),u=u===Mr?u:mr(u),s-=i?i.length:0,e&Zr){var l=r,f=i;r=i=Mr}var d=c?Mr:wo(t),h=[t,e,n,r,i,l,f,a,o,u];if(d&&gn(h,d),t=h[0],e=h[1],n=h[2],r=h[3],i=h[4],u=h[9]=null==h[9]?c?0:t.length:Xa(h[9]-s,0),!u&&e&(Xr|Kr)&&(e&=~(Xr|Kr)),e&&e!=Wr)g=e==Xr||e==Kr?Te(t,e,u):e!=Jr&&e!=(Wr|Jr)||i.length?Ee.apply(Mr,h):Ae(t,e,n,r);else var g=je(t,e,n);var p=d?xo:Do;return p(g,h)}function ze(t,e,n,r,i,a){var o=i&ii,u=t.length,c=e.length;if(u!=c&&!(o&&c>u))return!1;var s=a.get(t);if(s)return s==e;var l=-1,f=!0,d=i&ri?new it:Mr;for(a.set(t,e);++l<u;){var h=t[l],g=e[l];if(r)var p=o?r(g,h,l,e,t,a):r(h,g,l,t,e,a);if(p!==Mr){if(p)continue;f=!1;break}if(d){if(!v(e,function(t,e){return d.has(e)||h!==t&&!n(h,t,r,i,a)?void 0:d.add(e)})){f=!1;break}}else if(h!==g&&!n(h,g,r,i,a)){f=!1;break}}return a["delete"](t),f}function Fe(t,e,n,r,i,a,o){switch(n){case Ti:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Oi:return!(t.byteLength!=e.byteLength||!r(new Ha(t),new Ha(e)));case vi:case mi:return+t==+e;case yi:return t.name==e.name&&t.message==e.message;case wi:return t!=+t?e!=+e:t==+e;case Ci:case Ni:return t==e+"";case bi:var u=E;case Si:var c=a&ii;if(u||(u=P),t.size!=e.size&&!c)return!1;var s=o.get(t);return s?s==e:(a|=ri,o.set(t,e),ze(u(t),u(e),r,i,a,o));case Li:if(go)return go.call(t)==go.call(e)}return!1}function He(t,e,n,r,i,a){var o=i&ii,u=Dr(t),c=u.length,s=Dr(e),l=s.length;if(c!=l&&!o)return!1;for(var f=c;f--;){var d=u[f];if(!(o?d in e:Et(e,d)))return!1}var h=a.get(t);if(h)return h==e;var g=!0;a.set(t,e);for(var p=o;++f<c;){d=u[f];var v=t[d],m=e[d];if(r)var y=o?r(m,v,d,e,t,a):r(v,m,d,t,e,a);if(!(y===Mr?v===m||n(v,m,r,i,a):y)){g=!1;break}p||(p="constructor"==d)}if(g&&!p){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(g=!1)}return a["delete"](t),g}function Me(t){return Tt(t,Dr,Qe)}function Ge(t){for(var e=t.name+"",n=oo[e],r=ka.call(oo,e)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function Ve(t){var e=ka.call(R,"placeholder")?R:t;return e.placeholder}function Ue(){var t=R.iteratee||kr;return t=t===kr?Ht:t,arguments.length?t(arguments[0],arguments[1]):t}function Ye(t,e){var n=t.__data__;return cn(e)?n["string"==typeof e?"string":"hash"]:n.map}function $e(t){for(var e=Dr(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,dn(i)]}return e}function We(t,e){var n=j(t,e);return Ft(n)?n:Mr}function qe(t){return Wa(Object(t))}function Qe(t){return Ga(Object(t))}function Xe(t){return Pa.call(t)}function Ke(t,e,n){e=un(e,t)?[e]:se(e);for(var r,i=-1,a=e.length;++i<a;){var o=yn(e[i]);if(!(r=null!=t&&n(t,o)))break;t=t[o]}if(r)return r;var a=t?t.length:0;return!!a&&ir(a)&&an(o,a)&&(Ro(t)||dr(t)||Qn(t))}function Je(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&ka.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Ze(t){return"function"!=typeof t.constructor||fn(t)?{}:bt(qe(t))}function tn(t,e,n,r){var i=t.constructor;switch(e){case Oi:return de(t);case vi:case mi:return new i(+t);case Ti:return he(t,r);case ki:case Ei:case Ai:case Pi:case Bi:case Ri:case zi:case Fi:case Hi:return ye(t,r);case bi:return ge(t,r,n);case wi:case Ni:return new i(t);case Ci:return pe(t);case Si:return ve(t,r,n);case Li:return me(t)}}function en(t){var e=t?t.length:Mr;return ir(e)&&(Ro(t)||dr(t)||Qn(t))?b(e,String):null}function nn(t){return Ro(t)||Qn(t)}function rn(t){return Ro(t)&&!(2==t.length&&!rr(t[0]))}function an(t,e){return e=null==e?ci:e,!!e&&("number"==typeof t||Ji.test(t))&&t>-1&&t%1==0&&e>t}function on(t,e,n){if(!ar(n))return!1;var i="undefined"==typeof e?"undefined":r(e);return("number"==i?Xn(n)&&an(e,n.length):"string"==i&&e in n)?qn(n[e],t):!1}function un(t,e){if(Ro(t))return!1;var n="undefined"==typeof t?"undefined":r(t);return"number"==n||"symbol"==n||"boolean"==n||null==t||hr(t)?!0:Gi.test(t)||!Mi.test(t)||null!=e&&t in Object(e)}function cn(t){var e="undefined"==typeof t?"undefined":r(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function sn(t){var e=Ge(t),n=R[e];if("function"!=typeof n||!(e in F.prototype))return!1;if(t===n)return!0;var r=wo(n);return!!r&&t===r[0]}function ln(t){return!!Oa&&Oa in t}function fn(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||La;return t===n}function dn(t){return t===t&&!ar(t)}function hn(t,e){return function(n){return null==n?!1:n[t]===e&&(e!==Mr||t in Object(n))}}function gn(t,e){var n=t[1],r=e[1],i=n|r,a=(Wr|qr|ti)>i,o=r==ti&&n==Xr||r==ti&&n==ei&&t[7].length<=e[8]||r==(ti|ei)&&e[7].length<=e[8]&&n==Xr;if(!a&&!o)return t;r&Wr&&(t[2]=e[2],i|=n&Wr?0:Qr);var u=e[3];if(u){var c=t[3];t[3]=c?be(c,u,e[4]):u,t[4]=c?A(t[3],$r):e[4]}return u=e[5],u&&(c=t[5],t[5]=c?we(c,u,e[6]):u,t[6]=c?A(t[5],$r):e[6]),u=e[7],u&&(t[7]=u),r&ti&&(t[8]=null==t[8]?e[8]:Ka(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function pn(t,e,n,r,i,a){return ar(t)&&ar(e)&&Wt(t,e,Mr,pn,a.set(e,t)),t}function vn(t,e){return 1==e.length?t:Ot(t,ee(e,0,-1))}function mn(t,e){for(var n=t.length,r=Ka(e.length,n),i=Ie(t);r--;){var a=e[r];t[r]=an(a,n)?i[a]:Mr}return t}function yn(t){if("string"==typeof t||hr(t))return t;var e=t+"";return"0"==e&&1/t==-ui?"-0":e}function _n(t){if(null!=t){try{return Ta.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function xn(t){for(var e=-1,n=t?t.length:0,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i}function bn(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&on(t,e,n)&&(n=0,r=i),Ct(t,e,n,r)):[]}function wn(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=null==n?0:mr(n);return 0>i&&(i=Xa(r+i,0)),m(t,Ue(e,3),i)}function In(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=null==n?0:mr(n);return 0>i&&(i=Xa(r+i,0)),y(t,e,i)}function Dn(t){var e=t?t.length:0;return e?t[e-1]:Mr}function Cn(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],a=t.length;for(e=Ue(e,3);++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return Zt(t,i),n}function Sn(t,e){return re(t,e)}function Nn(t,e,n){return ie(t,e,Ue(n))}function Ln(t,e,n){return t&&t.length?(e=n||e===Mr?1:mr(e),ee(t,0,0>e?0:e)):[]}function jn(t){return t&&t.length?oe(t):[]}function On(t,e){return ue(t||[],e||[],pt)}function Tn(t,e,n){var r=Ro(t)?s:It;return n&&on(t,e,n)&&(e=Mr),r(t,Ue(e,3))}function kn(t,e){var n=Ro(t)?l:St;return n(t,Ue(e,3))}function En(t,e){var n=Ro(t)?u:vo;return n(t,Ue(e,3))}function An(t,e){var n=Ro(t)?c:mo;return n(t,Ue(e,3))}function Pn(t,e,n,r){t=Xn(t)?t:Lr(t),n=n&&!r?mr(n):0;var i=t.length;return 0>n&&(n=Xa(i+n,0)),dr(t)?i>=n&&t.indexOf(e,n)>-1:!!i&&y(t,e,n)>-1}function Bn(t,e){var n=Ro(t)?h:Ut;return n(t,Ue(e,3))}function Rn(t,e,n){var r=Ro(t)?p:_,i=arguments.length<3;return r(t,Ue(e,4),n,i,vo)}function zn(t,e,n){var r=Ro(t)?v:ne;return n&&on(t,e,n)&&(e=Mr),r(t,Ue(e,3))}function Fn(){return Date.now()}function Hn(t,e,n){e=n?Mr:e;var r=Re(t,Xr,Mr,Mr,Mr,Mr,Mr,e);return r.placeholder=Hn.placeholder,r}function Mn(t,e,n){e=n?Mr:e;var r=Re(t,Kr,Mr,Mr,Mr,Mr,Mr,e);return r.placeholder=Mn.placeholder,r}function Gn(t,e,n){function r(e){var n=d,r=h;return d=h=Mr,y=e,p=t.apply(r,n)}function i(t){return y=t,v=setTimeout(u,e),_?r(t):p}function a(t){var n=t-m,r=t-y,i=e-n;return x?Ka(i,g-r):i}function o(t){var n=t-m,r=t-y;return m===Mr||n>=e||0>n||x&&r>=g}function u(){var t=Fn();return o(t)?c(t):void(v=setTimeout(u,a(t)))}function c(t){return v=Mr,b&&d?r(t):(d=h=Mr,p)}function s(){y=0,d=m=h=v=Mr}function l(){return v===Mr?p:c(Fn())}function f(){var t=Fn(),n=o(t);if(d=arguments,h=this,m=t,n){if(v===Mr)return i(m);if(x)return v=setTimeout(u,e),r(m)}return v===Mr&&(v=setTimeout(u,e)),p}var d,h,g,p,v,m,y=0,_=!1,x=!1,b=!0;if("function"!=typeof t)throw new TypeError(Ur);return e=_r(e)||0,ar(n)&&(_=!!n.leading,x="maxWait"in n,g=x?Xa(_r(n.maxWait)||0,e):g,b="trailing"in n?!!n.trailing:b),f.cancel=s,f.flush=l,f}function Vn(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(Ur);var n=function r(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o),o};return n.cache=new(Vn.Cache||J),n}function Un(t,e){if("function"!=typeof t)throw new TypeError(Ur);return e=Xa(e===Mr?t.length-1:mr(e),0),function(){for(var n=arguments,r=-1,i=Xa(n.length-e,0),a=Array(i);++r<i;)a[r]=n[e+r];switch(e){case 0:return t.call(this,a);case 1:return t.call(this,n[0],a);case 2:return t.call(this,n[0],n[1],a)}var u=Array(e+1);for(r=-1;++r<e;)u[r]=n[r];return u[e]=a,o(t,this,u)}}function Yn(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(Ur);return ar(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Gn(t,e,{leading:r,maxWait:e,trailing:i})}function $n(t){return xt(t,!1,!0)}function Wn(t){return xt(t,!0,!0)}function qn(t,e){return t===e||t!==t&&e!==e}function Qn(t){return Kn(t)&&ka.call(t,"callee")&&(!Ua.call(t,"callee")||Pa.call(t)==gi)}function Xn(t){return null!=t&&ir(Io(t))&&!rr(t)}function Kn(t){return or(t)&&Xn(t)}function Jn(t){return t===!0||t===!1||or(t)&&Pa.call(t)==vi}function Zn(t){return or(t)&&Pa.call(t)==mi}function tr(t){if(Xn(t)&&(Ro(t)||dr(t)||rr(t.splice)||Qn(t)||zo(t)))return!t.length;if(or(t)){var e=Xe(t);if(e==bi||e==Si)return!t.size}for(var n in t)if(ka.call(t,n))return!1;return!(ao&&Dr(t).length)}function er(t,e){return Bt(t,e)}function nr(t){return"number"==typeof t&&qa(t)}function rr(t){var e=ar(t)?Pa.call(t):"";return e==_i||e==xi}function ir(t){return"number"==typeof t&&t>-1&&t%1==0&&ci>=t}function ar(t){var e="undefined"==typeof t?"undefined":r(t);return!!t&&("object"==e||"function"==e)}function or(t){return!!t&&"object"==("undefined"==typeof t?"undefined":r(t))}function ur(t){return lr(t)&&t!=+t}function cr(t){return null===t}function sr(t){return null==t}function lr(t){return"number"==typeof t||or(t)&&Pa.call(t)==wi}function fr(t){if(!or(t)||Pa.call(t)!=Ii||T(t))return!1;var e=qe(t);if(null===e)return!0;var n=ka.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ta.call(n)==Aa}function dr(t){return"string"==typeof t||!Ro(t)&&or(t)&&Pa.call(t)==Ni}function hr(t){return"symbol"==("undefined"==typeof t?"undefined":r(t))||or(t)&&Pa.call(t)==Li}function gr(t){return or(t)&&ir(t.length)&&!!ma[Pa.call(t)]}function pr(t){return t===Mr}function vr(t){if(!t)return 0===t?t:0;if(t=_r(t),t===ui||t===-ui){
  15. var e=0>t?-1:1;return e*si}return t===t?t:0}function mr(t){var e=vr(t),n=e%1;return e===e?n?e-n:e:0}function yr(t){return t?_t(mr(t),0,fi):0}function _r(t){if("number"==typeof t)return t;if(hr(t))return li;if(ar(t)){var e=rr(t.valueOf)?t.valueOf():t;t=ar(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Yi,"");var n=Qi.test(t);return n||Ki.test(t)?_a(t.slice(2),n?2:8):qi.test(t)?li:+t}function xr(t){return De(t,Cr(t))}function br(t){return null==t?"":ae(t)}function wr(t,e,n){var r=null==t?Mr:Ot(t,e);return r===Mr?n:r}function Ir(t,e){return null!=t&&Ke(t,e,At)}function Dr(t){var e=fn(t);if(!e&&!Xn(t))return Mt(t);var n=en(t),r=!!n,i=n||[],a=i.length;for(var o in t)!Et(t,o)||r&&("length"==o||an(o,a))||e&&"constructor"==o||i.push(o);return i}function Cr(t){for(var e=-1,n=fn(t),r=Gt(t),i=r.length,a=en(t),o=!!a,u=a||[],c=u.length;++e<i;){var s=r[e];o&&("length"==s||an(s,c))||"constructor"==s&&(n||!ka.call(t,s))||u.push(s)}return u}function Sr(t,e){var n={};return e=Ue(e,3),Lt(t,function(t,r,i){n[r]=e(t,r,i)}),n}function Nr(t,e,n){return null==t?t:te(t,e,n)}function Lr(t){return t?I(t,Dr(t)):[]}function jr(t,e,n){return t=br(t),n=_t(mr(n),0,t.length),t.lastIndexOf(ae(e),n)==n}function Or(t,e,n){if(t=br(t),t&&(n||e===Mr))return t.replace(Yi,"");if(!t||!(e=ae(e)))return t;var r=B(t),i=B(e),a=C(r,i),o=S(r,i)+1;return le(r,a,o).join("")}function Tr(t){return t}function kr(t){return Ht("function"==typeof t?t:xt(t,!0))}function Er(t,e){return $t(t,xt(e,!0))}function Ar(){}function Pr(t){return un(t)?Kt(yn(t)):Jt(t)}function Br(){return[]}function Rr(){return!1}function zr(t){var e=++Ea;return br(t)+e}function Fr(t){return t&&t.length?Dt(t,Tr,kt):Mr}function Hr(t){return t&&t.length?Dt(t,Tr,Vt):Mr}var Mr,Gr="4.13.1",Vr=200,Ur="Expected a function",Yr="__lodash_hash_undefined__",$r="__lodash_placeholder__",Wr=1,qr=2,Qr=4,Xr=8,Kr=16,Jr=32,Zr=64,ti=128,ei=256,ni=512,ri=1,ii=2,ai=150,oi=16,ui=1/0,ci=9007199254740991,si=1.7976931348623157e308,li=NaN,fi=4294967295,di=fi-1,hi=fi>>>1,gi="[object Arguments]",pi="[object Array]",vi="[object Boolean]",mi="[object Date]",yi="[object Error]",_i="[object Function]",xi="[object GeneratorFunction]",bi="[object Map]",wi="[object Number]",Ii="[object Object]",Di="[object Promise]",Ci="[object RegExp]",Si="[object Set]",Ni="[object String]",Li="[object Symbol]",ji="[object WeakMap]",Oi="[object ArrayBuffer]",Ti="[object DataView]",ki="[object Float32Array]",Ei="[object Float64Array]",Ai="[object Int8Array]",Pi="[object Int16Array]",Bi="[object Int32Array]",Ri="[object Uint8Array]",zi="[object Uint8ClampedArray]",Fi="[object Uint16Array]",Hi="[object Uint32Array]",Mi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gi=/^\w*$/,Vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,Ui=/[\\^$.*+?()[\]{}|]/g,Yi=/^\s+|\s+$/g,$i=/\\(\\)?/g,Wi=/\w*$/,qi=/^[-+]0x[0-9a-f]+$/i,Qi=/^0b[01]+$/i,Xi=/^\[object .+?Constructor\]$/,Ki=/^0o[0-7]+$/i,Ji=/^(?:0|[1-9]\d*)$/,Zi="\\ud800-\\udfff",ta="\\u0300-\\u036f\\ufe20-\\ufe23",ea="\\u20d0-\\u20f0",na="\\ufe0e\\ufe0f",ra="["+Zi+"]",ia="["+ta+ea+"]",aa="\\ud83c[\\udffb-\\udfff]",oa="(?:"+ia+"|"+aa+")",ua="[^"+Zi+"]",ca="(?:\\ud83c[\\udde6-\\uddff]){2}",sa="[\\ud800-\\udbff][\\udc00-\\udfff]",la="\\u200d",fa=oa+"?",da="["+na+"]?",ha="(?:"+la+"(?:"+[ua,ca,sa].join("|")+")"+da+fa+")*",ga=da+fa+ha,pa="(?:"+[ua+ia+"?",ia,ca,sa,ra].join("|")+")",va=RegExp(aa+"(?="+aa+")|"+pa+ga,"g"),ma={};ma[ki]=ma[Ei]=ma[Ai]=ma[Pi]=ma[Bi]=ma[Ri]=ma[zi]=ma[Fi]=ma[Hi]=!0,ma[gi]=ma[pi]=ma[Oi]=ma[vi]=ma[Ti]=ma[mi]=ma[yi]=ma[_i]=ma[bi]=ma[wi]=ma[Ii]=ma[Ci]=ma[Si]=ma[Ni]=ma[ji]=!1;var ya={};ya[gi]=ya[pi]=ya[Oi]=ya[Ti]=ya[vi]=ya[mi]=ya[ki]=ya[Ei]=ya[Ai]=ya[Pi]=ya[Bi]=ya[bi]=ya[wi]=ya[Ii]=ya[Ci]=ya[Si]=ya[Ni]=ya[Li]=ya[Ri]=ya[zi]=ya[Fi]=ya[Hi]=!0,ya[yi]=ya[_i]=ya[ji]=!1;var _a=parseInt,xa="object"==r(e)&&e,ba=xa&&"object"==r(t)&&t,wa=ba&&ba.exports===xa,Ia=N("object"==("undefined"==typeof n?"undefined":r(n))&&n),Da=N("object"==("undefined"==typeof self?"undefined":r(self))&&self),Ca=N("object"==r(this)&&this),Sa=Ia||Da||Ca||Function("return this")(),Na=Array.prototype,La=Object.prototype,ja=Sa["__core-js_shared__"],Oa=function(){var t=/[^.]+$/.exec(ja&&ja.keys&&ja.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ta=Function.prototype.toString,ka=La.hasOwnProperty,Ea=0,Aa=Ta.call(Object),Pa=La.toString,Ba=RegExp("^"+Ta.call(ka).replace(Ui,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ra=wa?Sa.Buffer:Mr,za=Sa.Reflect,Fa=Sa.Symbol,Ha=Sa.Uint8Array,Ma=za?za.enumerate:Mr,Ga=Object.getOwnPropertySymbols,Va=Object.create,Ua=La.propertyIsEnumerable,Ya=Na.splice,$a=Math.floor,Wa=Object.getPrototypeOf,qa=Sa.isFinite,Qa=Object.keys,Xa=Math.max,Ka=Math.min,Ja=We(Sa,"DataView"),Za=We(Sa,"Map"),to=We(Sa,"Promise"),eo=We(Sa,"Set"),no=We(Sa,"WeakMap"),ro=We(Object,"create"),io=no&&new no,ao=!Ua.call({valueOf:1},"valueOf"),oo={},uo=_n(Ja),co=_n(Za),so=_n(to),lo=_n(eo),fo=_n(no),ho=Fa?Fa.prototype:Mr,go=ho?ho.valueOf:Mr,po=ho?ho.toString:Mr;F.prototype=bt(z.prototype),F.prototype.constructor=F,H.prototype.clear=M,H.prototype["delete"]=G,H.prototype.get=V,H.prototype.has=U,H.prototype.set=Y,$.prototype.clear=W,$.prototype["delete"]=q,$.prototype.get=Q,$.prototype.has=X,$.prototype.set=K,J.prototype.clear=Z,J.prototype["delete"]=tt,J.prototype.get=et,J.prototype.has=nt,J.prototype.set=rt,it.prototype.add=it.prototype.push=at,it.prototype.has=ot,ut.prototype.clear=ct,ut.prototype["delete"]=st,ut.prototype.get=lt,ut.prototype.has=ft,ut.prototype.set=dt;var vo=Ne(Lt),mo=Ne(jt,!0),yo=Le(),_o=Le(!0);Ma&&!Ua.call({valueOf:1},"valueOf")&&(Gt=function(t){return k(Ma(t))});var xo=io?function(t,e){return io.set(t,e),t}:Tr,bo=eo&&1/P(new eo([,-0]))[1]==ui?function(t){return new eo(t)}:Ar,wo=io?function(t){return io.get(t)}:Ar,Io=Kt("length");Ga||(Qe=Br),(Ja&&Xe(new Ja(new ArrayBuffer(1)))!=Ti||Za&&Xe(new Za)!=bi||to&&Xe(to.resolve())!=Di||eo&&Xe(new eo)!=Si||no&&Xe(new no)!=ji)&&(Xe=function(t){var e=Pa.call(t),n=e==Ii?t.constructor:Mr,r=n?_n(n):Mr;if(r)switch(r){case uo:return Ti;case co:return bi;case so:return Di;case lo:return Si;case fo:return ji}return e});var Do=function(){var t=0,e=0;return function(n,r){var i=Fn(),a=oi-(i-e);if(e=i,a>0){if(++t>=ai)return n}else t=0;return xo(n,r)}}(),Co=Vn(function(t){var e=[];return br(t).replace(Vi,function(t,n,r,i){e.push(r?i.replace($i,"$1"):n||t)}),e}),So=Un(function(t,e){return Kn(t)?wt(t,Nt(e,1,Kn,!0)):[]}),No=Un(function(t){var e=h(t,ce);return e.length&&e[0]===t[0]?Pt(e):[]}),Lo=Un(function(t,e){e=Nt(e,1);var n=t?t.length:0,r=yt(t,e);return Zt(t,h(e,function(t){return an(t,n)?+t:t}).sort(_e)),r}),jo=Un(function(t){return oe(Nt(t,1,Kn,!0))}),Oo=ke(wn),To=Un(function(t,e){if(null==t)return[];var n=e.length;return n>1&&on(t,e[0],e[1])?e=[]:n>2&&on(e[0],e[1],e[2])&&(e=[e[0]]),e=1==e.length&&Ro(e[0])?e[0]:Nt(e,1,rn),Qt(t,e,[])}),ko=Un(function(t,e,n){var r=Wr;if(n.length){var i=A(n,Ve(ko));r|=Jr}return Re(t,r,e,n,i)}),Eo=Un(function(t,e,n){var r=Wr|qr;if(n.length){var i=A(n,Ve(Eo));r|=Jr}return Re(e,r,t,n,i)});Vn.Cache=J;var Ao=Un(function(t,e){var n=A(e,Ve(Ao));return Re(t,Jr,Mr,e,n)}),Po=Un(function(t,e){var n=A(e,Ve(Po));return Re(t,Zr,Mr,e,n)}),Bo=Pe(kt),Ro=Array.isArray,zo=Ra?function(t){return t instanceof Ra}:Rr,Fo=Pe(Vt),Ho=Se(function(t,e){if(ao||fn(e)||Xn(e))return void De(e,Dr(e),t);for(var n in e)ka.call(e,n)&&pt(t,n,e[n])}),Mo=Se(function(t,e){if(ao||fn(e)||Xn(e))return void De(e,Cr(e),t);for(var n in e)pt(t,n,e[n])}),Go=Se(function(t,e,n,r){De(e,Cr(e),t,r)}),Vo=Un(function(t){return t.push(Mr,ht),o(Go,Mr,t)}),Uo=Un(function(t){return t.push(Mr,pn),o($o,Mr,t)}),Yo=Se(function(t,e,n){Wt(t,e,n)}),$o=Se(function(t,e,n,r){Wt(t,e,n,r)}),Wo=Un(function(t,e){return null==t?{}:Xt(t,h(Nt(e,1),yn))});R.assign=Ho,R.assignIn=Mo,R.assignInWith=Go,R.bind=ko,R.bindKey=Eo,R.compact=xn,R.curry=Hn,R.curryRight=Mn,R.debounce=Gn,R.defaults=Vo,R.defaultsDeep=Uo,R.difference=So,R.fill=bn,R.filter=kn,R.intersection=No,R.iteratee=kr,R.keys=Dr,R.keysIn=Cr,R.map=Bn,R.mapValues=Sr,R.mP=Er,R.memoize=Vn,R.merge=Yo,R.mergeWith=$o,R.partial=Ao,R.partialRight=Po,R.pick=Wo,R.property=Pr,R.pullAt=Lo,R.remove=Cn,R.rest=Un,R.set=Nr,R.sortBy=To,R.take=Ln,R.throttle=Yn,R.toPlainObject=xr,R.union=jo,R.uniq=jn,R.values=Lr,R.zipObject=On,R.extend=Mo,R.extendWith=Go,R.clone=$n,R.cloneDeep=Wn,R.eq=qn,R.every=Tn,R.find=Oo,R.findIndex=wn,R.forEach=En,R.forEachRight=An,R.get=wr,R.gt=Bo,R.hasIn=Ir,R.identity=Tr,R.includes=Pn,R.indexOf=In,R.isArguments=Qn,R.isArray=Ro,R.isArrayLike=Xn,R.isArrayLikeObject=Kn,R.isBoolean=Jn,R.isBuffer=zo,R.isDate=Zn,R.isEmpty=tr,R.isEqual=er,R.isFinite=nr,R.isFunction=rr,R.isLength=ir,R.isNaN=ur,R.isNil=sr,R.isNull=cr,R.isNumber=lr,R.isObject=ar,R.isObjectLike=or,R.isPlainObject=fr,R.isString=dr,R.isSymbol=hr,R.isTypedArray=gr,R.isUndefined=pr,R.last=Dn,R.lt=Fo,R.max=Fr,R.min=Hr,R.stubArray=Br,R.stubFalse=Rr,R.noop=Ar,R.now=Fn,R.reduce=Rn,R.some=zn,R.sortedIndex=Sn,R.sortedIndexBy=Nn,R.startsWith=jr,R.toFinite=vr,R.toInteger=mr,R.toLength=yr,R.toNumber=_r,R.toString=br,R.trim=Or,R.uniqueId=zr,R.each=En,R.eachRight=An,R.VERSION=Gr,u(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){R[t].placeholder=R}),t.exports=R}).call(void 0)}).call(e,n(2)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){},,,,function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(){function e(t){return a(t.x)&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function i(t,e,n){return a(n)?n=t.height/t.width*e:a(e)&&(e=t.width/t.height*n),{width:e,height:n}}function a(t){return u.isUndefined(t)||u.isNull(t)}function o(t){return u.isNumber(t)&&isFinite(t)}var u=n(1),c=function s(t){return new s.Painter(t)};c.ns="http://www.w3.org/2000/svg",c.xmlns="http://www.w3.org/2000/xmlns/",c.xlink="http://www.w3.org/1999/xlink",c.supported=function(){return!!document.createElementNS&&!!document.createElementNS(c.ns,"svg").createSVGRect}(),c.create=function(t){return document.createElementNS(this.ns,t)},c.extend=function(){var t,e=[].slice.call(arguments),n=e.pop();for(t=e.length-1;t>=0;t--)e[t]&&u.extend(e[t].prototype,n)},c.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,c.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&u.extend(e.prototype,t.extend),t.construct&&u.extend(t.parent&&t.parent.prototype||c.Container.prototype,t.construct),e},c.adopt=function(t){if(t&&t.instance)return t.instance;var e=new c.Element(t);return e.type=t.nodeName,e.node=t,t.instance=e,e},c.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},c.utils={radians:function(t){return t%360*Math.PI/180},degrees:function(t){return 180*t/Math.PI%360},filterSVGElements:function(t){return[].filter.call(t,function(t){return t instanceof SVGElement})}},c.Element=c.invent({create:function(t){var e=this;e._stroke=c.defaults.attrs.stroke,e.node=t,e.node&&(e.type=t.nodeName,e.node.instance=e,e._stroke=t.getAttribute("stroke")||e._stroke)},extend:{attr:function(t,e,n){var i,s,l,f=this;if(a(t)){for(t={},e=f.node.attributes,n=e.length-1;n>=0;n--)i=e[n].nodeName,s=e[n].nodeValue,l=parseFloat(s),t[i]=o(l)?l:s;return t}if("object"===("undefined"==typeof t?"undefined":r(t)))for(e in t)t.hasOwnProperty(e)&&f.attr(e,t[e]);else if(null===e)f.node.removeAttribute(t);else{if(u.isUndefined(e))return e=f.node.getAttribute(t),l=parseFloat(e),a(e)?c.defaults.attrs[t]:o(l)?l:e;"string"==typeof n?f.node.setAttributeNS(n,t,e.toString()):f.node.setAttribute(t,e.toString())}return f},x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return a(t)?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return a(t)?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var n=this,r=i(n.bbox(),t,e);return n.width(r.width).height(r.height)},parent:function l(t){if(this.node.parentNode){var l=c.adopt(this.node.parentNode);if(t)for(;!(l instanceof t)&&l.node.parentNode instanceof SVGElement;)l=c.adopt(l.node.parentNode)}return l},remove:function(){var t=this,e=t.parent();return e&&e.removeElement(t),t.node=null,t},removeElement:function(t){var e=this;return e.node.removeChild(t.node),e},id:function(t){return this.attr("id",t)},contains:function(t,e,n,r){var i=this.bbox(),a=n||0,o=r||n||0;return t>i.x-a&&e>i.y-o&&t<i.x+i.width+a&&e<i.y+i.height+o},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!==this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return a(t)?[]:t.trim().split(/\s+/)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){var e=this,n=function(t){if(!e.hasClass(t)){var n=e.classes();n.push(t),e.attr("class",n.join(" "))}},r=t.split(/\s+/);return r.forEach(function(t){n(t)}),e},removeClass:function(t){var e=this;return e.hasClass(t)&&e.attr("class",e.classes().filter(function(e){return e!==t}).join(" ")),e},toggleClass:function(t){var e=this;return e.hasClass(t)?e.removeClass(t):e.addClass(t)}}}),c.Container=c.invent({create:function(t){this.constructor.call(this,t)},inherit:c.Element,extend:{children:function(){return u.map(u.filter(this.node.childNodes,function(t){return t instanceof SVGElement}),function(t){return c.adopt(t)})},parent:function(){return"#document"===this.node.parentNode.nodeName?null:this.node.parentNode},remove:function(){var t=this;return t.parent()&&t.parent().removeChild(t.node),t.node=null,t},add:function(t,e){var n=this;return n.has(t)||(e=a(e)?n.children().length:e,n.node.insertBefore(t.node,n.node.childNodes[e]||null)),n},put:function(t,e){return this.add(t,e),t},has:function(t){return this.index(t)>=0},index:function(t){return this.children().indexOf(t)},removeElement:function(t){var e=this;return e.node.removeChild(t.node),e}}}),c.Painter=c.invent({create:function(t){var e,n=this;t&&(e="string"==typeof t?document.getElementById(t):t),"svg"===e.nodeName?n.constructor.call(n,e):(n.constructor.call(n,c.create("svg")),e.appendChild(n.node)),this.namespace().size("100%","100%").x(0).y(0)},extend:{namespace:function(){return this.attr({xmlns:c.ns,version:"1.1"}).attr("xmlns:xlink",c.xlink,c.xmlns)}},inherit:c.Container}),c.BBox=c.invent({create:function(t){var n=this;if(t){var r;try{r=t.node.getBBox()}catch(i){r={x:t.node.clientLeft,y:t.node.clientTop,width:t.node.clientWidth,height:t.node.clientHeight}}n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height}e(this)},parent:c.Element,construct:{bbox:function(){return new c.BBox(this)}}}),c.PointArray=function(t,e){var n=this;return t=(t||[]).valueOf(),e=e||[[0,0]],0===t.length&&e&&(t=e.valueOf()),u.isArray(t)?(n.value=t,n.value):(n.value=t.split(/[\s]+/),n.value)},c.extend(c.PointArray,{toString:function(){for(var t=0,e=this.value.length,n=[];e>t;t++)n.push(this.value[t].join(","));return n.join(" ")},toLine:function(){var t=this;return{x1:t.value[0][0],y1:t.value[0][1],x2:t.value[1][0],y2:t.value[1][1]}},parse:function(t){if(t=t.valueOf(),Array.isArray(t))return t;t=t.split(/\s+/);for(var e,n=0,r=t.length,i=[];r>n;n++)e=t[n].split(","),i.push([parseFloat(e[0]),parseFloat(e[1])]);return i},move:function(t,e){var n=this,r=n.bbox();if(t-=r.x,e-=r.y,!isNaN(t)&&!isNaN(e))for(var i=n.value.length-1;i>=0;i--)n.value[i]=[n.value[i][0]+t,n.value[i][1]+e];return n},size:function(t,e){var n,r=this,i=r.bbox();for(n=r.value.length-1;n>=0;n--)r.value[n][0]=(this.value[n][0]-i.x)*t/i.width+i.x,r.value[n][1]=(this.value[n][1]-i.y)*e/i.height+i.y;return r},bbox:function(){return c.parser.poly.setAttribute("points",this.toString()),c.parser.poly.getBBox()}}),c.G=c.invent({create:"g",inherit:c.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:-this.x()+t},!0)},y:function(t){return null==t?this.transform("y"):this.transform({y:-this.y()+t},!0)},cx:function(t){return null==t?this.tbox().cx:this.x(t-this.tbox().width/2)},cy:function(t){return null==t?this.tbox().cy:this.y(t-this.tbox().height/2)}},construct:{group:function(){return this.put(new c.G)}}}),c.Line=c.invent({create:"line",inherit:c.Element,extend:{array:function(){var t=this;return new c.PointArray([[t.attr("x1"),t.attr("y1")],[t.attr("x2"),t.attr("y2")]])},plot:function(t,e,n,r){return t=4===arguments.length?{x1:t,y1:e,x2:n,y2:r}:new c.PointArray(t).toLine(),this.attr(t)},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var n=this,r=i(n.bbox(),t,e);return n.attr(n.array().size(r.width,r.height).toLine())}},construct:{line:function(t,e,n,r){return this.put(new c.Line).plot(t,e,n,r)}}}),c.Rect=c.invent({create:"rect",inherit:c.Element,extend:{plot:function(t,e){return this.size(t,e)}},construct:{rect:function(t,e){return this.put((new c.Rect).size(t,e))}}}),c.Polyline=c.invent({create:"polyline",inherit:c.Element,extend:{plot:function(t){return this.attr("points",t)}},construct:{polyline:function(t){return this.put(new c.Polyline).plot(t)}}}),c.Polygon=c.invent({create:"polygon",inherit:c.Element,extend:{plot:function(t){return this.attr("points",t)}},construct:{polygon:function(t){return this.put(new c.Polygon).plot(t)}}}),c.Circle=c.invent({create:"circle",inherit:c.Element,extend:{plot:function(t){return this.rx(t/2)},move:function(t,e){var n=this.bbox();return this.attr("cx",t+(n.x2-n.x)/2).attr("cy",e+(n.y2-n.y)/2)},cx:function(t){return a(t)?this.attr("cx"):this.attr("cx",t)},cy:function(t){return a(t)?this.attr("cy"):this.attr("cy",t)},rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}},construct:{circle:function(t){return this.put(new c.Circle).rx(t/2).move(0,0)}}}),c.Text=c.invent({create:function(){var t=this;t.constructor.call(t,c.create("text")),t._leading=1.3,t._rebuild=!0,t._build=!1,t.attr("font-family",c.defaults.attrs["font-family"])},inherit:c.Element,extend:{x:function(t){var e=this;return a(t)?e.attr("x"):(e.lines().forEach(function(e){e.newLined&&e.x(t)}),this.attr("x",t))},y:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return a(t)?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)},cx:function(t){return a(t)?this.bbox().cx:this.x(t-this.bbox().width/2)},cy:function(t){return a(t)?this.bbox().cy:this.y(t-this.bbox().height/2)},text:function(t){var e=this;if(u.isUndefined(t))return e.content;if(e.clear().build(!0),"function"==typeof t)t.call(e,e);else{t=(e.content=t).split("\n");for(var n=0,r=t.length;r>n;n++)e.tspan(t[n]).newLine()}return e},size:function(t){return this.attr("font-size",t).rebuild()},leading:function(t){var e=this;if(a(t))return e._leading;var n=parseFloat(t);return e._leading=u.isNaN(n)?1.3:n,e.rebuild()},rebuild:function(t){var e=this;return"boolean"==typeof t&&(e._rebuild=t),e._rebuild&&e.lines().forEach(function(t){t.newLined&&(t.attr("x",e.attr("x")),t.attr("dy",e._leading*e.attr("font-size")))}),e},lines:function(){return u.map(c.utils.filterSVGElements(this.node.childNodes),function(t){return c.adopt(t)})},build:function(t){var e=this;return e._build=!!t,e}},construct:{text:function(t){return this.put(new c.Text).text(t)},plain:function(t){return this.put(new c.Text).plain(t)}}}),c.Tspan=c.invent({create:"tspan",inherit:c.Element,extend:{text:function(t){return this.plain(t)},dx:function(t){return this.attr("dx",t)},dy:function(t){return this.attr("dy",t)},newLine:function(){var t=this,e=t.parent(c.Text);return t.newLined=!0,t.dy(e._leading*e.attr("font-size")).attr("x",e.x())}}}),c.extend(c.Text,c.Tspan,{plain:function(t){var e=this;return e._build===!1&&e.clear(),e.node.appendChild(document.createTextNode(e.content=t)),e},tspan:function f(t){var e=this,n=e.node,f=new c.Tspan;return e._build===!1&&e.clear(),n.appendChild(f.node),f.text(t)},clear:function(){for(var t=this,e=t.node;e.hasChildNodes();)e.removeChild(e.lastChild);return t instanceof c.Text&&(t.content=""),t},length:function(){return this.node.getComputedTextLength()}}),t.exports=c.supported?c:null}()},function(t,e){"use strict";!function(){var e=function(){function t(t,e,n){this.handler=t,this.self=e,this.priority=n}return t}(),n=function(){function t(){this._handlers=[]}return t.prototype.addHandler=function(t,n){var r=arguments.length<=2||void 0===arguments[2]?1:arguments[2];this._handlers.push(new e(t,n,r)),this.sortHandlers()},t.prototype.removeHandler=function(t,e){for(var n=0;n<this._handlers.length;n++){var r=this._handlers[n];if(r.handler===t&&r.self===e){this._handlers.splice(n,1);break}}},t.prototype.sortHandlers=function(){this._handlers.sort(function(t,e){var n=t.priority,r=e.priority;return r>n?1:n>r?-1:0})},t.prototype.removeHandlersByPriority=function(t){for(var e=null,n=null,r=0;r<this._handlers.length;r++){var i=this._handlers[r];if(i.priority===t)null==e?e=r:n=r;else if(null!=e)break}null!=e&&null!=n&&this._handlers.splice(e,n-e+1)},t.prototype.removeAllHandlers=function(){this._handlers.length=0},t.prototype.raise=function(t,e){var n=!1,r=function(){n=!0};null==e?e={stopPropagation:r}:e.stopPropagation=r;for(var i=this._handlers.length,a=this._handlers.slice(0,i),o=0;i>o&&!n;o++){var u=a[o];u.handler.call(u.self,t,e)}},Object.defineProperty(t.prototype,"hasHandlers",{get:function(){return this._handlers.length>0},enumerable:!0,configurable:!0}),t}();t.exports={Event:n,EventHandler:e}}()},function(t,e,n){"use strict";!function(){function e(t){return j.isNil(t)?!0:j.isString(t)?t.replace(/\s/g,"").length<1:!1}function r(t,e,n){t&&t.removeEventListener(e,n)}function i(t,e,n){t&&t.addEventListener(e,n)}function a(t){}function o(t){return L.isNumber(t)?"number":L.isBoolean(t)?"boolean":L.isDate(t)?"date":L.isString(t)?"string":L.isArray(t)?"array":L.isObject(t)?"object":""}function u(t,e){var n=j.isNil(e)||"boolean"==typeof e||""===e;if(n)return"";var r=isNaN(e);return r||0===e||E.hasOwnProperty(t)&&E[t]?""+e:("string"==typeof e&&(e=e.trim()),e+"px")}function c(t){var e={};return function(n){return e.hasOwnProperty(n)?e[n]:(e[n]=t.call(this,n),e[n])}}function s(t){return t.replace(A,"-$1").toLowerCase()}function l(t){return s(t).replace(P,"-ms-")}function f(t){var e="";for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];j.isNil(r)||(e+=B(n)+":",e+=u(n,r)+";")}return e||null}function d(t,e){var n=function(t){return"[object Object]"===Object.prototype.toString.call(t)};if(!n(t)||!n(e))return t;for(var r,i=[{level:-1,value:t,key:null}],a=[],o={};i.length>0;)if(r=i.pop(),L.isNil(r.key)||(a=j.take(a,r.level),a.push(r.key)),L.isObject(r.value)&&!L.isFunction(r.value))for(var u in r.value)i.push({level:r.level+1,value:r.value[u],key:u});else{var c=a.join("."),s=j.get(t,c);s!==j.get(e,c)&&j.set(o,c,s)}return j.isEmpty(o)?null:o}function h(t){var e=j.cloneDeep(t),n=[];e&&n.push(e);for(var r;n.length>0;)if(r=n.pop(),L.isObject(r))for(var i in r)n.push(r[i]),L.isFunction(r[i])&&(r[i]=p(r[i]));return e}function g(t){var e=j.clone(t),n=[];e&&n.push(e);for(var r,i;n.length>0;)if(r=n.pop(),L.isObject(r))for(var a in r)n.push(r[a]),L.isString(r[a])&&(i=v(r[a]),i&&(r[a]=i));return e}function p(t){return t.toString()}function v(t){if(L.isString(t)&&"function"===t.substr(0,8)&&(/\s/.test(t[8])||"("===t[8])){var e=t.indexOf("(")+1,n=t.indexOf(")"),r=t.substr(e,n-e).split(",").map(function(t){return t.replace(/\s+/,"")}),i=t.indexOf("{")+1,a=t.lastIndexOf("}");return new Function(r,t.substr(i,a-i))}return null}function m(t){var e;try{e=GC.Spread.Views.Plugins[t]}catch(n){}return e}function y(t){var e={},n=GC&&GC.Spread&&GC.Spread.Views&&GC.Spread.Views.LocaleResource&&GC.Spread.Views.LocaleResource.content;for(var r in t)e[r]=n&&n[r];return e}function _(t){var e=L.toDate(t);if(isNaN(e.getTime()))return t;var n=e.getFullYear().toString(),r=(e.getMonth()+1).toString(),i=e.getDate().toString();return x(n,4)+"-"+x(r,2)+"-"+x(i,2)}function x(t,e){var n=e-t.length+1;return n>=0?new Array(n).join("0")+t:t}function b(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);n.prototype=e.prototype,t.prototype=new n}function w(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""}function I(t,e,n){var r=function(t){return j.isUndefined(t)?t:n?(t+"").trim().toLowerCase():(t+"").trim().toString()},i=r(e);return function(e){if(null==e)return!1;var r=D(e,t);return r=j.isUndefined(r)?r:n?(r+"").toLowerCase():(r+"").toString(),r===i?void 0!==i||t in e:j.isEqual(r,i)}}function D(){var t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1];if(!j.isNil(t)&&!j.isNil(e)){e=j.isArray(e)?e:j.isString(e)?e.split("."):[e];for(var n=0,r=e.length,i=arguments.length>2;t&&r>n;){if(i&&n===r-1)return void(t[e[n]]=arguments.length<=2?void 0:arguments[2]);t=t[e[n++]]}return t}}function C(t,e,n,r){j.isArray(t)||(t=[t]),j.isArray(e)||(e=[e]);var i=r?[]:{};j.forEach(t,function(t){i[t]||(i[t]=1)});var a=[],o=[],u=[],c=0,s=0,l=0;return j.forEach(e,function(t){i[t]?(i[t]=2,n&&(o[l++]=t)):(i[t]=3,n&&(a[c++]=t))}),n&&j.forEach(i,function(t,e){1===t&&(u[s++]=+e)}),n?{add:a,remove:u,keep:o}:{map:i}}function S(t){return L.isNumber(t)?N(t):new Date(t)}function N(t){var e=new Date(1899,11,30),n=864e5,r=t-Math.floor(t);return 0>t&&r&&(t=Math.floor(t)-r),new Date(t*n+ +e)}var L={},j=n(1);L.isString=j.isString,L.regist=i,L.unRegist=r,L.isNilOrWhiteSpace=e,L.isNumber=j.isNumber,L.isInt=j.isInteger,L.isBoolean=j.isBoolean,L.isFunction=j.isFunction,L.isUndefined=j.isUndefined,L.isDate=j.isDate,L.isArray=j.isArray,L.isObject=j.isObject,L.debugLog=a,L.getType=o,L.isNull=j.isNull,L.isNil=j.isNil;var O={Back:8,Tab:9,Enter:13,Escape:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Delete:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123};L.Key=O;var T=function(t){var e=t.keyCode,n=e>47&&58>e||e>64&&91>e||e>95&&112>e||e>185&&193>e||e>218&&223>e;return n};L.isPrintableKey=T;var k={Text:"text",CheckBox:"checkbox",Date:"date",Color:"color",Number:"number"};L.EditorType=k;var E={columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},A=/([A-Z])/g,P=/^-ms-/,B=c(function(t){return l(t)});L.cMFS=f,L.extractObject=d,L.serializeObject=h,L.deserializeObject=g,L.serializeFunction=p,L.deserializeFunction=v,L.findPlugin=m,L.getResource=y,L.normalizeDate=_,L.extends_=b,L.caC=w,L.mP=I,L.sOP=function(t,e){return D(t,e)},L.gOP=function(t,e,n){return D(t,e,n)},L.compareArray=C,L.toDate=S,t.exports=L}()}])});