WordPress Charts and Graphs Lite - Version 3.3.4

Version Description

  • 2019-11-15
Download this release

Release Info

Developer codeinwp
Plugin Icon WordPress Charts and Graphs Lite
Version 3.3.4
Comparing to
See all releases

Code changes from version 3.3.3 to 3.3.4

CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
 
 
 
 
 
2
  ### v3.3.3 - 2019-11-12
3
  **Changes:**
4
  * Tested upto WordPress 5.3
1
 
2
+ ### v3.3.4 - 2019-11-15
3
+ **Changes:**
4
+ * Fix issue with table chart not loading in the block editor
5
+
6
  ### v3.3.3 - 2019-11-12
7
  **Changes:**
8
  * Tested upto WordPress 5.3
classes/Visualizer/Gutenberg/build/block.css CHANGED
@@ -1,2 +1,2 @@
1
- .visualizer-settings{background-color:#f8f9f9;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;position:relative}.visualizer-settings .visualizer-settings__title{margin:0;padding:1.5rem 0;text-align:center;border-bottom:1px solid #e6eaee}.visualizer-settings .visualizer-settings__title .dashicon{vertical-align:top;margin-right:.25em}.visualizer-settings .visualizer-settings__content{padding:2.5em 0}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-description{margin:0 0 1.5em 0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:18px;text-align:center}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option{display:flex;align-items:flex-start;flex-wrap:wrap;margin:0 auto;padding:1.25em 1.5em;max-width:80%;background:#fff;border-width:1px 1px 0;border-style:solid;border-color:#e6eaee;cursor:pointer}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option.locked{cursor:default}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option.locked:hover{background:#ffffff}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option:hover{background:#f5f5f5}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option:last-of-type{border-bottom-width:1px}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option .visualizer-settings__content-option-title{max-width:80%;display:block;font-size:1.25em}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option .visualizer-settings__content-option-icon{align-self:center;margin-left:auto;color:#b9bcc2}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option .visualizer-settings__content-option-icon .dashicon{height:25px;width:25px}.visualizer-settings .visualizer-settings__charts{text-align:center;padding-bottom:25px}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid{display:grid;grid-template-columns:50% 50%}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid .visualizer-settings__charts-single{margin:25px;padding-bottom:50px;background-color:#efefef;position:relative}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid .visualizer-settings__charts-single .visualizer-settings__charts-title{padding:10px;font-weight:bold;text-align:center}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid .visualizer-settings__charts-single .visualizer-settings__charts-controls{width:100%;position:absolute;bottom:0;padding:10px;font-weight:bold;text-align:center;cursor:pointer}.visualizer-settings .visualizer-settings__charts .dataTables_wrapper{background:#fff;padding:10px}.visualizer-settings .visualizer-settings__charts .visualizer-no-charts{padding-top:25px}.visualizer-settings .visualizer-settings__chart{text-align:center}.visualizer-settings .visualizer-settings__chart .dataTables_wrapper{background:#fff;padding:10px}.visualizer-settings .visualizer-settings__controls{margin:0;padding:1.5rem 0;text-align:center;border-top:1px solid #e6eaee}.visualizer-advanced-panel.components-panel__body.is-opened>.components-panel__body-title{margin-bottom:0}.visualizer-inner-sections{background:#f8f9f9}.visualizer-inner-sections .components-panel__body-toggle:hover{background:#EEEEEE}.visualizer-inner-sections ul.visualizer-list{list-style:disc;margin-left:15px}.components-panel__body-button .components-panel__body-toggle.components-button .dashicons-admin-tools{margin:-2px 6px -2px 0}.components-panel__body-button .components-panel__body-toggle.components-button .dashicons-admin-users{margin:-2px 6px -2px 0}.components-panel__body-button .components-panel__body-toggle.components-button .components-panel__arrow{width:48px;height:48px;right:0;border-top:1px solid #ddd;transform:translateY(-50%) rotate(270deg)}.components-panel__body-button.visualizer-panel-back .components-panel__body-title{background:#f3f3f3}.components-panel__body-button.visualizer-panel-back .components-panel__body-title:hover{background:#f3f3f3}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle{margin:10px 0;background:#fff}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle.components-button{padding-left:60px}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle.components-button:hover .components-panel__arrow{background:#f3f3f3;border-width:1px 1px 0 1px;border-color:#ddd;border-style:solid}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle.components-button .components-panel__arrow{left:0;transform:translateY(-50%) rotate(90deg)}.visualizer-chart-editor{max-width:100%;margin:25px 25px 0}.visualizer-chart-editor .htEditor{margin-bottom:20px}.visualizer-chart-editor .htEditor .htRowHeaders{height:auto !important;width:auto !important}.visualizer-chart-editor .htEditor .ht_master .wtHolder{height:auto !important;width:auto !important}.htContextMenu:not(.htGhostTable){z-index:999999}.htDatepickerHolder{z-index:999999 !important}@media (max-width: 768px){.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid{display:grid;grid-template-columns:100%}}
2
 
1
+ .visualizer-settings{background-color:#f8f9f9;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;position:relative}.visualizer-settings .visualizer-settings__title{margin:0;padding:1.5rem 0;text-align:center;border-bottom:1px solid #e6eaee}.visualizer-settings .visualizer-settings__title .dashicon{vertical-align:top;margin-right:.25em}.visualizer-settings .visualizer-settings__content{padding:2.5em 0}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-description{margin:0 0 1.5em 0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:18px;text-align:center}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option{display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;flex-wrap:wrap;margin:0 auto;padding:1.25em 1.5em;max-width:80%;background:#fff;border-width:1px 1px 0;border-style:solid;border-color:#e6eaee;cursor:pointer}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option.locked{cursor:default}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option.locked:hover{background:#ffffff}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option:hover{background:#f5f5f5}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option:last-of-type{border-bottom-width:1px}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option .visualizer-settings__content-option-title{max-width:80%;display:block;font-size:1.25em}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option .visualizer-settings__content-option-icon{align-self:center;margin-left:auto;color:#b9bcc2}.visualizer-settings .visualizer-settings__content .visualizer-settings__content-option .visualizer-settings__content-option-icon .dashicon{height:25px;width:25px}.visualizer-settings .visualizer-settings__charts{text-align:center;padding-bottom:25px}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid{display:grid;grid-template-columns:50% 50%}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid .visualizer-settings__charts-single{margin:25px;padding-bottom:50px;background-color:#efefef;position:relative}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid .visualizer-settings__charts-single .visualizer-settings__charts-title{padding:10px;font-weight:bold;text-align:center}.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid .visualizer-settings__charts-single .visualizer-settings__charts-controls{width:100%;position:absolute;bottom:0;padding:10px;font-weight:bold;text-align:center;cursor:pointer}.visualizer-settings .visualizer-settings__charts .dataTables_wrapper{background:#fff;padding:10px}.visualizer-settings .visualizer-settings__charts .visualizer-no-charts{padding-top:25px}.visualizer-settings .visualizer-settings__chart{text-align:center}.visualizer-settings .visualizer-settings__chart .dataTables_wrapper{background:#fff;padding:10px}.visualizer-settings .visualizer-settings__controls{margin:0;padding:1.5rem 0;text-align:center;border-top:1px solid #e6eaee}.visualizer-advanced-panel.components-panel__body.is-opened>.components-panel__body-title{margin-bottom:0}.visualizer-inner-sections{background:#f8f9f9}.visualizer-inner-sections .components-panel__body-toggle:hover{background:#EEEEEE}.visualizer-inner-sections ul.visualizer-list{list-style:disc;margin-left:15px}.components-panel__body-button .components-panel__body-toggle.components-button .dashicons-admin-tools{margin:-2px 6px -2px 0}.components-panel__body-button .components-panel__body-toggle.components-button .dashicons-admin-users{margin:-2px 6px -2px 0}.components-panel__body-button .components-panel__body-toggle.components-button .components-panel__arrow{width:48px;height:48px;right:0;border-top:1px solid #ddd;-webkit-transform:translateY(-50%) rotate(270deg);transform:translateY(-50%) rotate(270deg)}.components-panel__body-button.visualizer-panel-back .components-panel__body-title{background:#f3f3f3}.components-panel__body-button.visualizer-panel-back .components-panel__body-title:hover{background:#f3f3f3}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle{margin:10px 0;background:#fff}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle.components-button{padding-left:60px}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle.components-button:hover .components-panel__arrow{background:#f3f3f3;border-width:1px 1px 0 1px;border-color:#ddd;border-style:solid}.components-panel__body-button.visualizer-panel-back .components-panel__body-title .components-panel__body-toggle.components-button .components-panel__arrow{left:0;-webkit-transform:translateY(-50%) rotate(90deg);transform:translateY(-50%) rotate(90deg)}.visualizer-chart-editor{max-width:100%;margin:25px 25px 0}.visualizer-chart-editor .htEditor{margin-bottom:20px}.visualizer-chart-editor .htEditor .htRowHeaders{height:auto !important;width:auto !important}.visualizer-chart-editor .htEditor .ht_master .wtHolder{height:auto !important;width:auto !important}.htContextMenu:not(.htGhostTable){z-index:999999}.htDatepickerHolder{z-index:999999 !important}@media (max-width: 768px){.visualizer-settings .visualizer-settings__charts .visualizer-settings__charts-grid{display:grid;grid-template-columns:100%}}
2
 
classes/Visualizer/Gutenberg/build/block.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e){function t(t){for(var r,o,s=t[0],l=t[1],u=t[2],d=0,m=[];d<s.length;d++)o=s[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&m.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(c&&c(t);m.length;)m.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={1:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var c=l;i.push([154,0]),n()}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Et(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function _(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function f(e){var t=p(NaN);return null!=e?m(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var y=a.momentProperties=[];function g(e,t){var n,r,a;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),y.length>0)for(n=0;n<y.length;n++)s(a=t[r=y[n]])||(e[r]=a);return e}var b=!1;function v(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,a.updateOffset(this),b=!1)}function M(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function L(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&k(e[r])!==k(t[r]))&&o++;return o+i}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){for(var r,i=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];i.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var T,S={};function O(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),S[e]||(Y(t),S[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function j(e,t){var n,r=m({},e);for(n in t)d(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&o(e[n])&&(r[n]=m({},r[n]));return r}function E(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var C={};function H(e,t){var n=e.toLowerCase();C[n]=C[n+"s"]=C[t]=e}function P(e){return"string"==typeof e?C[e]||C[e.toLowerCase()]:void 0}function A(e){var t,n,r={};for(n in e)d(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var z={};function F(e,t){z[e]=t}function W(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function U(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(B[e]=a),t&&(B[t[0]]=function(){return W(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function V(e,t){return e.isValid()?(t=J(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(N);for(t=0,n=a.length;t<n;t++)B[a[t]]?a[t]=B[a[t]]:a[t]=(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=x(a[r])?a[r].call(t,e):a[r];return i}}(t),I[t](e)):e.localeData().invalidDate()}function J(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(R.lastIndex=0;n>=0&&R.test(e);)e=e.replace(R,r),R.lastIndex=0,n-=1;return e}var G=/\d/,q=/\d\d/,$=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ae=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,t,n){ue[e]=x(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=k(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function _e(e,t){he(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function fe(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}var ye=0,ge=1,be=2,ve=3,Me=4,we=5,ke=6,Le=7,Ye=8;function De(e){return Te(e)?366:365}function Te(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),H("year","y"),F("year",1),ce("Y",ie),ce("YY",Q,q),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),he(["YYYYY","YYYYYY"],ye),he("YYYY",(function(e,t){t[ye]=2===e.length?a.parseTwoDigitYear(e):k(e)})),he("YY",(function(e,t){t[ye]=a.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[ye]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var Se,Oe=xe("FullYear",!0);function xe(e,t){return function(n){return null!=n?(Ee(this,e,n),a.updateOffset(this,t),this):je(this,e)}}function je(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Te(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Te(e)?29:28:31-r%7%2}Se=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),F("month",8),ce("M",Q),ce("MM",Q,q),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[ge]=k(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[ge]=a:h(n).invalidMonth=e}));var He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function ze(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:-1!==(a=Se.call(this._shortMonthsParse,o))?a:null}function Fe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function We(e){return null!=e?(Fe(this,e),a.updateOffset(this,!0),this):je(this,"Month")}var Ne=le,Re=le;function Ie(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=me(r[t]),a[t]=me(a[t]);for(t=0;t<24;t++)i[t]=me(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e,t,n,r,a,i,o){var s=new Date(e,t,n,r,a,i,o);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function Ue(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var r=7+t-n;return-(7+Ue(e,0,r).getUTCDay()-t)%7+r-1}function Je(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+Ve(e,r,a);return s<=0?o=De(i=e-1)+s:s>De(e)?(i=e+1,o=s-De(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ge(e,t,n){var r,a,i=Ve(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+qe(a=e.year()-1,t,n):o>qe(e.year(),t,n)?(r=o-qe(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function qe(e,t,n){var r=Ve(e,t,n),a=Ve(e+1,t,n);return(De(e)-r+a)/7}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),F("week",5),F("isoWeek",5),ce("w",Q),ce("ww",Q,q),ce("W",Q),ce("WW",Q,q),_e(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ce("d",Q),ce("e",Q),ce("E",Q),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:h(n).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,n,r){t[r]=k(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null}var Xe=le,et=le,tt=le;function nt(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),s.push(a),l.push(i),u.push(r),u.push(a),u.push(i);for(o.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=me(s[t]),l[t]=me(l[t]),u[t]=me(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function rt(){return this.hours()%12||12}function at(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,rt),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+rt.apply(this)+W(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+rt.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+W(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)})),at("a",!0),at("A",!1),H("hour","h"),F("hour",13),ce("a",it),ce("A",it),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,q),ce("hh",Q,q),ce("kk",Q,q),ce("hmm",X),ce("hmmss",ee),ce("Hmm",X),ce("Hmmss",ee),he(["H","HH"],ve),he(["k","kk"],(function(e,t,n){var r=k(e);t[ve]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[ve]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(a)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(a))}));var ot,st=xe("Hours",!0),lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Ae,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Ze,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ut={},ct={};function dt(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=ot._abbr,n(149)("./"+t),pt(r)}catch(e){}return ut[t]}function pt(e,t){var n;return e&&(n=s(t)?_t(e):ht(e,t))&&(ot=n),ot._abbr}function ht(e,t){if(null!==t){var n=lt;if(t.abbr=e,null!=ut[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ut[e]._config;else if(null!=t.parentLocale){if(null==ut[t.parentLocale])return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;n=ut[t.parentLocale]._config}return ut[e]=new E(j(n,t)),ct[e]&&ct[e].forEach((function(e){ht(e.name,e.config)})),pt(e),ut[e]}return delete ut[e],null}function _t(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=dt(e[i]).split("-")).length,n=(n=dt(e[i+1]))?n.split("-"):null;t>0;){if(r=mt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(a,n,!0)>=t-1)break;t--}i++}return null}(e)}function ft(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[be]<1||n[be]>Ce(n[ye],n[ge])?be:n[ve]<0||n[ve]>24||24===n[ve]&&(0!==n[Me]||0!==n[we]||0!==n[ke])?ve:n[Me]<0||n[Me]>59?Me:n[we]<0||n[we]>59?we:n[ke]<0||n[ke]>999?ke:-1,h(e)._overflowDayOfYear&&(t<ye||t>be)&&(t=be),h(e)._overflowWeeks&&-1===t&&(t=Le),h(e)._overflowWeekday&&-1===t&&(t=Ye),h(e).overflow=t),e}function yt(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,r,i,o,s=[];if(!e._d){for(r=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[be]&&null==e._a[ge]&&function(e){var t,n,r,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=yt(t.GG,e._a[ye],Ge(Ct(),1,4).year),r=yt(t.W,1),((a=yt(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var u=Ge(Ct(),i,o);n=yt(t.gg,e._a[ye],u.year),r=yt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}r<1||r>qe(n,i,o)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=Je(n,r,a,i,o),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=yt(e._a[ye],r[ye]),(e._dayOfYear>De(o)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Ue(o,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ve]&&0===e._a[Me]&&0===e._a[we]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Ue:Be).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(h(e).weekdayMismatch=!0)}}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mt=/Z|[+-]\d\d(?::?\d\d)?/,wt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Lt=/^\/?Date\((\-?\d+)/i;function Yt(e){var t,n,r,a,i,o,s=e._i,l=bt.exec(s)||vt.exec(s);if(l){for(h(e).iso=!0,t=0,n=wt.length;t<n;t++)if(wt[t][1].exec(l[1])){a=wt[t][0],r=!1!==wt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=kt.length;t<n;t++)if(kt[t][1].exec(l[3])){i=(l[2]||" ")+kt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Mt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),xt(e)}else e._isValid=!1}var Dt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Tt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,a,i,o,s,l=Dt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(l){var u=(t=l[4],n=l[3],r=l[2],a=l[5],i=l[6],o=l[7],s=[Tt(t),Ae.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(i,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,n){return!e||Ke.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(l[8],l[9],l[10]),e._d=Ue.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function xt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,i,o,s=""+e._i,l=s.length,u=0;for(r=J(e._f,e._locale).match(N)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(de(i,e))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?h(e).empty=!1:h(e).unusedTokens.push(i),fe(i,n,e)):e._strict&&!n&&h(e).unusedTokens.push(i);h(e).charsLeftOver=l-u,s.length>0&&h(e).unusedInput.push(s),e._a[ve]<=12&&!0===h(e).bigHour&&e._a[ve]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[ve]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[ve],e._meridiem),gt(e),ft(e)}else Ot(e);else Yt(e)}function jt(e){var t=e._i,n=e._f;return e._locale=e._locale||_t(e._l),null===t||void 0===n&&""===t?f({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new v(ft(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,a,i;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],xt(t),_(t)&&(i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,(null==r||i<r)&&(r=i,n=t));m(e,n||t)}(e):n?xt(e):function(e){var t=e._i;s(t)?e._d=new Date(a.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Lt.exec(e._i);null===t?(Yt(e),!1===e._isValid&&(delete e._isValid,Ot(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),gt(e)):o(t)?function(e){if(!e._d){var t=A(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),gt(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),_(e)||(e._d=null),e))}function Et(e,t,n,r,a){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new v(ft(jt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ct(e,t,n,r){return Et(e,t,n,r,!1)}a.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Ht=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f()})),Pt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:f()}));function At(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ft(e){var t=A(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||0,o=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Se.call(zt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<zt.length;++r)if(e[zt[r]]){if(n)return!1;parseFloat(e[zt[r]])!==k(e[zt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=_t(),this._bubble()}function Wt(e){return e instanceof Ft}function Nt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Rt(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+W(~~(e/60),2)+t+W(~~e%60,2)}))}Rt("Z",":"),Rt("ZZ",""),ce("Z",se),ce("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Bt(se,e)}));var It=/([\+\-]|\d\d)/gi;function Bt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(It)||["-",0,0],a=60*r[1]+k(r[2]);return 0===a?0:"+"===r[0]?a:-a}function Ut(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(M(e)||u(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Ct(e).local()}function Vt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Jt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Gt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,a,i,o,s,u=e,c=null;return Wt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Gt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[be])*n,h:k(c[ve])*n,m:k(c[Me])*n,s:k(c[we])*n,ms:k(Nt(1e3*c[ke]))*n}):(c=qt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:Kt(c[2],n),M:Kt(c[3],n),w:Kt(c[4],n),d:Kt(c[5],n),h:Kt(c[6],n),m:Kt(c[7],n),s:Kt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Ct(u.from),o=Ct(u.to),a=i.isValid()&&o.isValid()?(o=Ut(o,i),i.isBefore(o)?s=Zt(i,o):((s=Zt(o,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Ft(u),Wt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Kt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Qt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Xt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function Xt(e,t,n,r){var i=t._milliseconds,o=Nt(t._days),s=Nt(t._months);e.isValid()&&(r=null==r||r,s&&Fe(e,je(e,"Month")+s*n),o&&Ee(e,"Date",je(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,o||s))}$t.fn=Ft.prototype,$t.invalid=function(){return $t(NaN)};var en=Qt(1,"add"),tn=Qt(-1,"subtract");function nn(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function rn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=_t(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function on(){return this._locale}function sn(e,t){U(0,[e,e.length],0,t)}function ln(e,t,n,r,a){var i;return null==e?Ge(this,r,a).year:(t>(i=qe(e,r,a))&&(t=i),un.call(this,e,t,n,r,a))}function un(e,t,n,r,a){var i=Je(e,t,n,r,a),o=Ue(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,q),ce("gg",Q,q),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),_e(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),H("quarter","Q"),F("quarter",7),ce("Q",G),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),U("D",["DD",2],"Do","date"),H("date","D"),F("date",9),ce("D",Q),ce("DD",Q,q),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],be),he("Do",(function(e,t){t[be]=k(e.match(Q)[0])}));var cn=xe("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),F("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),U("m",["mm",2],0,"minute"),H("minute","m"),F("minute",14),ce("m",Q),ce("mm",Q,q),he(["m","mm"],Me);var dn=xe("Minutes",!1);U("s",["ss",2],0,"second"),H("second","s"),F("second",15),ce("s",Q),ce("ss",Q,q),he(["s","ss"],we);var mn,pn=xe("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),F("millisecond",16),ce("S",te,G),ce("SS",te,q),ce("SSS",te,$),mn="SSSS";mn.length<=9;mn+="S")ce(mn,ae);function hn(e,t){t[ke]=k(1e3*("0."+e))}for(mn="S";mn.length<=9;mn+="S")he(mn,hn);var _n=xe("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var fn=v.prototype;function yn(e){return e}fn.add=en,fn.calendar=function(e,t){var n=e||Ct(),r=Ut(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Ct(n)))},fn.clone=function(){return new v(this)},fn.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=P(t)){case"year":i=nn(this,r)/12;break;case"month":i=nn(this,r);break;case"quarter":i=nn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:w(i)},fn.endOf=function(e){return void 0===(e=P(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},fn.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Ct(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Ct(),e)},fn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Ct(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Ct(),e)},fn.get=function(e){return x(this[e=P(e)])?this[e]():this},fn.invalidAt=function(){return h(this).overflow},fn.isAfter=function(e,t){var n=M(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=M(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},fn.isSame=function(e,t){var n,r=M(e)?e:Ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=P(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return _(this)},fn.lang=an,fn.locale=rn,fn.localeData=on,fn.max=Pt,fn.min=Ht,fn.parsingFlags=function(){return m({},h(this))},fn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:z[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=A(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(x(this[e=P(e)]))return this[e](t);return this},fn.startOf=function(e){switch(e=P(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},fn.subtract=tn,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",V(n,"Z")):V(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+a)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Oe,fn.isLeapYear=function(){return Te(this.year())},fn.weekYear=function(e){return ln.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return ln.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=We,fn.daysInMonth=function(){return Ce(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return qe(this.year(),1,4)},fn.date=cn,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=st,fn.minute=fn.minutes=dn,fn.second=fn.seconds=pn,fn.millisecond=fn.milliseconds=_n,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Bt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Vt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Xt(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Vt(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vt(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Bt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Jt,fn.isUTC=Jt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=D("dates accessor is deprecated. Use date instead.",cn),fn.months=D("months accessor is deprecated. Use month instead",We),fn.years=D("years accessor is deprecated. Use year instead",Oe),fn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=jt(e))._a){var t=e._isUTC?p(e._a):Ct(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var gn=E.prototype;function bn(e,t,n,r){var a=_t(),i=p().set(r,t);return a[n](i,e)}function vn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return bn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=bn(e,r,n,"month");return a}function Mn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var a,i=_t(),o=e?i._week.dow:0;if(null!=n)return bn(t,(n+o)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=bn(t,(a+o)%7,r,"day");return s}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return x(r)?r.call(t,n):r},gn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=yn,gn.postformat=yn,gn.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return x(a)?a(e,t,n,r):a.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[He.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return ze.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},gn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Re),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ne),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},gn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=D("moment.lang is deprecated. Use moment.locale instead.",pt),a.langData=D("moment.langData is deprecated. Use moment.localeData instead.",_t);var wn=Math.abs;function kn(e,t,n,r){var a=$t(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Ln(e){return e<0?Math.floor(e):Math.ceil(e)}function Yn(e){return 4800*e/146097}function Dn(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var Sn=Tn("ms"),On=Tn("s"),xn=Tn("m"),jn=Tn("h"),En=Tn("d"),Cn=Tn("w"),Hn=Tn("M"),Pn=Tn("y");function An(e){return function(){return this.isValid()?this._data[e]:NaN}}var zn=An("milliseconds"),Fn=An("seconds"),Wn=An("minutes"),Nn=An("hours"),Rn=An("days"),In=An("months"),Bn=An("years"),Un=Math.round,Vn={ss:44,s:45,m:45,h:22,d:26,M:11};function Jn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Gn=Math.abs;function qn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,r=Gn(this._days),a=Gn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(a/12),o=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var m=d<0?"-":"",p=qn(this._months)!==qn(d)?"-":"",h=qn(this._days)!==qn(d)?"-":"",_=qn(this._milliseconds)!==qn(d)?"-":"";return m+"P"+(i?p+i+"Y":"")+(o?p+o+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?_+l+"H":"")+(u?_+u+"M":"")+(c?_+c+"S":"")}var Kn=Ft.prototype;return Kn.isValid=function(){return this._isValid},Kn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},Kn.add=function(e,t){return kn(this,e,t,1)},Kn.subtract=function(e,t){return kn(this,e,t,-1)},Kn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=P(e))||"year"===e)return t=this._days+r/864e5,n=this._months+Yn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Dn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Kn.asMilliseconds=Sn,Kn.asSeconds=On,Kn.asMinutes=xn,Kn.asHours=jn,Kn.asDays=En,Kn.asWeeks=Cn,Kn.asMonths=Hn,Kn.asYears=Pn,Kn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Kn._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*Ln(Dn(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=w(i/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,o+=w(n/24),a=w(Yn(o)),s+=a,o-=Ln(Dn(a)),r=w(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},Kn.clone=function(){return $t(this)},Kn.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Kn.milliseconds=zn,Kn.seconds=Fn,Kn.minutes=Wn,Kn.hours=Nn,Kn.days=Rn,Kn.weeks=function(){return w(this.days()/7)},Kn.months=In,Kn.years=Bn,Kn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),a=Un(r.as("s")),i=Un(r.as("m")),o=Un(r.as("h")),s=Un(r.as("d")),l=Un(r.as("M")),u=Un(r.as("y")),c=a<=Vn.ss&&["s",a]||a<Vn.s&&["ss",a]||i<=1&&["m"]||i<Vn.m&&["mm",i]||o<=1&&["h"]||o<Vn.h&&["hh",o]||s<=1&&["d"]||s<Vn.d&&["dd",s]||l<=1&&["M"]||l<Vn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,Jn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Kn.toISOString=$n,Kn.toString=$n,Kn.toJSON=$n,Kn.locale=rn,Kn.localeData=on,Kn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Kn.lang=an,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(k(e))})),a.version="2.20.1",t=Ct,a.fn=fn,a.min=function(){return At("isBefore",[].slice.call(arguments,0))},a.max=function(){return At("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Ct(1e3*e)},a.months=function(e,t){return vn(e,t,"months")},a.isDate=u,a.locale=pt,a.invalid=f,a.duration=$t,a.isMoment=M,a.weekdays=function(e,t,n){return Mn(e,t,n,"weekdays")},a.parseZone=function(){return Ct.apply(null,arguments).parseZone()},a.localeData=_t,a.isDuration=Wt,a.monthsShort=function(e,t){return vn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return Mn(e,t,n,"weekdaysMin")},a.defineLocale=ht,a.updateLocale=function(e,t){if(null!=t){var n,r,a=lt;null!=(r=mt(e))&&(a=r._config),t=j(a,t),(n=new E(t)).parentLocale=ut[e],ut[e]=n,pt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},a.locales=function(){return T(ut)},a.weekdaysShort=function(e,t,n){return Mn(e,t,n,"weekdaysShort")},a.normalizeUnits=P,a.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Vn[e]&&(void 0===t?Vn[e]:(Vn[e]=t,"s"===e&&(Vn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=fn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,n(9)(e))},function(e,t,n){"use strict";e.exports=n(135)},function(e,t){function n(e,t=null,n=null){var r=[];function a(e,t,n,i=0){let o;if(null!==n&&i<n)y(e)&&(o=Object.keys(e)).forEach(r=>{a(e[r],t,n,i+1)});else{if(null!==n&&i==n)return 0==n?void(r=a(e,t,null,i)):void(y(e)&&r.push(a(e,t,n,i+1)));switch(M(e)){case"array":var s=[];if(o=Object.keys(e),null===t||i<t)for(var l=0,u=o.length;l<u;l++){const r=o[l],u=e[r];s[r]=a(u,t,n,i+1)}return s;case"object":var c={};if(o=Object.keys(e),null===t||i<t)for(l=0,u=o.length;l<u;l++){const r=o[l],s=e[r];c[r]=a(s,t,n,i+1)}return c;case"string":return""+e;case"number":return 0+e;case"boolean":return!!e;case"null":return null;case"undefined":return}}}return null===n?a(e,t,n,0):(a(e,t,n,0),r)}function r(e,t,n=null){if("string"===M(t)&&""!==t){var r=[];return function e(t,n,a="",i="",o=null,s=0){a===n&&(r[r.length]=i);if(null!==o&&s>=o)return!1;if(y(t))for(var l=0,u=Object.keys(t),c=u.length;l<c;l++){const r=u[l];e(t[r],n,r,(""===i?i:i+".")+r,o,s+1)}}(e,t,"","",n),0!==(r=r.map(e=>"boolean"===M(e)?e:""===e?e:((e=e.split(".")).pop(),e=e.join(".")))).length&&r}}function a(e,t,n=null){if("string"===M(t)&&""!==t){var r=function e(t,n,r="",a,i=0){if(r===n)return r;var o=!1;if(null!==a&&i>=a)return o;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0);return"boolean"===M(r)?r:""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function i(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(f(t,[n]))return u(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],n,r,a+1))return!0}return!1}(e,t,n)}function o(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(f(t,[n]))return l(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],n,r,a+1))return!0}return!1}(e,t,n,0)}function s(e){const t=c(e);return!(t>1)&&(1===t?Object.keys(e)[0]:0===t&&["string","number"].indexOf(M(e))>-1&&e)}function l(e){return!u(e)}function u(e){return!1===function(e){return y(e)?e:!(["null","undefined"].indexOf(M(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function c(e){return-1===["array","object"].indexOf(M(e))?0:Object.keys(e).length}function d(e,t,n=null,r=0){if(g(e,t))return!0;if(y(t)&&v(e,t)&&f(e,Object.keys(t))){if(g(_(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&y(e))for(var a=0,i=Object.keys(e),o=i.length;a<o;a++){if(d(e[i[a]],t,n,r+1))return!0}return!1}function m(e,t,n=null){var r=p(e,t,n);if(!1===r)return;return r.map(n=>{if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(M(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]})}function p(e,t,n=null){var r=[];return function e(t,n,a="",i,o){if(y(n)&&v(t,n)&&f(t,Object.keys(n))){g(_(t,Object.keys(n)),n)&&(r[r.length]=a)}g(t,n)&&(r[r.length]=a);if(null!==i&&o>=i)return!1;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const r=l[s];e(t[r],n,(""===a?a:a+".")+r,i,o+1)}}(e,t,"",n,0),0!==r.length&&r}function h(e,t,n=null){return function e(t,n,r="",a,i){if(y(n)&&v(t,n)&&f(t,Object.keys(n))){if(g(_(t,Object.keys(n)),n))return r}if(g(t,n))return r;var o=!1;if(null!==a&&i>=a)return o;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0)}function _(e,t){const n=M(e);if(-1!==["array","object"].indexOf(n)&&0!==t.length){var r;switch(n){case"object":r={},t.forEach(t=>{t in e&&(r[t]=e[t])});break;case"array":r=[],t.forEach(t=>{t in e&&r.push(e[t])})}return r}}function f(e,t){const n=t.length;if(0===n||!y(e))return!1;const r=Object.keys(e);for(var a=!0,i=0;i<n;i++){const e=""+t[i];if(-1===r.indexOf(e)){a=!1;break}}return a}function y(e){return-1!==["array","object"].indexOf(M(e))&&0!==Object.keys(e).length}function g(e,t){const n=b(e,t);if(!1===n)return n;if(-1===["array","object"].indexOf(n))return e===t;const r=Object.keys(e),a=r.length;for(var i=!0,o=0;o<a;o++){const n=r[o],a=g(e[n],t[n]);if(!1===a){i=a;break}}return i}function b(e,t){const n=v(e,t);if(!1===n)return!1;if(["array","object"].indexOf(n)>-1){const n=Object.keys(e),a=Object.keys(t),i=n.length;if(i!==a.length)return!1;if(0===i)return!0;for(var r=0;r<i;r++)if(n[r]!==a[r])return!1}return n}function v(e,t){const n=M(e);return n===M(t)&&n}function M(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var w={getType:function(e){return M(e)},sameType:function(e,t){return v(e,t)},sameStructure:function(e,t){return b(e,t)},identical:function(e,t){return g(e,t)},isIterable:function(e){return y(e)},containsKeys:function(e,t){return f(e,t)},trim:function(e,t){return _(e,t)},locate:function(e,t,n){return h(e,t,n)},deepGet:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);if(!1!==r){if(""===r)return e;r=r.split("."),-1===["array","object"].indexOf(M(t))&&r.splice(-1,1);var a=e;return Array.isArray(r)?(r.forEach(e=>{a=a[e]}),a):a[r]}}(e,t,n)},locateAll:function(e,t,n){return p(e,t,n)},deepFilter:function(e,t,n){return m(e,t,n)},exists:function(e,t,n){return d(e,t,n)},onlyExisting:function(e,t,n){return function(e,t,n=null){if("array"===M(t)){let r=[];return t.forEach(t=>{d(e,t,n)&&r.push(t)}),r}if("object"===M(t)){let r={};return Object.keys(t).forEach(a=>{let i=t[a];d(e,i,n)&&(r[a]=i)}),r}if(d(e,t,n))return t}(e,t,n)},onlyMissing:function(e,t,n){return function(e,t,n=null){if("array"===M(t)){let r=[];return t.forEach(t=>{d(e,t,n)||r.push(t)}),r}if("object"===M(t)){let r={};return Object.keys(t).forEach(a=>{let i=t[a];d(e,i,n)||(r[a]=i)}),r}if(!d(e,t,n))return t}(e,t,n)},length:function(e){return c(e)},isFalsy:function(e){return u(e)},isTruthy:function(e){return l(e)},foundTruthy:function(e,t,n){return o(e,t,n)},onlyTruthy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===M(t)){let a=[];return t.forEach(t=>{const i=m(e,t);l(i)&&o(i,n,r)&&a.push(t)}),a}if("object"===M(t)){let a={};return Object.keys(t).forEach(i=>{const s=t[i],u=m(e,s);l(u)&&o(u,n,r)&&(a[i]=s)}),a}if(o(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return i(e,t,n)},onlyFalsy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===M(t)){let a=[];return t.forEach(t=>{const o=m(e,t);l(o)&&i(o,n,r)&&a.push(t)}),a}if("object"===M(t)){let a={};return Object.keys(t).forEach(o=>{const s=t[o],u=m(e,s);l(u)&&i(u,n,r)&&(a[o]=s)}),a}if(i(e,n,r))return t}(e,t,n,r)},countMatches:function(e,t,n,r){return function(e,t,n=null,r=null){var a=null===n,i=null===r,o=p(e,t,a&&i?null:a||i?n||r:n<r?n:r);if(!1===o)return 0;if(null===n)return o.length;if("number"===M(n)){let e=0;return o.forEach(t=>{(t=t.split(".")).length===n&&e++}),e}}(e,t,n,r)},matchDepth:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);return!1!==r&&(""===r?0:(r=r.split(".")).length)}(e,t,n)},maxDepth:function(e,t){return function(e,t=null){let n=0;return function e(t,r,a=0){n<a&&(n=a),null!==r&&a>=r||y(t)&&Object.keys(t).forEach(n=>{e(t[n],r,a+1)})}(e,t),n}(e,t)},locate_Key:function(e,t,n){return a(e,t,n)},deepGet_Key:function(e,t,n){return function(e,t,n=null){if("string"===M(t)&&""!==t){var r=a(e,t,n);if(!1!==r){""===r?r=t:r+="."+t,r=r.split(".");var i=e;return Array.isArray(r)?(r.forEach(e=>{i=i[e]}),i):i[r]}}}(e,t,n)},locateAll_Key:function(e,t,n){return r(e,t,n)},deepFilter_Key:function(e,t,n){return function(e,t,n=null){if("string"!==M(t))return;if(""===t)return;var a=r(e,t,n);if(!1===a)return;return a.map(n=>{if(!1!==n){""===n?n=t:n+="."+t,n=n.split(".");var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]}})}(e,t,n)},deepClone:function(e,t,r){return n(e,t,r)},renameKey:function(e,t,n,r){return function(e,t,n,r=null){if("string"===M(t)&&"string"===M(n)&&""!==t&&""!==n){var a=!1;return function e(t,n,r,i,o=0){let s;switch(M(t)){case"array":for(var l=[],u=0,c=(s=Object.keys(t)).length;u<c;u++){let a=s[u],c=t[a];l[a]=e(c,n,r,i,o+1)}return l;case"object":var d={};for(u=0,c=(s=Object.keys(t)).length;u<c;u++){let l=s[u],c=t[l];(null===i||o<i)&&(a||l===n&&(l=r,a=!0)),d[l]=e(c,n,r,i,o+1)}return d;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}}(e,t,n,r)},renameKeys:function(e,t,n,r){return function(e,t,n,r=null){if("string"===M(t)&&"string"===M(n)&&""!==t&&""!==n)return function e(t,n,r,a,i=0){let o;switch(M(t)){case"array":for(var s=[],l=0,u=(o=Object.keys(t)).length;l<u;l++){let u=o[l],c=t[u];s[u]=e(c,n,r,a,i+1)}return s;case"object":var c={};for(l=0,u=(o=Object.keys(t)).length;l<u;l++){let s=o[l],u=t[s];(null===a||i<a)&&s===n&&(s=r),c[s]=e(u,n,r,a,i+1)}return c;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}(e,t,n,r)},deepRemove_Key:function(e,t,r){return function(e,t,r){if("string"!==M(t))return;if(""===t)return;let i=n(e);var o=a(i,t,r);if(!1===o)return i;""===o?o=t:o+="."+t,o=o.split(".");var s=i;return Array.isArray(o)||delete s[o],o.forEach((e,t)=>{t<o.length-1?s=s[e]:delete s[e]}),i}(e,t,r)},deepRemoveAll_Key:function(e,t,a){return function(e,t,a){if("string"!==M(t))return;if(""===t)return;let i=n(e);var o=r(i,t,a);return o===[]||!1===o?i:(o.forEach(e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=i;Array.isArray(e)||delete n[e];for(var r=0;r<e.length;r++){var a=e[r];if(!(a in n))break;r<e.length-1?n=n[a]:delete n[a]}}),i)}(e,t,a)}};e.exports=w},function(e,t,n){(function(e){!function(t){var n=function(e){return a(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function a(e,t,a){var o=a[0],s=a.length;(e||"object"!==i(o))&&(o={});for(var l=0;l<s;++l){var u=a[l];if("object"===i(u))for(var c in u)if("__proto__"!==c){var d=e?n.clone(u[c]):u[c];o[c]=t?r(o[c],d):d}}return o}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return a(!0===e,!0,arguments)},n.clone=function(e){var t,r,a=e,o=i(e);if("array"===o)for(a=[],r=e.length,t=0;t<r;++t)a[t]=n.clone(e[t]);else if("object"===o)for(t in a={},e)a[t]=n.clone(e[t]);return a},t?e.exports=n:window.merge=n}(e&&"object"==typeof e.exports&&e.exports)}).call(this,n(9)(e))},function(e,t,n){"use strict";
2
  /*!
3
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
  *
@@ -55,15 +55,15 @@ object-assign
55
  *
56
  * Copyright (c) 2014-2017, Jon Schlinkert.
57
  * Released under the MIT License.
58
- */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},,function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,i,o,s,l=1,u={},c=!1,d=e.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),m.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return u[l]=a,r(l),l++},m.clearImmediate=p}function p(e){delete u[e]}function h(e){if(c)setTimeout(h,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(148))},function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function m(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(m);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function _(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=_,a.addListener=_,a.once=_,a.off=_,a.removeListener=_,a.removeAllListeners=_,a.emit=_,a.prependListener=_,a.prependOnceListener=_,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){var r={"./af":10,"./af.js":10,"./ar":11,"./ar-dz":12,"./ar-dz.js":12,"./ar-kw":13,"./ar-kw.js":13,"./ar-ly":14,"./ar-ly.js":14,"./ar-ma":15,"./ar-ma.js":15,"./ar-sa":16,"./ar-sa.js":16,"./ar-tn":17,"./ar-tn.js":17,"./ar.js":11,"./az":18,"./az.js":18,"./be":19,"./be.js":19,"./bg":20,"./bg.js":20,"./bm":21,"./bm.js":21,"./bn":22,"./bn.js":22,"./bo":23,"./bo.js":23,"./br":24,"./br.js":24,"./bs":25,"./bs.js":25,"./ca":26,"./ca.js":26,"./cs":27,"./cs.js":27,"./cv":28,"./cv.js":28,"./cy":29,"./cy.js":29,"./da":30,"./da.js":30,"./de":31,"./de-at":32,"./de-at.js":32,"./de-ch":33,"./de-ch.js":33,"./de.js":31,"./dv":34,"./dv.js":34,"./el":35,"./el.js":35,"./en-au":36,"./en-au.js":36,"./en-ca":37,"./en-ca.js":37,"./en-gb":38,"./en-gb.js":38,"./en-ie":39,"./en-ie.js":39,"./en-nz":40,"./en-nz.js":40,"./eo":41,"./eo.js":41,"./es":42,"./es-do":43,"./es-do.js":43,"./es-us":44,"./es-us.js":44,"./es.js":42,"./et":45,"./et.js":45,"./eu":46,"./eu.js":46,"./fa":47,"./fa.js":47,"./fi":48,"./fi.js":48,"./fo":49,"./fo.js":49,"./fr":50,"./fr-ca":51,"./fr-ca.js":51,"./fr-ch":52,"./fr-ch.js":52,"./fr.js":50,"./fy":53,"./fy.js":53,"./gd":54,"./gd.js":54,"./gl":55,"./gl.js":55,"./gom-latn":56,"./gom-latn.js":56,"./gu":57,"./gu.js":57,"./he":58,"./he.js":58,"./hi":59,"./hi.js":59,"./hr":60,"./hr.js":60,"./hu":61,"./hu.js":61,"./hy-am":62,"./hy-am.js":62,"./id":63,"./id.js":63,"./is":64,"./is.js":64,"./it":65,"./it.js":65,"./ja":66,"./ja.js":66,"./jv":67,"./jv.js":67,"./ka":68,"./ka.js":68,"./kk":69,"./kk.js":69,"./km":70,"./km.js":70,"./kn":71,"./kn.js":71,"./ko":72,"./ko.js":72,"./ky":73,"./ky.js":73,"./lb":74,"./lb.js":74,"./lo":75,"./lo.js":75,"./lt":76,"./lt.js":76,"./lv":77,"./lv.js":77,"./me":78,"./me.js":78,"./mi":79,"./mi.js":79,"./mk":80,"./mk.js":80,"./ml":81,"./ml.js":81,"./mr":82,"./mr.js":82,"./ms":83,"./ms-my":84,"./ms-my.js":84,"./ms.js":83,"./mt":85,"./mt.js":85,"./my":86,"./my.js":86,"./nb":87,"./nb.js":87,"./ne":88,"./ne.js":88,"./nl":89,"./nl-be":90,"./nl-be.js":90,"./nl.js":89,"./nn":91,"./nn.js":91,"./pa-in":92,"./pa-in.js":92,"./pl":93,"./pl.js":93,"./pt":94,"./pt-br":95,"./pt-br.js":95,"./pt.js":94,"./ro":96,"./ro.js":96,"./ru":97,"./ru.js":97,"./sd":98,"./sd.js":98,"./se":99,"./se.js":99,"./si":100,"./si.js":100,"./sk":101,"./sk.js":101,"./sl":102,"./sl.js":102,"./sq":103,"./sq.js":103,"./sr":104,"./sr-cyrl":105,"./sr-cyrl.js":105,"./sr.js":104,"./ss":106,"./ss.js":106,"./sv":107,"./sv.js":107,"./sw":108,"./sw.js":108,"./ta":109,"./ta.js":109,"./te":110,"./te.js":110,"./tet":111,"./tet.js":111,"./th":112,"./th.js":112,"./tl-ph":113,"./tl-ph.js":113,"./tlh":114,"./tlh.js":114,"./tr":115,"./tr.js":115,"./tzl":116,"./tzl.js":116,"./tzm":117,"./tzm-latn":118,"./tzm-latn.js":118,"./tzm.js":117,"./uk":119,"./uk.js":119,"./ur":120,"./ur.js":120,"./uz":121,"./uz-latn":122,"./uz-latn.js":122,"./uz.js":121,"./vi":123,"./vi.js":123,"./x-pseudo":124,"./x-pseudo.js":124,"./yo":125,"./yo.js":125,"./zh-cn":126,"./zh-cn.js":126,"./zh-hk":127,"./zh-hk.js":127,"./zh-tw":128,"./zh-tw.js":128};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=149},function(e,t,n){var r;e.exports=function e(t,n,a){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,a)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<a.length;s++)i(a[s]);return i}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,i=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,p=1e9;function h(e){var t=0|e;return 0<e||e===t?t:t-1}function _(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=u-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function f(e,t){var n,r,a=e.c,i=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=a.length)<(u=i.length)?l:u,o=0;o<s;o++)if(a[o]!=i[o])return a[o]>i[o]^n?1:-1;return l==u?0:u<l^n?1:-1}function y(e,t,n,r){if(e<t||n<e||e!==(e<0?a(e):i(e)))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return h(e.e/u)==t&&e.c[t]%2!=0}function b(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,M,w,k,L,Y,D,T,S,O,x=B.prototype={constructor:B,toString:null,valueOf:null},j=new B(1),E=20,C=4,H=-7,P=21,A=-1e7,z=1e7,F=!1,W=1,N=0,R={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},I="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,a,o,l,d,m,p,h,_=this;if(!(_ instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return _.s=e.s,_.e=e.e,void(_.c=(e=e.c)?e.slice():e);if((m="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;10<=d;d/=10,l++);return _.e=l,void(_.c=[e])}h=String(e)}else{if(h=String(e),!r.test(h))return w(_,h,m);_.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}-1<(l=h.indexOf("."))&&(h=h.replace(".","")),0<(d=h.search(/e/i))?(l<0&&(l=d),l+=+h.slice(d+1),h=h.substring(0,d)):l<0&&(l=h.length)}else{if(y(t,2,I.length,"Base"),h=String(e),10==t)return G(_=new B(e instanceof B?e:h),E+_.e+1,C);if(m="number"==typeof e){if(0*e!=0)return w(_,h,m,t);if(_.s=1/e<0?(h=h.slice(1),-1):1,B.DEBUG&&15<h.replace(/^0\.0*|\./,"").length)throw Error(s+e);m=!1}else _.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=I.slice(0,t),l=d=0,p=h.length;d<p;d++)if(n.indexOf(a=h.charAt(d))<0){if("."==a){if(l<d){l=p;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,d=-1,l=0;continue}return w(_,String(e),m,t)}-1<(l=(h=M(h,t,10,_.s)).indexOf("."))?h=h.replace(".",""):l=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,m&&B.DEBUG&&15<p&&(c<e||e!==i(e)))throw Error(s+_.s*e);if(z<(l=l-d-1))_.c=_.e=null;else if(l<A)_.c=[_.e=0];else{if(_.e=l,_.c=[],d=(l+1)%u,l<0&&(d+=u),d<p){for(d&&_.c.push(+h.slice(0,d)),p-=u;d<p;)_.c.push(+h.slice(d,d+=u));h=h.slice(d),d=u-h.length}else d-=p;for(;d--;h+="0");_.c.push(+h)}}else _.c=[_.e=0]}function U(e,t,n,r){var a,i,o,s,l;if(null==n?n=C:y(n,0,8),!e.c)return e.toString();if(a=e.c[0],o=e.e,null==t)l=_(e.c),l=1==r||2==r&&(o<=H||P<=o)?b(l,o):v(l,o,"0");else if(i=(e=G(new B(e),t,n)).e,s=(l=_(e.c)).length,1==r||2==r&&(t<=i||i<=H)){for(;s<t;l+="0",s++);l=b(l,i)}else if(t-=o,l=v(l,i,"0"),s<i+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=i-s))for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&a?"-"+l:l}function V(e,t){for(var n,r=1,a=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){a=n;break}t.call(a,n)&&(a=n)}return a}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];10<=a;a/=10,r++);return(n=r+n*u-1)>z?e.c=e.e=null:e.c=n<A?[e.e=0]:(e.e=n,t),e}function G(e,t,n,r){var o,s,c,m,p,h,_,f=e.c,y=d;if(f){e:{for(o=1,m=f[0];10<=m;m/=10,o++);if((s=t-o)<0)s+=u,c=t,_=(p=f[h=0])/y[o-c-1]%10|0;else if((h=a((s+1)/u))>=f.length){if(!r)break e;for(;f.length<=h;f.push(0));p=_=0,c=(s%=u)-u+(o=1)}else{for(p=m=f[h],o=1;10<=m;m/=10,o++);_=(c=(s%=u)-u+o)<0?0:p/y[o-c-1]%10|0}if(r=r||t<0||null!=f[h+1]||(c<0?p:p%y[o-c-1]),r=n<4?(_||r)&&(0==n||n==(e.s<0?3:2)):5<_||5==_&&(4==n||r||6==n&&(0<s?0<c?p/y[o-c]:0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=y[(u-t%u)%u],e.e=-t||0):f[0]=e.e=0,e;if(0==s?(f.length=h,m=1,h--):(f.length=h+1,m=y[u-s],f[h]=0<c?i(p/y[o-c]%y[c])*m:0),r)for(;;){if(0==h){for(s=1,c=f[0];10<=c;c/=10,s++);for(c=f[0]+=m,m=1;10<=c;c/=10,m++);s!=m&&(e.e++,f[0]==l&&(f[0]=1));break}if(f[h]+=m,f[h]!=l)break;f[h--]=0,m=1}for(s=f.length;0===f[--s];f.pop());}e.e>z?e.c=e.e=null:e.e<A&&(e.c=[e.e=0])}return e}function q(e){var t,n=e.e;return null===n?e.toString():(t=_(e.c),t=n<=H||P<=n?b(t,n):v(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),E=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),C=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),H=n[0],P=n[1]):(y(n,-p,p,t),H=-(P=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),A=n[0],z=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);A=-(z=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!n,Error(o+"crypto unavailable");F=n}else F=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),W=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),N=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);R=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);I=n}}return{DECIMAL_PLACES:E,ROUNDING_MODE:C,EXPONENTIAL_AT:[H,P],RANGE:[A,z],CRYPTO:F,MODULO_MODE:W,POW_PRECISION:N,FORMAT:R,ALPHABET:I}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return V(arguments,x.lt)},B.minimum=B.min=function(){return V(arguments,x.gt)},B.random=(k=9007199254740992,L=Math.random()*k&2097151?function(){return i(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,s,l,c=0,m=[],h=new B(j);if(null==e?e=E:y(e,0,p),s=a(e/u),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));c<s;)9e15<=(l=131072*t[c]+(t[c+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(m.push(l%1e14),c+=2);c=s/2}else{if(!crypto.randomBytes)throw F=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(s*=7);c<s;)9e15<=(l=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])?crypto.randomBytes(7).copy(t,c):(m.push(l%1e14),c+=7);c=s/7}if(!F)for(;c<s;)(l=L())<9e15&&(m[c++]=l%1e14);for(s=m[--c],e%=u,s&&e&&(l=d[u-e],m[c]=i(s/l)*l);0===m[c];m.pop(),c--);if(c<0)m=[r=0];else{for(r=-1;0===m[0];m.splice(0,1),r-=u);for(c=1,l=m[0];10<=l;l/=10,c++);c<u&&(r-=u-c)}return h.e=r,h.c=m,h}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},M=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,o=[0],s=0,l=e.length;s<l;){for(i=o.length;i--;o[i]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),a=0;a<o.length;a++)o[a]>n-1&&(null==o[a+1]&&(o[a+1]=0),o[a+1]+=o[a]/n|0,o[a]%=n)}return o.reverse()}return function(r,a,i,o,s){var l,u,c,d,m,p,h,f,y=r.indexOf("."),g=E,b=C;for(0<=y&&(d=N,N=0,r=r.replace(".",""),p=(f=new B(a)).pow(r.length-y),N=d,f.c=t(v(_(p.c),p.e,"0"),10,i,e),f.e=f.c.length),c=d=(h=t(r,a,i,s?(l=I,e):(l=e,I))).length;0==h[--d];h.pop());if(!h[0])return l.charAt(0);if(y<0?--c:(p.c=h,p.e=c,p.s=o,h=(p=n(p,f,g,b,i)).c,m=p.r,c=p.e),y=h[u=c+g+1],d=i/2,m=m||u<0||null!=h[u+1],m=b<4?(null!=y||m)&&(0==b||b==(p.s<0?3:2)):d<y||y==d&&(4==b||m||6==b&&1&h[u-1]||b==(p.s<0?8:7)),u<1||!h[0])r=m?v(l.charAt(1),-g,l.charAt(0)):l.charAt(0);else{if(h.length=u,m)for(--i;++h[--u]>i;)h[u]=0,u||(++c,h=[1].concat(h));for(d=h.length;!h[--d];);for(y=0,r="";y<=d;r+=l.charAt(h[y++]));r=v(r,c,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,o,s=0,l=e.length,u=t%m,c=t/m|0;for(e=e.slice();l--;)s=((a=u*(i=e[l]%m)+(r=c*i+(o=e[l]/m|0)*u)%m*m+s)/n|0)+(r/m|0)+c*o,e[l]=a%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=r<n?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(r,a,o,s,c){var d,m,p,_,f,y,g,b,v,M,w,k,L,Y,D,T,S,O=r.s==a.s?1:-1,x=r.c,j=a.c;if(!(x&&x[0]&&j&&j[0]))return new B(r.s&&a.s&&(x?!j||x[0]!=j[0]:j)?x&&0==x[0]||!j?0*O:O/0:NaN);for(v=(b=new B(O)).c=[],O=o+(m=r.e-a.e)+1,c||(c=l,m=h(r.e/u)-h(a.e/u),O=O/u|0),p=0;j[p]==(x[p]||0);p++);if(j[p]>(x[p]||0)&&m--,O<0)v.push(1),_=!0;else{for(Y=x.length,T=j.length,O+=2,1<(f=i(c/(j[p=0]+1)))&&(j=e(j,f,c),x=e(x,f,c),T=j.length,Y=x.length),L=T,w=(M=x.slice(0,T)).length;w<T;M[w++]=0);S=j.slice(),S=[0].concat(S),D=j[0],j[1]>=c/2&&D++;do{if(f=0,(d=t(j,M,T,w))<0){if(k=M[0],T!=w&&(k=k*c+(M[1]||0)),1<(f=i(k/D)))for(c<=f&&(f=c-1),g=(y=e(j,f,c)).length,w=M.length;1==t(y,M,g,w);)f--,n(y,T<g?S:j,g,c),g=y.length,d=1;else 0==f&&(d=f=1),g=(y=j.slice()).length;if(g<w&&(y=[0].concat(y)),n(M,y,w,c),w=M.length,-1==d)for(;t(j,M,T,w)<1;)f++,n(M,T<w?S:j,w,c),w=M.length}else 0===d&&(f++,M=[0]);v[p++]=f,M[0]?M[w++]=x[L]||0:(M=[x[L]],w=1)}while((L++<Y||null!=M[0])&&O--);_=null!=M[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,O=v[0];10<=O;O/=10,p++);G(b,o+(b.e=p+m*u-1)+1,s,_)}else b.e=m,b.r=+_;return b}}(),Y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,D=/^([^.]+)\.$/,T=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,w=function(e,t,n,r){var a,i=n?t:t.replace(O,"");if(S.test(i))e.s=isNaN(i)?null:i<0?-1:1,e.c=e.e=null;else{if(!n&&(i=i.replace(Y,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(D,"$1").replace(T,"0.$1")),t!=i))return new B(i,a);if(B.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},x.absoluteValue=x.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},x.comparedTo=function(e,t){return f(this,new B(e,t))},x.decimalPlaces=x.dp=function(e,t){var n,r,a;if(null!=e)return y(e,0,p),null==t?t=C:y(t,0,8),G(new B(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((a=n.length-1)-h(this.e/u))*u,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},x.dividedBy=x.div=function(e,t){return n(this,new B(e,t),E,C)},x.dividedToIntegerBy=x.idiv=function(e,t){return n(this,new B(e,t),0,1)},x.exponentiatedBy=x.pow=function(e,t){var n,r,s,l,c,d,m,p,h=this;if((e=new B(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+q(e));if(null!=t&&(t=new B(t)),c=14<e.e,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new B(Math.pow(+q(h),c?2-g(e):+q(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(9<e.e&&(0<h.e||h.e<-1||(0==h.e?1<h.c[0]||c&&24e7<=h.c[1]:h.c[0]<8e13||c&&h.c[0]<=9999975e7)))return l=h.s<0&&g(e)?-0:0,-1<h.e&&(l=1/l),new B(d?1/l:l);N&&(l=a(N/u+2))}for(m=c?(n=new B(.5),d&&(e.s=1),g(e)):(s=Math.abs(+q(e)))%2,p=new B(j);;){if(m){if(!(p=p.times(h)).c)break;l?p.c.length>l&&(p.c.length=l):r&&(p=p.mod(t))}if(s){if(0===(s=i(s/2)))break;m=s%2}else if(G(e=e.times(n),e.e+1,1),14<e.e)m=g(e);else{if(0==(s=+q(e)))break;m=s%2}h=h.times(h),l?h.c&&h.c.length>l&&(h.c.length=l):r&&(h=h.mod(t))}return r?p:(d&&(p=j.div(p)),t?p.mod(t):l?G(p,N,C,void 0):p)},x.integerValue=function(e){var t=new B(this);return null==e?e=C:y(e,0,8),G(t,t.e+1,e)},x.isEqualTo=x.eq=function(e,t){return 0===f(this,new B(e,t))},x.isFinite=function(){return!!this.c},x.isGreaterThan=x.gt=function(e,t){return 0<f(this,new B(e,t))},x.isGreaterThanOrEqualTo=x.gte=function(e,t){return 1===(t=f(this,new B(e,t)))||0===t},x.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},x.isLessThan=x.lt=function(e,t){return f(this,new B(e,t))<0},x.isLessThanOrEqualTo=x.lte=function(e,t){return-1===(t=f(this,new B(e,t)))||0===t},x.isNaN=function(){return!this.s},x.isNegative=function(){return this.s<0},x.isPositive=function(){return 0<this.s},x.isZero=function(){return!!this.c&&0==this.c[0]},x.minus=function(e,t){var n,r,a,i,o=this,s=o.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/u,d=e.e/u,m=o.c,p=e.c;if(!c||!d){if(!m||!p)return m?(e.s=-t,e):new B(p?o:NaN);if(!m[0]||!p[0])return p[0]?(e.s=-t,e):new B(m[0]?o:3==C?-0:0)}if(c=h(c),d=h(d),m=m.slice(),s=c-d){for((a=(i=s<0)?(s=-s,m):(d=c,p)).reverse(),t=s;t--;a.push(0));a.reverse()}else for(r=(i=(s=m.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(m[t]!=p[t]){i=m[t]<p[t];break}if(i&&(a=m,m=p,p=a,e.s=-e.s),0<(t=(r=p.length)-(n=m.length)))for(;t--;m[n++]=0);for(t=l-1;s<r;){if(m[--r]<p[r]){for(n=r;n&&!m[--n];m[n]=t);--m[n],m[r]+=l}m[r]-=p[r]}for(;0==m[0];m.splice(0,1),--d);return m[0]?J(e,m,d):(e.s=3==C?-1:1,e.c=[e.e=0],e)},x.modulo=x.mod=function(e,t){var r,a,i=this;return e=new B(e,t),!i.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||i.c&&!i.c[0]?new B(i):(9==W?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,W),(e=i.minus(r.times(e))).c[0]||1!=W||(e.s=i.s),e)},x.multipliedBy=x.times=function(e,t){var n,r,a,i,o,s,c,d,p,_,f,y,g,b,v,M=this,w=M.c,k=(e=new B(e,t)).c;if(!(w&&k&&w[0]&&k[0]))return!M.s||!e.s||w&&!w[0]&&!k||k&&!k[0]&&!w?e.c=e.e=e.s=null:(e.s*=M.s,w&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=h(M.e/u)+h(e.e/u),e.s*=M.s,(c=w.length)<(_=k.length)&&(g=w,w=k,k=g,a=c,c=_,_=a),a=c+_,g=[];a--;g.push(0));for(b=l,v=m,a=_;0<=--a;){for(n=0,f=k[a]%v,y=k[a]/v|0,i=a+(o=c);a<i;)n=((d=f*(d=w[--o]%v)+(s=y*d+(p=w[o]/v|0)*f)%v*v+g[i]+n)/b|0)+(s/v|0)+y*p,g[i--]=d%b;g[i]=n}return n?++r:g.splice(0,1),J(e,g,r)},x.negated=function(){var e=new B(this);return e.s=-e.s||null,e},x.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/u,o=e.e/u,s=r.c,c=e.c;if(!i||!o){if(!s||!c)return new B(a/0);if(!s[0]||!c[0])return c[0]?e:new B(s[0]?r:0*a)}if(i=h(i),o=h(o),s=s.slice(),a=i-o){for((n=0<a?(o=i,c):(a=-a,s)).reverse();a--;n.push(0));n.reverse()}for((a=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=a),a=0;t;)a=(s[--t]=s[t]+c[t]+a)/l|0,s[t]=l===s[t]?0:s[t]%l;return a&&(s=[a].concat(s),++o),J(e,s,o)},x.precision=x.sd=function(e,t){var n,r,a;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=C:y(t,0,8),G(new B(this),e,t);if(!(n=this.c))return null;if(r=(a=n.length-1)*u+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];10<=a;a/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},x.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},x.squareRoot=x.sqrt=function(){var e,t,r,a,i,o=this,s=o.c,l=o.s,u=o.e,c=E+4,d=new B("0.5");if(1!==l||!s||!s[0])return new B(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);if((r=0==(l=Math.sqrt(+q(o)))||l==1/0?(((t=_(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),new B(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new B(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(i=r,r=d.times(i.plus(n(o,i,c,1))),_(i.c).slice(0,l)===(t=_(r.c)).slice(0,l)){if(r.e<u&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(G(r,r.e+E+2,1),e=!r.times(r).eq(o));break}if(!a&&(G(i,i.e+E+2,0),i.times(i).eq(o))){r=i;break}c+=4,l+=4,a=1}return G(r,r.e+E+1,C,e)},x.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),U(this,e,t,1)},x.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),U(this,e,t)},x.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=R;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var a,i=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=i[0],d=i[1],m=this.s<0,p=m?c.slice(1):c,h=p.length;if(l&&(a=s,s=l,h-=l=a),0<s&&0<h){for(a=h%s||s,c=p.substr(0,a);a<h;a+=s)c+=u+p.substr(a,s);0<l&&(c+=u+p.slice(a)),m&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},x.toFraction=function(e){var t,r,a,i,s,l,c,m,p,h,f,y,g=this,b=g.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(j)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+q(c));if(!b)return new B(g);for(t=new B(j),p=r=new B(j),a=m=new B(j),y=_(b),s=t.e=y.length-g.e-1,t.c[0]=d[(l=s%u)<0?u+l:l],e=!e||0<c.comparedTo(t)?0<s?t:p:c,l=z,z=1/0,c=new B(y),m.c[0]=0;h=n(c,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=m.plus(h.times(i=p)),m=i,t=c.minus(h.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),m=m.plus(i.times(p)),r=r.plus(i.times(a)),m.s=p.s=g.s,f=n(p,a,s*=2,C).minus(g).abs().comparedTo(n(m,r,s,C).minus(g).abs())<1?[p,a]:[m,r],z=l,f},x.toNumber=function(){return+q(this)},x.toPrecision=function(e,t){return null!=e&&y(e,1,p),U(this,e,t,2)},x.toString=function(e){var t,n=this,r=n.s,a=n.e;return null===a?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?a<=H||P<=a?b(_(n.c),a):v(_(n.c),a,"0"):10===e?v(_((n=G(new B(n),E+a+1,C)).c),n.e,"0"):(y(e,2,I.length,"Base"),M(v(_(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},x.valueOf=x.toJSON=function(){return q(this)},x._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(x[Symbol.toStringTag]="BigNumber",x[Symbol.for("nodejs.util.inspect.custom")]=x.valueOf),null!=t&&B.set(t),B}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=e("./globalState"),i=e("./validating"),o=e("./parsing"),s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:s,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:s,marker:"d"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function c(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=o.parseFormat(t)),!i.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",s=t.postfix||"",c=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){var r=n.currentCurrency(),a=Object.assign({},u,t),i=void 0,o="",s=!!a.totalLength||!!a.forceAverage||a.average,l=t.currencyPosition||r.position,c=t.currencySymbol||r.symbol;a.spaceSeparated&&(o=" "),"infix"===l&&(i=o+c+o);var d=h({instance:e,providedFormat:t,state:n,decimalSeparator:i});return"prefix"===l&&(d=e._value<0&&"sign"===a.negative?"-".concat(o).concat(c).concat(d.slice(1)):c+o+d),l&&"postfix"!==l||(d=d+(o=s?"":o)+c),d}(e,t=_(t,a.currentCurrencyDefaultFormat()),a);case"percent":return function(e,t,n,r){var a=t.prefixSymbol,i=h({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},u,t);return a?"%".concat(o.spaceSeparated?" ":"").concat(i):"".concat(i).concat(o.spaceSeparated?" ":"","%")}(e,t=_(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return t=_(t,a.currentByteDefaultFormat()),v=e,w=a,k=n,L=(M=t).base||"binary",Y=l[L],T=(D=d(v._value,Y.suffixes,Y.scale)).value,S=D.suffix,O=h({instance:k(T),providedFormat:M,state:w,defaults:w.currentByteDefaultFormat()}),x=w.currentAbbreviations(),"".concat(O).concat(x.spaced?" ":"").concat(S);case"time":return t=_(t,a.currentTimeDefaultFormat()),f=e,y=Math.floor(f._value/60/60),g=Math.floor((f._value-60*y*60)/60),b=Math.round(f._value-60*y*60-60*g),"".concat(y,":").concat(g<10?"0":"").concat(g,":").concat(b<10?"0":"").concat(b);case"ordinal":return r=e,i=t=_(t,a.currentOrdinalDefaultFormat()),s=(o=a).currentOrdinal(),c=Object.assign({},u,i),m=h({instance:r,providedFormat:i,state:o}),p=s(r._value),"".concat(m).concat(c.spaceSeparated?" ":"").concat(p);case"number":default:return h({instance:e,providedFormat:t,numbro:n})}var r,i,o,s,c,m,p,f,y,g,b,v,M,w,k,L,Y,D,T,S,O,x}(e,t,n);return(c=r+c)+s}function d(e,t,n){var r=t[0],a=Math.abs(e);if(n<=a){for(var i=1;i<t.length;++i){var o=Math.pow(n,i),s=Math.pow(n,i+1);if(o<=a&&a<s){r=t[i],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function m(e){for(var t="",n=0;n<e;n++)t+="0";return t}function p(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),a=r(n.split("e"),2),i=a[0],o=a[1],s=r(i.split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(0<+o)n=l+c+m(o-c.length);else{var d=".";d=+l<0?"-0".concat(d):"0".concat(d);var p=(m(-o-1)+Math.abs(l)+c).substr(0,t);p.length<t&&(p+=m(t-p.length)),n=d+p}return 0<+o&&0<t&&(n+=".".concat(m(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function h(e){var t=e.instance,n=e.providedFormat,i=e.state,o=void 0===i?a:i,s=e.decimalSeparator,l=e.defaults,c=void 0===l?o.currentDefaults():l,d=t._value;if(0===d&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(d))return d.toString();var m,h,_,f,y,g,b,v,M=Object.assign({},u,c,n),w=M.totalLength,k=w?0:M.characteristic,L=M.optionalCharacteristic,Y=M.forceAverage,D=!!w||!!Y||M.average,T=w?-1:D&&void 0===n.mantissa?0:M.mantissa,S=!w&&(void 0===n.optionalMantissa?-1===T:M.optionalMantissa),O=M.trimMantissa,x=M.thousandSeparated,j=M.spaceSeparated,E=M.negative,C=M.forceSign,H=M.exponential,P="";if(D){var A=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,a=e.spaceSeparated,i=void 0!==a&&a,o=e.totalLength,s=void 0===o?0:o,l="",u=Math.abs(t),c=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(i?" ":"")+l),s){var d=t.toString().split(".")[0];c=Math.max(s-d.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:d,forceAverage:Y,abbreviations:o.currentAbbreviations(),spaceSeparated:j,totalLength:w});d=A.value,P+=A.abbreviation,w&&(T=A.mantissaPrecision)}if(H){var z=(h=(m={value:d,characteristicPrecision:k}).value,f=void 0===(_=m.characteristicPrecision)?0:_,g=(y=r(h.toExponential().split("e"),2))[0],b=y[1],v=+g,f&&1<f&&(v*=Math.pow(10,f-1),b=0<=(b=+b-(f-1))?"+".concat(b):b),{value:v,abbreviation:"e".concat(b)});d=z.value,P=z.abbreviation+P}var F,W,N,R=function(e,t,n,a,i){if(-1===a)return e;var o=p(t,a),s=r(o.toString().split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(c.match(/^0+$/)&&(n||i))return l;var d=c.match(/0+$/);return i&&d?"".concat(l,".").concat(c.toString().slice(0,d.index)):o.toString()}(d.toString(),d,S,T,O);return R=function(e,t,n,r,a){var i=r.currentDelimiters(),o=i.thousands;a=a||i.decimal;var s=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(u=u.slice(1)),function(e,t){for(var n=[],r=0,a=e;0<a;a--)r===t&&(n.unshift(a),r=0),r++;return n}(u.length,s).forEach((function(e,t){u=u.slice(0,e+t)+o+u.slice(e+t)})),t<0&&(u="-".concat(u))),c?u+a+c:u}(R=function(e,t,n,a){var i=e,o=r(i.toString().split("."),2),s=o[0],l=o[1];if(s.match(/^-?0$/)&&n)return l?"".concat(s.replace("0",""),".").concat(l):s.replace("0","");if(s.length<a)for(var u=a-s.length,c=0;c<u;c++)i="0".concat(i);return i.toString()}(R,0,L,k),d,x,o,s),(D||H)&&(R+=P),(C||d<0)&&(F=R,N=E,R=0===(W=d)?F:0==+F?F.replace("-",""):0<W?"+".concat(F):"sign"===N?F:"(".concat(F.replace("-",""),")")),R}function _(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.general;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.binary;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.decimal;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:_}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),a=e("./validating"),i=e("./parsing"),o={},s=void 0,l={},u=null,c={};function d(e){s=e}function m(){return l[s]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return s},o.currentCurrency=function(){return m().currency},o.currentAbbreviations=function(){return m().abbreviations},o.currentDelimiters=function(){return m().delimiters},o.currentOrdinal=function(){return m().ordinal},o.currentDefaults=function(){return Object.assign({},m().defaults,c)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().timeFormat)},o.setDefaults=function(e){e=i.parseFormat(e),a.validateFormat(e)&&(c=e)},o.getZeroFormat=function(){return u},o.setZeroFormat=function(e){return u="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==u},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return m()},o.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&d(e.languageTag)},o.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],a=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[a]?void d(a):void d(t)}d(e)},o.registerLanguage(r),s=r.languageTag,t.exports=o},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function a(e,t,n){var a=new r(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new r(i),e._value=a.minus(i).toNumber(),e}t.exports=function(e){return{add:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.plus(l).toNumber(),a;var a,i,o,s,l},subtract:function(t,n){return a(t,n,e)},multiply:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.times(l).toNumber(),a;var a,i,o,s,l},divide:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.dividedBy(l).toNumber(),a;var a,i,o,s,l},set:function(t,n){return r=t,i=a=n,e.isNumbro(a)&&(i=a._value),r._value=i,r;var r,a,i},difference:function(t,n){return r=n,a(o=(i=e)(t._value),r,i),Math.abs(o._value);var r,i,o}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("./globalState"),i=e("./validating"),o=e("./loading")(p),s=e("./unformatting"),l=e("./formatting")(p),u=e("./manipulating")(p),c=e("./parsing"),d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n;return t=e,(n=[{key:"clone",value:function(){return p(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=c.parseFormat(e)),(e=l.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.set(this,m(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),e}();function m(e){var t=e;return p.isNumbro(e)?t=e._value:"string"==typeof e?t=p.unformat(e):isNaN(e)&&(t=NaN),t}function p(e){return new d(m(e))}p.version="2.1.2",p.isNumbro=function(e){return e instanceof d},p.language=a.currentLanguage,p.registerLanguage=a.registerLanguage,p.setLanguage=a.setLanguage,p.languages=a.languages,p.languageData=a.languageData,p.zeroFormat=a.setZeroFormat,p.defaultFormat=a.currentDefaults,p.setDefaults=a.setDefaults,p.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,p.validate=i.validate,p.loadLanguagesInNode=o.loadLanguagesInNode,p.unformat=s.unformat,t.exports=p},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,a,i,o,s,l,u,c,d,m,p,h,_,f,y,g,b,v,M=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=M,i=M,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(o=(a=e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t).match(/{([^}]*)}$/))?(i.postfix=o[1],a.slice(0,-o[0].length)):a,M),s=M,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=M,(c=e.split(".")[0].match(/0+/))&&(u.characteristic=c[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,M),d=M,-1!==e.indexOf("a")&&(d.average=!0),p=M,-1!==(m=e).indexOf("K")?p.forceAverage="thousand":-1!==m.indexOf("M")?p.forceAverage="million":-1!==m.indexOf("B")?p.forceAverage="billion":-1!==m.indexOf("T")&&(p.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,M),_=M,(h=e).match(/\[\.]/)?_.optionalMantissa=!0:h.match(/\./)&&(_.optionalMantissa=!1),f=M,-1!==e.indexOf(",")&&(f.thousandSeparated=!0),y=M,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=M,(g=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),g.match(/^\+?-/)&&(b.negative="sign"),v=M,e.match(/^\+/)&&(v.forceSign=!0),M)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function a(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}t.exports={unformat:function(t,n){var i,o,s,l=e("./globalState"),u=l.currentDelimiters(),c=l.currentCurrency().symbol,d=l.currentOrdinal(),m=l.getZeroFormat(),p=l.currentAbbreviations(),h=void 0;if("string"==typeof t)h=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],a=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(a)&&!isNaN(i)}(t,u)?(o=+(i=t.split(":"))[0],s=+i[1],+i[2]+60*s+3600*o):function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",i=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,s=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,s=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var c="",d=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==t)return-1*e(d,n,i,o,s,l,u);for(var m=0;m<r.length;m++){var p=r[m];if((c=t.replace(p.key,""))!==t)return e(c,n,i,o,s,l,u)*p.factor}if((c=t.replace("%",""))!==t)return e(c,n,i,o,s,l,u)/100;var h=parseFloat(t);if(!isNaN(h)){var _=o(h);if(_&&"."!==_&&(c=t.replace(new RegExp("".concat(a(_),"$")),""))!==t)return e(c,n,i,o,s,l,u);var f={};Object.keys(l).forEach((function(e){f[l[e]]=e}));for(var y=Object.keys(f).sort().reverse(),g=y.length,b=0;b<g;b++){var v=y[b],M=f[v];if((c=t.replace(v,""))!==t){var w=void 0;switch(M){case"thousand":w=Math.pow(10,3);break;case"million":w=Math.pow(10,6);break;case"billion":w=Math.pow(10,9);break;case"trillion":w=Math.pow(10,12)}return e(c,n,i,o,s,l,u)*w}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(a(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,i,o,s,l)}(t,u,c,d,m,p,n);else{if("number"!=typeof t)return;h=t}if(void 0!==h)return h}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,o={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},s={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(i)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function l(e){return!!a.unformat(e)}function u(e,t,n){var a=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map((function(a){if(!t[a])return console.error("".concat(n," Invalid key: ").concat(a)),!1;var i=e[a],s=t[a];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!u(i,o,"[Validate ".concat(a,"]"),!0))return!1}else if(r(i)!==s.type)return console.error("".concat(n," ").concat(a,' type mismatched: "').concat(s.type,'" expected, "').concat(r(i),'" provided')),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,c=0;c<l;c++){var d=s.restrictions[c],m=d.restriction,p=d.message;if(!m(i,e))return console.error("".concat(n," ").concat(a," invalid value: ").concat(p)),!1}return s.restriction&&!s.restriction(i,e)?(console.error("".concat(n," ").concat(a," invalid value: ").concat(s.message)),!1):s.validValues&&-1===s.validValues.indexOf(i)?(console.error("".concat(n," ").concat(a," invalid value: must be among ").concat(JSON.stringify(s.validValues),', "').concat(i,'" provided')),!1):!(s.children&&!u(i,s.children,"[Validate ".concat(a,"]")))}));return a||i.push.apply(i,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(Object.keys(t).map((function(r){var a=t[r];if("string"==typeof a&&(a={type:a}),a.mandatory){var i=a.mandatory;if("function"==typeof i&&(i=i(e)),i&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),i.reduce((function(e,t){return e&&t}),!0)}function c(e){return u(e,o,"[Validate format]")}t.exports={validate:function(e,t){var n=l(e),r=c(t);return n&&r},validateFormat:c,validateInput:l,validateLanguage:function(e){return u(e,s,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){
59
  /*!
60
  * Pikaday
61
  *
62
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
63
  */
64
- !function(t,r){"use strict";var a;try{a=n(0)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,i=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},o=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},s=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=f(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=f(a,n),e.fireEvent("on"+t,a))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},m=function(e){return e%4==0&&e%100!=0||e%400==0},p=function(e,t){return[31,m(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},_=function(e,t){return e.getTime()===t.getTime()},f=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=f({},t[r],n):!n&&a||(e[r]=t[r]);return e},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},g={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},b=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},v=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},M=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},w=function(e,t,n,r,a,i){var o,s,l,c,d,m=e._o,p=n===m.minYear,h=n===m.maxYear,_='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',f=!0,y=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===a?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(p&&o<m.minMonth||h&&o>m.maxMonth?'disabled="disabled"':"")+">"+m.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+m.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(m.yearRange)?(o=m.yearRange[0],s=m.yearRange[1]+1):(o=n-m.yearRange,s=1+n+m.yearRange),l=[];o<s&&o<=m.maxYear;o++)o>=m.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return d='<div class="pika-label">'+n+m.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",m.showMonthAfterYear?_+=d+c:_+=c+d,p&&(0===r||m.minMonth>=r)&&(f=!1),h&&(11===r||m.maxMonth<=r)&&(y=!1),0===t&&(_+='<button class="pika-prev'+(f?"":" is-disabled")+'" type="button">'+m.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(_+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+m.i18n.nextMonth+"</button>"),_+"</div>"},k=function(o){var s=this,u=s.config(o);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=a((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),i(s.el,"mousedown",s._onMouseDown,!0),i(s.el,"touchend",s._onMouseDown,!0),i(s.el,"change",s._onChange),i(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),i(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",i(u.trigger,"click",s._onInputClick),i(u.trigger,"focus",s._onInputFocus),i(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=f({},g,!0));var t=f(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),u(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||g.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a<n.getTime()||r.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,r){var a,i=this.getDate(),o=24*parseInt(r)*60*60*1e3;"add"===n?a=new Date(i.valueOf()+o):"subtract"===n&&(a=new Date(i.valueOf()-o)),t&&("add"===n?a=e(i).add(r,"days").toDate():"subtract"===n&&(a=e(i).subtract(r,"days").toDate())),this.setDate(a)},adjustCalendars:function(){this.calendars[0]=y(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=y({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(h(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=g.minDate,this._o.minYear=g.minYear,this._o.minMonth=g.minMonth,this._o.startRange=g.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(h(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=g.maxDate,this._o.maxYear=g.maxYear,this._o.maxMonth=g.maxMonth,this._o.endRange=g.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,i=n.maxYear,o=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)l+='<div class="pika-lendar">'+w(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,a,i,o,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,i=window.innerWidth||r.documentElement.clientWidth,o=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>i||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>o+s||this._o.position.indexOf("top")>-1&&u-a-e.offsetHeight>0)&&(u=u-a-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,a=new Date,i=p(e,t),o=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(o-=r.firstDay)<0&&(o+=7);for(var u,m,f,y,g=0===t?11:t-1,w=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=p(k,g),D=i+o,T=D;T>7;)T-=7;D+=7-T;for(var S=0,O=0;S<D;S++){var x=new Date(e,t,S-o+1),j=!!c(this._d)&&_(x,this._d),E=_(x,a),C=S<o||S>=i+o,H=S-o+1,P=t,A=e,z=r.startRange&&_(r.startRange,x),F=r.endRange&&_(r.endRange,x),W=r.startRange&&r.endRange&&r.startRange<x&&x<r.endRange;C&&(S<o?(H=Y+H,P=g,A=k):(H-=i,P=w,A=L));var N={day:H,month:P,year:A,isSelected:j,isToday:E,isDisabled:r.minDate&&x<r.minDate||r.maxDate&&x>r.maxDate||r.disableWeekends&&d(x)||r.disableDayFn&&r.disableDayFn(x),isEmpty:C,isStartRange:z,isEndRange:F,isInRange:W,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(N)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-o,m=t,f=e,y=void 0,void 0,y=new Date(f,0,1),'<td class="pika-week">'+Math.ceil(((new Date(f,m,u)-y)/864e5+y.getDay()+1)/7)+"</td>")),s.push(M(l,r.isRTL)),l=[],O=0)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];e.showWeekNumber&&n.push("<th></th>");for(t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+b(e,t)+'">'+b(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+(r=t,"<tbody>"+r.join("")+"</tbody>")+"</table>";var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(i(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&o(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),this._o.field&&(o(this._o.field,"change",this._onInputChange),this._o.bound&&(o(this._o.trigger,"click",this._onInputClick),o(this._o.trigger,"focus",this._onInputFocus),o(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k}(a)}()},,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),i=n(129),o=n.n(i),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var m={graph_id:null,legend_toggle:!1,graphID:null,options:{colors:null},data:null,rows:null,columns:null,diffdata:null,chartEvents:null,legendToggle:!1,chartActions:null,getChartWrapper:function(e,t){},getChartEditor:null,className:"",style:{},formatters:null,spreadSheetUrl:null,spreadSheetQueryParameters:{headers:1,gid:1},rootProps:{},chartWrapperParams:{},controls:null,render:null,toolbarItems:null,toolbarID:null},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleGoogleChartsLoaderScriptLoaded=function(e){var n=t.props,r=n.chartVersion,a=n.chartPackages,i=n.chartLanguage,o=n.mapsApiKey,s=n.onLoad;e.charts.load(r||"current",{packages:a||["corechart","controls"],language:i||"en",mapsApiKey:o}),e.charts.setOnLoadCallback((function(){s(e)}))},t}return l(t,e),t.prototype.shouldComponentUpdate=function(e){return e.chartPackages===this.props.chartPackages},t.prototype.render=function(){var e=this,t=this.props.onError;return Object(r.createElement)(o.a,{url:"https://www.gstatic.com/charts/loader.js",onError:t,onLoad:function(){var t=window;t.google&&e.handleGoogleChartsLoaderScriptLoaded(t.google)}})},t}(r.Component),h=0,_=function(){return"reactgooglegraph-"+(h+=1)},f=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#3B3EAC"],y=function(e,t,n){return void 0===n&&(n={}),c(void 0,void 0,void 0,(function(){return d(this,(function(r){return[2,new Promise((function(r,a){var i=n.headers?"headers="+n.headers:"headers=0",o=n.query?"&tq="+encodeURIComponent(n.query):"",s=n.gid?"&gid="+n.gid:"",l=n.sheet?"&sheet="+n.sheet:"",u=n.access_token?"&access_token="+n.access_token:"",c=t+"/gviz/tq?"+(""+i+s+l+o+u);new e.visualization.Query(c).send((function(e){e.isError()?a("Error in query: "+e.getMessage()+" "+e.getDetailedMessage()):r(e.getDataTable())}))}))]}))}))},g=Object(r.createContext)(m),b=g.Provider,v=g.Consumer,M=function(e){var t=e.children,n=e.value;return Object(r.createElement)(b,{value:n},t)},w=function(e){var t=e.render;return Object(r.createElement)(v,null,(function(e){return t(e)}))},k="#CCCCCC",L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={hiddenColumns:[]},t.listenToLegendToggle=function(){var e=t.props,n=e.google,r=e.googleChartWrapper;n.visualization.events.addListener(r,"select",(function(){var e=r.getChart().getSelection(),n=r.getDataTable();if(0!==e.length&&null===e[0].row&&null!==n){var a=e[0].column,i=t.getColumnID(n,a);t.state.hiddenColumns.includes(i)?t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.filter((function(e){return e!==i})).slice()})})):t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.concat([i])})}))}}))},t.applyFormatters=function(e,n){for(var r=t.props.google,a=0,i=n;a<i.length;a++){var o=i[a];switch(o.type){case"ArrowFormat":(s=new r.visualization.ArrowFormat(o.options)).format(e,o.column);break;case"BarFormat":(s=new r.visualization.BarFormat(o.options)).format(e,o.column);break;case"ColorFormat":for(var s=new r.visualization.ColorFormat(o.options),l=0,u=o.ranges;l<u.length;l++){var c=u[l];s.addRange.apply(s,c)}s.format(e,o.column);break;case"DateFormat":(s=new r.visualization.DateFormat(o.options)).format(e,o.column);break;case"NumberFormat":(s=new r.visualization.NumberFormat(o.options)).format(e,o.column);break;case"PatternFormat":(s=new r.visualization.PatternFormat(o.options)).format(e,o.column)}}},t.getColumnID=function(e,t){return e.getColumnId(t)||e.getColumnLabel(t)},t.draw=function(e){var n=e.data,r=e.diffdata,a=e.rows,i=e.columns,o=e.options,s=e.legend_toggle,l=e.legendToggle,u=e.chartType,m=e.formatters,p=e.spreadSheetUrl,h=e.spreadSheetQueryParameters;return c(t,void 0,void 0,(function(){var e,t,c,_,f,g,b,v,M,w,k,L,Y,D;return d(this,(function(d){switch(d.label){case 0:return e=this.props,t=e.google,c=e.googleChartWrapper,f=null,null!==r&&(g=t.visualization.arrayToDataTable(r.old),b=t.visualization.arrayToDataTable(r.new),f=t.visualization[u].prototype.computeDiff(g,b)),null===n?[3,1]:(_=Array.isArray(n)?t.visualization.arrayToDataTable(n):new t.visualization.DataTable(n),[3,5]);case 1:return null===a||null===i?[3,2]:(_=t.visualization.arrayToDataTable([i].concat(a)),[3,5]);case 2:return null===p?[3,4]:[4,y(t,p,h)];case 3:return _=d.sent(),[3,5];case 4:_=t.visualization.arrayToDataTable([]),d.label=5;case 5:for(v=_.getNumberOfColumns(),M=0;M<v;M+=1)w=this.getColumnID(_,M),this.state.hiddenColumns.includes(w)&&(k=_.getColumnLabel(M),L=_.getColumnId(M),Y=_.getColumnType(M),_.removeColumn(M),_.addColumn({label:k,id:L,type:Y}));return D=c.getChart(),"Timeline"===c.getChartType()&&D&&D.clearChart(),c.setChartType(u),c.setOptions(o),c.setDataTable(_),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(_),null!==f&&(c.setDataTable(f),c.draw()),null!==m&&(this.applyFormatters(_,m),c.setDataTable(_),c.draw()),!0!==l&&!0!==s||this.grayOutHiddenColumns({options:o}),[2]}}))}))},t.grayOutHiddenColumns=function(e){var n=e.options,r=t.props.googleChartWrapper,a=r.getDataTable();if(null!==a){var i=a.getNumberOfColumns();if(!1!==t.state.hiddenColumns.length>0){var o=Array.from({length:i-1}).map((function(e,r){var i=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(i)?k:void 0!==n.colors&&null!==n.colors?n.colors[r]:f[r]}));r.setOptions(u({},n,{colors:o})),r.draw()}}},t.onResize=function(){t.props.googleChartWrapper.draw()},t}return l(t,e),t.prototype.componentDidMount=function(){this.draw(this.props),window.addEventListener("resize",this.onResize),(this.props.legend_toggle||this.props.legendToggle)&&this.listenToLegendToggle()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.google,n=e.googleChartWrapper;window.removeEventListener("resize",this.onResize),t.visualization.events.removeAllListeners(n),"Timeline"===n.getChartType()&&n.getChart()&&n.getChart().clearChart()},t.prototype.componentDidUpdate=function(){this.draw(this.props)},t.prototype.render=function(){return null},t}(r.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.componentDidMount=function(){},t.prototype.componentWillUnmount=function(){},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.google,n=e.googleChartWrapper,a=e.googleChartDashboard;return Object(r.createElement)(w,{render:function(e){return Object(r.createElement)(L,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.listenToEvents=function(e){var t=this,n=e.chartEvents,r=e.google,a=e.googleChartWrapper;if(null!==n){r.visualization.events.removeAllListeners(a);for(var i=function(e){var n=e.eventName,i=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];i({chartWrapper:a,props:t.props,google:r,eventArgs:e})}))},o=0,s=n;o<s.length;o++){i(s[o])}}},t.prototype.render=function(){var e=this,t=this.props,n=t.google,a=t.googleChartWrapper;return Object(r.createElement)(w,{render:function(t){return e.listenToEvents({chartEvents:t.chartEvents||null,google:n,googleChartWrapper:a}),null}})},t}(r.Component),T=0,S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={googleChartWrapper:null,googleChartDashboard:null,googleChartControls:null,googleChartEditor:null,isReady:!1},t.graphID=null,t.dashboard_ref=Object(r.createRef)(),t.toolbar_ref=Object(r.createRef)(),t.getGraphID=function(){var e,n=t.props,r=n.graphID,a=n.graph_id;return e=null===r&&null===a?null===t.graphID?_():t.graphID:null!==r&&null===a?r:null!==a&&null===r?a:r,t.graphID=e,t.graphID},t.getControlID=function(e,t){return T+=1,void 0===e?"googlechart-control-"+t+"-"+T:e},t.addControls=function(e,n){var r=t.props,a=r.google,i=r.controls,o=null===i?null:i.map((function(e,n){var r=e.controlID,i=e.controlType,o=e.options,s=e.controlWrapperParams,l=t.getControlID(r,n);return{controlProp:e,control:new a.visualization.ControlWrapper(u({containerId:l,controlType:i,options:o},s))}}));if(null===o)return null;n.bind(o.map((function(e){return e.control})),e);for(var s=function(n){for(var r=n.control,i=n.controlProp.controlEvents,o=function(n){var i=n.callback,o=n.eventName;a.visualization.events.removeListener(r,o,i),a.visualization.events.addListener(r,o,(function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];i({chartWrapper:e,controlWrapper:r,props:t.props,google:a,eventArgs:n})}))},s=0,l=void 0===i?[]:i;s<l.length;s++){o(l[s])}},l=0,c=o;l<c.length;l++){s(c[l])}return o},t.renderChart=function(){var e=t.props,n=e.width,a=e.height,i=e.options,o=e.style,s=e.className,l=e.rootProps,c=e.google,d=u({height:a||i&&i.height,width:n||i&&i.width},o);return Object(r.createElement)("div",u({id:t.getGraphID(),style:d,className:s},l),t.state.isReady&&null!==t.state.googleChartWrapper?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Y,{googleChartWrapper:t.state.googleChartWrapper,google:c,googleChartDashboard:t.state.googleChartDashboard}),Object(r.createElement)(D,{googleChartWrapper:t.state.googleChartWrapper,google:c})):null)},t.renderControl=function(e){return void 0===e&&(e=function(e){e.control,e.controlProp;return!0}),t.state.isReady&&null!==t.state.googleChartControls?Object(r.createElement)(r.Fragment,null,t.state.googleChartControls.filter((function(t){var n=t.controlProp,r=t.control;return e({control:r,controlProp:n})})).map((function(e){var t=e.control;e.controlProp;return Object(r.createElement)("div",{key:t.getContainerId(),id:t.getContainerId()})}))):null},t.renderToolBar=function(){return null===t.props.toolbarItems?null:Object(r.createElement)("div",{ref:t.toolbar_ref})},t}return l(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.options,n=e.google,r=e.chartType,a=e.chartWrapperParams,i=e.toolbarItems,o=e.getChartEditor,s=e.getChartWrapper,l=u({chartType:r,options:t,containerId:this.getGraphID()},a),c=new n.visualization.ChartWrapper(l);c.setOptions(t),s(c,n);var d=new n.visualization.Dashboard(this.dashboard_ref),m=this.addControls(c,d);null!==i&&n.visualization.drawToolbar(this.toolbar_ref.current,i);var p=null;null!==o&&o({chartEditor:p=new n.visualization.ChartEditor,chartWrapper:c,google:n}),this.setState({googleChartEditor:p,googleChartControls:m,googleChartDashboard:d,googleChartWrapper:c,isReady:!0})},t.prototype.componentDidUpdate=function(){if(null!==this.state.googleChartWrapper&&null!==this.state.googleChartDashboard&&null!==this.state.googleChartControls)for(var e=this.props.controls,t=0;t<e.length;t+=1){var n=e[t],r=n.controlType,a=n.options,i=n.controlWrapperParams;i&&"state"in i&&this.state.googleChartControls[t].control.setState(i.state),this.state.googleChartControls[t].control.setOptions(a),this.state.googleChartControls[t].control.setControlType(r)}},t.prototype.shouldComponentUpdate=function(e,t){return this.state.isReady!==t.isReady||e.controls!==this.props.controls},t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,a=e.options,i=e.style,o=u({height:n||a&&a.height,width:t||a&&a.width},i);return null!==this.props.render?Object(r.createElement)("div",{ref:this.dashboard_ref,style:o},Object(r.createElement)("div",{ref:this.toolbar_ref,id:"toolbar"}),this.props.render({renderChart:this.renderChart,renderControl:this.renderControl,renderToolbar:this.renderToolBar})):Object(r.createElement)("div",{ref:this.dashboard_ref,style:o},this.renderControl((function(e){return"bottom"!==e.controlProp.controlPosition})),this.renderChart(),this.renderControl((function(e){return"bottom"===e.controlProp.controlPosition})),this.renderToolBar())},t}(r.Component),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isMounted=!1,t.state={loadingStatus:"loading",google:null},t.onLoad=function(e){if(t.isFullyLoaded(e))t.onSuccess(e);else var n=setInterval((function(){var e=window.google;t._isMounted?e&&t.isFullyLoaded(e)&&(clearInterval(n),t.onSuccess(e)):clearInterval(n)}),1e3)},t.onSuccess=function(e){t.setState({loadingStatus:"ready",google:e})},t.onError=function(){t.setState({loadingStatus:"errored"})},t}return l(t,e),t.prototype.render=function(){var e=this.props,t=e.chartLanguage,n=e.chartPackages,a=e.chartVersion,i=e.mapsApiKey,o=e.loader,s=e.errorElement;return Object(r.createElement)(M,{value:this.props},"ready"===this.state.loadingStatus&&null!==this.state.google?Object(r.createElement)(S,u({},this.props,{google:this.state.google})):"errored"===this.state.loadingStatus&&s?s:o,Object(r.createElement)(p,u({},{chartLanguage:t,chartPackages:n,chartVersion:a,mapsApiKey:i},{onLoad:this.onLoad,onError:this.onError})))},t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.isFullyLoaded=function(e){var t=this.props,n=t.controls,r=t.toolbarItems,a=t.getChartEditor;return e&&e.visualization&&e.visualization.ChartWrapper&&e.visualization.Dashboard&&(!n||e.visualization.ChartWrapper)&&(!a||e.visualization.ChartEditor)&&(!r||e.visualization.drawToolbar)},t.defaultProps=m,t}(r.Component),x=n(130),j=n.n(x);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var z=wp.element,F=z.Component,W=z.Fragment,N=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?P(e):t}(this,H(t).apply(this,arguments))).initDataTable=e.initDataTable.bind(P(e)),e.dataRenderer=e.dataRenderer.bind(P(e)),e.table,e.uniqueId=j()(),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.initDataTable(this.props.columns,this.props.rows)}},{key:"componentWillUnmount",value:function(){this.table.destroy()}},{key:"componentDidUpdate",value:function(e){this.props!==e&&(this.props.options.responsive_bool!==e.options.responsive_bool&&"true"===e.options.responsive_bool&&document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).classList.remove("collapsed"),this.table.destroy(),document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).innerHTML="",this.initDataTable(this.props.columns,this.props.rows))}},{key:"initDataTable",value:function(e,t){var n=this,r=this.props.options,a=e.map((function(e,t){var r=e.type;switch(e.type){case"number":r="num";break;case"date":case"datetime":case"timeofday":r="date"}return{title:e.label,data:e.label,type:r,render:n.dataRenderer(i,r,t)}})),i=t.map((function(e){var t={};return a.forEach((function(n,r){t[n.data]=e[r]})),t}));this.table=jQuery("#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).DataTable({destroy:!0,data:i,columns:a,paging:"true"===r.paging_bool,pageLength:r.pageLength_int||10,pagingType:r.pagingType,ordering:"false"!==r.ordering_bool,fixedHeader:"true"===r.fixedHeader_bool,scrollCollapse:!(!this.props.chartsScreen&&"true"!==r.scrollCollapse_bool),scrollY:(this.props.chartsScreen?180:"true"===r.scrollCollapse_bool&&Number(r.scrollY_int))||!1,responsive:!(!this.props.chartsScreen&&"true"!==r.responsive_bool),searching:!1,select:!1,lengthChange:!1,bFilter:!1,bInfo:!1})}},{key:"dataRenderer",value:function(e,t,n){var r=this.props.options;if(void 0===r.series[n])return e;if("date"===t||"datetime"===t||"timeofday"===t)return r.series[n].format&&r.series[n].format.from&&r.series[n].format.to?$.fn.dataTable.render.moment(r.series[n].format.from,r.series[n].format.to):$.fn.dataTable.render.moment("MM-DD-YYYY");if("num"===t){var a,i=["","","","",""];return r.series[n].format.thousands&&(i[0]=r.series[n].format.thousands),r.series[n].format.decimal&&(i[1]=r.series[n].format.decimal),r.series[n].format.precision&&(i[2]=r.series[n].format.precision),r.series[n].format.prefix&&(i[3]=r.series[n].format.prefix),r.series[n].format.suffix&&(i[4]=r.series[n].format.suffix),(a=$.fn.dataTable.render).number.apply(a,i)}return e}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(W,null,e.customcss&&wp.element.createElement("style",null,e.customcss.oddTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.odd {\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.color?"color: ".concat(e.customcss.oddTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow["background-color"]?"background-color: ".concat(e.customcss.oddTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.transform?"transform: rotate( ".concat(e.customcss.oddTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.evenTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.even {\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.color?"color: ".concat(e.customcss.evenTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow["background-color"]?"background-color: ".concat(e.customcss.evenTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.transform?"transform: rotate( ".concat(e.customcss.evenTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.tableCell&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr td,\n\t\t\t\t\t\t\t#dataTable-instances-").concat(this.props.id,"-").concat(this.uniqueId,"_wrapper tr th {\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.color?"color: ".concat(e.customcss.tableCell.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell["background-color"]?"background-color: ".concat(e.customcss.tableCell["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.transform?"transform: rotate( ".concat(e.customcss.tableCell.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}")),wp.element.createElement("table",{id:"dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)}))}}])&&C(n.prototype,r),a&&C(n,a),t}(F),R=n(4),I=n.n(R),B=n(131),U=n.n(B),V=function(e){return Object.keys(e["visualizer-series"]).map((function(t){void 0!==e["visualizer-series"][t].type&&"date"===e["visualizer-series"][t].type&&Object.keys(e["visualizer-data"]).map((function(n){return e["visualizer-data"][n][t]=new Date(e["visualizer-data"][n][t])}))})),e},J=function(e){var t;if(Array.isArray(e))return 0<e.length;if(I()(e)){for(t in e)return!0;return!1}return"string"==typeof e?0<e.length:null!=e},G=function(e){return U()(e,J)},q=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},G(e)},K=function(e){try{JSON.parse(e)}catch(e){return!1}return!0};function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Q(i,r,a,o,s,"next",e)}function s(e){Q(i,r,a,o,s,"throw",e)}o(void 0)}))}}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ae=lodash.startCase,ie=wp.i18n.__,oe=wp.apiFetch,se=wp.element,le=se.Component,ue=se.Fragment,ce=wp.components,de=ce.Button,me=ce.Dashicon,pe=ce.ExternalLink,he=ce.Notice,_e=ce.Placeholder,fe=ce.Spinner,ye=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?ne(e):t}(this,te(t).apply(this,arguments))).loadMoreCharts=e.loadMoreCharts.bind(ne(e)),e.state={charts:null,isBusy:!1,chartsLoaded:!1},e}var n,r,a,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=X(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe({path:"wp/v2/visualizer/?per_page=6&meta_key=visualizer-chart-library&meta_value=ChartJS"});case 2:t=e.sent,this.setState({charts:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"loadMoreCharts",value:(i=X(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.charts.length,n=this.state.chartsLoaded,this.setState({isBusy:!0}),e.next=5,oe({path:"wp/v2/visualizer/?per_page=6&meta_key=visualizer-chart-library&meta_value=ChartJS&offset=".concat(t)});case 5:6>(r=e.sent).length&&(n=!0),this.setState({charts:this.state.charts.concat(r),isBusy:!1,chartsLoaded:n});case 8:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=t.charts,r=t.isBusy,a=t.chartsLoaded;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(he,{status:"warning",isDismissible:!1},ie("ChartJS charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag."),wp.element.createElement(pe,{href:visualizerLocalize.adminPage},ie("Click here to visit Visualizer Charts Library."))),null!==n?1<=n.length?wp.element.createElement(ue,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(n).map((function(t){var r,a,i=V(n[t].chart_data);if(r=i["visualizer-settings"].title?i["visualizer-settings"].title:"#".concat(n[t].id),a=0<=["gauge","table","timeline","dataTable"].indexOf(i["visualizer-chart-type"])?"dataTable"===i["visualizer-chart-type"]?i["visualizer-chart-type"]:ae(i["visualizer-chart-type"]):"".concat(ae(i["visualizer-chart-type"]),"Chart"),!i["visualizer-chart-library"]||"ChartJS"!==i["visualizer-chart-library"])return wp.element.createElement("div",{className:"visualizer-settings__charts-single"},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},r),"dataTable"===a?wp.element.createElement(N,{id:n[t].id,rows:i["visualizer-data"],columns:i["visualizer-series"],chartsScreen:!0,options:q(i["visualizer-settings"])}):wp.element.createElement(O,{chartType:a,rows:i["visualizer-data"],columns:i["visualizer-series"],options:q(i["visualizer-settings"])}),wp.element.createElement("div",{className:"visualizer-settings__charts-controls",title:ie("Insert Chart"),onClick:function(){return e.props.getChart(n[t].id)}},wp.element.createElement(me,{icon:"upload"})))}))),!a&&5<n.length&&wp.element.createElement(de,{isPrimary:!0,isLarge:!0,onClick:this.loadMoreCharts,isBusy:r},ie("Load More"))):wp.element.createElement("p",{className:"visualizer-no-charts"},ie("No charts found.")):wp.element.createElement(_e,null,wp.element.createElement(fe,null)))}}])&&ee(n.prototype,r),a&&ee(n,a),t}(le);function ge(e){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ke=wp.i18n.__,Le=wp.element.Component,Ye=wp.components,De=Ye.Button,Te=Ye.ExternalLink,Se=Ye.PanelBody,Oe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?Me(e):t}(this,ve(t).apply(this,arguments))).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(Me(e)),e.uploadImport=e.uploadImport.bind(Me(e)),e.state={uploadLabel:ke("Upload")},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&we(e,t)}(t,e),n=t,(r=[{key:"fileUploaded",value:function(e){"text/csv"===e.target.files[0].type&&this.setState({uploadLabel:ke("Upload")})}},{key:"uploadImport",value:function(){this.props.readUploadedFile(this.uploadInput),this.setState({uploadLabel:ke("Uploaded")})}},{key:"render",value:function(){return wp.element.createElement(Se,{title:ke("Import data from file"),initialOpen:!1},wp.element.createElement("p",null,ke("Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,ke("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(Te,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("input",{type:"file",accept:"text/csv",ref:this.uploadInput,onChange:this.fileUploaded}),wp.element.createElement(De,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&be(n.prototype,r),a&&be(n,a),t}(Le);function xe(e){return(xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ee(e,t){return!t||"object"!==xe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function He(e,t){return(He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pe=wp.i18n.__,Ae=wp.element.Component,ze=wp.components,Fe=ze.Button,We=ze.ExternalLink,Ne=ze.PanelBody,Re=ze.SelectControl,Ie=ze.TextControl,Be=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ee(this,Ce(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&He(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return wp.element.createElement(Ne,{title:Pe("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ne,{title:Pe("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Pe("You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,Pe("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(We,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("p",null,Pe("You can also import data from Google Spreadsheet.")),wp.element.createElement(Ie,{placeholder:Pe("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(Fe,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},Pe("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(Ne,{title:Pe("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Pe("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,Pe("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,Pe("We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.")),wp.element.createElement(Ie,{placeholder:Pe("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(Re,{label:Pe("How often do you want to check the url?"),value:this.props.chart["visualizer-chart-schedule"]?this.props.chart["visualizer-chart-schedule"]:1,options:[{label:Pe("Each hour"),value:"1"},{label:Pe("Each 12 hours"),value:"12"},{label:Pe("Each day"),value:"24"},{label:Pe("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Fe,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},Pe("Save Schedule"))):wp.element.createElement(Ne,{title:Pe("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Pe("Enable this feature in BUSINESS version!")),wp.element.createElement(Fe,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Pe("Buy Now"))))}}])&&je(n.prototype,r),a&&je(n,a),t}(Ae);function Ue(e){return(Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ge(e,t){return!t||"object"!==Ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $e(e,t){return($e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ke=wp.i18n.__,Ze=wp.apiFetch,Qe=wp.element,Xe=Qe.Component,et=Qe.Fragment,tt=wp.components,nt=tt.Button,rt=tt.PanelBody,at=tt.Placeholder,it=tt.SelectControl,ot=tt.Spinner,st=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Ge(this,qe(t).apply(this,arguments))).state={id:"",charts:[]},e}var n,r,a,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$e(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(i=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ze({path:"wp/v2/visualizer/?per_page=100"});case 2:t=(t=e.sent).map((function(e,t){var r=e.chart_data["visualizer-settings"].title?e.chart_data["visualizer-settings"].title:"#".concat(e.id);return 0===t&&(n=e.id),{value:e.id,label:r}})),this.setState({id:n,charts:t});case 5:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var a=i.apply(e,t);function o(e){Ve(a,n,r,o,s,"next",e)}function s(e){Ve(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"community"!==visualizerLocalize.isPro?wp.element.createElement(rt,{title:Ke("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(et,null,wp.element.createElement(it,{label:Ke("You can import here data from your previously created charts."),value:this.state.id,options:this.state.charts,onChange:function(t){return e.setState({id:t})}}),wp.element.createElement(nt,{isPrimary:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},Ke("Import Chart"))):wp.element.createElement(at,null,wp.element.createElement(ot,null))):wp.element.createElement(rt,{title:Ke("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Ke("Enable this feature in PRO version!")),wp.element.createElement(nt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Ke("Buy Now")))}}])&&Je(n.prototype,r),a&&Je(n,a),t}(Xe),lt=n(132);n(152);function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dt(e,t){return!t||"object"!==ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pt(e,t){return(pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ht=wp.i18n.__,_t=wp.element.Component,ft=wp.components,yt=ft.Button,gt=ft.ButtonGroup,bt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=dt(this,mt(t).apply(this,arguments))).data=[],e.dates=[],e.types=["string","number","boolean","date","datetime","timeofday"],e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pt(e,t)}(t,e),n=t,(r=[{key:"componentWillMount",value:function(){var e=this;this.data[this.data.length]=[],this.data[this.data.length]=[],this.props.chart["visualizer-series"].map((function(t,n){e.data[0][n]=t.label,e.data[1][n]=t.type,"date"===t.type&&e.dates.push(n)})),this.props.chart["visualizer-data"].map((function(t){e.data[e.data.length]=t}))}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"visualizer-chart-editor"},wp.element.createElement(lt.HotTable,{data:this.data,allowInsertRow:!0,contextMenu:!0,rowHeaders:!0,colHeaders:!0,allowInvalid:!1,className:"htEditor",cells:function(t,n,r){var a;return 1===t&&(a={type:"autocomplete",source:e.types,strict:!1}),0<=e.dates.indexOf(n)&&1<t&&(a={type:"date",dateFormat:"YYYY-MM-DD",correctFormat:!0}),a}}),wp.element.createElement(gt,null,wp.element.createElement(yt,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},ht("Close")),wp.element.createElement(yt,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},ht("Save"))))}}])&&ct(n.prototype,r),a&&ct(n,a),t}(_t);function vt(e){return(vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lt(e,t){return(Lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Yt=wp.i18n.__,Dt=wp.element,Tt=Dt.Component,St=Dt.Fragment,Ot=wp.components,xt=Ot.Button,jt=Ot.Modal,Et=Ot.PanelBody,Ct=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==vt(t)&&"function"!=typeof t?kt(e):t}(this,wt(t).apply(this,arguments))).toggleModal=e.toggleModal.bind(kt(e)),e.state={isOpen:!1},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lt(e,t)}(t,e),n=t,(r=[{key:"toggleModal",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return"community"!==visualizerLocalize.isPro?wp.element.createElement(St,null,wp.element.createElement(Et,{title:Yt("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,Yt("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(xt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},Yt("View Editor"))),this.state.isOpen&&wp.element.createElement(jt,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(bt,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(Et,{title:Yt("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Yt("Enable this feature in PRO version!")),wp.element.createElement(xt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Yt("Buy Now")))}}])&&Mt(n.prototype,r),a&&Mt(n,a),t}(Tt);function Ht(e){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function At(e,t){return!t||"object"!==Ht(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zt(e){return(zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Wt=wp.i18n.__,Nt=wp.element.Component,Rt=wp.editor.ColorPalette,It=wp.components,Bt=It.BaseControl,Ut=It.CheckboxControl,Vt=It.PanelBody,Jt=It.SelectControl,Gt=It.TextControl,qt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),At(this,zt(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:Wt("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];return-1>=["timeline"].indexOf(t)&&(r[1]={label:Wt("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:Wt("The tooltip will not be displayed"),value:"none"},wp.element.createElement(Vt,{title:Wt("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Vt,{title:Wt("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Gt,{label:Wt("Chart Title"),help:Wt("Text to display above the chart."),value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Jt,{label:Wt("Chart Title Position"),help:Wt("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:Wt("Inside the chart"),value:"in"},{label:Wt("Outside the chart"),value:"out"},{label:Wt("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Bt,{label:Wt("Chart Title Color")},wp.element.createElement(Rt,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Jt,{label:Wt("Axes Titles Position"),help:Wt("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:Wt("Inside the chart"),value:"in"},{label:Wt("Outside the chart"),value:"out"},{label:Wt("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Vt,{title:Wt("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jt,{label:Wt("Font Family"),help:Wt("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:Wt("Arial"),value:"Arial"},{label:Wt("Sans Serif"),value:"Sans Serif"},{label:Wt("Serif"),value:"serif"},{label:Wt("Arial"),value:"Arial"},{label:Wt("Wide"),value:"Arial black"},{label:Wt("Narrow"),value:"Arial Narrow"},{label:Wt("Comic Sans MS"),value:"Comic Sans MS"},{label:Wt("Courier New"),value:"Courier New"},{label:Wt("Garamond"),value:"Garamond"},{label:Wt("Georgia"),value:"Georgia"},{label:Wt("Tahoma"),value:"Tahoma"},{label:Wt("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Jt,{label:Wt("Font Size"),help:Wt("The default font size for all text in the chart."),value:n.fontSize?n.fontSize:"15",options:[{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"}],onChange:function(t){n.fontSize=t,e.props.edit(n)}})),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Vt,{title:Wt("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jt,{label:Wt("Position"),help:Wt("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:[{label:Wt("Left of the chart"),value:"left"},{label:Wt("Right of the chart"),value:"right"},{label:Wt("Above the chart"),value:"top"},{label:Wt("Below the chart"),value:"bottom"},{label:Wt("Inside the chart"),value:"in"},{label:Wt("Omit the legend"),value:"none"}],onChange:function(r){if("pie"!==t){var a="left"===r?1:0;Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Jt,{label:Wt("Alignment"),help:Wt("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:Wt("Aligned to the start of the allocated area"),value:"start"},{label:Wt("Centered in the allocated area"),value:"center"},{label:Wt("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(Bt,{label:Wt("Font Color")},wp.element.createElement(Rt,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["table","gauge","geo","dataTable"].indexOf(t)&&wp.element.createElement(Vt,{title:Wt("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jt,{label:Wt("Trigger"),help:Wt("Determines the user interaction that causes the tooltip to be displayed."),value:n.tooltip.trigger?n.tooltip.trigger:"focus",options:r,onChange:function(t){n.tooltip.trigger=t,e.props.edit(n)}}),wp.element.createElement(Jt,{label:Wt("Show Color Code"),help:Wt("If set to yes, will show colored squares next to the slice information in the tooltip."),value:n.tooltip.showColorCode?n.tooltip.showColorCode:"0",options:[{label:Wt("Yes"),value:"1"},{label:Wt("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Jt,{label:Wt("Text"),help:Wt("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:Wt("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:Wt("Display only the absolute value of the slice"),value:"value"},{label:Wt("Display only the percentage of the whole represented by the slice"),value:"percentage"}],onChange:function(t){n.tooltip.text=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Vt,{title:Wt("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ut,{label:Wt("Animate on startup?"),help:Wt("Determines if the chart will animate on the initial draw."),checked:Number(n.animation.startup),onChange:function(t){n.animation.startup=t?"1":"0",e.props.edit(n)}}),wp.element.createElement(Gt,{label:Wt("Duration"),help:Wt("The duration of the animation, in milliseconds."),type:"number",value:n.animation.duration,onChange:function(t){n.animation.duration=t,e.props.edit(n)}}),wp.element.createElement(Jt,{label:Wt("Easing"),help:Wt("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:Wt("Constant speed"),value:"linear"},{label:Wt("Start slow and speed up"),value:"in"},{label:Wt("Start fast and slow down"),value:"out"},{label:Wt("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&Pt(n.prototype,r),a&&Pt(n,a),t}(Nt);function $t(e){return($t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zt(e,t){return!t||"object"!==$t(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xt(e,t){return(Xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var en=wp.i18n.__,tn=wp.element,nn=tn.Component,rn=tn.Fragment,an=wp.editor.ColorPalette,on=wp.components,sn=on.BaseControl,ln=on.ExternalLink,un=on.PanelBody,cn=on.SelectControl,dn=on.TextControl,mn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Zt(this,Qt(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(un,{title:en("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(un,{title:en("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(dn,{label:en("Axis Title"),help:en("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(cn,{label:en("Text Position"),help:en("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:en("Inside the chart"),value:"in"},{label:en("Outside the chart"),value:"out"},{label:en("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(cn,{label:en("Direction"),help:en("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:en("Identical Direction"),value:"1"},{label:en("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(sn,{label:en("Base Line Color")},wp.element.createElement(an,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(sn,{label:en("Axis Text Color")},wp.element.createElement(an,{value:n.hAxis.textStyle.color||n.hAxis.textStyle,onChange:function(t){n.hAxis.textStyle={},n.hAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(rn,null,wp.element.createElement(dn,{label:en("Number Format"),help:en("Enter custom format pattern to apply to horizontal axis labels."),value:n.hAxis.format,onChange:function(t){n.hAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,en("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ln,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},en("ICU pattern set.")),en(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,en("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ln,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},en("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(rn,null,wp.element.createElement(un,{title:en("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(dn,{label:en("Count"),help:en("The number of horizontal gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines."),value:n.hAxis.gridlines?n.hAxis.gridlines.count:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(sn,{label:en("Color")},wp.element.createElement(an,{value:n.hAxis.gridlines?n.hAxis.gridlines.color:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(un,{title:en("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(dn,{label:en("Count"),help:en("The number of horizontal minor gridlines between two regular gridlines."),value:n.hAxis.minorGridlines.count,onChange:function(t){n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(sn,{label:en("Color")},wp.element.createElement(an,{value:n.hAxis.minorGridlines.color,onChange:function(t){n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(un,{title:en("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(dn,{label:en("Maximun Value"),help:en("The maximum vertical data value to render."),value:n.hAxis.viewWindow.max,onChange:function(t){n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(dn,{label:en("Minimum Value"),help:en("The minimum vertical data value to render."),value:n.hAxis.viewWindow.min,onChange:function(t){n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Kt(n.prototype,r),a&&Kt(n,a),t}(nn);function pn(e){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _n(e,t){return!t||"object"!==pn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fn(e){return(fn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yn(e,t){return(yn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gn=wp.i18n.__,bn=wp.element,vn=bn.Component,Mn=bn.Fragment,wn=wp.editor.ColorPalette,kn=wp.components,Ln=kn.BaseControl,Yn=kn.ExternalLink,Dn=kn.PanelBody,Tn=kn.SelectControl,Sn=kn.TextControl,On=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_n(this,fn(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(Dn,{title:gn("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Dn,{title:gn("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sn,{label:gn("Axis Title"),help:gn("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(Tn,{label:gn("Text Position"),help:gn("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:gn("Inside the chart"),value:"in"},{label:gn("Outside the chart"),value:"out"},{label:gn("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(Tn,{label:gn("Direction"),help:gn("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:gn("Identical Direction"),value:"1"},{label:gn("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(Ln,{label:gn("Base Line Color")},wp.element.createElement(wn,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(Ln,{label:gn("Axis Text Color")},wp.element.createElement(wn,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(Mn,null,wp.element.createElement(Sn,{label:gn("Number Format"),help:gn("Enter custom format pattern to apply to Vertical axis labels."),value:n.vAxis.format,onChange:function(t){n.vAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,gn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Yn,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},gn("ICU pattern set.")),gn(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,gn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Yn,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},gn("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(Mn,null,wp.element.createElement(Dn,{title:gn("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sn,{label:gn("Count"),help:gn("The number of Vertical gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines."),value:n.vAxis.gridlines?n.vAxis.gridlines.count:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(Ln,{label:gn("Color")},wp.element.createElement(wn,{value:n.vAxis.gridlines?n.vAxis.gridlines.color:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(Dn,{title:gn("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sn,{label:gn("Count"),help:gn("The number of Vertical minor gridlines between two regular gridlines."),value:n.vAxis.minorGridlines.count,onChange:function(t){n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(Ln,{label:gn("Color")},wp.element.createElement(wn,{value:n.vAxis.minorGridlines.color,onChange:function(t){n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(Dn,{title:gn("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sn,{label:gn("Maximun Value"),help:gn("The maximum vertical data value to render."),value:n.vAxis.viewWindow.max,onChange:function(t){n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Sn,{label:gn("Minimum Value"),help:gn("The minimum vertical data value to render."),value:n.vAxis.viewWindow.min,onChange:function(t){n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&hn(n.prototype,r),a&&hn(n,a),t}(vn);function xn(e){return(xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return!t||"object"!==xn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cn(e){return(Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Hn(e,t){return(Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pn=wp.i18n.__,An=wp.element,zn=An.Component,Fn=An.Fragment,Wn=wp.editor.ColorPalette,Nn=wp.components,Rn=Nn.BaseControl,In=Nn.ExternalLink,Bn=Nn.PanelBody,Un=Nn.SelectControl,Vn=Nn.TextControl,Jn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),En(this,Cn(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Bn,{title:Pn("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Fn,null,wp.element.createElement(Vn,{label:Pn("Number Format"),help:Pn("Enter custom format pattern to apply to chart labels."),value:t.format,onChange:function(n){t.format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Pn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(In,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Pn("ICU pattern set.")),Pn(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Pn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(In,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Pn("ICU date and time format.")))),wp.element.createElement(Un,{label:Pn("Is 3D"),help:Pn("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:Pn("Yes"),value:"1"},{label:Pn("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Un,{label:Pn("Reverse Categories"),help:Pn("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:Pn("Yes"),value:"1"},{label:Pn("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Un,{label:Pn("Slice Text"),help:Pn("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:Pn("The percentage of the slice size out of the total"),value:"percentage"},{label:Pn("The quantitative value of the slice"),value:"value"},{label:Pn("The name of the slice"),value:"label"},{label:Pn("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:Pn("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Vn,{label:Pn("Pie Hole"),help:Pn("If between 0 and 1, displays a donut chart. The hole with have a radius equal to number times the radius of the chart. Only applicable when the chart is two-dimensional."),placeholder:Pn("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Vn,{label:Pn("Start Angle"),help:Pn("The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up."),value:t.pieStartAngle,onChange:function(n){t.pieStartAngle=n,e.props.edit(t)}}),wp.element.createElement(Rn,{label:Pn("Slice Border Color")},wp.element.createElement(Wn,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&jn(n.prototype,r),a&&jn(n,a),t}(zn);function Gn(e){return(Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $n(e,t){return!t||"object"!==Gn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kn(e){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zn(e,t){return(Zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qn=wp.i18n.__,Xn=wp.element.Component,er=wp.editor.ColorPalette,tr=wp.components,nr=tr.BaseControl,rr=tr.PanelBody,ar=tr.TextControl,ir=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$n(this,Kn(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(rr,{title:Qn("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ar,{label:Qn("Visibility Threshold"),help:Qn("The slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree."),placeholder:Qn("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(ar,{label:Qn("Residue Slice Label"),help:Qn("A label for the combination slice that holds all slices below slice visibility threshold."),value:t.pieResidueSliceLabel,onChange:function(n){t.pieResidueSliceLabel=n,e.props.edit(t)}}),wp.element.createElement(nr,{label:Qn("Residue Slice Color")},wp.element.createElement(er,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&qn(n.prototype,r),a&&qn(n,a),t}(Xn);function or(e){return(or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lr(e,t){return!t||"object"!==or(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ur(e){return(ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cr(e,t){return(cr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var dr=wp.i18n.__,mr=wp.element,pr=mr.Component,hr=mr.Fragment,_r=wp.components,fr=_r.PanelBody,yr=_r.SelectControl,gr=_r.TextControl,br=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),lr(this,ur(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(fr,{title:dr("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(gr,{label:dr("Line Width"),help:dr("Data line width in pixels. Use zero to hide all lines."),value:n.lineWidth,onChange:function(t){n.lineWidth=t,e.props.edit(n)}}),wp.element.createElement(gr,{label:dr("Point Size"),help:dr("Diameter of displayed points in pixels. Use zero to hide all the points."),value:n.pointSize,onChange:function(t){n.pointSize=t,e.props.edit(n)}}),-1>=["area"].indexOf(t)&&wp.element.createElement(yr,{label:dr("Curve Type"),help:dr("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:dr("Straight line without curve"),value:"none"},{label:dr("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.curveType=t,e.props.edit(n)}}),-1>=["scatter"].indexOf(t)&&wp.element.createElement(yr,{label:dr("Focus Target"),help:dr("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:n.focusTarget?n.focusTarget:"datum",options:[{label:dr("Focus on a single data point."),value:"datum"},{label:dr("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(t){n.focusTarget=t,e.props.edit(n)}}),wp.element.createElement(yr,{label:dr("Selection Mode"),help:dr("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:dr("Single data point"),value:"single"},{label:dr("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(yr,{label:dr("Aggregation Target"),help:dr("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:n.aggregationTarget?n.aggregationTarget:"auto",options:[{label:dr("Group selected data by x-value"),value:"category"},{label:dr("Group selected data by series"),value:"series"},{label:dr("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:dr("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(gr,{label:dr("Point Opacity"),help:dr("The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent."),value:n.dataOpacity,onChange:function(t){n.dataOpacity=t,e.props.edit(n)}}),-1>=["scatter","line"].indexOf(t)&&wp.element.createElement(hr,null,wp.element.createElement(gr,{label:dr("Area Opacity"),help:dr("The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property."),value:n.areaOpacity,onChange:function(t){n.areaOpacity=t,e.props.edit(n)}}),wp.element.createElement(yr,{label:dr("Is Stacked"),help:dr("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:dr("Yes"),value:"1"},{label:dr("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(yr,{label:dr("Interpolate Nulls"),help:dr("Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point."),value:n.interpolateNulls?n.interpolateNulls:"0",options:[{label:dr("Yes"),value:"1"},{label:dr("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&sr(n.prototype,r),a&&sr(n,a),t}(pr);function vr(e){return(vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wr(e,t){return!t||"object"!==vr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kr(e){return(kr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Lr(e,t){return(Lr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Yr=wp.i18n.__,Dr=wp.element.Component,Tr=wp.components,Sr=Tr.PanelBody,Or=Tr.SelectControl,xr=Tr.TextControl,jr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),wr(this,kr(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Sr,{title:Yr("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Or,{label:Yr("Focus Target"),help:Yr("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:Yr("Focus on a single data point."),value:"datum"},{label:Yr("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Or,{label:Yr("Is Stacked"),help:Yr("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Yr("Yes"),value:"1"},{label:Yr("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(xr,{label:Yr("Bars Opacity"),help:Yr("Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent."),value:t.dataOpacity,onChange:function(n){t.dataOpacity=n,e.props.edit(t)}}))}}])&&Mr(n.prototype,r),a&&Mr(n,a),t}(Dr);function Er(e){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hr(e,t){return!t||"object"!==Er(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pr(e){return(Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ar(e,t){return(Ar=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zr=wp.i18n.__,Fr=wp.element.Component,Wr=wp.editor.ColorPalette,Nr=wp.components,Rr=Nr.BaseControl,Ir=Nr.PanelBody,Br=Nr.SelectControl,Ur=Nr.TextControl,Vr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Hr(this,Pr(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ar(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ir,{title:zr("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ir,{title:zr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Br,{label:zr("Focus Target"),help:zr("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:zr("Focus on a single data point."),value:"datum"},{label:zr("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Br,{label:zr("Selection Mode"),help:zr("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:zr("Single data point"),value:"single"},{label:zr("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Br,{label:zr("Aggregation Target"),help:zr("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:t.aggregationTarget?t.aggregationTarget:"auto",options:[{label:zr("Group selected data by x-value"),value:"category"},{label:zr("Group selected data by series"),value:"series"},{label:zr("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:zr("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Ir,{title:zr("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ur,{label:zr("Stroke Width"),help:zr("The stroke width of falling candles."),value:t.candlestick.fallingColor.strokeWidth,onChange:function(n){t.candlestick.fallingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement(Rr,{label:zr("Stroke Color")},wp.element.createElement(Wr,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Rr,{label:zr("Fill Color")},wp.element.createElement(Wr,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Ir,{title:zr("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ur,{label:zr("Stroke Width"),help:zr("The stroke width of rising candles."),value:t.candlestick.risingColor.strokeWidth,onChange:function(n){t.candlestick.risingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement(Rr,{label:zr("Stroke Color")},wp.element.createElement(Wr,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Rr,{label:zr("Fill Color")},wp.element.createElement(Wr,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&Cr(n.prototype,r),a&&Cr(n,a),t}(Fr);function Jr(e){return(Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qr(e,t){return!t||"object"!==Jr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $r(e){return($r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kr(e,t){return(Kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zr=wp.i18n.__,Qr=wp.element.Component,Xr=wp.components,ea=Xr.ExternalLink,ta=Xr.PanelBody,na=Xr.SelectControl,ra=Xr.TextControl,aa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),qr(this,$r(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ta,{title:Zr("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ta,{title:Zr("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ra,{label:Zr("API Key"),help:Zr("Add the Google Maps API key."),value:t.map_api_key,onChange:function(n){t.map_api_key=n,e.props.edit(t)}}),wp.element.createElement(ea,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},Zr("Get API Keys"))),wp.element.createElement(ta,{title:Zr("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Zr("A map of the entire world using 'world'.")),wp.element.createElement("li",null,Zr("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(ea,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},Zr("More info here."))),wp.element.createElement("li",null,Zr("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(ea,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},Zr("More info here."))),wp.element.createElement("li",null,Zr("A state in the United States, specified by its ISO 3166-2:US code, e.g., 'US-AL' for Alabama. Note that the resolution option must be set to either 'provinces' or 'metros'. "),wp.element.createElement(ea,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},Zr("More info here.")))),wp.element.createElement(ra,{label:Zr("Reigion"),help:Zr("Configure the region area to display on the map. (Surrounding areas will be displayed as well.)"),value:t.region,onChange:function(n){t.region=n,e.props.edit(t)}})),wp.element.createElement(ta,{title:Zr("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Zr("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,Zr("'provinces' - Supported only for country regions and US state regions. Not supported for all countries; please test a country to see whether this option is supported.")),wp.element.createElement("li",null,Zr("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(na,{label:Zr("Resolution"),help:Zr("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:Zr("Countries"),value:"countries"},{label:Zr("Provinces"),value:"provinces"},{label:Zr("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(ta,{title:Zr("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Zr("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,Zr("'regions' - This is a region map.")),wp.element.createElement("li",null,Zr("'markers' - This is a marker map."))),wp.element.createElement(na,{label:Zr("Display Mode"),help:Zr("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:Zr("Auto"),value:"auto"},{label:Zr("Regions"),value:"regions"},{label:Zr("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(ta,{title:Zr("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(na,{label:Zr("Trigger"),help:Zr("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:Zr("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:Zr("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&Gr(n.prototype,r),a&&Gr(n,a),t}(Qr);function ia(e){return(ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sa(e,t){return!t||"object"!==ia(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function la(e){return(la=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ua(e,t){return(ua=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ca=wp.i18n.__,da=wp.element.Component,ma=wp.editor.ColorPalette,pa=wp.components,ha=pa.BaseControl,_a=pa.PanelBody,fa=pa.TextControl,ya=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),sa(this,la(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ua(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(_a,{title:ca("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(fa,{label:ca("Minimum Values"),help:ca("Determines the minimum values of color axis."),value:t.colorAxis.minValue,onChange:function(n){t.colorAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(fa,{label:ca("Maximum Values"),help:ca("Determines the maximum values of color axis."),value:t.colorAxis.maxValue,onChange:function(n){t.colorAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(ha,{label:ca("Minimum Value")},wp.element.createElement(ma,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(ha,{label:ca("Intermediate Value")},wp.element.createElement(ma,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(ha,{label:ca("Maximum Value")},wp.element.createElement(ma,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(ha,{label:ca("Dateless Region")},wp.element.createElement(ma,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&oa(n.prototype,r),a&&oa(n,a),t}(da);function ga(e){return(ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function va(e,t){return!t||"object"!==ga(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ma(e){return(Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wa(e,t){return(wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ka=wp.i18n.__,La=wp.element,Ya=La.Component,Da=La.Fragment,Ta=wp.components,Sa=Ta.ExternalLink,Oa=Ta.PanelBody,xa=Ta.TextControl,ja=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),va(this,Ma(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Oa,{title:ka("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(xa,{label:ka("Minimum Values"),help:ka("Determines the minimum values of size axis."),value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(xa,{label:ka("Maximum Values"),help:ka("Determines the maximum values of size axis."),value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(xa,{label:ka("Minimum Marker Radius"),help:ka("Determines the radius of the smallest possible bubbles, in pixels."),value:t.sizeAxis.minSize,onChange:function(n){t.sizeAxis.minSize=n,e.props.edit(t)}}),wp.element.createElement(xa,{label:ka("Maximum Marker Radius"),help:ka("Determines the radius of the largest possible bubbles, in pixels."),value:t.sizeAxis.maxSize,onChange:function(n){t.sizeAxis.maxSize=n,e.props.edit(t)}}),wp.element.createElement(xa,{label:ka("Marker Opacity"),help:ka("The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.markerOpacity,onChange:function(n){t.markerOpacity=n,e.props.edit(t)}}),wp.element.createElement(Da,null,wp.element.createElement(xa,{label:ka("Number Format"),help:ka("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,ka("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Sa,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},ka("ICU pattern set.")),ka(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))))}}])&&ba(n.prototype,r),a&&ba(n,a),t}(Ya);function Ea(e){return(Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ha(e,t){return!t||"object"!==Ea(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pa(e){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Aa(e,t){return(Aa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var za=wp.i18n.__,Fa=wp.element.Component,Wa=wp.components,Na=Wa.PanelBody,Ra=Wa.SelectControl,Ia=Wa.TextControl,Ba=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ha(this,Pa(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Aa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Na,{title:za("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ra,{label:za("Enabled"),help:za("If yes, when the user lingers over a cluttered marker, a magnifiying glass will be opened."),value:t.magnifyingGlass.enable?t.magnifyingGlass.enable:"1",options:[{label:za("Yes"),value:"1"},{label:za("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(Ia,{label:za("Zoom Factor"),help:za("The zoom factor of the magnifying glass. Can be any number greater than 0."),value:t.magnifyingGlass.zoomFactor,onChange:function(n){t.magnifyingGlass.zoomFactor=n,e.props.edit(t)}}))}}])&&Ca(n.prototype,r),a&&Ca(n,a),t}(Fa);function Ua(e){return(Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Va(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ja(e,t){return!t||"object"!==Ua(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ga(e){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qa(e,t){return(qa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $a=wp.i18n.__,Ka=wp.element,Za=Ka.Component,Qa=Ka.Fragment,Xa=wp.editor.ColorPalette,ei=wp.components,ti=ei.BaseControl,ni=ei.ExternalLink,ri=ei.PanelBody,ai=ei.TextControl,ii=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ja(this,Ga(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ri,{title:$a("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ri,{title:$a("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ai,{label:$a("Minimum Values"),help:$a("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(ai,{label:$a("Maximum Values"),help:$a("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(ai,{label:$a("Minor Ticks"),help:$a("The number of minor tick section in each major tick section."),value:t.minorTicks,onChange:function(n){t.minorTicks=n,e.props.edit(t)}}),wp.element.createElement(Qa,null,wp.element.createElement(ai,{label:$a("Number Format"),help:$a("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,$a("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ni,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},$a("ICU pattern set.")),$a(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")))),wp.element.createElement(ri,{title:$a("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ai,{label:$a("Minimum Range"),help:$a("The lowest values for a range marked by a green color."),value:t.greenFrom,onChange:function(n){t.greenFrom=n,e.props.edit(t)}}),wp.element.createElement(ai,{label:$a("Maximum Range"),help:$a("The highest values for a range marked by a green color."),value:t.greenTo,onChange:function(n){t.greenTo=n,e.props.edit(t)}}),wp.element.createElement(ti,{label:$a("Green Color")},wp.element.createElement(Xa,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(ri,{title:$a("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ai,{label:$a("Minimum Range"),help:$a("The lowest values for a range marked by a yellow color."),value:t.yellowFrom,onChange:function(n){t.yellowFrom=n,e.props.edit(t)}}),wp.element.createElement(ai,{label:$a("Maximum Range"),help:$a("The highest values for a range marked by a yellow color."),value:t.yellowTo,onChange:function(n){t.yellowTo=n,e.props.edit(t)}}),wp.element.createElement(ti,{label:$a("Yellow Color")},wp.element.createElement(Xa,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(ri,{title:$a("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ai,{label:$a("Minimum Range"),help:$a("The lowest values for a range marked by a red color."),value:t.redFrom,onChange:function(n){t.redFrom=n,e.props.edit(t)}}),wp.element.createElement(ai,{label:$a("Maximum Range"),help:$a("The highest values for a range marked by a red color."),value:t.redTo,onChange:function(n){t.redTo=n,e.props.edit(t)}}),wp.element.createElement(ti,{label:$a("Red Color")},wp.element.createElement(Xa,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&Va(n.prototype,r),a&&Va(n,a),t}(Za);function oi(e){return(oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function li(e){return(li=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ui(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ci(e,t){return(ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var di=wp.i18n.__,mi=wp.element.Component,pi=wp.editor.ColorPalette,hi=wp.components,_i=hi.BaseControl,fi=hi.CheckboxControl,yi=hi.PanelBody,gi=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==oi(t)&&"function"!=typeof t?ui(e):t}(this,li(t).apply(this,arguments))).mapValues=e.mapValues.bind(ui(e)),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ci(e,t)}(t,e),n=t,(r=[{key:"mapValues",value:function(e,t){return void 0===e.timeline?e[t]:e.timeline[t]}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return this.mapValues(t,"showRowLabels"),wp.element.createElement(yi,{title:di("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(fi,{label:di("Show Row Label"),help:di("If checked, shows the category/row label."),checked:Number(this.mapValues(t,"showRowLabels")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.showRowLabels=!Number(e.mapValues(t,"showRowLabels")),e.props.edit(t)}}),wp.element.createElement(fi,{label:di("Group by Row Label"),help:di("If checked, groups the bars on the basis of the category/row label."),checked:Number(this.mapValues(t,"groupByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.groupByRowLabel=!Number(e.mapValues(t,"groupByRowLabel")),e.props.edit(t)}}),wp.element.createElement(fi,{label:di("Color by Row Label"),help:di("If checked, colors every bar on the row the same."),checked:Number(this.mapValues(t,"colorByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.colorByRowLabel=!Number(e.mapValues(t,"colorByRowLabel")),e.props.edit(t)}}),wp.element.createElement(_i,{label:di("Single Color")},wp.element.createElement(pi,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&si(n.prototype,r),a&&si(n,a),t}(mi);function bi(e){return(bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mi(e,t){return!t||"object"!==bi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wi(e){return(wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ki(e,t){return(ki=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Li=wp.i18n.__,Yi=wp.element,Di=Yi.Component,Ti=Yi.Fragment,Si=wp.components,Oi=Si.CheckboxControl,xi=Si.PanelBody,ji=Si.SelectControl,Ei=Si.TextControl,Ci=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Mi(this,wi(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ki(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(xi,{title:Li("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Ti,null,wp.element.createElement(Oi,{label:Li("Enable Pagination"),help:Li("To enable paging through the data."),checked:"true"===t.paging_bool,onChange:function(n){t.paging_bool="true",n||(t.paging_bool="false"),e.props.edit(t)}}),wp.element.createElement(Ei,{label:Li("Number of rows per page"),help:Li("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageLength_int,placeholder:10,onChange:function(n){t.pageLength_int=n,e.props.edit(t)}}),wp.element.createElement(ji,{label:Li("Pagination type"),help:Li("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:Li("Page number buttons only"),value:"numbers"},{label:Li("'Previous' and 'Next' buttons only"),value:"simple"},{label:Li("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:Li("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:Li("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:Li("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Oi,{label:Li("Scroll Collapse"),help:Li("Allow the table to reduce in height when a limited number of rows are shown."),checked:"true"===t.scrollCollapse_bool,onChange:function(n){t.scrollCollapse_bool="true",n||(t.scrollCollapse_bool="false"),e.props.edit(t)}}),"true"===t.scrollCollapse_bool&&wp.element.createElement(Ei,{label:Li("Vertical Height"),help:Li("Vertical scrolling will constrain the table to the given height."),type:"number",value:t.scrollY_int,placeholder:300,onChange:function(n){t.scrollY_int=n,e.props.edit(t)}}),wp.element.createElement(Oi,{label:Li("Disable Sort"),help:Li("To disable sorting on columns."),checked:"false"===t.ordering_bool,onChange:function(n){t.ordering_bool="true",n&&(t.ordering_bool="false"),e.props.edit(t)}}),wp.element.createElement(Oi,{label:Li("Freeze Header/Footer"),help:Li("Freeze the header and footer."),checked:"true"===t.fixedHeader_bool,onChange:function(n){t.fixedHeader_bool="true",n||(t.fixedHeader_bool="false"),e.props.edit(t)}}),wp.element.createElement(Oi,{label:Li("Responsive"),help:Li("Enable the table to be responsive."),checked:"true"===t.responsive_bool,onChange:function(n){t.responsive_bool="true",n||(t.responsive_bool="false"),e.props.edit(t)}})):wp.element.createElement(Ti,null,wp.element.createElement(ji,{label:Li("Enable Pagination"),help:Li("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:Li("Enable"),value:"enable"},{label:Li("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(Ei,{label:Li("Number of rows per page"),help:Li("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageSize,onChange:function(n){t.pageSize=n,e.props.edit(t)}}),wp.element.createElement(ji,{label:Li("Disable Sort"),help:Li("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:Li("Enable"),value:"enable"},{label:Li("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(Ei,{label:Li("Freeze Columns"),help:Li("The number of columns from the left that will be frozen."),type:"number",value:t.frozenColumns,onChange:function(n){t.frozenColumns=n,e.props.edit(t)}}),wp.element.createElement(Oi,{label:Li("Allow HTML"),help:Li("If enabled, formatted values of cells that include HTML tags will be rendered as HTML."),checked:Number(t.allowHtml),onChange:function(n){t.allowHtml=!Number(t.allowHtml),e.props.edit(t)}}),wp.element.createElement(Oi,{label:Li("Right to Left table"),help:Li("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&vi(n.prototype,r),a&&vi(n,a),t}(Di);function Hi(e){return(Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ai(e,t){return!t||"object"!==Hi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zi(e){return(zi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fi(e,t){return(Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Wi=wp.i18n.__,Ni=wp.element,Ri=Ni.Component,Ii=Ni.Fragment,Bi=wp.editor.ColorPalette,Ui=wp.components,Vi=Ui.BaseControl,Ji=Ui.PanelBody,Gi=Ui.TextControl,qi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ai(this,zi(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Ji,{title:Wi("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Ii,null,wp.element.createElement(Ji,{title:Wi("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(Ii,null,wp.element.createElement(Ji,{title:Wi("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(Ji,{title:Wi("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vi,{label:Wi("Background Color")},wp.element.createElement(Bi,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Vi,{label:Wi("Color")},wp.element.createElement(Bi,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Gi,{label:Wi("Text Orientation"),help:Wi("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&Pi(n.prototype,r),a&&Pi(n,a),t}(Ri);function $i(e){return($i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ki(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zi(e,t){return!t||"object"!==$i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qi(e){return(Qi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xi(e,t){return(Xi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var eo=wp.i18n.__,to=wp.element.Component,no=wp.components,ro=no.PanelBody,ao=no.SelectControl,io=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Zi(this,Qi(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ro,{title:eo("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ao,{label:eo("Chart Type"),help:eo("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:eo("Area"),value:"area"},{label:eo("Bar"),value:"bars"},{label:eo("Candlesticks"),value:"candlesticks"},{label:eo("Line"),value:"line"},{label:eo("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&Ki(n.prototype,r),a&&Ki(n,a),t}(to);function oo(e){return(oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function so(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lo(e,t){return!t||"object"!==oo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uo(e){return(uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function co(e,t){return(co=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var mo=wp.i18n.__,po=wp.element,ho=po.Component,_o=po.Fragment,fo=wp.editor.ColorPalette,yo=wp.components,go=yo.BaseControl,bo=yo.ExternalLink,vo=yo.PanelBody,Mo=yo.SelectControl,wo=yo.TextControl,ko=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),lo(this,uo(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&co(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=this.props.chart["visualizer-series"];return wp.element.createElement(vo,{title:mo("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(n.series).map((function(a,i){return a++,wp.element.createElement(vo,{title:r[a].label,className:"visualizer-inner-sections",initialOpen:!1},-1>=["table","pie"].indexOf(t)&&wp.element.createElement(Mo,{label:mo("Visible In Legend"),help:mo("Determines whether the series has to be presented in the legend or not."),value:n.series[i].visibleInLegend?n.series[i].visibleInLegend:"1",options:[{label:mo("Yes"),value:"1"},{label:mo("No"),value:"0"}],onChange:function(t){n.series[i].visibleInLegend=t,e.props.edit(n)}}),-1>=["table","candlestick","combo","column","bar"].indexOf(t)&&wp.element.createElement(_o,null,wp.element.createElement(wo,{label:mo("Line Width"),help:mo("Overrides the global line width value for this series."),value:n.series[i].lineWidth,onChange:function(t){n.series[i].lineWidth=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:mo("Point Size"),help:mo("Overrides the global point size value for this series."),value:n.series[i].pointSize,onChange:function(t){n.series[i].pointSize=t,e.props.edit(n)}})),-1>=["candlestick"].indexOf(t)&&"number"===r[a].type?wp.element.createElement(_o,null,wp.element.createElement(wo,{label:mo("Format"),help:mo("Enter custom format pattern to apply to this series value."),value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,mo("For number axis labels, this is a subset of the formatting "),wp.element.createElement(bo,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},mo("ICU pattern set.")),mo(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))):"date"===r[a].type&&wp.element.createElement(_o,null,wp.element.createElement(wo,{label:mo("Date Format"),help:mo("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,mo("This is a subset of the date formatting "),wp.element.createElement(bo,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},mo("ICU date and time format.")))),0<=["scatter","line"].indexOf(t)&&wp.element.createElement(Mo,{label:mo("Curve Type"),help:mo("Determines whether the series has to be presented in the legend or not."),value:n.series[i].curveType?n.series[i].curveType:"none",options:[{label:mo("Straight line without curve"),value:"none"},{label:mo("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.series[i].curveType=t,e.props.edit(n)}}),0<=["area"].indexOf(t)&&wp.element.createElement(wo,{label:mo("Area Opacity"),help:mo("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:n.series[i].areaOpacity,onChange:function(t){n.series[i].areaOpacity=t,e.props.edit(n)}}),0<=["combo"].indexOf(t)&&wp.element.createElement(Mo,{label:mo("Chart Type"),help:mo("Select the type of chart to show for this series."),value:n.series[i].type?n.series[i].type:"area",options:[{label:mo("Area"),value:"area"},{label:mo("Bar"),value:"bars"},{label:mo("Candlesticks"),value:"candlesticks"},{label:mo("Line"),value:"line"},{label:mo("Stepped Area"),value:"steppedArea"}],onChange:function(t){n.series[i].type=t,e.props.edit(n)}}),-1>=["table"].indexOf(t)&&wp.element.createElement(go,{label:mo("Color")},wp.element.createElement(fo,{value:n.series[i].color,onChange:function(t){n.series[i].color=t,e.props.edit(n)}})))})))}}])&&so(n.prototype,r),a&&so(n,a),t}(ho);function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Do(e,t){return!t||"object"!==Lo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function To(e){return(To=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function So(e,t){return(So=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Oo=wp.i18n.__,xo=wp.element.Component,jo=wp.editor.ColorPalette,Eo=wp.components,Co=Eo.BaseControl,Ho=Eo.PanelBody,Po=Eo.TextControl,Ao=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Do(this,To(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&So(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.slices).map((function(t){void 0!==e.slices[t]&&(e.slices[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-data"];return wp.element.createElement(Ho,{title:Oo("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(Ho,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Po,{label:Oo("Slice Offset"),help:Oo("How far to separate the slice from the rest of the pie, from 0.0 (not at all) to 1.0 (the pie's radius)."),value:t.slices[r].offset,onChange:function(n){t.slices[r].offset=n,e.props.edit(t)}}),wp.element.createElement(Co,{label:Oo("Format")},wp.element.createElement(jo,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&Yo(n.prototype,r),a&&Yo(n,a),t}(xo);function zo(e){return(zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wo(e,t){return!t||"object"!==zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function No(e){return(No=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ro(e,t){return(Ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Io=wp.i18n.__,Bo=wp.element,Uo=Bo.Component,Vo=Bo.Fragment,Jo=wp.components,Go=Jo.ExternalLink,qo=Jo.PanelBody,$o=Jo.TextControl,Ko=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Wo(this,No(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ro(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-series"];return wp.element.createElement(qo,{title:Io("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(r){return wp.element.createElement(qo,{title:n[r].label,className:"visualizer-inner-sections",initialOpen:!1},("date"===n[r].type||"datetime"===n[r].type||"timeofday"===n[r].type)&&wp.element.createElement(Vo,null,wp.element.createElement($o,{label:Io("Display Date Format"),help:Io("Enter custom format pattern to apply to this series value."),value:t.series[r].format?t.series[r].format.to:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.to=n,e.props.edit(t)}}),wp.element.createElement($o,{label:Io("Source Date Format"),help:Io("What format is the source date in?"),value:t.series[r].format?t.series[r].format.from:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Io("You can find more info on "),wp.element.createElement(Go,{href:"https://momentjs.com/docs/#/displaying/"},Io("date and time formats here.")))),"number"===n[r].type&&wp.element.createElement(Vo,null,wp.element.createElement($o,{label:Io("Thousands Separator"),value:t.series[r].format?t.series[r].format.thousands:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.thousands=n,e.props.edit(t)}}),wp.element.createElement($o,{label:Io("Decimal Separator"),value:t.series[r].format?t.series[r].format.decimal:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.decimal=n,e.props.edit(t)}}),wp.element.createElement($o,{label:Io("Precision"),help:Io("Round values to how many decimal places?"),value:t.series[r].format?t.series[r].format.precision:"",type:"number",onChange:function(n){100<n||(t.series[r].format||(t.series[r].format={}),t.series[r].format.precision=n,e.props.edit(t))}}),wp.element.createElement($o,{label:Io("Prefix"),value:t.series[r].format?t.series[r].format.prefix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.prefix=n,e.props.edit(t)}}),wp.element.createElement($o,{label:Io("Suffix"),value:t.series[r].format?t.series[r].format.suffix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.suffix=n,e.props.edit(t)}})))})))}}])&&Fo(n.prototype,r),a&&Fo(n,a),t}(Uo);function Zo(e){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xo(e,t){return!t||"object"!==Zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function es(e){return(es=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ts(e,t){return(ts=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ns=wp.i18n.__,rs=wp.element,as=rs.Component,is=rs.Fragment,os=wp.editor.ColorPalette,ss=wp.components,ls=ss.BaseControl,us=ss.CheckboxControl,cs=ss.PanelBody,ds=ss.SelectControl,ms=ss.TextControl,ps=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Xo(this,es(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ts(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(cs,{title:ns("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(cs,{title:ns("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ms,{label:ns("Width of Chart"),help:ns("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(ms,{label:ns("Height of Chart"),help:ns("Determines the total height of the chart."),value:n.height,onChange:function(t){n.height=t,e.props.edit(n)}}),0<=["geo"].indexOf(t)&&wp.element.createElement(ds,{label:ns("Keep Aspect Ratio"),help:ns("If yes, the map will be drawn at the largest size that can fit inside the chart area at its natural aspect ratio. If only one of the width and height options is specified, the other one will be calculated according to the aspect ratio. If no, the map will be stretched to the exact size of the chart as specified by the width and height options."),value:n.keepAspectRatio?n.isStacked:"1",options:[{label:ns("Yes"),value:"1"},{label:ns("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge"].indexOf(t)&&wp.element.createElement(is,null,wp.element.createElement(ms,{label:ns("Stroke Width"),help:ns("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(ls,{label:ns("Stroke Color")},wp.element.createElement(os,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(ls,{label:ns("Background Color")},wp.element.createElement(os,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(us,{label:ns("Transparent Background?"),checked:"transparent"===n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill="transparent"===n.backgroundColor.fill?"":"transparent",e.props.edit(n)}}))),-1>=["geo","gauge"].indexOf(t)&&wp.element.createElement(cs,{title:ns("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ms,{label:ns("Left Margin"),help:ns("Determines how far to draw the chart from the left border."),value:n.chartArea.left,onChange:function(t){n.chartArea.left=t,e.props.edit(n)}}),wp.element.createElement(ms,{label:ns("Top Margin"),help:ns("Determines how far to draw the chart from the top border."),value:n.chartArea.top,onChange:function(t){n.chartArea.top=t,e.props.edit(n)}}),wp.element.createElement(ms,{label:ns("Width Of Chart Area"),help:ns("Determines the width of the chart area."),value:n.chartArea.width,onChange:function(t){n.chartArea.width=t,e.props.edit(n)}}),wp.element.createElement(ms,{label:ns("Height Of Chart Area"),help:ns("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Qo(n.prototype,r),a&&Qo(n,a),t}(as);function hs(e){return(hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fs(e,t){return!t||"object"!==hs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ys(e){return(ys=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gs(e,t){return(gs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var bs=wp.i18n.__,vs=wp.element,Ms=vs.Component,ws=vs.Fragment,ks=wp.components,Ls=ks.CheckboxControl,Ys=ks.PanelBody,Ds=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),fs(this,ys(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gs(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];void 0===e.actions&&(e.actions=[]),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ys,{title:bs("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(ws,null,wp.element.createElement(Ls,{label:bs("Print"),help:bs("To enable printing the data."),checked:0<=t.actions.indexOf("print"),onChange:function(n){if(0<=t.actions.indexOf("print")){var r=t.actions.indexOf("print");-1!==r&&t.actions.splice(r,1)}else t.actions.push("print");e.props.edit(t)}}),wp.element.createElement(Ls,{label:bs("CSV"),help:bs("To enable downloading the data as a CSV."),checked:0<=t.actions.indexOf("csv;application/csv"),onChange:function(n){if(0<=t.actions.indexOf("csv;application/csv")){var r=t.actions.indexOf("csv;application/csv");-1!==r&&t.actions.splice(r,1)}else t.actions.push("csv;application/csv");e.props.edit(t)}}),wp.element.createElement(Ls,{label:bs("Excel"),help:bs("To enable downloading the data as an Excel spreadsheet."),checked:0<=t.actions.indexOf("xls;application/vnd.ms-excel"),onChange:function(n){if(0<=t.actions.indexOf("xls;application/vnd.ms-excel")){var r=t.actions.indexOf("xls;application/vnd.ms-excel");-1!==r&&t.actions.splice(r,1)}else t.actions.push("xls;application/vnd.ms-excel");e.props.edit(t)}}),wp.element.createElement(Ls,{label:bs("Copy"),help:bs("To enable copying the data to the clipboard."),checked:0<=t.actions.indexOf("copy"),onChange:function(n){if(0<=t.actions.indexOf("copy")){var r=t.actions.indexOf("copy");-1!==r&&t.actions.splice(r,1)}else t.actions.push("copy");e.props.edit(t)}})))}}])&&_s(n.prototype,r),a&&_s(n,a),t}(Ms);function Ts(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ss(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ts(e,t,n[t])}))}return e}var Os={dark_vscode_tribute:{default:"#D4D4D4",background:"#1E1E1E",background_warning:"#1E1E1E",string:"#CE8453",number:"#B5CE9F",colon:"#49B8F7",keys:"#9CDCFE",keys_whiteSpace:"#AF74A5",primitive:"#6392C6"},light_mitsuketa_tribute:{default:"#D4D4D4",background:"#FCFDFD",background_warning:"#FEECEB",string:"#FA7921",number:"#70CE35",colon:"#49B8F7",keys:"#59A5D8",keys_whiteSpace:"#835FB6",primitive:"#386FA4"}},xs=n(2);const js={getCaller:(e=1)=>{var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:(e="unknown function",t="unknown parameter",n="to be defined")=>{throw["@",e,"(): Expected parameter '",t,"' ",n].join("")},isUndefined:(e="<unknown parameter>",t)=>{[null,void 0].indexOf(t)>-1&&js.throwError(js.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||js.throwError(js.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&js.throwError(js.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&js.throwError(js.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(xs.getType)(t)!==n.toLowerCase()&&js.throwError(js.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(xs.getType)(t)===n&&js.throwError(js.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{js.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&js.throwError(js.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{js.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&js.throwError(js.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(xs.locate)(t,n);r&&js.throwError(js.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{js.isUndefined(e,t),js.isNotType(e,t,"string"),js.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&js.throwError(js.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&js.throwError(js.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{js.isUndefined(e,t),js.containsUndefined(e,t)}};var Es=js;const Cs=(e,t)=>t?Object.keys(t).reduce((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"==typeof e?e:""+e)(t[n])),e):e;var Hs={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"};
65
  /** @license react-json-editor-ajrm v2.5.9
66
  *
67
  * This source code is licensed under the MIT license found in the
68
  * LICENSE file in the root directory of this source tree.
69
- */var Ps=class extends r.Component{constructor(e){super(e),this.updateInternalProps=this.updateInternalProps.bind(this),this.createMarkup=this.createMarkup.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this),this.update=this.update.bind(this),this.getCursorPosition=this.getCursorPosition.bind(this),this.setCursorPosition=this.setCursorPosition.bind(this),this.scheduledUpdate=this.scheduledUpdate.bind(this),this.setUpdateTime=this.setUpdateTime.bind(this),this.renderLabels=this.renderLabels.bind(this),this.newSpan=this.newSpan.bind(this),this.renderErrorMessage=this.renderErrorMessage.bind(this),this.onScroll=this.onScroll.bind(this),this.showPlaceholder=this.showPlaceholder.bind(this),this.tokenize=this.tokenize.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onPaste=this.onPaste.bind(this),this.stopEvent=this.stopEvent.bind(this),this.refContent=null,this.refLabels=null,this.updateInternalProps(),this.renderCount=1,this.state={prevPlaceholder:"",markupText:"",plainText:"",json:"",jsObject:void 0,lines:!1,error:!1},this.props.locale||console.warn("[react-json-editor-ajrm - Deprecation Warning] You did not provide a 'locale' prop for your JSON input - This will be required in a future version. English has been set as a default.")}updateInternalProps(){let e={},t={},n=Os.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Os&&(n=Os[this.props.theme]),e=n,"colors"in this.props&&(e={default:"default"in this.props.colors?this.props.colors.default:e.default,string:"string"in this.props.colors?this.props.colors.string:e.string,number:"number"in this.props.colors?this.props.colors.number:e.number,colon:"colon"in this.props.colors?this.props.colors.colon:e.colon,keys:"keys"in this.props.colors?this.props.colors.keys:e.keys,keys_whiteSpace:"keys_whiteSpace"in this.props.colors?this.props.colors.keys_whiteSpace:e.keys_whiteSpace,primitive:"primitive"in this.props.colors?this.props.colors.primitive:e.primitive,error:"error"in this.props.colors?this.props.colors.error:e.error,background:"background"in this.props.colors?this.props.colors.background:e.background,background_warning:"background_warning"in this.props.colors?this.props.colors.background_warning:e.background_warning}),this.colors=e,t="style"in this.props?{outerBox:"outerBox"in this.props.style?this.props.style.outerBox:{},container:"container"in this.props.style?this.props.style.container:{},warningBox:"warningBox"in this.props.style?this.props.style.warningBox:{},errorMessage:"errorMessage"in this.props.style?this.props.style.errorMessage:{},body:"body"in this.props.style?this.props.style.body:{},labelColumn:"labelColumn"in this.props.style?this.props.style.labelColumn:{},labels:"labels"in this.props.style?this.props.style.labels:{},contentBox:"contentBox"in this.props.style?this.props.style.contentBox:{}}:{outerBox:{},container:{},warningBox:{},errorMessage:{},body:{},labelColumn:{},labels:{},contentBox:{}},this.style=t,this.confirmGood=!("confirmGood"in this.props)||this.props.confirmGood;const r=this.props.height||"610px",a=this.props.width||"479px";this.totalHeight=r,this.totalWidth=a,"onKeyPressUpdate"in this.props&&!this.props.onKeyPressUpdate?this.timer&&(clearInterval(this.timer),this.timer=!1):this.timer||(this.timer=setInterval(this.scheduledUpdate,100)),this.updateTime=!1,this.waitAfterKeyPress="waitAfterKeyPress"in this.props?this.props.waitAfterKeyPress:1e3,this.resetConfiguration="reset"in this.props&&this.props.reset}render(){const e=this.props.id,t=this.state.markupText,n=this.state.error,r=this.colors,i=this.style,o=this.confirmGood,s=this.totalHeight,l=this.totalWidth,u=!!n&&"token"in n;return this.renderCount++,a.a.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:Ss({display:"block",overflow:"none",height:s,width:l,margin:0,boxSizing:"border-box",position:"relative"},i.outerBox)},o?a.a.createElement("div",{style:{opacity:u?0:1,height:"30px",width:"30px",position:"absolute",top:0,right:0,transform:"translate(-25%,25%)",pointerEvents:"none",transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"}},a.a.createElement("svg",{height:"30px",width:"30px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"green",opacity:"0.85",d:"M39.363,79L16,55.49l11.347-11.419L39.694,56.49L72.983,23L84,34.085L39.363,79z"}))):void 0,a.a.createElement("div",{name:"container",id:e&&e+"-container",style:Ss({display:"block",height:s,width:l,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},i.container),onClick:this.onClick},a.a.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:Ss({display:"block",overflow:"hidden",height:u?"60px":"0px",width:"100%",margin:0,backgroundColor:r.background_warning,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},i.warningBox),onClick:this.onClick},a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"60px",margin:0,boxSizing:"border-box",overflow:"hidden",verticalAlign:"top",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"relative",top:0,left:0,height:"60px",width:"60px",margin:0,pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("svg",{height:"25px",width:"25px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"red",d:"M73.9,5.75c0.467-0.467,1.067-0.7,1.8-0.7c0.7,0,1.283,0.233,1.75,0.7l16.8,16.8 c0.467,0.5,0.7,1.084,0.7,1.75c0,0.733-0.233,1.334-0.7,1.801L70.35,50l23.9,23.95c0.5,0.467,0.75,1.066,0.75,1.8 c0,0.667-0.25,1.25-0.75,1.75l-16.8,16.75c-0.534,0.467-1.117,0.7-1.75,0.7s-1.233-0.233-1.8-0.7L50,70.351L26.1,94.25 c-0.567,0.467-1.167,0.7-1.8,0.7c-0.667,0-1.283-0.233-1.85-0.7L5.75,77.5C5.25,77,5,76.417,5,75.75c0-0.733,0.25-1.333,0.75-1.8 L29.65,50L5.75,26.101C5.25,25.667,5,25.066,5,24.3c0-0.666,0.25-1.25,0.75-1.75l16.8-16.8c0.467-0.467,1.05-0.7,1.75-0.7 c0.733,0,1.333,0.233,1.8,0.7L50,29.65L73.9,5.75z"}))))),a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"calc(100% - 60px)",margin:0,overflow:"hidden",verticalAlign:"top",position:"absolute",pointerEvents:"none"},onClick:this.onClick},this.renderErrorMessage())),a.a.createElement("div",{name:"body",id:e&&e+"-body",style:Ss({display:"flex",overflow:"none",height:u?"calc(100% - 60px)":"100%",width:"",margin:0,resize:"none",fontFamily:"Roboto Mono, Monaco, monospace",fontSize:"11px",backgroundColor:r.background,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},i.body),onClick:this.onClick},a.a.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:Ss({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},i.labelColumn),onClick:this.onClick},this.renderLabels()),a.a.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:Ss({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"",flex:1,margin:0,padding:"5px",overflowX:"hidden",overflowY:"auto",wordWrap:"break-word",whiteSpace:"pre-line",color:"#D4D4D4",outline:"none"},i.contentBox),dangerouslySetInnerHTML:this.createMarkup(t),onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,onClick:this.onClick,onBlur:this.onBlur,onScroll:this.onScroll,onPaste:this.onPaste,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}))))}renderErrorMessage(){const e=this.props.locale||Hs,t=this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Ss({color:"red",fontSize:"12px",position:"absolute",width:"calc(100% - 60px)",height:"60px",boxSizing:"border-box",margin:0,padding:0,paddingRight:"10px",overflowWrap:"break-word",display:"flex",flexDirection:"column",justifyContent:"center"},n.errorMessage)},Cs(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.state.error?this.state.error.line:-1,r=this.state.lines?this.state.lines:1;let i=new Array(r);for(var o=0;o<r-1;o++)i[o]=o+1;return i.map(r=>{const i=r!==n?e.default:"red";return a.a.createElement("div",{key:r,style:Ss({},t.labels,{color:i})},r)})}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,a=t.type,i=t.string,o="";switch(a){case"string":case"number":case"primitive":case"error":o=r[t.type];break;case"key":o=" "===i?r.keys_whiteSpace:r.keys;break;case"symbol":o=":"===i?r.colon:r.default;break;default:o=r.default}return i.length!==i.replace(/</g,"").replace(/>/g,"").length&&(i="<xmp style=display:inline;>"+i+"</xmp>"),'<span type="'+a+'" value="'+i+'" depth="'+n+'" style="color:'+o+'">'+i+"</span>"}getCursorPosition(e){let t,n=window.getSelection(),r=-1,a=0;if(n.focusNode&&(e=>{for(;null!==e;){if(e===this.refContent)return!0;e=e.parentNode}return!1})(n.focusNode))for(t=n.focusNode,r=n.focusOffset;t&&t!==this.refContent;)if(t.previousSibling)t=t.previousSibling,e&&"BR"===t.nodeName&&a++,r+=t.textContent.length;else if(null===(t=t.parentNode))break;return r+a}setCursorPosition(e){if([!1,null,void 0].indexOf(e)>-1)return;const t=(e,n,r)=>{if(r||((r=document.createRange()).selectNode(e),r.setStart(e,0)),0===n.count)r.setEnd(e,n.count);else if(e&&n.count>0)if(e.nodeType===Node.TEXT_NODE)e.textContent.length<n.count?n.count-=e.textContent.length:(r.setEnd(e,n.count),n.count=0);else for(var a=0;a<e.childNodes.length&&(r=t(e.childNodes[a],n,r),0!==n.count);a++);return r};e>0?(e=>{if(e<0)return;let n=window.getSelection(),r=t(this.refContent,{count:e});r&&(r.collapse(!1),n.removeAllRanges(),n.addRange(r))})(e):this.refContent.focus()}update(e=0,t=!0){const n=this.refContent,r=this.tokenize(n);"onChange"in this.props&&this.props.onChange({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error});let a=this.getCursorPosition(r.error)+e;this.setState({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error}),this.updateTime=!1,t&&this.setCursorPosition(a)}scheduledUpdate(){if("onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate)return;const{updateTime:e}=this;!1!==e&&(e>(new Date).getTime()||this.update())}setUpdateTime(){"onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate||(this.updateTime=(new Date).getTime()+this.waitAfterKeyPress)}stopEvent(e){e&&(e.preventDefault(),e.stopPropagation())}onKeyPress(e){const t=e.ctrlKey||e.metaKey;this.props.viewOnly&&!t&&this.stopEvent(e),t||this.setUpdateTime()}onKeyDown(e){const t=!!this.props.viewOnly,n=e.ctrlKey||e.metaKey;switch(e.key){case"Tab":if(this.stopEvent(e),t)break;document.execCommand("insertText",!1," "),this.setUpdateTime();break;case"Backspace":case"Delete":t&&this.stopEvent(e),this.setUpdateTime();break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this.setUpdateTime();break;case"a":case"c":t&&!n&&this.stopEvent(e);break;default:t&&this.stopEvent(e)}}onPaste(e){if(this.props.viewOnly)this.stopEvent(e);else{e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,t)}this.update()}onClick(){"viewOnly"in this.props&&this.props.viewOnly}onBlur(){"viewOnly"in this.props&&this.props.viewOnly||this.update(0,!1)}onScroll(e){this.refLabels.scrollTop=e.target.scrollTop}componentDidUpdate(){this.updateInternalProps(),this.showPlaceholder()}componentDidMount(){this.showPlaceholder()}componentWillUnmount(){this.timer&&clearInterval(this.timer)}showPlaceholder(){if(!("placeholder"in this.props))return;const{placeholder:e}=this.props;if([void 0,null].indexOf(e)>-1)return;const{prevPlaceholder:t,jsObject:n}=this.state,{resetConfiguration:r}=this,a=Object(xs.getType)(e);-1===["object","array"].indexOf(a)&&Es.throwError("showPlaceholder","placeholder","either an object or an array");let i=!Object(xs.identical)(e,t);if(i||r&&void 0!==n&&(i=!Object(xs.identical)(e,n)),!i)return;const o=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:o.indentation,markupText:o.markup,lines:o.lines,error:o.error})}tokenize(e){if("object"!=typeof e)return console.error("tokenize() expects object type properties only. Got '"+typeof e+"' type instead.");const t=this.props.locale||Hs,n=this.newSpan;if("nodeType"in e){const v=e.cloneNode(!0);if(!v.hasChildNodes())return"";const M=v.childNodes;let w={tokens_unknown:[],tokens_proto:[],tokens_split:[],tokens_fallback:[],tokens_normalize:[],tokens_merge:[],tokens_plainText:"",indented:"",json:"",jsObject:void 0,markup:""};for(var r=0;r<M.length;r++){let e=M[r],t={};switch(e.nodeName){case"SPAN":t={string:e.textContent,type:e.attributes.type.textContent},w.tokens_unknown.push(t);break;case"DIV":w.tokens_unknown.push({string:e.textContent,type:"unknown"});break;case"BR":""===e.textContent&&w.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":w.tokens_unknown.push({string:e.wholeText,type:"unknown"});break;case"FONT":w.tokens_unknown.push({string:e.textContent,type:"unknown"});break;default:console.error("Unrecognized node:",{child:e})}}function a(e,t=""){let n={active:!1,string:"",number:"",symbol:"",space:"",delimiter:"",quarks:[]};function r(e,r){switch(r){case"symbol":case"delimiter":n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e;break;default:r!==n.active||[n.string,e].indexOf("\n")>-1?(n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e):n[r]+=e}}for(var a=0;a<e.length;a++){const t=e.charAt(a);switch(t){case'"':case"'":r(t,"delimiter");break;case" ":case" ":r(t,"space");break;case"{":case"}":case"[":case"]":case":":case",":r(t,"symbol");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":"string"===n.active?r(t,"string"):r(t,"number");break;case"-":if(a<e.length-1&&"0123456789".indexOf(e.charAt(a+1))>-1){r(t,"number");break}case".":if(a<e.length-1&&a>0&&"0123456789".indexOf(e.charAt(a+1))>-1&&"0123456789".indexOf(e.charAt(a-1))>-1){r(t,"number");break}default:r(t,"string")}}return n.active&&(n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=!1),n.quarks}for(r=0;r<w.tokens_unknown.length;r++){let e=w.tokens_unknown[r];w.tokens_proto=w.tokens_proto.concat(a(e.string,"proto"))}function i(e,t){let n="",r="",a=!1;switch(t){case"primitive":if(-1===["true","false","null","undefined"].indexOf(e))return!1;break;case"string":if(e.length<2)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),-1===(a="'\"".indexOf(n)))return!1;if(n!==r)return!1;for(var i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-1))return!1;break;case"key":if(0===e.length)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),(a="'\"".indexOf(n))>-1){if(1===e.length)return!1;if(n!==r)return!1;for(i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^  ";for(i=0;i<t.length;i++){const n=t.charAt(i);if(e.indexOf(n)>-1)return!1}}break;case"number":for(i=0;i<e.length;i++)if(-1==="0123456789".indexOf(e.charAt(i)))if(0===i){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(i))return!1;break;case"symbol":if(e.length>1)return!1;if(-1==="{[:]},".indexOf(e))return!1;break;case"colon":if(e.length>1)return!1;if(":"!==e)return!1;break;default:return!0}return!0}for(r=0;r<w.tokens_proto.length;r++){let e=w.tokens_proto[r];-1===e.type.indexOf("proto")?i(e.string,e.type)?w.tokens_split.push(e):w.tokens_split=w.tokens_split.concat(a(e.string,"split")):w.tokens_split.push(e)}for(r=0;r<w.tokens_split.length;r++){let e=w.tokens_split[r],t=e.type,n=e.string,a=n.length,i=[];t.indexOf("-")>-1&&("string"!==(t=t.slice(t.indexOf("-")+1))&&i.push("string"),i.push("key"),i.push("error"));let o={string:n,length:a,type:t,fallback:i};w.tokens_fallback.push(o)}function o(){const e=w.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=w.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let k={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<w.tokens_fallback.length;r++){let e=w.tokens_fallback[r];const t=e.type,n=e.string;let a={type:t,string:n};switch(t){case"symbol":case"colon":if(k.stringOpen){k.isValue?a.type="string":a.type="key";break}switch(n){case"[":case"{":k.brackets.push(n),k.isValue="["===k.brackets[k.brackets.length-1];break;case"]":case"}":k.brackets.pop(),k.isValue="["===k.brackets[k.brackets.length-1];break;case",":if("colon"===o().type)break;k.isValue="["===k.brackets[k.brackets.length-1];break;case":":a.type="colon",k.isValue=!0}break;case"delimiter":if(k.isValue?a.type="string":a.type="key",!k.stringOpen){k.stringOpen=n;break}if(r>0){const e=w.tokens_fallback[r-1],t=e.string,n=e.type,a=t.charAt(t.length-1);if("string"===n&&"\\"===a)break}if(k.stringOpen===n){k.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(n)>-1){const e=w.tokens_normalize.length-1;if(e>=0){if("string"!==w.tokens_normalize[e].type){a.type="primitive";break}a.type="string";break}a.type="primitive";break}if("\n"===n&&!k.stringOpen){a.type="linebreak";break}k.isValue?a.type="string":a.type="key";break;case"space":case"number":k.stringOpen&&(k.isValue?a.type="string":a.type="key")}w.tokens_normalize.push(a)}for(r=0;r<w.tokens_normalize.length;r++){const e=w.tokens_normalize[r];let t={string:e.string,type:e.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(e.type)&&r+1<w.tokens_normalize.length){let n=0;for(var s=r+1;s<w.tokens_normalize.length;s++){const r=w.tokens_normalize[s];if(e.type!==r.type)break;t.string+=r.string,t.tokens.push(s),n++}r+=n}w.tokens_merge.push(t)}const L="'\"",Y="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var l=!1,u=w.tokens_merge.length>0?1:0;function c(e,t,n=0){l={token:e,line:u,reason:t},w.tokens_merge[e+n].type="error"}function d(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),e===w.tokens_merge.length-1)return!1;for(var n=e+1;n<w.tokens_merge.length;n++){const e=w.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1&&n;default:return!1}}return!1}function m(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),0===e)return!1;for(var n=e-1;n>=0;n--){const e=w.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1;default:return!1}}return!1}function p(e){if(void 0===e&&console.error("tokenID argument must be an integer."),0===e)return!1;for(var t=e-1;t>=0;t--){const e=w.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}k={brackets:[],stringOpen:!1,isValue:!1};let D=[];for(r=0;r<w.tokens_merge.length&&!l;r++){let e=w.tokens_merge[r],n=e.string,a=e.type,i=!1;switch(a){case"space":break;case"linebreak":u++;break;case"symbol":switch(n){case"{":case"[":if(i=m(r,["}","]"])){c(r,Cs(t.invalidToken.tokenSequence.prohibited,{firstToken:w.tokens_merge[i].string,secondToken:n}));break}if("["===n&&r>0&&!m(r,[":","[",","])){c(r,Cs(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&m(r,["{"])){c(r,Cs(t.invalidToken.double,{token:"{"}));break}k.brackets.push(n),k.isValue="["===k.brackets[k.brackets.length-1],D.push({i:r,line:u,string:n});break;case"}":case"]":if("}"===n&&"{"!==k.brackets[k.brackets.length-1]){c(r,Cs(t.brace.curly.missingOpen));break}if("}"===n&&m(r,[","])){c(r,Cs(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==k.brackets[k.brackets.length-1]){c(r,Cs(t.brace.square.missingOpen));break}if("]"===n&&m(r,[":"])){c(r,Cs(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}k.brackets.pop(),k.isValue="["===k.brackets[k.brackets.length-1],D.push({i:r,line:u,string:n});break;case",":if(i=m(r,["{"])){if(d(r,["}"])){c(r,Cs(t.brace.curly.cannotWrap,{token:","}));break}c(r,Cs(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Cs(t.noTrailingOrLeadingComma));break}switch(i=p(r)){case"key":case"colon":c(r,Cs(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===i?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(m(r,["{"])){c(r,Cs(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}k.isValue="["===k.brackets[k.brackets.length-1]}w.json+=n;break;case"colon":if((i=m(r,["["]))&&d(r,["]"])){c(r,Cs(t.brace.square.cannotWrap,{token:":"}));break}if(i){c(r,Cs(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==p(r)){c(r,Cs(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Cs(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}k.isValue=!0,w.json+=n;break;case"key":case"string":let e=n.charAt(0),o=n.charAt(n.length-1);L.indexOf(e);if(-1===L.indexOf(e)&&-1!==L.indexOf(o)){c(r,Cs(t.string.missingOpen,{quote:e}));break}if(-1===L.indexOf(o)&&-1!==L.indexOf(e)){c(r,Cs(t.string.missingClose,{quote:e}));break}if(L.indexOf(e)>-1&&e!==o){c(r,Cs(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===L.indexOf(e)&&-1===L.indexOf(o)){c(r,Cs(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Cs(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===L.indexOf(e)&&-1===L.indexOf(o))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===Y.indexOf(e)){c(r,Cs(t.string.nonAlphanumeric,{token:e}));break}}if("'"===e?n='"'+n.slice(1,-1)+'"':'"'!==e&&(n='"'+n+'"'),"key"===a&&"key"===p(r)){if(r>0&&!isNaN(w.tokens_merge[r-1])){w.tokens_merge[r-1]+=w.tokens_merge[r],c(r,Cs(t.key.numberAndLetterMissingQuotes));break}c(r,Cs(t.key.spaceMissingQuotes));break}if("key"===a&&!m(r,["{",","])){c(r,Cs(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!m(r,["[",":",","])){c(r,Cs(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&k.isValue){c(r,Cs(t.string.unexpectedKey));break}if("string"===a&&!k.isValue){c(r,Cs(t.key.unexpectedString));break}w.json+=n;break;case"number":case"primitive":if(m(r,["{"]))w.tokens_merge[r].type="key",a=w.tokens_merge[r].type,n='"'+n+'"';else if("key"===p(r))w.tokens_merge[r].type="key",a=w.tokens_merge[r].type;else if(!m(r,["[",":",","])){c(r,Cs(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}"key"!==a&&(k.isValue||(w.tokens_merge[r].type="key",a=w.tokens_merge[r].type,n='"'+n+'"')),"primitive"===a&&"undefined"===n&&c(r,Cs(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),w.json+=n}}let T="";for(r=0;r<w.json.length;r++){let e=w.json.charAt(r),t="";r+1<w.json.length&&(t=w.json.charAt(r+1),"\\"===e&&"'"===t)?(T+=t,r++):T+=e}if(w.json=T,!l){const e=Math.ceil(D.length/2);let n=0,r=!1;function _(e){D.splice(e+1,1),D.splice(e,1),r||(r=!0)}for(;D.length>0;){r=!1;for(var f=0;f<D.length-1;f++){const e=D[f].string+D[f+1].string;["[]","{}"].indexOf(e)>-1&&_(f)}if(n++,!r)break;if(n>=e)break}if(D.length>0){const e=D[0].string,n=D[0].i,r="["===e?"]":"}";u=D[0].line,c(n,Cs(t.brace["]"===r?"square":"curly"].missingClose))}}if(!l&&-1===[void 0,""].indexOf(w.json))try{w.jsObject=JSON.parse(w.json)}catch(e){const n=e.message,r=n.indexOf("position");if(-1===r)throw new Error("Error parsing failed");const a=n.substring(r+9,n.length),i=parseInt(a);let o=0,s=0,d=!1,m=1,p=!1;for(;o<i&&!p&&("linebreak"===(d=w.tokens_merge[s]).type&&m++,-1===["space","linebreak"].indexOf(d.type)&&(o+=d.string.length),!(o>=i));)s++,w.tokens_merge[s+1]||(p=!0);u=m;let h=0;for(let e=0;e<d.string.length;e++){const n=d.string.charAt(e);"\\"===n?h=h>0?h+1:1:(h%2==0&&0!==h||-1==="'\"bfnrt".indexOf(n)&&c(s,Cs(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Cs(t.invalidToken.unexpected,{token:d.string}))}let S=1,O=0;function y(e=!1){return function(e=!1){return S++,O>0||e?"<br>":""}(e)+function(){for(var e=[],t=0;t<2*O;t++)e.push("&nbsp;");return e.join("")}()}if(!l)for(r=0;r<w.tokens_merge.length;r++){const e=w.tokens_merge[r],t=e.string;switch(e.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":w.markup+=(m(r,[",","["])?y():"")+n(r,e,O);break;case"key":w.markup+=y()+n(r,e,O);break;case"colon":w.markup+=n(r,e,O)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":w.markup+=(m(r,[":"])?"":y())+n(r,e,O),O++;break;case"]":case"}":O--;const t=r===w.tokens_merge.length-1,a=r>0?["[","{"].indexOf(w.tokens_merge[r-1].string)>-1?"":y(t):"";w.markup+=a+n(r,e,O);break;case",":w.markup+=n(r,e,O)}}}if(l){let e=1;function g(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}S=1;for(r=0;r<w.tokens_merge.length;r++){const t=w.tokens_merge[r],a=t.type,i=t.string;"linebreak"===a&&S++,w.markup+=n(r,t,O),e+=g(i)}++S<++e&&(S=e)}for(r=0;r<w.tokens_merge.length;r++){let e=w.tokens_merge[r];w.indented+=e.string,-1===["space","linebreak"].indexOf(e.type)&&(w.tokens_plainText+=e.string)}if(l){"modifyErrorText"in this.props&&((b=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(b)&&(l.reason=this.props.modifyErrorText(l.reason)))}return{tokens:w.tokens_merge,noSpaces:w.tokens_plainText,indented:w.indented,json:w.json,jsObject:w.jsObject,markup:w.markup,lines:S,error:l}}var b;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function v(){return"\\"===t.currentChar&&(t.inputText=(e=t.inputText,n=t.position,e.slice(0,n)+e.slice(n+1)),!0);var e,n}function M(){if(-1==="'\"".indexOf(t.currentChar))return!1;if(!t.stringOpen)return k(),t.stringStart=t.position,t.stringOpen=t.currentChar,!0;if(t.stringOpen===t.currentChar){return k(),L(t.inputText.substring(t.stringStart,t.position+1)),t.stringOpen=!1,!0}return!1}function w(){if(-1===":,{}[]".indexOf(t.currentChar))return!1;if(t.stringOpen)return!1;switch(k(),L(t.currentChar),t.currentChar){case":":return t.isValue=!0,!0;case"{":case"[":t.brackets.push(t.currentChar);break;case"}":case"]":t.brackets.pop()}return":"!==t.currentChar&&(t.isValue="["===t.brackets[t.brackets.length-1]),!0}function k(){return 0!==t.tokenSecondary.length&&(t.tokens.push(t.tokenSecondary),t.tokenSecondary="",!0)}function L(e){return 0!==e.length&&(t.tokens.push(e),!0)}for(r=0;r<t.inputText.length;r++){t.position=r,t.currentChar=t.inputText.charAt(t.position);const e=w(),n=M(),a=v();e||n||a||t.stringOpen||(t.tokenSecondary+=t.currentChar)}let a={brackets:[],isValue:!1,tokens:[]};a.tokens=t.tokens.map(e=>{let t="",n="",r="";switch(e){case",":t="symbol",n=e,r=e,a.isValue="["===a.brackets[a.brackets.length-1];break;case":":t="symbol",n=e,r=e,a.isValue=!0;break;case"{":case"[":t="symbol",n=e,r=e,a.brackets.push(e),a.isValue="["===a.brackets[a.brackets.length-1];break;case"}":case"]":t="symbol",n=e,r=e,a.brackets.pop(),a.isValue="["===a.brackets[a.brackets.length-1];break;case"undefined":t="primitive",n=e,r=void 0;break;case"null":t="primitive",n=e,r=null;break;case"false":t="primitive",n=e,r=!1;break;case"true":t="primitive",n=e,r=!0;break;default:const o=e.charAt(0);if("'\"".indexOf(o)>-1){if("key"===(t=a.isValue?"string":"key")&&(n=function(e){if(0===e.length)return e;if(['""',"''"].indexOf(e)>-1)return"''";let t=!1;for(var n=0;n<2;n++)if([e.charAt(0),e.charAt(e.length-1)].indexOf(['"',"'"][n])>-1){t=!0;break}t&&e.length>=2&&(e=e.slice(1,-1));const r=e.replace(/\w/g,""),a=(e.replace(/\W+/g,""),((e,t)=>{let n=!1;for(var r=0;r<t.length&&(0!==r||!isNaN(t.charAt(r)));r++)if(isNaN(t.charAt(r))){n=!0;break}return!(e.length>0||n)})(r,e));if((e=>{for(var t=0;t<e.length;t++)if(["'",'"'].indexOf(e.charAt(t))>-1)return!0;return!1})(r)){let t="";const n=e.split("");for(var i=0;i<n.length;i++){let e=n[i];["'",'"'].indexOf(e)>-1&&(e="\\"+e),t+=e}e=t}return a?e:"'"+e+"'"}(e)),"string"===t){n="";const t=e.slice(1,-1).split("");for(var i=0;i<t.length;i++){let e=t[i];"'\"".indexOf(e)>-1&&(e="\\"+e),n+=e}n="'"+n+"'"}r=n;break}if(!isNaN(e)){t="number",n=e,r=Number(e);break}if(e.length>0&&!a.isValue){t="key",(n=e).indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:a.brackets.length}});let i="";for(r=0;r<a.tokens.length;r++){i+=a.tokens[r].string}function Y(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let o="";for(r=0;r<a.tokens.length;r++){let e=a.tokens[r];switch(e.string){case"[":case"{":const t=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(t.string)?o+=e.string+Y(e.depth):o+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?o+=Y(e.depth)+e.string:o+=e.string;break;case":":o+=e.string+" ";break;case",":o+=e.string+Y(e.depth);break;default:o+=e.string}}let s=1;function D(e){var t=[];e>0&&s++;for(var n=0;n<2*e;n++)t.push("&nbsp;");return(e>0?"<br>":"")+t.join("")}let l="";const u=a.tokens.length-1;for(r=0;r<a.tokens.length;r++){let e=a.tokens[r],t=n(r,e,e.depth);switch(e.string){case"{":case"[":const n=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(n.string)?l+=t+D(e.depth):l+=t;break;case"}":case"]":const i=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(i.string)?l+=D(e.depth)+(u===r?"<br>":"")+t:l+=t;break;case":":l+=t+" ";break;case",":l+=t+D(e.depth);break;default:l+=t}}return s+=2,{tokens:a.tokens,noSpaces:i,indented:o,json:JSON.stringify(e),jsObject:e,markup:l,lines:s}}}},As=n(133),zs=n.n(As);function Fs(e){return(Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ws(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ns(e){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Is(e,t){return(Is=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Bs=wp.i18n.__,Us=wp.element.Component,Vs=wp.components,Js=Vs.ExternalLink,Gs=Vs.PanelBody,qs=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Fs(t)&&"function"!=typeof t?Rs(e):t}(this,Ns(t).apply(this,arguments))).isValidJSON=e.isValidJSON.bind(Rs(e)),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Is(e,t)}(t,e),n=t,(r=[{key:"isValidJSON",value:function(e){try{JSON.parse(e)}catch(e){return!1}return!0}},{key:"render",value:function(){var e,t=this,n=this.props.chart["visualizer-settings"];return e=0<=["gauge","table","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?this.props.chart["visualizer-chart-type"]:"".concat(this.props.chart["visualizer-chart-type"],"chart"),wp.element.createElement(Gs,{title:Bs("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,Bs("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(Js,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},Bs("Google Visualization API"))),wp.element.createElement(Ps,{locale:zs.a,theme:"light_mitsuketa_tribute",placeholder:K(n.manual)?JSON.parse(n.manual):{},width:"100%",height:"250px",style:{errorMessage:{height:"100%",fontSize:"10px"},container:{border:"1px solid #ddd",boxShadow:"inset 0 1px 2px rgba(0,0,0,.07)"},labelColumn:{background:"#F5F5F5",width:"auto",padding:"5px 10px 5px 10px"}},onChange:function(e){!1===e.error&&(n.manual=e.json,t.props.edit(n))}}))}}])&&Ws(n.prototype,r),a&&Ws(n,a),t}(Us);function $s(e){return($s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zs(e,t){return!t||"object"!==$s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qs(e){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xs(e,t){return(Xs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var el=wp.element,tl=el.Component,nl=el.Fragment,rl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Zs(this,Qs(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xs(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"];return wp.element.createElement(nl,null,wp.element.createElement(qt,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(mn,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(On,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(nl,null,wp.element.createElement(Jn,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ir,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(br,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(jr,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Vr,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(nl,null,wp.element.createElement(aa,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ya,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ja,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ba,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(ii,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(gi,{chart:this.props.chart,edit:this.props.edit}),0<=["table","dataTable"].indexOf(e)&&wp.element.createElement(nl,null,wp.element.createElement(Ci,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(qi,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(io,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","gauge","geo","pie","dataTable"].indexOf(e)&&wp.element.createElement(ko,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Ao,{chart:this.props.chart,edit:this.props.edit}),0<=["dataTable"].indexOf(e)&&wp.element.createElement(Ko,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(ps,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ds,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(qs,{chart:this.props.chart,edit:this.props.edit}))}}])&&Ks(n.prototype,r),a&&Ks(n,a),t}(tl);function al(e){return(al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function il(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ol(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){il(i,r,a,o,s,"next",e)}function s(e){il(i,r,a,o,s,"throw",e)}o(void 0)}))}}function sl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ll(e){return(ll=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cl(e,t){return(cl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var dl=wp.i18n.__,ml=wp.apiFetch,pl=wp.element,hl=pl.Component,_l=pl.Fragment,fl=wp.components,yl=fl.Button,gl=fl.PanelBody,bl=fl.SelectControl,vl=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==al(t)&&"function"!=typeof t?ul(e):t}(this,ll(t).apply(this,arguments))).getPermissionData=e.getPermissionData.bind(ul(e)),e.state={users:[],roles:[]},e}var n,r,a,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cl(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=ol(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=14;break}if(void 0===(t=this.props.chart["visualizer-permissions"]).permissions){e.next=14;break}if(void 0===t.permissions.read||void 0===t.permissions.edit){e.next=14;break}if("users"!==t.permissions.read&&"users"!==t.permissions.edit){e.next=9;break}return e.next=7,ml({path:"/visualizer/v1/get-permission-data?type=users"});case 7:n=e.sent,this.setState({users:n});case 9:if("roles"!==t.permissions.read&&"roles"!==t.permissions.edit){e.next=14;break}return e.next=12,ml({path:"/visualizer/v1/get-permission-data?type=roles"});case 12:r=e.sent,this.setState({roles:r});case 14:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPermissionData",value:(i=ol(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=11;break}if("users"!==t||0!==this.state.users.length){e.next=6;break}return e.next=4,ml({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 4:n=e.sent,this.setState({users:n});case 6:if("roles"!==t||0!==this.state.roles.length){e.next=11;break}return e.next=9,ml({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 9:r=e.sent,this.setState({roles:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"render",value:function(){var e,t=this;return"business"===visualizerLocalize.isPro&&(e=this.props.chart["visualizer-permissions"]),wp.element.createElement(_l,null,"business"===visualizerLocalize.isPro?wp.element.createElement(gl,{title:dl("Who can see this chart?"),initialOpen:!1},wp.element.createElement(bl,{label:dl("Select who can view the chart on the front-end."),value:e.permissions.read,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.read=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.read||"roles"===e.permissions.read)&&wp.element.createElement(bl,{multiple:!0,value:e.permissions["read-specific"],options:"users"===e.permissions.read&&this.state.users||"roles"===e.permissions.read&&this.state.roles,onChange:function(n){e.permissions["read-specific"]=n,t.props.edit(e)}})):wp.element.createElement(gl,{title:dl("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,dl("Enable this feature in BUSINESS version!")),wp.element.createElement(yl,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},dl("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(gl,{title:dl("Who can edit this chart?"),initialOpen:!1},wp.element.createElement(bl,{label:dl("Select who can edit the chart on the front-end."),value:e.permissions.edit,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.edit=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.edit||"roles"===e.permissions.edit)&&wp.element.createElement(bl,{multiple:!0,value:e.permissions["edit-specific"],options:"users"===e.permissions.edit&&this.state.users||"roles"===e.permissions.edit&&this.state.roles,onChange:function(n){e.permissions["edit-specific"]=n,t.props.edit(e)}})):wp.element.createElement(gl,{title:dl("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,dl("Enable this feature in BUSINESS version!")),wp.element.createElement(yl,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},dl("Buy Now"))))}}])&&sl(n.prototype,r),a&&sl(n,a),t}(hl),Ml=n(134),wl=n.n(Ml),kl=wp.components,Ll=kl.Button,Yl=kl.Dashicon,Dl=kl.G,Tl=kl.Path,Sl=kl.SVG;var Ol=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,i=e.onClick,o=wl()("components-panel__body","components-panel__body-button",r,{"visualizer-panel-back":a});return wp.element.createElement("div",{className:o},wp.element.createElement("h2",{className:"components-panel__body-title"},wp.element.createElement(Ll,{className:"components-panel__body-toggle",onClick:i},wp.element.createElement(Sl,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Dl,null,wp.element.createElement(Tl,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(Dl,null,wp.element.createElement(Tl,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(Yl,{icon:n,className:"components-panel__icon"}),t)))},xl=n(3),jl=n.n(xl);function El(e){return(El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hl(e,t){return!t||"object"!==El(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pl(e){return(Pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Al(e,t){return(Al=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zl=lodash.startCase,Fl=wp.i18n.__,Wl=wp.element,Nl=Wl.Component,Rl=Wl.Fragment,Il=wp.editor.InspectorControls,Bl=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Hl(this,Pl(t).apply(this,arguments))).state={route:"home"},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Al(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t=this,n=V(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===n["visualizer-chart-type"]?n["visualizer-chart-type"]:zl(this.props.chart["visualizer-chart-type"]):"".concat(zl(this.props.chart["visualizer-chart-type"]),"Chart"),wp.element.createElement(Rl,null,"home"===this.state.route&&wp.element.createElement(Il,null,wp.element.createElement(Oe,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(Be,{chart:this.props.chart,editURL:this.props.editURL,isLoading:this.props.isLoading,uploadData:this.props.uploadData,editSchedule:this.props.editSchedule}),wp.element.createElement(st,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(Ct,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Ol,{label:Fl("Advanced Options"),icon:"admin-tools",onClick:function(){return t.setState({route:"showAdvanced"})}}),wp.element.createElement(Ol,{label:Fl("Chart Permissions"),icon:"admin-users",onClick:function(){return t.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(Il,null,wp.element.createElement(Ol,{label:Fl("Chart Settings"),onClick:function(){return t.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(rl,{chart:this.props.chart,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(vl,{chart:this.props.chart,edit:this.props.editPermissions})),wp.element.createElement("div",{className:"visualizer-settings__chart"},null!==this.props.chart&&"dataTable"===e?wp.element.createElement(N,{id:this.props.id,rows:n["visualizer-data"],columns:n["visualizer-series"],options:n["visualizer-settings"]}):wp.element.createElement(O,{chartType:e,rows:n["visualizer-data"],columns:n["visualizer-series"],options:K(this.props.chart["visualizer-settings"].manual)?jl()(G(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):G(this.props.chart["visualizer-settings"]),height:"500px"})))}}])&&Cl(n.prototype,r),a&&Cl(n,a),t}(Nl);function Ul(e){return(Ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jl(e,t){return!t||"object"!==Ul(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gl(e){return(Gl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ql(e,t){return(ql=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $l=lodash.startCase,Kl=wp.i18n.__,Zl=wp.element,Ql=Zl.Component,Xl=Zl.Fragment,eu=wp.components,tu=eu.Button,nu=eu.Dashicon,ru=eu.Toolbar,au=eu.Tooltip,iu=wp.editor.BlockControls,ou=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Jl(this,Gl(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ql(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t=V(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===t["visualizer-chart-type"]?t["visualizer-chart-type"]:$l(this.props.chart["visualizer-chart-type"]):"".concat($l(this.props.chart["visualizer-chart-type"]),"Chart"),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(Xl,null,wp.element.createElement(iu,{key:"toolbar-controls"},wp.element.createElement(ru,{className:"components-toolbar"},wp.element.createElement(au,{text:Kl("Edit Chart")},wp.element.createElement(tu,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(nu,{icon:"edit"}))))),"dataTable"===e?wp.element.createElement(N,{id:this.props.id,rows:t["visualizer-data"],columns:t["visualizer-series"],options:t["visualizer-settings"]}):wp.element.createElement(O,{chartType:e,rows:t["visualizer-data"],columns:t["visualizer-series"],options:K(this.props.chart["visualizer-settings"].manual)?jl()(G(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):G(this.props.chart["visualizer-settings"]),height:"500px"})))}}])&&Vl(n.prototype,r),a&&Vl(n,a),t}(Ql);function su(e){return(su="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lu(n,!0).forEach((function(t){cu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lu(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function du(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function mu(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){du(i,r,a,o,s,"next",e)}function s(e){du(i,r,a,o,s,"throw",e)}o(void 0)}))}}function pu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hu(e){return(hu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fu(e,t){return(fu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var yu=wp.i18n.__,gu=wp,bu=gu.apiFetch,vu=gu.apiRequest,Mu=wp.element,wu=Mu.Component,ku=Mu.Fragment,Lu=wp.components,Yu=Lu.Button,Du=Lu.ButtonGroup,Tu=Lu.Dashicon,Su=Lu.Placeholder,Ou=Lu.Spinner,xu=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==su(t)&&"function"!=typeof t?_u(e):t}(this,hu(t).apply(this,arguments))).getChart=e.getChart.bind(_u(e)),e.editChart=e.editChart.bind(_u(e)),e.editSettings=e.editSettings.bind(_u(e)),e.editPermissions=e.editPermissions.bind(_u(e)),e.readUploadedFile=e.readUploadedFile.bind(_u(e)),e.editURL=e.editURL.bind(_u(e)),e.editSchedule=e.editSchedule.bind(_u(e)),e.uploadData=e.uploadData.bind(_u(e)),e.getChartData=e.getChartData.bind(_u(e)),e.editChartData=e.editChartData.bind(_u(e)),e.updateChart=e.updateChart.bind(_u(e)),e.state={route:e.props.attributes.route?e.props.attributes.route:"home",chart:null,isModified:!1,isLoading:!1,isScheduled:!1},e}var n,r,a,i,o,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fu(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(s=mu(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.attributes.id){e.next=5;break}return e.next=3,bu({path:"wp/v2/visualizer/".concat(this.props.attributes.id)});case 3:t=e.sent,this.setState({chart:t.chart_data});case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getChart",value:(o=mu(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChart"});case 2:return e.next=4,bu({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,this.setState({route:"chartSelect",chart:n.chart_data,isLoading:!1}),this.props.setAttributes({id:t,route:"chartSelect"});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"editChart",value:function(){this.setState({route:"chartSelect"}),this.props.setAttributes({route:"chartSelect"})}},{key:"editSettings",value:function(e){var t=uu({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=uu({},this.state.chart);t["visualizer-permissions"]=e,this.setState({chart:t,isModified:!0})}},{key:"readUploadedFile",value:function(e){var t=this,n=e.current.files[0],r=new FileReader;r.onload=function(){var e=function(e,t){t=t||",";for(var n=new RegExp("(\\"+t+"|\\r?\\n|\\r|^)(?:'([^']*(?:''[^']*)*)'|([^'\\"+t+"\\r\\n]*))","gi"),r=[[]],a=null;a=n.exec(e);){var i=a[1];i.length&&i!==t&&r.push([]);var o=void 0;o=a[2]?a[2].replace(new RegExp("''","g"),"'"):a[3],r[r.length-1].push(o)}return r}(r.result);t.editChartData(e,"Visualizer_Source_Csv")},r.readAsText(n)}},{key:"editURL",value:function(e){var t=uu({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=uu({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t})}},{key:"uploadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setState({isLoading:"uploadData",isScheduled:t}),vu({path:"/visualizer/v1/upload-data?url=".concat(this.state.chart["visualizer-chart-url"]),method:"POST"}).then((function(t){if(2<=Object.keys(t).length){var n=uu({},e.state.chart);n["visualizer-source"]="Visualizer_Source_Csv_Remote",n["visualizer-default-data"]=0,n["visualizer-series"]=t.series,n["visualizer-data"]=t.data;var r=n["visualizer-series"],a=n["visualizer-settings"],i=r,o="series";return"pie"===n["visualizer-chart-type"]&&(i=n["visualizer-data"],o="slices"),i.map((function(e,t){if("pie"===n["visualizer-chart-type"]||0!==t){var r="pie"!==n["visualizer-chart-type"]?t-1:t;void 0===a[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?i.length-1:i.length)})),n["visualizer-settings"]=a,e.setState({chart:n,isModified:!0,isLoading:!1}),t}e.setState({isLoading:!1})}),(function(t){return e.setState({isLoading:!1}),t}))}},{key:"getChartData",value:(i=mu(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChartData"});case 2:return e.next=4,bu({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=uu({},this.state.chart))["visualizer-source"]="Visualizer_Source_Csv",r["visualizer-default-data"]=0,r["visualizer-series"]=n.chart_data["visualizer-series"],r["visualizer-data"]=n.chart_data["visualizer-data"],this.setState({isLoading:!1,chart:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"editChartData",value:function(e,t){var n=uu({},this.state.chart),r=[],a=uu({},n["visualizer-settings"]);e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var i=r,o="series";"pie"===n["visualizer-chart-type"]&&(i=e,o="slices"),i.map((function(e,t){if("pie"===n["visualizer-chart-type"]||0!==t){var r="pie"!==n["visualizer-chart-type"]?t-1:t;void 0===a[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?i.length-1:i.length)})),n["visualizer-source"]=t,n["visualizer-default-data"]=0,n["visualizer-data"]=e,n["visualizer-series"]=r,n["visualizer-settings"]=a,n["visualizer-chart-url"]="",this.setState({chart:n,isModified:!0,isScheduled:!1})}},{key:"updateChart",value:function(){var e=this;this.setState({isLoading:"updateChart"});var t=this.state.chart;!1===this.state.isScheduled&&(t["visualizer-chart-schedule"]="");var n="series";"pie"===t["visualizer-chart-type"]&&(n="slices"),Object.keys(t["visualizer-settings"][n]).map((function(e){void 0!==t["visualizer-settings"][n][e]&&void 0!==t["visualizer-settings"][n][e].temp&&delete t["visualizer-settings"][n][e].temp})),vu({path:"/visualizer/v1/update-chart?id=".concat(this.props.attributes.id),method:"POST",data:t}).then((function(t){return e.setState({isLoading:!1,isModified:!1}),t}),(function(e){return e}))}},{key:"render",value:function(){var e=this;return"renderChart"===this.state.route&&null!==this.state.chart?wp.element.createElement(ou,{id:this.props.attributes.id,chart:this.state.chart,className:this.props.className,editChart:this.editChart}):wp.element.createElement("div",{className:"visualizer-settings"},wp.element.createElement("div",{className:"visualizer-settings__title"},wp.element.createElement(Tu,{icon:"chart-pie"}),yu("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},yu("Make a new chart or display an existing one?")),wp.element.createElement("a",{href:visualizerLocalize.adminPage,target:"_blank",className:"visualizer-settings__content-option"},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},yu("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Tu,{icon:"arrow-right-alt2"}))),wp.element.createElement("div",{className:"visualizer-settings__content-option",onClick:function(){e.setState({route:"showCharts"}),e.props.setAttributes({route:"showCharts"})}},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},yu("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Tu,{icon:"arrow-right-alt2"})))),("getChart"===this.state.isLoading||"chartSelect"===this.state.route&&null===this.state.chart||"renderChart"===this.state.route&&null===this.state.chart)&&wp.element.createElement(Su,null,wp.element.createElement(Ou,null)),"showCharts"===this.state.route&&!1===this.state.isLoading&&wp.element.createElement(ye,{getChart:this.getChart}),"chartSelect"===this.state.route&&null!==this.state.chart&&wp.element.createElement(Bl,{id:this.props.attributes.id,chart:this.state.chart,editSettings:this.editSettings,editPermissions:this.editPermissions,url:this.state.url,readUploadedFile:this.readUploadedFile,editURL:this.editURL,editSchedule:this.editSchedule,uploadData:this.uploadData,getChartData:this.getChartData,editChartData:this.editChartData,isLoading:this.state.isLoading}),wp.element.createElement("div",{className:"visualizer-settings__controls"},("showCharts"===this.state.route||"chartSelect"===this.state.route)&&wp.element.createElement(Du,null,wp.element.createElement(Yu,{isDefault:!0,isLarge:!0,onClick:function(){var t;"showCharts"===e.state.route?t="home":"chartSelect"===e.state.route&&(t="showCharts"),e.setState({route:t}),e.props.setAttributes({route:t})}},yu("Back")),"chartSelect"===this.state.route&&wp.element.createElement(ku,null,!1===this.state.isModified?wp.element.createElement(Yu,{isDefault:!0,isLarge:!0,onClick:function(){e.setState({route:"renderChart"}),e.props.setAttributes({route:"renderChart"})}},yu("Done")):wp.element.createElement(Yu,{isPrimary:!0,isLarge:!0,isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},yu("Save"))))))}}])&&pu(n.prototype,r),a&&pu(n,a),t}(wu),ju=(n(153),wp.i18n.__),Eu=wp.blocks.registerBlockType;t.default=Eu("visualizer/chart",{title:ju("Visualizer Chart"),description:ju("A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages."),category:"common",icon:"chart-pie",keywords:[ju("Visualizer"),ju("Chart"),ju("Google Charts")],attributes:{id:{type:"number"},route:{type:"string"}},supports:{customClassName:!1},edit:xu,save:function(){return null}})}]);
1
+ !function(e){function t(t){for(var r,o,s=t[0],l=t[1],u=t[2],d=0,m=[];d<s.length;d++)o=s[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&m.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(c&&c(t);m.length;)m.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={1:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var c=l;i.push([154,0]),n()}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Et(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function _(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function f(e){var t=p(NaN);return null!=e?m(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var y=a.momentProperties=[];function g(e,t){var n,r,a;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),y.length>0)for(n=0;n<y.length;n++)s(a=t[r=y[n]])||(e[r]=a);return e}var b=!1;function v(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,a.updateOffset(this),b=!1)}function M(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function L(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&k(e[r])!==k(t[r]))&&o++;return o+i}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){for(var r,i=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];i.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var T,S={};function O(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),S[e]||(Y(t),S[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function j(e,t){var n,r=m({},e);for(n in t)d(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&o(e[n])&&(r[n]=m({},r[n]));return r}function E(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var C={};function H(e,t){var n=e.toLowerCase();C[n]=C[n+"s"]=C[t]=e}function P(e){return"string"==typeof e?C[e]||C[e.toLowerCase()]:void 0}function A(e){var t,n,r={};for(n in e)d(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var z={};function F(e,t){z[e]=t}function W(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function U(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(B[e]=a),t&&(B[t[0]]=function(){return W(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function V(e,t){return e.isValid()?(t=J(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(N);for(t=0,n=a.length;t<n;t++)B[a[t]]?a[t]=B[a[t]]:a[t]=(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=x(a[r])?a[r].call(t,e):a[r];return i}}(t),I[t](e)):e.localeData().invalidDate()}function J(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(R.lastIndex=0;n>=0&&R.test(e);)e=e.replace(R,r),R.lastIndex=0,n-=1;return e}var G=/\d/,q=/\d\d/,$=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ae=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,t,n){ue[e]=x(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=k(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function _e(e,t){he(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function fe(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}var ye=0,ge=1,be=2,ve=3,Me=4,we=5,ke=6,Le=7,Ye=8;function De(e){return Te(e)?366:365}function Te(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),H("year","y"),F("year",1),ce("Y",ie),ce("YY",Q,q),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),he(["YYYYY","YYYYYY"],ye),he("YYYY",(function(e,t){t[ye]=2===e.length?a.parseTwoDigitYear(e):k(e)})),he("YY",(function(e,t){t[ye]=a.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[ye]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var Se,Oe=xe("FullYear",!0);function xe(e,t){return function(n){return null!=n?(Ee(this,e,n),a.updateOffset(this,t),this):je(this,e)}}function je(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Te(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Te(e)?29:28:31-r%7%2}Se=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),F("month",8),ce("M",Q),ce("MM",Q,q),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[ge]=k(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[ge]=a:h(n).invalidMonth=e}));var He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function ze(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:-1!==(a=Se.call(this._shortMonthsParse,o))?a:null}function Fe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function We(e){return null!=e?(Fe(this,e),a.updateOffset(this,!0),this):je(this,"Month")}var Ne=le,Re=le;function Ie(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=me(r[t]),a[t]=me(a[t]);for(t=0;t<24;t++)i[t]=me(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e,t,n,r,a,i,o){var s=new Date(e,t,n,r,a,i,o);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function Ue(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var r=7+t-n;return-(7+Ue(e,0,r).getUTCDay()-t)%7+r-1}function Je(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+Ve(e,r,a);return s<=0?o=De(i=e-1)+s:s>De(e)?(i=e+1,o=s-De(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ge(e,t,n){var r,a,i=Ve(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+qe(a=e.year()-1,t,n):o>qe(e.year(),t,n)?(r=o-qe(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function qe(e,t,n){var r=Ve(e,t,n),a=Ve(e+1,t,n);return(De(e)-r+a)/7}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),F("week",5),F("isoWeek",5),ce("w",Q),ce("ww",Q,q),ce("W",Q),ce("WW",Q,q),_e(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ce("d",Q),ce("e",Q),ce("E",Q),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:h(n).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,n,r){t[r]=k(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null}var Xe=le,et=le,tt=le;function nt(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),s.push(a),l.push(i),u.push(r),u.push(a),u.push(i);for(o.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=me(s[t]),l[t]=me(l[t]),u[t]=me(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function rt(){return this.hours()%12||12}function at(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,rt),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+rt.apply(this)+W(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+rt.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+W(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)})),at("a",!0),at("A",!1),H("hour","h"),F("hour",13),ce("a",it),ce("A",it),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,q),ce("hh",Q,q),ce("kk",Q,q),ce("hmm",X),ce("hmmss",ee),ce("Hmm",X),ce("Hmmss",ee),he(["H","HH"],ve),he(["k","kk"],(function(e,t,n){var r=k(e);t[ve]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[ve]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(a)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(a))}));var ot,st=xe("Hours",!0),lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Ae,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Ze,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ut={},ct={};function dt(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=ot._abbr,n(149)("./"+t),pt(r)}catch(e){}return ut[t]}function pt(e,t){var n;return e&&(n=s(t)?_t(e):ht(e,t))&&(ot=n),ot._abbr}function ht(e,t){if(null!==t){var n=lt;if(t.abbr=e,null!=ut[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ut[e]._config;else if(null!=t.parentLocale){if(null==ut[t.parentLocale])return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;n=ut[t.parentLocale]._config}return ut[e]=new E(j(n,t)),ct[e]&&ct[e].forEach((function(e){ht(e.name,e.config)})),pt(e),ut[e]}return delete ut[e],null}function _t(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=dt(e[i]).split("-")).length,n=(n=dt(e[i+1]))?n.split("-"):null;t>0;){if(r=mt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(a,n,!0)>=t-1)break;t--}i++}return null}(e)}function ft(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[be]<1||n[be]>Ce(n[ye],n[ge])?be:n[ve]<0||n[ve]>24||24===n[ve]&&(0!==n[Me]||0!==n[we]||0!==n[ke])?ve:n[Me]<0||n[Me]>59?Me:n[we]<0||n[we]>59?we:n[ke]<0||n[ke]>999?ke:-1,h(e)._overflowDayOfYear&&(t<ye||t>be)&&(t=be),h(e)._overflowWeeks&&-1===t&&(t=Le),h(e)._overflowWeekday&&-1===t&&(t=Ye),h(e).overflow=t),e}function yt(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,r,i,o,s=[];if(!e._d){for(r=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[be]&&null==e._a[ge]&&function(e){var t,n,r,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=yt(t.GG,e._a[ye],Ge(Ct(),1,4).year),r=yt(t.W,1),((a=yt(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var u=Ge(Ct(),i,o);n=yt(t.gg,e._a[ye],u.year),r=yt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}r<1||r>qe(n,i,o)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=Je(n,r,a,i,o),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=yt(e._a[ye],r[ye]),(e._dayOfYear>De(o)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Ue(o,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ve]&&0===e._a[Me]&&0===e._a[we]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Ue:Be).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(h(e).weekdayMismatch=!0)}}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mt=/Z|[+-]\d\d(?::?\d\d)?/,wt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Lt=/^\/?Date\((\-?\d+)/i;function Yt(e){var t,n,r,a,i,o,s=e._i,l=bt.exec(s)||vt.exec(s);if(l){for(h(e).iso=!0,t=0,n=wt.length;t<n;t++)if(wt[t][1].exec(l[1])){a=wt[t][0],r=!1!==wt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=kt.length;t<n;t++)if(kt[t][1].exec(l[3])){i=(l[2]||" ")+kt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Mt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),xt(e)}else e._isValid=!1}var Dt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Tt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,a,i,o,s,l=Dt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(l){var u=(t=l[4],n=l[3],r=l[2],a=l[5],i=l[6],o=l[7],s=[Tt(t),Ae.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(i,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,n){return!e||Ke.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(l[8],l[9],l[10]),e._d=Ue.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function xt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,i,o,s=""+e._i,l=s.length,u=0;for(r=J(e._f,e._locale).match(N)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(de(i,e))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?h(e).empty=!1:h(e).unusedTokens.push(i),fe(i,n,e)):e._strict&&!n&&h(e).unusedTokens.push(i);h(e).charsLeftOver=l-u,s.length>0&&h(e).unusedInput.push(s),e._a[ve]<=12&&!0===h(e).bigHour&&e._a[ve]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[ve]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[ve],e._meridiem),gt(e),ft(e)}else Ot(e);else Yt(e)}function jt(e){var t=e._i,n=e._f;return e._locale=e._locale||_t(e._l),null===t||void 0===n&&""===t?f({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new v(ft(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,a,i;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],xt(t),_(t)&&(i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,(null==r||i<r)&&(r=i,n=t));m(e,n||t)}(e):n?xt(e):function(e){var t=e._i;s(t)?e._d=new Date(a.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Lt.exec(e._i);null===t?(Yt(e),!1===e._isValid&&(delete e._isValid,Ot(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),gt(e)):o(t)?function(e){if(!e._d){var t=A(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),gt(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),_(e)||(e._d=null),e))}function Et(e,t,n,r,a){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new v(ft(jt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ct(e,t,n,r){return Et(e,t,n,r,!1)}a.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Ht=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f()})),Pt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:f()}));function At(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ft(e){var t=A(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||0,o=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Se.call(zt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<zt.length;++r)if(e[zt[r]]){if(n)return!1;parseFloat(e[zt[r]])!==k(e[zt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=_t(),this._bubble()}function Wt(e){return e instanceof Ft}function Nt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Rt(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+W(~~(e/60),2)+t+W(~~e%60,2)}))}Rt("Z",":"),Rt("ZZ",""),ce("Z",se),ce("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Bt(se,e)}));var It=/([\+\-]|\d\d)/gi;function Bt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(It)||["-",0,0],a=60*r[1]+k(r[2]);return 0===a?0:"+"===r[0]?a:-a}function Ut(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(M(e)||u(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Ct(e).local()}function Vt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Jt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Gt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,a,i,o,s,u=e,c=null;return Wt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Gt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[be])*n,h:k(c[ve])*n,m:k(c[Me])*n,s:k(c[we])*n,ms:k(Nt(1e3*c[ke]))*n}):(c=qt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:Kt(c[2],n),M:Kt(c[3],n),w:Kt(c[4],n),d:Kt(c[5],n),h:Kt(c[6],n),m:Kt(c[7],n),s:Kt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Ct(u.from),o=Ct(u.to),a=i.isValid()&&o.isValid()?(o=Ut(o,i),i.isBefore(o)?s=Zt(i,o):((s=Zt(o,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Ft(u),Wt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Kt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Qt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Xt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function Xt(e,t,n,r){var i=t._milliseconds,o=Nt(t._days),s=Nt(t._months);e.isValid()&&(r=null==r||r,s&&Fe(e,je(e,"Month")+s*n),o&&Ee(e,"Date",je(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,o||s))}$t.fn=Ft.prototype,$t.invalid=function(){return $t(NaN)};var en=Qt(1,"add"),tn=Qt(-1,"subtract");function nn(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function rn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=_t(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function on(){return this._locale}function sn(e,t){U(0,[e,e.length],0,t)}function ln(e,t,n,r,a){var i;return null==e?Ge(this,r,a).year:(t>(i=qe(e,r,a))&&(t=i),un.call(this,e,t,n,r,a))}function un(e,t,n,r,a){var i=Je(e,t,n,r,a),o=Ue(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,q),ce("gg",Q,q),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),_e(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),H("quarter","Q"),F("quarter",7),ce("Q",G),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),U("D",["DD",2],"Do","date"),H("date","D"),F("date",9),ce("D",Q),ce("DD",Q,q),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],be),he("Do",(function(e,t){t[be]=k(e.match(Q)[0])}));var cn=xe("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),F("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),U("m",["mm",2],0,"minute"),H("minute","m"),F("minute",14),ce("m",Q),ce("mm",Q,q),he(["m","mm"],Me);var dn=xe("Minutes",!1);U("s",["ss",2],0,"second"),H("second","s"),F("second",15),ce("s",Q),ce("ss",Q,q),he(["s","ss"],we);var mn,pn=xe("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),F("millisecond",16),ce("S",te,G),ce("SS",te,q),ce("SSS",te,$),mn="SSSS";mn.length<=9;mn+="S")ce(mn,ae);function hn(e,t){t[ke]=k(1e3*("0."+e))}for(mn="S";mn.length<=9;mn+="S")he(mn,hn);var _n=xe("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var fn=v.prototype;function yn(e){return e}fn.add=en,fn.calendar=function(e,t){var n=e||Ct(),r=Ut(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Ct(n)))},fn.clone=function(){return new v(this)},fn.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=P(t)){case"year":i=nn(this,r)/12;break;case"month":i=nn(this,r);break;case"quarter":i=nn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:w(i)},fn.endOf=function(e){return void 0===(e=P(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},fn.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Ct(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Ct(),e)},fn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Ct(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Ct(),e)},fn.get=function(e){return x(this[e=P(e)])?this[e]():this},fn.invalidAt=function(){return h(this).overflow},fn.isAfter=function(e,t){var n=M(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=M(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},fn.isSame=function(e,t){var n,r=M(e)?e:Ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=P(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return _(this)},fn.lang=an,fn.locale=rn,fn.localeData=on,fn.max=Pt,fn.min=Ht,fn.parsingFlags=function(){return m({},h(this))},fn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:z[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=A(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(x(this[e=P(e)]))return this[e](t);return this},fn.startOf=function(e){switch(e=P(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},fn.subtract=tn,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",V(n,"Z")):V(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+a)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Oe,fn.isLeapYear=function(){return Te(this.year())},fn.weekYear=function(e){return ln.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return ln.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=We,fn.daysInMonth=function(){return Ce(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return qe(this.year(),1,4)},fn.date=cn,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=st,fn.minute=fn.minutes=dn,fn.second=fn.seconds=pn,fn.millisecond=fn.milliseconds=_n,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Bt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Vt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Xt(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Vt(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vt(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Bt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Jt,fn.isUTC=Jt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=D("dates accessor is deprecated. Use date instead.",cn),fn.months=D("months accessor is deprecated. Use month instead",We),fn.years=D("years accessor is deprecated. Use year instead",Oe),fn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=jt(e))._a){var t=e._isUTC?p(e._a):Ct(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var gn=E.prototype;function bn(e,t,n,r){var a=_t(),i=p().set(r,t);return a[n](i,e)}function vn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return bn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=bn(e,r,n,"month");return a}function Mn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var a,i=_t(),o=e?i._week.dow:0;if(null!=n)return bn(t,(n+o)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=bn(t,(a+o)%7,r,"day");return s}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return x(r)?r.call(t,n):r},gn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=yn,gn.postformat=yn,gn.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return x(a)?a(e,t,n,r):a.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[He.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return ze.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},gn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Re),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ne),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},gn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=D("moment.lang is deprecated. Use moment.locale instead.",pt),a.langData=D("moment.langData is deprecated. Use moment.localeData instead.",_t);var wn=Math.abs;function kn(e,t,n,r){var a=$t(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Ln(e){return e<0?Math.floor(e):Math.ceil(e)}function Yn(e){return 4800*e/146097}function Dn(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var Sn=Tn("ms"),On=Tn("s"),xn=Tn("m"),jn=Tn("h"),En=Tn("d"),Cn=Tn("w"),Hn=Tn("M"),Pn=Tn("y");function An(e){return function(){return this.isValid()?this._data[e]:NaN}}var zn=An("milliseconds"),Fn=An("seconds"),Wn=An("minutes"),Nn=An("hours"),Rn=An("days"),In=An("months"),Bn=An("years"),Un=Math.round,Vn={ss:44,s:45,m:45,h:22,d:26,M:11};function Jn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Gn=Math.abs;function qn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,r=Gn(this._days),a=Gn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(a/12),o=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var m=d<0?"-":"",p=qn(this._months)!==qn(d)?"-":"",h=qn(this._days)!==qn(d)?"-":"",_=qn(this._milliseconds)!==qn(d)?"-":"";return m+"P"+(i?p+i+"Y":"")+(o?p+o+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?_+l+"H":"")+(u?_+u+"M":"")+(c?_+c+"S":"")}var Kn=Ft.prototype;return Kn.isValid=function(){return this._isValid},Kn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},Kn.add=function(e,t){return kn(this,e,t,1)},Kn.subtract=function(e,t){return kn(this,e,t,-1)},Kn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=P(e))||"year"===e)return t=this._days+r/864e5,n=this._months+Yn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Dn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Kn.asMilliseconds=Sn,Kn.asSeconds=On,Kn.asMinutes=xn,Kn.asHours=jn,Kn.asDays=En,Kn.asWeeks=Cn,Kn.asMonths=Hn,Kn.asYears=Pn,Kn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Kn._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*Ln(Dn(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=w(i/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,o+=w(n/24),a=w(Yn(o)),s+=a,o-=Ln(Dn(a)),r=w(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},Kn.clone=function(){return $t(this)},Kn.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Kn.milliseconds=zn,Kn.seconds=Fn,Kn.minutes=Wn,Kn.hours=Nn,Kn.days=Rn,Kn.weeks=function(){return w(this.days()/7)},Kn.months=In,Kn.years=Bn,Kn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),a=Un(r.as("s")),i=Un(r.as("m")),o=Un(r.as("h")),s=Un(r.as("d")),l=Un(r.as("M")),u=Un(r.as("y")),c=a<=Vn.ss&&["s",a]||a<Vn.s&&["ss",a]||i<=1&&["m"]||i<Vn.m&&["mm",i]||o<=1&&["h"]||o<Vn.h&&["hh",o]||s<=1&&["d"]||s<Vn.d&&["dd",s]||l<=1&&["M"]||l<Vn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,Jn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Kn.toISOString=$n,Kn.toString=$n,Kn.toJSON=$n,Kn.locale=rn,Kn.localeData=on,Kn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Kn.lang=an,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(k(e))})),a.version="2.20.1",t=Ct,a.fn=fn,a.min=function(){return At("isBefore",[].slice.call(arguments,0))},a.max=function(){return At("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Ct(1e3*e)},a.months=function(e,t){return vn(e,t,"months")},a.isDate=u,a.locale=pt,a.invalid=f,a.duration=$t,a.isMoment=M,a.weekdays=function(e,t,n){return Mn(e,t,n,"weekdays")},a.parseZone=function(){return Ct.apply(null,arguments).parseZone()},a.localeData=_t,a.isDuration=Wt,a.monthsShort=function(e,t){return vn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return Mn(e,t,n,"weekdaysMin")},a.defineLocale=ht,a.updateLocale=function(e,t){if(null!=t){var n,r,a=lt;null!=(r=mt(e))&&(a=r._config),t=j(a,t),(n=new E(t)).parentLocale=ut[e],ut[e]=n,pt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},a.locales=function(){return T(ut)},a.weekdaysShort=function(e,t,n){return Mn(e,t,n,"weekdaysShort")},a.normalizeUnits=P,a.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Vn[e]&&(void 0===t?Vn[e]:(Vn[e]=t,"s"===e&&(Vn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=fn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,n(9)(e))},function(e,t,n){"use strict";e.exports=n(135)},function(e,t){function n(e,t=null,n=null){var r=[];function a(e,t,n,i=0){let o;if(null!==n&&i<n)y(e)&&(o=Object.keys(e)).forEach(r=>{a(e[r],t,n,i+1)});else{if(null!==n&&i==n)return 0==n?void(r=a(e,t,null,i)):void(y(e)&&r.push(a(e,t,n,i+1)));switch(M(e)){case"array":var s=[];if(o=Object.keys(e),null===t||i<t)for(var l=0,u=o.length;l<u;l++){const r=o[l],u=e[r];s[r]=a(u,t,n,i+1)}return s;case"object":var c={};if(o=Object.keys(e),null===t||i<t)for(l=0,u=o.length;l<u;l++){const r=o[l],s=e[r];c[r]=a(s,t,n,i+1)}return c;case"string":return""+e;case"number":return 0+e;case"boolean":return!!e;case"null":return null;case"undefined":return}}}return null===n?a(e,t,n,0):(a(e,t,n,0),r)}function r(e,t,n=null){if("string"===M(t)&&""!==t){var r=[];return function e(t,n,a="",i="",o=null,s=0){if(a===n&&(r[r.length]=i),null!==o&&s>=o)return!1;if(y(t))for(var l=0,u=Object.keys(t),c=u.length;l<c;l++){const r=u[l];e(t[r],n,r,(""===i?i:i+".")+r,o,s+1)}}(e,t,"","",n),0!==(r=r.map(e=>"boolean"===M(e)?e:""===e?e:((e=e.split(".")).pop(),e=e.join(".")))).length&&r}}function a(e,t,n=null){if("string"===M(t)&&""!==t){var r=function e(t,n,r="",a,i=0){if(r===n)return r;var o=!1;if(null!==a&&i>=a)return o;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0);return"boolean"===M(r)?r:""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function i(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(f(t,[n]))return u(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],n,r,a+1))return!0}return!1}(e,t,n)}function o(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(f(t,[n]))return l(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],n,r,a+1))return!0}return!1}(e,t,n,0)}function s(e){const t=c(e);return!(t>1)&&(1===t?Object.keys(e)[0]:0===t&&["string","number"].indexOf(M(e))>-1&&e)}function l(e){return!u(e)}function u(e){return!1===function(e){return y(e)?e:!(["null","undefined"].indexOf(M(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function c(e){return-1===["array","object"].indexOf(M(e))?0:Object.keys(e).length}function d(e,t,n=null,r=0){if(g(e,t))return!0;if(y(t)&&v(e,t)&&f(e,Object.keys(t))){if(g(_(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&y(e))for(var a=0,i=Object.keys(e),o=i.length;a<o;a++){if(d(e[i[a]],t,n,r+1))return!0}return!1}function m(e,t,n=null){var r=p(e,t,n);if(!1===r)return;return r.map(n=>{if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(M(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]})}function p(e,t,n=null){var r=[];return function e(t,n,a="",i,o){if(y(n)&&v(t,n)&&f(t,Object.keys(n))){g(_(t,Object.keys(n)),n)&&(r[r.length]=a)}if(g(t,n)&&(r[r.length]=a),null!==i&&o>=i)return!1;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const r=l[s];e(t[r],n,(""===a?a:a+".")+r,i,o+1)}}(e,t,"",n,0),0!==r.length&&r}function h(e,t,n=null){return function e(t,n,r="",a,i){if(y(n)&&v(t,n)&&f(t,Object.keys(n))){if(g(_(t,Object.keys(n)),n))return r}if(g(t,n))return r;var o=!1;if(null!==a&&i>=a)return o;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0)}function _(e,t){const n=M(e);if(-1!==["array","object"].indexOf(n)&&0!==t.length){var r;switch(n){case"object":r={},t.forEach(t=>{t in e&&(r[t]=e[t])});break;case"array":r=[],t.forEach(t=>{t in e&&r.push(e[t])})}return r}}function f(e,t){const n=t.length;if(0===n||!y(e))return!1;const r=Object.keys(e);for(var a=!0,i=0;i<n;i++){const e=""+t[i];if(-1===r.indexOf(e)){a=!1;break}}return a}function y(e){return-1!==["array","object"].indexOf(M(e))&&0!==Object.keys(e).length}function g(e,t){const n=b(e,t);if(!1===n)return n;if(-1===["array","object"].indexOf(n))return e===t;const r=Object.keys(e),a=r.length;for(var i=!0,o=0;o<a;o++){const n=r[o],a=g(e[n],t[n]);if(!1===a){i=a;break}}return i}function b(e,t){const n=v(e,t);if(!1===n)return!1;if(["array","object"].indexOf(n)>-1){const n=Object.keys(e),a=Object.keys(t),i=n.length;if(i!==a.length)return!1;if(0===i)return!0;for(var r=0;r<i;r++)if(n[r]!==a[r])return!1}return n}function v(e,t){const n=M(e);return n===M(t)&&n}function M(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var w={getType:function(e){return M(e)},sameType:function(e,t){return v(e,t)},sameStructure:function(e,t){return b(e,t)},identical:function(e,t){return g(e,t)},isIterable:function(e){return y(e)},containsKeys:function(e,t){return f(e,t)},trim:function(e,t){return _(e,t)},locate:function(e,t,n){return h(e,t,n)},deepGet:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);if(!1!==r){if(""===r)return e;r=r.split("."),-1===["array","object"].indexOf(M(t))&&r.splice(-1,1);var a=e;return Array.isArray(r)?(r.forEach(e=>{a=a[e]}),a):a[r]}}(e,t,n)},locateAll:function(e,t,n){return p(e,t,n)},deepFilter:function(e,t,n){return m(e,t,n)},exists:function(e,t,n){return d(e,t,n)},onlyExisting:function(e,t,n){return function(e,t,n=null){if("array"===M(t)){let r=[];return t.forEach(t=>{d(e,t,n)&&r.push(t)}),r}if("object"===M(t)){let r={};return Object.keys(t).forEach(a=>{let i=t[a];d(e,i,n)&&(r[a]=i)}),r}if(d(e,t,n))return t}(e,t,n)},onlyMissing:function(e,t,n){return function(e,t,n=null){if("array"===M(t)){let r=[];return t.forEach(t=>{d(e,t,n)||r.push(t)}),r}if("object"===M(t)){let r={};return Object.keys(t).forEach(a=>{let i=t[a];d(e,i,n)||(r[a]=i)}),r}if(!d(e,t,n))return t}(e,t,n)},length:function(e){return c(e)},isFalsy:function(e){return u(e)},isTruthy:function(e){return l(e)},foundTruthy:function(e,t,n){return o(e,t,n)},onlyTruthy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===M(t)){let a=[];return t.forEach(t=>{const i=m(e,t);l(i)&&o(i,n,r)&&a.push(t)}),a}if("object"===M(t)){let a={};return Object.keys(t).forEach(i=>{const s=t[i],u=m(e,s);l(u)&&o(u,n,r)&&(a[i]=s)}),a}if(o(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return i(e,t,n)},onlyFalsy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===M(t)){let a=[];return t.forEach(t=>{const o=m(e,t);l(o)&&i(o,n,r)&&a.push(t)}),a}if("object"===M(t)){let a={};return Object.keys(t).forEach(o=>{const s=t[o],u=m(e,s);l(u)&&i(u,n,r)&&(a[o]=s)}),a}if(i(e,n,r))return t}(e,t,n,r)},countMatches:function(e,t,n,r){return function(e,t,n=null,r=null){var a=null===n,i=null===r,o=p(e,t,a&&i?null:a||i?n||r:n<r?n:r);if(!1===o)return 0;if(null===n)return o.length;if("number"===M(n)){let e=0;return o.forEach(t=>{(t=t.split(".")).length===n&&e++}),e}}(e,t,n,r)},matchDepth:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);return!1!==r&&(""===r?0:(r=r.split(".")).length)}(e,t,n)},maxDepth:function(e,t){return function(e,t=null){let n=0;return function e(t,r,a=0){n<a&&(n=a),null!==r&&a>=r||y(t)&&Object.keys(t).forEach(n=>{e(t[n],r,a+1)})}(e,t),n}(e,t)},locate_Key:function(e,t,n){return a(e,t,n)},deepGet_Key:function(e,t,n){return function(e,t,n=null){if("string"===M(t)&&""!==t){var r=a(e,t,n);if(!1!==r){""===r?r=t:r+="."+t,r=r.split(".");var i=e;return Array.isArray(r)?(r.forEach(e=>{i=i[e]}),i):i[r]}}}(e,t,n)},locateAll_Key:function(e,t,n){return r(e,t,n)},deepFilter_Key:function(e,t,n){return function(e,t,n=null){if("string"!==M(t))return;if(""===t)return;var a=r(e,t,n);if(!1===a)return;return a.map(n=>{if(!1!==n){""===n?n=t:n+="."+t,n=n.split(".");var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]}})}(e,t,n)},deepClone:function(e,t,r){return n(e,t,r)},renameKey:function(e,t,n,r){return function(e,t,n,r=null){if("string"===M(t)&&"string"===M(n)&&""!==t&&""!==n){var a=!1;return function e(t,n,r,i,o=0){let s;switch(M(t)){case"array":for(var l=[],u=0,c=(s=Object.keys(t)).length;u<c;u++){let a=s[u],c=t[a];l[a]=e(c,n,r,i,o+1)}return l;case"object":var d={};for(u=0,c=(s=Object.keys(t)).length;u<c;u++){let l=s[u],c=t[l];(null===i||o<i)&&(a||l===n&&(l=r,a=!0)),d[l]=e(c,n,r,i,o+1)}return d;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}}(e,t,n,r)},renameKeys:function(e,t,n,r){return function(e,t,n,r=null){if("string"===M(t)&&"string"===M(n)&&""!==t&&""!==n)return function e(t,n,r,a,i=0){let o;switch(M(t)){case"array":for(var s=[],l=0,u=(o=Object.keys(t)).length;l<u;l++){let u=o[l],c=t[u];s[u]=e(c,n,r,a,i+1)}return s;case"object":var c={};for(l=0,u=(o=Object.keys(t)).length;l<u;l++){let s=o[l],u=t[s];(null===a||i<a)&&s===n&&(s=r),c[s]=e(u,n,r,a,i+1)}return c;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}(e,t,n,r)},deepRemove_Key:function(e,t,r){return function(e,t,r){if("string"!==M(t))return;if(""===t)return;let i=n(e);var o=a(i,t,r);if(!1===o)return i;""===o?o=t:o+="."+t,o=o.split(".");var s=i;return Array.isArray(o)||delete s[o],o.forEach((e,t)=>{t<o.length-1?s=s[e]:delete s[e]}),i}(e,t,r)},deepRemoveAll_Key:function(e,t,a){return function(e,t,a){if("string"!==M(t))return;if(""===t)return;let i=n(e);var o=r(i,t,a);return o===[]||!1===o?i:(o.forEach(e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=i;Array.isArray(e)||delete n[e];for(var r=0;r<e.length;r++){var a=e[r];if(!(a in n))break;r<e.length-1?n=n[a]:delete n[a]}}),i)}(e,t,a)}};e.exports=w},function(e,t,n){(function(e){!function(t){var n=function(e){return a(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function a(e,t,a){var o=a[0],s=a.length;(e||"object"!==i(o))&&(o={});for(var l=0;l<s;++l){var u=a[l];if("object"===i(u))for(var c in u)if("__proto__"!==c){var d=e?n.clone(u[c]):u[c];o[c]=t?r(o[c],d):d}}return o}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return a(!0===e,!0,arguments)},n.clone=function(e){var t,r,a=e,o=i(e);if("array"===o)for(a=[],r=e.length,t=0;t<r;++t)a[t]=n.clone(e[t]);else if("object"===o)for(t in a={},e)a[t]=n.clone(e[t]);return a},t?e.exports=n:window.merge=n}(e&&"object"==typeof e.exports&&e.exports)}).call(this,n(9)(e))},function(e,t,n){"use strict";
2
  /*!
3
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
  *
55
  *
56
  * Copyright (c) 2014-2017, Jon Schlinkert.
57
  * Released under the MIT License.
58
+ */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},,function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,i,o,s,l=1,u={},c=!1,d=e.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),m.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return u[l]=a,r(l),l++},m.clearImmediate=p}function p(e){delete u[e]}function h(e){if(c)setTimeout(h,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(148))},function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function m(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(m);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function _(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=_,a.addListener=_,a.once=_,a.off=_,a.removeListener=_,a.removeAllListeners=_,a.emit=_,a.prependListener=_,a.prependOnceListener=_,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){var r={"./af":10,"./af.js":10,"./ar":11,"./ar-dz":12,"./ar-dz.js":12,"./ar-kw":13,"./ar-kw.js":13,"./ar-ly":14,"./ar-ly.js":14,"./ar-ma":15,"./ar-ma.js":15,"./ar-sa":16,"./ar-sa.js":16,"./ar-tn":17,"./ar-tn.js":17,"./ar.js":11,"./az":18,"./az.js":18,"./be":19,"./be.js":19,"./bg":20,"./bg.js":20,"./bm":21,"./bm.js":21,"./bn":22,"./bn.js":22,"./bo":23,"./bo.js":23,"./br":24,"./br.js":24,"./bs":25,"./bs.js":25,"./ca":26,"./ca.js":26,"./cs":27,"./cs.js":27,"./cv":28,"./cv.js":28,"./cy":29,"./cy.js":29,"./da":30,"./da.js":30,"./de":31,"./de-at":32,"./de-at.js":32,"./de-ch":33,"./de-ch.js":33,"./de.js":31,"./dv":34,"./dv.js":34,"./el":35,"./el.js":35,"./en-au":36,"./en-au.js":36,"./en-ca":37,"./en-ca.js":37,"./en-gb":38,"./en-gb.js":38,"./en-ie":39,"./en-ie.js":39,"./en-nz":40,"./en-nz.js":40,"./eo":41,"./eo.js":41,"./es":42,"./es-do":43,"./es-do.js":43,"./es-us":44,"./es-us.js":44,"./es.js":42,"./et":45,"./et.js":45,"./eu":46,"./eu.js":46,"./fa":47,"./fa.js":47,"./fi":48,"./fi.js":48,"./fo":49,"./fo.js":49,"./fr":50,"./fr-ca":51,"./fr-ca.js":51,"./fr-ch":52,"./fr-ch.js":52,"./fr.js":50,"./fy":53,"./fy.js":53,"./gd":54,"./gd.js":54,"./gl":55,"./gl.js":55,"./gom-latn":56,"./gom-latn.js":56,"./gu":57,"./gu.js":57,"./he":58,"./he.js":58,"./hi":59,"./hi.js":59,"./hr":60,"./hr.js":60,"./hu":61,"./hu.js":61,"./hy-am":62,"./hy-am.js":62,"./id":63,"./id.js":63,"./is":64,"./is.js":64,"./it":65,"./it.js":65,"./ja":66,"./ja.js":66,"./jv":67,"./jv.js":67,"./ka":68,"./ka.js":68,"./kk":69,"./kk.js":69,"./km":70,"./km.js":70,"./kn":71,"./kn.js":71,"./ko":72,"./ko.js":72,"./ky":73,"./ky.js":73,"./lb":74,"./lb.js":74,"./lo":75,"./lo.js":75,"./lt":76,"./lt.js":76,"./lv":77,"./lv.js":77,"./me":78,"./me.js":78,"./mi":79,"./mi.js":79,"./mk":80,"./mk.js":80,"./ml":81,"./ml.js":81,"./mr":82,"./mr.js":82,"./ms":83,"./ms-my":84,"./ms-my.js":84,"./ms.js":83,"./mt":85,"./mt.js":85,"./my":86,"./my.js":86,"./nb":87,"./nb.js":87,"./ne":88,"./ne.js":88,"./nl":89,"./nl-be":90,"./nl-be.js":90,"./nl.js":89,"./nn":91,"./nn.js":91,"./pa-in":92,"./pa-in.js":92,"./pl":93,"./pl.js":93,"./pt":94,"./pt-br":95,"./pt-br.js":95,"./pt.js":94,"./ro":96,"./ro.js":96,"./ru":97,"./ru.js":97,"./sd":98,"./sd.js":98,"./se":99,"./se.js":99,"./si":100,"./si.js":100,"./sk":101,"./sk.js":101,"./sl":102,"./sl.js":102,"./sq":103,"./sq.js":103,"./sr":104,"./sr-cyrl":105,"./sr-cyrl.js":105,"./sr.js":104,"./ss":106,"./ss.js":106,"./sv":107,"./sv.js":107,"./sw":108,"./sw.js":108,"./ta":109,"./ta.js":109,"./te":110,"./te.js":110,"./tet":111,"./tet.js":111,"./th":112,"./th.js":112,"./tl-ph":113,"./tl-ph.js":113,"./tlh":114,"./tlh.js":114,"./tr":115,"./tr.js":115,"./tzl":116,"./tzl.js":116,"./tzm":117,"./tzm-latn":118,"./tzm-latn.js":118,"./tzm.js":117,"./uk":119,"./uk.js":119,"./ur":120,"./ur.js":120,"./uz":121,"./uz-latn":122,"./uz-latn.js":122,"./uz.js":121,"./vi":123,"./vi.js":123,"./x-pseudo":124,"./x-pseudo.js":124,"./yo":125,"./yo.js":125,"./zh-cn":126,"./zh-cn.js":126,"./zh-hk":127,"./zh-hk.js":127,"./zh-tw":128,"./zh-tw.js":128};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=149},function(e,t,n){var r;e.exports=function e(t,n,a){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,a)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<a.length;s++)i(a[s]);return i}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,i=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,p=1e9;function h(e){var t=0|e;return 0<e||e===t?t:t-1}function _(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=u-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function f(e,t){var n,r,a=e.c,i=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=a.length)<(u=i.length)?l:u,o=0;o<s;o++)if(a[o]!=i[o])return a[o]>i[o]^n?1:-1;return l==u?0:u<l^n?1:-1}function y(e,t,n,r){if(e<t||n<e||e!==(e<0?a(e):i(e)))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return h(e.e/u)==t&&e.c[t]%2!=0}function b(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,M,w,k,L,Y,D,T,S,O,x=B.prototype={constructor:B,toString:null,valueOf:null},j=new B(1),E=20,C=4,H=-7,P=21,A=-1e7,z=1e7,F=!1,W=1,N=0,R={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},I="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,a,o,l,d,m,p,h,_=this;if(!(_ instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return _.s=e.s,_.e=e.e,void(_.c=(e=e.c)?e.slice():e);if((m="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;10<=d;d/=10,l++);return _.e=l,void(_.c=[e])}h=String(e)}else{if(h=String(e),!r.test(h))return w(_,h,m);_.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}-1<(l=h.indexOf("."))&&(h=h.replace(".","")),0<(d=h.search(/e/i))?(l<0&&(l=d),l+=+h.slice(d+1),h=h.substring(0,d)):l<0&&(l=h.length)}else{if(y(t,2,I.length,"Base"),h=String(e),10==t)return G(_=new B(e instanceof B?e:h),E+_.e+1,C);if(m="number"==typeof e){if(0*e!=0)return w(_,h,m,t);if(_.s=1/e<0?(h=h.slice(1),-1):1,B.DEBUG&&15<h.replace(/^0\.0*|\./,"").length)throw Error(s+e);m=!1}else _.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=I.slice(0,t),l=d=0,p=h.length;d<p;d++)if(n.indexOf(a=h.charAt(d))<0){if("."==a){if(l<d){l=p;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,d=-1,l=0;continue}return w(_,String(e),m,t)}-1<(l=(h=M(h,t,10,_.s)).indexOf("."))?h=h.replace(".",""):l=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,m&&B.DEBUG&&15<p&&(c<e||e!==i(e)))throw Error(s+_.s*e);if(z<(l=l-d-1))_.c=_.e=null;else if(l<A)_.c=[_.e=0];else{if(_.e=l,_.c=[],d=(l+1)%u,l<0&&(d+=u),d<p){for(d&&_.c.push(+h.slice(0,d)),p-=u;d<p;)_.c.push(+h.slice(d,d+=u));h=h.slice(d),d=u-h.length}else d-=p;for(;d--;h+="0");_.c.push(+h)}}else _.c=[_.e=0]}function U(e,t,n,r){var a,i,o,s,l;if(null==n?n=C:y(n,0,8),!e.c)return e.toString();if(a=e.c[0],o=e.e,null==t)l=_(e.c),l=1==r||2==r&&(o<=H||P<=o)?b(l,o):v(l,o,"0");else if(i=(e=G(new B(e),t,n)).e,s=(l=_(e.c)).length,1==r||2==r&&(t<=i||i<=H)){for(;s<t;l+="0",s++);l=b(l,i)}else if(t-=o,l=v(l,i,"0"),s<i+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=i-s))for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&a?"-"+l:l}function V(e,t){for(var n,r=1,a=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){a=n;break}t.call(a,n)&&(a=n)}return a}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];10<=a;a/=10,r++);return(n=r+n*u-1)>z?e.c=e.e=null:e.c=n<A?[e.e=0]:(e.e=n,t),e}function G(e,t,n,r){var o,s,c,m,p,h,_,f=e.c,y=d;if(f){e:{for(o=1,m=f[0];10<=m;m/=10,o++);if((s=t-o)<0)s+=u,c=t,_=(p=f[h=0])/y[o-c-1]%10|0;else if((h=a((s+1)/u))>=f.length){if(!r)break e;for(;f.length<=h;f.push(0));p=_=0,c=(s%=u)-u+(o=1)}else{for(p=m=f[h],o=1;10<=m;m/=10,o++);_=(c=(s%=u)-u+o)<0?0:p/y[o-c-1]%10|0}if(r=r||t<0||null!=f[h+1]||(c<0?p:p%y[o-c-1]),r=n<4?(_||r)&&(0==n||n==(e.s<0?3:2)):5<_||5==_&&(4==n||r||6==n&&(0<s?0<c?p/y[o-c]:0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=y[(u-t%u)%u],e.e=-t||0):f[0]=e.e=0,e;if(0==s?(f.length=h,m=1,h--):(f.length=h+1,m=y[u-s],f[h]=0<c?i(p/y[o-c]%y[c])*m:0),r)for(;;){if(0==h){for(s=1,c=f[0];10<=c;c/=10,s++);for(c=f[0]+=m,m=1;10<=c;c/=10,m++);s!=m&&(e.e++,f[0]==l&&(f[0]=1));break}if(f[h]+=m,f[h]!=l)break;f[h--]=0,m=1}for(s=f.length;0===f[--s];f.pop());}e.e>z?e.c=e.e=null:e.e<A&&(e.c=[e.e=0])}return e}function q(e){var t,n=e.e;return null===n?e.toString():(t=_(e.c),t=n<=H||P<=n?b(t,n):v(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),E=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),C=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),H=n[0],P=n[1]):(y(n,-p,p,t),H=-(P=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),A=n[0],z=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);A=-(z=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!n,Error(o+"crypto unavailable");F=n}else F=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),W=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),N=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);R=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);I=n}}return{DECIMAL_PLACES:E,ROUNDING_MODE:C,EXPONENTIAL_AT:[H,P],RANGE:[A,z],CRYPTO:F,MODULO_MODE:W,POW_PRECISION:N,FORMAT:R,ALPHABET:I}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return V(arguments,x.lt)},B.minimum=B.min=function(){return V(arguments,x.gt)},B.random=(k=9007199254740992,L=Math.random()*k&2097151?function(){return i(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,s,l,c=0,m=[],h=new B(j);if(null==e?e=E:y(e,0,p),s=a(e/u),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));c<s;)9e15<=(l=131072*t[c]+(t[c+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(m.push(l%1e14),c+=2);c=s/2}else{if(!crypto.randomBytes)throw F=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(s*=7);c<s;)9e15<=(l=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])?crypto.randomBytes(7).copy(t,c):(m.push(l%1e14),c+=7);c=s/7}if(!F)for(;c<s;)(l=L())<9e15&&(m[c++]=l%1e14);for(s=m[--c],e%=u,s&&e&&(l=d[u-e],m[c]=i(s/l)*l);0===m[c];m.pop(),c--);if(c<0)m=[r=0];else{for(r=-1;0===m[0];m.splice(0,1),r-=u);for(c=1,l=m[0];10<=l;l/=10,c++);c<u&&(r-=u-c)}return h.e=r,h.c=m,h}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},M=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,o=[0],s=0,l=e.length;s<l;){for(i=o.length;i--;o[i]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),a=0;a<o.length;a++)o[a]>n-1&&(null==o[a+1]&&(o[a+1]=0),o[a+1]+=o[a]/n|0,o[a]%=n)}return o.reverse()}return function(r,a,i,o,s){var l,u,c,d,m,p,h,f,y=r.indexOf("."),g=E,b=C;for(0<=y&&(d=N,N=0,r=r.replace(".",""),p=(f=new B(a)).pow(r.length-y),N=d,f.c=t(v(_(p.c),p.e,"0"),10,i,e),f.e=f.c.length),c=d=(h=t(r,a,i,s?(l=I,e):(l=e,I))).length;0==h[--d];h.pop());if(!h[0])return l.charAt(0);if(y<0?--c:(p.c=h,p.e=c,p.s=o,h=(p=n(p,f,g,b,i)).c,m=p.r,c=p.e),y=h[u=c+g+1],d=i/2,m=m||u<0||null!=h[u+1],m=b<4?(null!=y||m)&&(0==b||b==(p.s<0?3:2)):d<y||y==d&&(4==b||m||6==b&&1&h[u-1]||b==(p.s<0?8:7)),u<1||!h[0])r=m?v(l.charAt(1),-g,l.charAt(0)):l.charAt(0);else{if(h.length=u,m)for(--i;++h[--u]>i;)h[u]=0,u||(++c,h=[1].concat(h));for(d=h.length;!h[--d];);for(y=0,r="";y<=d;r+=l.charAt(h[y++]));r=v(r,c,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,o,s=0,l=e.length,u=t%m,c=t/m|0;for(e=e.slice();l--;)s=((a=u*(i=e[l]%m)+(r=c*i+(o=e[l]/m|0)*u)%m*m+s)/n|0)+(r/m|0)+c*o,e[l]=a%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=r<n?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(r,a,o,s,c){var d,m,p,_,f,y,g,b,v,M,w,k,L,Y,D,T,S,O=r.s==a.s?1:-1,x=r.c,j=a.c;if(!(x&&x[0]&&j&&j[0]))return new B(r.s&&a.s&&(x?!j||x[0]!=j[0]:j)?x&&0==x[0]||!j?0*O:O/0:NaN);for(v=(b=new B(O)).c=[],O=o+(m=r.e-a.e)+1,c||(c=l,m=h(r.e/u)-h(a.e/u),O=O/u|0),p=0;j[p]==(x[p]||0);p++);if(j[p]>(x[p]||0)&&m--,O<0)v.push(1),_=!0;else{for(Y=x.length,T=j.length,O+=2,1<(f=i(c/(j[p=0]+1)))&&(j=e(j,f,c),x=e(x,f,c),T=j.length,Y=x.length),L=T,w=(M=x.slice(0,T)).length;w<T;M[w++]=0);S=j.slice(),S=[0].concat(S),D=j[0],j[1]>=c/2&&D++;do{if(f=0,(d=t(j,M,T,w))<0){if(k=M[0],T!=w&&(k=k*c+(M[1]||0)),1<(f=i(k/D)))for(c<=f&&(f=c-1),g=(y=e(j,f,c)).length,w=M.length;1==t(y,M,g,w);)f--,n(y,T<g?S:j,g,c),g=y.length,d=1;else 0==f&&(d=f=1),g=(y=j.slice()).length;if(g<w&&(y=[0].concat(y)),n(M,y,w,c),w=M.length,-1==d)for(;t(j,M,T,w)<1;)f++,n(M,T<w?S:j,w,c),w=M.length}else 0===d&&(f++,M=[0]);v[p++]=f,M[0]?M[w++]=x[L]||0:(M=[x[L]],w=1)}while((L++<Y||null!=M[0])&&O--);_=null!=M[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,O=v[0];10<=O;O/=10,p++);G(b,o+(b.e=p+m*u-1)+1,s,_)}else b.e=m,b.r=+_;return b}}(),Y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,D=/^([^.]+)\.$/,T=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,w=function(e,t,n,r){var a,i=n?t:t.replace(O,"");if(S.test(i))e.s=isNaN(i)?null:i<0?-1:1,e.c=e.e=null;else{if(!n&&(i=i.replace(Y,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(D,"$1").replace(T,"0.$1")),t!=i))return new B(i,a);if(B.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},x.absoluteValue=x.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},x.comparedTo=function(e,t){return f(this,new B(e,t))},x.decimalPlaces=x.dp=function(e,t){var n,r,a;if(null!=e)return y(e,0,p),null==t?t=C:y(t,0,8),G(new B(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((a=n.length-1)-h(this.e/u))*u,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},x.dividedBy=x.div=function(e,t){return n(this,new B(e,t),E,C)},x.dividedToIntegerBy=x.idiv=function(e,t){return n(this,new B(e,t),0,1)},x.exponentiatedBy=x.pow=function(e,t){var n,r,s,l,c,d,m,p,h=this;if((e=new B(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+q(e));if(null!=t&&(t=new B(t)),c=14<e.e,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new B(Math.pow(+q(h),c?2-g(e):+q(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(9<e.e&&(0<h.e||h.e<-1||(0==h.e?1<h.c[0]||c&&24e7<=h.c[1]:h.c[0]<8e13||c&&h.c[0]<=9999975e7)))return l=h.s<0&&g(e)?-0:0,-1<h.e&&(l=1/l),new B(d?1/l:l);N&&(l=a(N/u+2))}for(m=c?(n=new B(.5),d&&(e.s=1),g(e)):(s=Math.abs(+q(e)))%2,p=new B(j);;){if(m){if(!(p=p.times(h)).c)break;l?p.c.length>l&&(p.c.length=l):r&&(p=p.mod(t))}if(s){if(0===(s=i(s/2)))break;m=s%2}else if(G(e=e.times(n),e.e+1,1),14<e.e)m=g(e);else{if(0==(s=+q(e)))break;m=s%2}h=h.times(h),l?h.c&&h.c.length>l&&(h.c.length=l):r&&(h=h.mod(t))}return r?p:(d&&(p=j.div(p)),t?p.mod(t):l?G(p,N,C,void 0):p)},x.integerValue=function(e){var t=new B(this);return null==e?e=C:y(e,0,8),G(t,t.e+1,e)},x.isEqualTo=x.eq=function(e,t){return 0===f(this,new B(e,t))},x.isFinite=function(){return!!this.c},x.isGreaterThan=x.gt=function(e,t){return 0<f(this,new B(e,t))},x.isGreaterThanOrEqualTo=x.gte=function(e,t){return 1===(t=f(this,new B(e,t)))||0===t},x.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},x.isLessThan=x.lt=function(e,t){return f(this,new B(e,t))<0},x.isLessThanOrEqualTo=x.lte=function(e,t){return-1===(t=f(this,new B(e,t)))||0===t},x.isNaN=function(){return!this.s},x.isNegative=function(){return this.s<0},x.isPositive=function(){return 0<this.s},x.isZero=function(){return!!this.c&&0==this.c[0]},x.minus=function(e,t){var n,r,a,i,o=this,s=o.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/u,d=e.e/u,m=o.c,p=e.c;if(!c||!d){if(!m||!p)return m?(e.s=-t,e):new B(p?o:NaN);if(!m[0]||!p[0])return p[0]?(e.s=-t,e):new B(m[0]?o:3==C?-0:0)}if(c=h(c),d=h(d),m=m.slice(),s=c-d){for((a=(i=s<0)?(s=-s,m):(d=c,p)).reverse(),t=s;t--;a.push(0));a.reverse()}else for(r=(i=(s=m.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(m[t]!=p[t]){i=m[t]<p[t];break}if(i&&(a=m,m=p,p=a,e.s=-e.s),0<(t=(r=p.length)-(n=m.length)))for(;t--;m[n++]=0);for(t=l-1;s<r;){if(m[--r]<p[r]){for(n=r;n&&!m[--n];m[n]=t);--m[n],m[r]+=l}m[r]-=p[r]}for(;0==m[0];m.splice(0,1),--d);return m[0]?J(e,m,d):(e.s=3==C?-1:1,e.c=[e.e=0],e)},x.modulo=x.mod=function(e,t){var r,a,i=this;return e=new B(e,t),!i.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||i.c&&!i.c[0]?new B(i):(9==W?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,W),(e=i.minus(r.times(e))).c[0]||1!=W||(e.s=i.s),e)},x.multipliedBy=x.times=function(e,t){var n,r,a,i,o,s,c,d,p,_,f,y,g,b,v,M=this,w=M.c,k=(e=new B(e,t)).c;if(!(w&&k&&w[0]&&k[0]))return!M.s||!e.s||w&&!w[0]&&!k||k&&!k[0]&&!w?e.c=e.e=e.s=null:(e.s*=M.s,w&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=h(M.e/u)+h(e.e/u),e.s*=M.s,(c=w.length)<(_=k.length)&&(g=w,w=k,k=g,a=c,c=_,_=a),a=c+_,g=[];a--;g.push(0));for(b=l,v=m,a=_;0<=--a;){for(n=0,f=k[a]%v,y=k[a]/v|0,i=a+(o=c);a<i;)n=((d=f*(d=w[--o]%v)+(s=y*d+(p=w[o]/v|0)*f)%v*v+g[i]+n)/b|0)+(s/v|0)+y*p,g[i--]=d%b;g[i]=n}return n?++r:g.splice(0,1),J(e,g,r)},x.negated=function(){var e=new B(this);return e.s=-e.s||null,e},x.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/u,o=e.e/u,s=r.c,c=e.c;if(!i||!o){if(!s||!c)return new B(a/0);if(!s[0]||!c[0])return c[0]?e:new B(s[0]?r:0*a)}if(i=h(i),o=h(o),s=s.slice(),a=i-o){for((n=0<a?(o=i,c):(a=-a,s)).reverse();a--;n.push(0));n.reverse()}for((a=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=a),a=0;t;)a=(s[--t]=s[t]+c[t]+a)/l|0,s[t]=l===s[t]?0:s[t]%l;return a&&(s=[a].concat(s),++o),J(e,s,o)},x.precision=x.sd=function(e,t){var n,r,a;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=C:y(t,0,8),G(new B(this),e,t);if(!(n=this.c))return null;if(r=(a=n.length-1)*u+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];10<=a;a/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},x.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},x.squareRoot=x.sqrt=function(){var e,t,r,a,i,o=this,s=o.c,l=o.s,u=o.e,c=E+4,d=new B("0.5");if(1!==l||!s||!s[0])return new B(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);if((r=0==(l=Math.sqrt(+q(o)))||l==1/0?(((t=_(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),new B(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new B(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(i=r,r=d.times(i.plus(n(o,i,c,1))),_(i.c).slice(0,l)===(t=_(r.c)).slice(0,l)){if(r.e<u&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(G(r,r.e+E+2,1),e=!r.times(r).eq(o));break}if(!a&&(G(i,i.e+E+2,0),i.times(i).eq(o))){r=i;break}c+=4,l+=4,a=1}return G(r,r.e+E+1,C,e)},x.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),U(this,e,t,1)},x.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),U(this,e,t)},x.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=R;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var a,i=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=i[0],d=i[1],m=this.s<0,p=m?c.slice(1):c,h=p.length;if(l&&(a=s,s=l,h-=l=a),0<s&&0<h){for(a=h%s||s,c=p.substr(0,a);a<h;a+=s)c+=u+p.substr(a,s);0<l&&(c+=u+p.slice(a)),m&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},x.toFraction=function(e){var t,r,a,i,s,l,c,m,p,h,f,y,g=this,b=g.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(j)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+q(c));if(!b)return new B(g);for(t=new B(j),p=r=new B(j),a=m=new B(j),y=_(b),s=t.e=y.length-g.e-1,t.c[0]=d[(l=s%u)<0?u+l:l],e=!e||0<c.comparedTo(t)?0<s?t:p:c,l=z,z=1/0,c=new B(y),m.c[0]=0;h=n(c,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=m.plus(h.times(i=p)),m=i,t=c.minus(h.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),m=m.plus(i.times(p)),r=r.plus(i.times(a)),m.s=p.s=g.s,f=n(p,a,s*=2,C).minus(g).abs().comparedTo(n(m,r,s,C).minus(g).abs())<1?[p,a]:[m,r],z=l,f},x.toNumber=function(){return+q(this)},x.toPrecision=function(e,t){return null!=e&&y(e,1,p),U(this,e,t,2)},x.toString=function(e){var t,n=this,r=n.s,a=n.e;return null===a?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?a<=H||P<=a?b(_(n.c),a):v(_(n.c),a,"0"):10===e?v(_((n=G(new B(n),E+a+1,C)).c),n.e,"0"):(y(e,2,I.length,"Base"),M(v(_(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},x.valueOf=x.toJSON=function(){return q(this)},x._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(x[Symbol.toStringTag]="BigNumber",x[Symbol.for("nodejs.util.inspect.custom")]=x.valueOf),null!=t&&B.set(t),B}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=e("./globalState"),i=e("./validating"),o=e("./parsing"),s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:s,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:s,marker:"d"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function c(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=o.parseFormat(t)),!i.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",s=t.postfix||"",c=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){var r=n.currentCurrency(),a=Object.assign({},u,t),i=void 0,o="",s=!!a.totalLength||!!a.forceAverage||a.average,l=t.currencyPosition||r.position,c=t.currencySymbol||r.symbol;a.spaceSeparated&&(o=" "),"infix"===l&&(i=o+c+o);var d=h({instance:e,providedFormat:t,state:n,decimalSeparator:i});return"prefix"===l&&(d=e._value<0&&"sign"===a.negative?"-".concat(o).concat(c).concat(d.slice(1)):c+o+d),l&&"postfix"!==l||(d=d+(o=s?"":o)+c),d}(e,t=_(t,a.currentCurrencyDefaultFormat()),a);case"percent":return function(e,t,n,r){var a=t.prefixSymbol,i=h({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},u,t);return a?"%".concat(o.spaceSeparated?" ":"").concat(i):"".concat(i).concat(o.spaceSeparated?" ":"","%")}(e,t=_(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return t=_(t,a.currentByteDefaultFormat()),v=e,w=a,k=n,L=(M=t).base||"binary",Y=l[L],T=(D=d(v._value,Y.suffixes,Y.scale)).value,S=D.suffix,O=h({instance:k(T),providedFormat:M,state:w,defaults:w.currentByteDefaultFormat()}),x=w.currentAbbreviations(),"".concat(O).concat(x.spaced?" ":"").concat(S);case"time":return t=_(t,a.currentTimeDefaultFormat()),f=e,y=Math.floor(f._value/60/60),g=Math.floor((f._value-60*y*60)/60),b=Math.round(f._value-60*y*60-60*g),"".concat(y,":").concat(g<10?"0":"").concat(g,":").concat(b<10?"0":"").concat(b);case"ordinal":return r=e,i=t=_(t,a.currentOrdinalDefaultFormat()),s=(o=a).currentOrdinal(),c=Object.assign({},u,i),m=h({instance:r,providedFormat:i,state:o}),p=s(r._value),"".concat(m).concat(c.spaceSeparated?" ":"").concat(p);case"number":default:return h({instance:e,providedFormat:t,numbro:n})}var r,i,o,s,c,m,p,f,y,g,b,v,M,w,k,L,Y,D,T,S,O,x}(e,t,n);return(c=r+c)+s}function d(e,t,n){var r=t[0],a=Math.abs(e);if(n<=a){for(var i=1;i<t.length;++i){var o=Math.pow(n,i),s=Math.pow(n,i+1);if(o<=a&&a<s){r=t[i],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function m(e){for(var t="",n=0;n<e;n++)t+="0";return t}function p(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),a=r(n.split("e"),2),i=a[0],o=a[1],s=r(i.split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(0<+o)n=l+c+m(o-c.length);else{var d=".";d=+l<0?"-0".concat(d):"0".concat(d);var p=(m(-o-1)+Math.abs(l)+c).substr(0,t);p.length<t&&(p+=m(t-p.length)),n=d+p}return 0<+o&&0<t&&(n+=".".concat(m(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function h(e){var t=e.instance,n=e.providedFormat,i=e.state,o=void 0===i?a:i,s=e.decimalSeparator,l=e.defaults,c=void 0===l?o.currentDefaults():l,d=t._value;if(0===d&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(d))return d.toString();var m,h,_,f,y,g,b,v,M=Object.assign({},u,c,n),w=M.totalLength,k=w?0:M.characteristic,L=M.optionalCharacteristic,Y=M.forceAverage,D=!!w||!!Y||M.average,T=w?-1:D&&void 0===n.mantissa?0:M.mantissa,S=!w&&(void 0===n.optionalMantissa?-1===T:M.optionalMantissa),O=M.trimMantissa,x=M.thousandSeparated,j=M.spaceSeparated,E=M.negative,C=M.forceSign,H=M.exponential,P="";if(D){var A=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,a=e.spaceSeparated,i=void 0!==a&&a,o=e.totalLength,s=void 0===o?0:o,l="",u=Math.abs(t),c=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(i?" ":"")+l),s){var d=t.toString().split(".")[0];c=Math.max(s-d.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:d,forceAverage:Y,abbreviations:o.currentAbbreviations(),spaceSeparated:j,totalLength:w});d=A.value,P+=A.abbreviation,w&&(T=A.mantissaPrecision)}if(H){var z=(h=(m={value:d,characteristicPrecision:k}).value,f=void 0===(_=m.characteristicPrecision)?0:_,g=(y=r(h.toExponential().split("e"),2))[0],b=y[1],v=+g,f&&1<f&&(v*=Math.pow(10,f-1),b=0<=(b=+b-(f-1))?"+".concat(b):b),{value:v,abbreviation:"e".concat(b)});d=z.value,P=z.abbreviation+P}var F,W,N,R=function(e,t,n,a,i){if(-1===a)return e;var o=p(t,a),s=r(o.toString().split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(c.match(/^0+$/)&&(n||i))return l;var d=c.match(/0+$/);return i&&d?"".concat(l,".").concat(c.toString().slice(0,d.index)):o.toString()}(d.toString(),d,S,T,O);return R=function(e,t,n,r,a){var i=r.currentDelimiters(),o=i.thousands;a=a||i.decimal;var s=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(u=u.slice(1)),function(e,t){for(var n=[],r=0,a=e;0<a;a--)r===t&&(n.unshift(a),r=0),r++;return n}(u.length,s).forEach((function(e,t){u=u.slice(0,e+t)+o+u.slice(e+t)})),t<0&&(u="-".concat(u))),c?u+a+c:u}(R=function(e,t,n,a){var i=e,o=r(i.toString().split("."),2),s=o[0],l=o[1];if(s.match(/^-?0$/)&&n)return l?"".concat(s.replace("0",""),".").concat(l):s.replace("0","");if(s.length<a)for(var u=a-s.length,c=0;c<u;c++)i="0".concat(i);return i.toString()}(R,0,L,k),d,x,o,s),(D||H)&&(R+=P),(C||d<0)&&(F=R,N=E,R=0===(W=d)?F:0==+F?F.replace("-",""):0<W?"+".concat(F):"sign"===N?F:"(".concat(F.replace("-",""),")")),R}function _(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.general;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.binary;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.decimal;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:_}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),a=e("./validating"),i=e("./parsing"),o={},s=void 0,l={},u=null,c={};function d(e){s=e}function m(){return l[s]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return s},o.currentCurrency=function(){return m().currency},o.currentAbbreviations=function(){return m().abbreviations},o.currentDelimiters=function(){return m().delimiters},o.currentOrdinal=function(){return m().ordinal},o.currentDefaults=function(){return Object.assign({},m().defaults,c)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().timeFormat)},o.setDefaults=function(e){e=i.parseFormat(e),a.validateFormat(e)&&(c=e)},o.getZeroFormat=function(){return u},o.setZeroFormat=function(e){return u="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==u},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return m()},o.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&d(e.languageTag)},o.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],a=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[a]?void d(a):void d(t)}d(e)},o.registerLanguage(r),s=r.languageTag,t.exports=o},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function a(e,t,n){var a=new r(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new r(i),e._value=a.minus(i).toNumber(),e}t.exports=function(e){return{add:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.plus(l).toNumber(),a;var a,i,o,s,l},subtract:function(t,n){return a(t,n,e)},multiply:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.times(l).toNumber(),a;var a,i,o,s,l},divide:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.dividedBy(l).toNumber(),a;var a,i,o,s,l},set:function(t,n){return r=t,i=a=n,e.isNumbro(a)&&(i=a._value),r._value=i,r;var r,a,i},difference:function(t,n){return r=n,a(o=(i=e)(t._value),r,i),Math.abs(o._value);var r,i,o}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("./globalState"),i=e("./validating"),o=e("./loading")(p),s=e("./unformatting"),l=e("./formatting")(p),u=e("./manipulating")(p),c=e("./parsing"),d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n;return t=e,(n=[{key:"clone",value:function(){return p(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=c.parseFormat(e)),(e=l.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.set(this,m(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),e}();function m(e){var t=e;return p.isNumbro(e)?t=e._value:"string"==typeof e?t=p.unformat(e):isNaN(e)&&(t=NaN),t}function p(e){return new d(m(e))}p.version="2.1.2",p.isNumbro=function(e){return e instanceof d},p.language=a.currentLanguage,p.registerLanguage=a.registerLanguage,p.setLanguage=a.setLanguage,p.languages=a.languages,p.languageData=a.languageData,p.zeroFormat=a.setZeroFormat,p.defaultFormat=a.currentDefaults,p.setDefaults=a.setDefaults,p.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,p.validate=i.validate,p.loadLanguagesInNode=o.loadLanguagesInNode,p.unformat=s.unformat,t.exports=p},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,a,i,o,s,l,u,c,d,m,p,h,_,f,y,g,b,v,M=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=M,i=M,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(o=(a=e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t).match(/{([^}]*)}$/))?(i.postfix=o[1],a.slice(0,-o[0].length)):a,M),s=M,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=M,(c=e.split(".")[0].match(/0+/))&&(u.characteristic=c[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,M),d=M,-1!==e.indexOf("a")&&(d.average=!0),p=M,-1!==(m=e).indexOf("K")?p.forceAverage="thousand":-1!==m.indexOf("M")?p.forceAverage="million":-1!==m.indexOf("B")?p.forceAverage="billion":-1!==m.indexOf("T")&&(p.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,M),_=M,(h=e).match(/\[\.]/)?_.optionalMantissa=!0:h.match(/\./)&&(_.optionalMantissa=!1),f=M,-1!==e.indexOf(",")&&(f.thousandSeparated=!0),y=M,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=M,(g=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),g.match(/^\+?-/)&&(b.negative="sign"),v=M,e.match(/^\+/)&&(v.forceSign=!0),M)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function a(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}t.exports={unformat:function(t,n){var i,o,s,l=e("./globalState"),u=l.currentDelimiters(),c=l.currentCurrency().symbol,d=l.currentOrdinal(),m=l.getZeroFormat(),p=l.currentAbbreviations(),h=void 0;if("string"==typeof t)h=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],a=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(a)&&!isNaN(i)}(t,u)?(o=+(i=t.split(":"))[0],s=+i[1],+i[2]+60*s+3600*o):function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",i=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,s=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,s=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var c="",d=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==t)return-1*e(d,n,i,o,s,l,u);for(var m=0;m<r.length;m++){var p=r[m];if((c=t.replace(p.key,""))!==t)return e(c,n,i,o,s,l,u)*p.factor}if((c=t.replace("%",""))!==t)return e(c,n,i,o,s,l,u)/100;var h=parseFloat(t);if(!isNaN(h)){var _=o(h);if(_&&"."!==_&&(c=t.replace(new RegExp("".concat(a(_),"$")),""))!==t)return e(c,n,i,o,s,l,u);var f={};Object.keys(l).forEach((function(e){f[l[e]]=e}));for(var y=Object.keys(f).sort().reverse(),g=y.length,b=0;b<g;b++){var v=y[b],M=f[v];if((c=t.replace(v,""))!==t){var w=void 0;switch(M){case"thousand":w=Math.pow(10,3);break;case"million":w=Math.pow(10,6);break;case"billion":w=Math.pow(10,9);break;case"trillion":w=Math.pow(10,12)}return e(c,n,i,o,s,l,u)*w}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(a(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,i,o,s,l)}(t,u,c,d,m,p,n);else{if("number"!=typeof t)return;h=t}if(void 0!==h)return h}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,o={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},s={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(i)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function l(e){return!!a.unformat(e)}function u(e,t,n){var a=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map((function(a){if(!t[a])return console.error("".concat(n," Invalid key: ").concat(a)),!1;var i=e[a],s=t[a];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!u(i,o,"[Validate ".concat(a,"]"),!0))return!1}else if(r(i)!==s.type)return console.error("".concat(n," ").concat(a,' type mismatched: "').concat(s.type,'" expected, "').concat(r(i),'" provided')),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,c=0;c<l;c++){var d=s.restrictions[c],m=d.restriction,p=d.message;if(!m(i,e))return console.error("".concat(n," ").concat(a," invalid value: ").concat(p)),!1}return s.restriction&&!s.restriction(i,e)?(console.error("".concat(n," ").concat(a," invalid value: ").concat(s.message)),!1):s.validValues&&-1===s.validValues.indexOf(i)?(console.error("".concat(n," ").concat(a," invalid value: must be among ").concat(JSON.stringify(s.validValues),', "').concat(i,'" provided')),!1):!(s.children&&!u(i,s.children,"[Validate ".concat(a,"]")))}));return a||i.push.apply(i,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(Object.keys(t).map((function(r){var a=t[r];if("string"==typeof a&&(a={type:a}),a.mandatory){var i=a.mandatory;if("function"==typeof i&&(i=i(e)),i&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),i.reduce((function(e,t){return e&&t}),!0)}function c(e){return u(e,o,"[Validate format]")}t.exports={validate:function(e,t){var n=l(e),r=c(t);return n&&r},validateFormat:c,validateInput:l,validateLanguage:function(e){return u(e,s,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){
59
  /*!
60
  * Pikaday
61
  *
62
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
63
  */
64
+ !function(t,r){"use strict";var a;try{a=n(0)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,i=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},o=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},s=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=f(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=f(a,n),e.fireEvent("on"+t,a))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},m=function(e){return e%4==0&&e%100!=0||e%400==0},p=function(e,t){return[31,m(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},_=function(e,t){return e.getTime()===t.getTime()},f=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=f({},t[r],n):!n&&a||(e[r]=t[r]);return e},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},g={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},b=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},v=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},M=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},w=function(e,t,n,r,a,i){var o,s,l,c,d,m=e._o,p=n===m.minYear,h=n===m.maxYear,_='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',f=!0,y=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===a?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(p&&o<m.minMonth||h&&o>m.maxMonth?'disabled="disabled"':"")+">"+m.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+m.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(m.yearRange)?(o=m.yearRange[0],s=m.yearRange[1]+1):(o=n-m.yearRange,s=1+n+m.yearRange),l=[];o<s&&o<=m.maxYear;o++)o>=m.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return d='<div class="pika-label">'+n+m.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",m.showMonthAfterYear?_+=d+c:_+=c+d,p&&(0===r||m.minMonth>=r)&&(f=!1),h&&(11===r||m.maxMonth<=r)&&(y=!1),0===t&&(_+='<button class="pika-prev'+(f?"":" is-disabled")+'" type="button">'+m.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(_+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+m.i18n.nextMonth+"</button>"),_+"</div>"},k=function(o){var s=this,u=s.config(o);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=a((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),i(s.el,"mousedown",s._onMouseDown,!0),i(s.el,"touchend",s._onMouseDown,!0),i(s.el,"change",s._onChange),i(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),i(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",i(u.trigger,"click",s._onInputClick),i(u.trigger,"focus",s._onInputFocus),i(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=f({},g,!0));var t=f(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),u(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||g.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a<n.getTime()||r.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,r){var a,i=this.getDate(),o=24*parseInt(r)*60*60*1e3;"add"===n?a=new Date(i.valueOf()+o):"subtract"===n&&(a=new Date(i.valueOf()-o)),t&&("add"===n?a=e(i).add(r,"days").toDate():"subtract"===n&&(a=e(i).subtract(r,"days").toDate())),this.setDate(a)},adjustCalendars:function(){this.calendars[0]=y(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=y({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(h(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=g.minDate,this._o.minYear=g.minYear,this._o.minMonth=g.minMonth,this._o.startRange=g.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(h(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=g.maxDate,this._o.maxYear=g.maxYear,this._o.maxMonth=g.maxMonth,this._o.endRange=g.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,i=n.maxYear,o=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)l+='<div class="pika-lendar">'+w(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,a,i,o,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,i=window.innerWidth||r.documentElement.clientWidth,o=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>i||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>o+s||this._o.position.indexOf("top")>-1&&u-a-e.offsetHeight>0)&&(u=u-a-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,a=new Date,i=p(e,t),o=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(o-=r.firstDay)<0&&(o+=7);for(var u,m,f,y,g=0===t?11:t-1,w=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=p(k,g),D=i+o,T=D;T>7;)T-=7;D+=7-T;for(var S=0,O=0;S<D;S++){var x=new Date(e,t,S-o+1),j=!!c(this._d)&&_(x,this._d),E=_(x,a),C=S<o||S>=i+o,H=S-o+1,P=t,A=e,z=r.startRange&&_(r.startRange,x),F=r.endRange&&_(r.endRange,x),W=r.startRange&&r.endRange&&r.startRange<x&&x<r.endRange;C&&(S<o?(H=Y+H,P=g,A=k):(H-=i,P=w,A=L));var N={day:H,month:P,year:A,isSelected:j,isToday:E,isDisabled:r.minDate&&x<r.minDate||r.maxDate&&x>r.maxDate||r.disableWeekends&&d(x)||r.disableDayFn&&r.disableDayFn(x),isEmpty:C,isStartRange:z,isEndRange:F,isInRange:W,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(N)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-o,m=t,f=e,y=void 0,void 0,y=new Date(f,0,1),'<td class="pika-week">'+Math.ceil(((new Date(f,m,u)-y)/864e5+y.getDay()+1)/7)+"</td>")),s.push(M(l,r.isRTL)),l=[],O=0)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];e.showWeekNumber&&n.push("<th></th>");for(t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+b(e,t)+'">'+b(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+(r=t,"<tbody>"+r.join("")+"</tbody>")+"</table>";var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(i(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&o(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),this._o.field&&(o(this._o.field,"change",this._onInputChange),this._o.bound&&(o(this._o.trigger,"click",this._onInputClick),o(this._o.trigger,"focus",this._onInputFocus),o(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k}(a)}()},,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),i=n(129),o=n.n(i),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var m={graph_id:null,legend_toggle:!1,graphID:null,options:{colors:null},data:null,rows:null,columns:null,diffdata:null,chartEvents:null,legendToggle:!1,chartActions:null,getChartWrapper:function(e,t){},getChartEditor:null,className:"",style:{},formatters:null,spreadSheetUrl:null,spreadSheetQueryParameters:{headers:1,gid:1},rootProps:{},chartWrapperParams:{},controls:null,render:null,toolbarItems:null,toolbarID:null},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleGoogleChartsLoaderScriptLoaded=function(e){var n=t.props,r=n.chartVersion,a=n.chartPackages,i=n.chartLanguage,o=n.mapsApiKey,s=n.onLoad;e.charts.load(r||"current",{packages:a||["corechart","controls"],language:i||"en",mapsApiKey:o}),e.charts.setOnLoadCallback((function(){s(e)}))},t}return l(t,e),t.prototype.shouldComponentUpdate=function(e){return e.chartPackages===this.props.chartPackages},t.prototype.render=function(){var e=this,t=this.props.onError;return Object(r.createElement)(o.a,{url:"https://www.gstatic.com/charts/loader.js",onError:t,onLoad:function(){var t=window;t.google&&e.handleGoogleChartsLoaderScriptLoaded(t.google)}})},t}(r.Component),h=0,_=function(){return"reactgooglegraph-"+(h+=1)},f=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#3B3EAC"],y=function(e,t,n){return void 0===n&&(n={}),c(void 0,void 0,void 0,(function(){return d(this,(function(r){return[2,new Promise((function(r,a){var i=n.headers?"headers="+n.headers:"headers=0",o=n.query?"&tq="+encodeURIComponent(n.query):"",s=n.gid?"&gid="+n.gid:"",l=n.sheet?"&sheet="+n.sheet:"",u=n.access_token?"&access_token="+n.access_token:"",c=t+"/gviz/tq?"+(""+i+s+l+o+u);new e.visualization.Query(c).send((function(e){e.isError()?a("Error in query: "+e.getMessage()+" "+e.getDetailedMessage()):r(e.getDataTable())}))}))]}))}))},g=Object(r.createContext)(m),b=g.Provider,v=g.Consumer,M=function(e){var t=e.children,n=e.value;return Object(r.createElement)(b,{value:n},t)},w=function(e){var t=e.render;return Object(r.createElement)(v,null,(function(e){return t(e)}))},k="#CCCCCC",L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={hiddenColumns:[]},t.listenToLegendToggle=function(){var e=t.props,n=e.google,r=e.googleChartWrapper;n.visualization.events.addListener(r,"select",(function(){var e=r.getChart().getSelection(),n=r.getDataTable();if(0!==e.length&&null===e[0].row&&null!==n){var a=e[0].column,i=t.getColumnID(n,a);t.state.hiddenColumns.includes(i)?t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.filter((function(e){return e!==i})).slice()})})):t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.concat([i])})}))}}))},t.applyFormatters=function(e,n){for(var r=t.props.google,a=0,i=n;a<i.length;a++){var o=i[a];switch(o.type){case"ArrowFormat":(s=new r.visualization.ArrowFormat(o.options)).format(e,o.column);break;case"BarFormat":(s=new r.visualization.BarFormat(o.options)).format(e,o.column);break;case"ColorFormat":for(var s=new r.visualization.ColorFormat(o.options),l=0,u=o.ranges;l<u.length;l++){var c=u[l];s.addRange.apply(s,c)}s.format(e,o.column);break;case"DateFormat":(s=new r.visualization.DateFormat(o.options)).format(e,o.column);break;case"NumberFormat":(s=new r.visualization.NumberFormat(o.options)).format(e,o.column);break;case"PatternFormat":(s=new r.visualization.PatternFormat(o.options)).format(e,o.column)}}},t.getColumnID=function(e,t){return e.getColumnId(t)||e.getColumnLabel(t)},t.draw=function(e){var n=e.data,r=e.diffdata,a=e.rows,i=e.columns,o=e.options,s=e.legend_toggle,l=e.legendToggle,u=e.chartType,m=e.formatters,p=e.spreadSheetUrl,h=e.spreadSheetQueryParameters;return c(t,void 0,void 0,(function(){var e,t,c,_,f,g,b,v,M,w,k,L,Y,D;return d(this,(function(d){switch(d.label){case 0:return e=this.props,t=e.google,c=e.googleChartWrapper,f=null,null!==r&&(g=t.visualization.arrayToDataTable(r.old),b=t.visualization.arrayToDataTable(r.new),f=t.visualization[u].prototype.computeDiff(g,b)),null===n?[3,1]:(_=Array.isArray(n)?t.visualization.arrayToDataTable(n):new t.visualization.DataTable(n),[3,5]);case 1:return null===a||null===i?[3,2]:(_=t.visualization.arrayToDataTable([i].concat(a)),[3,5]);case 2:return null===p?[3,4]:[4,y(t,p,h)];case 3:return _=d.sent(),[3,5];case 4:_=t.visualization.arrayToDataTable([]),d.label=5;case 5:for(v=_.getNumberOfColumns(),M=0;M<v;M+=1)w=this.getColumnID(_,M),this.state.hiddenColumns.includes(w)&&(k=_.getColumnLabel(M),L=_.getColumnId(M),Y=_.getColumnType(M),_.removeColumn(M),_.addColumn({label:k,id:L,type:Y}));return D=c.getChart(),"Timeline"===c.getChartType()&&D&&D.clearChart(),c.setChartType(u),c.setOptions(o),c.setDataTable(_),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(_),null!==f&&(c.setDataTable(f),c.draw()),null!==m&&(this.applyFormatters(_,m),c.setDataTable(_),c.draw()),!0!==l&&!0!==s||this.grayOutHiddenColumns({options:o}),[2]}}))}))},t.grayOutHiddenColumns=function(e){var n=e.options,r=t.props.googleChartWrapper,a=r.getDataTable();if(null!==a){var i=a.getNumberOfColumns();if(!1!==t.state.hiddenColumns.length>0){var o=Array.from({length:i-1}).map((function(e,r){var i=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(i)?k:void 0!==n.colors&&null!==n.colors?n.colors[r]:f[r]}));r.setOptions(u({},n,{colors:o})),r.draw()}}},t.onResize=function(){t.props.googleChartWrapper.draw()},t}return l(t,e),t.prototype.componentDidMount=function(){this.draw(this.props),window.addEventListener("resize",this.onResize),(this.props.legend_toggle||this.props.legendToggle)&&this.listenToLegendToggle()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.google,n=e.googleChartWrapper;window.removeEventListener("resize",this.onResize),t.visualization.events.removeAllListeners(n),"Timeline"===n.getChartType()&&n.getChart()&&n.getChart().clearChart()},t.prototype.componentDidUpdate=function(){this.draw(this.props)},t.prototype.render=function(){return null},t}(r.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.componentDidMount=function(){},t.prototype.componentWillUnmount=function(){},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.google,n=e.googleChartWrapper,a=e.googleChartDashboard;return Object(r.createElement)(w,{render:function(e){return Object(r.createElement)(L,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.listenToEvents=function(e){var t=this,n=e.chartEvents,r=e.google,a=e.googleChartWrapper;if(null!==n){r.visualization.events.removeAllListeners(a);for(var i=function(e){var n=e.eventName,i=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];i({chartWrapper:a,props:t.props,google:r,eventArgs:e})}))},o=0,s=n;o<s.length;o++){i(s[o])}}},t.prototype.render=function(){var e=this,t=this.props,n=t.google,a=t.googleChartWrapper;return Object(r.createElement)(w,{render:function(t){return e.listenToEvents({chartEvents:t.chartEvents||null,google:n,googleChartWrapper:a}),null}})},t}(r.Component),T=0,S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={googleChartWrapper:null,googleChartDashboard:null,googleChartControls:null,googleChartEditor:null,isReady:!1},t.graphID=null,t.dashboard_ref=Object(r.createRef)(),t.toolbar_ref=Object(r.createRef)(),t.getGraphID=function(){var e,n=t.props,r=n.graphID,a=n.graph_id;return e=null===r&&null===a?null===t.graphID?_():t.graphID:null!==r&&null===a?r:null!==a&&null===r?a:r,t.graphID=e,t.graphID},t.getControlID=function(e,t){return T+=1,void 0===e?"googlechart-control-"+t+"-"+T:e},t.addControls=function(e,n){var r=t.props,a=r.google,i=r.controls,o=null===i?null:i.map((function(e,n){var r=e.controlID,i=e.controlType,o=e.options,s=e.controlWrapperParams,l=t.getControlID(r,n);return{controlProp:e,control:new a.visualization.ControlWrapper(u({containerId:l,controlType:i,options:o},s))}}));if(null===o)return null;n.bind(o.map((function(e){return e.control})),e);for(var s=function(n){for(var r=n.control,i=n.controlProp.controlEvents,o=function(n){var i=n.callback,o=n.eventName;a.visualization.events.removeListener(r,o,i),a.visualization.events.addListener(r,o,(function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];i({chartWrapper:e,controlWrapper:r,props:t.props,google:a,eventArgs:n})}))},s=0,l=void 0===i?[]:i;s<l.length;s++){o(l[s])}},l=0,c=o;l<c.length;l++){s(c[l])}return o},t.renderChart=function(){var e=t.props,n=e.width,a=e.height,i=e.options,o=e.style,s=e.className,l=e.rootProps,c=e.google,d=u({height:a||i&&i.height,width:n||i&&i.width},o);return Object(r.createElement)("div",u({id:t.getGraphID(),style:d,className:s},l),t.state.isReady&&null!==t.state.googleChartWrapper?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Y,{googleChartWrapper:t.state.googleChartWrapper,google:c,googleChartDashboard:t.state.googleChartDashboard}),Object(r.createElement)(D,{googleChartWrapper:t.state.googleChartWrapper,google:c})):null)},t.renderControl=function(e){return void 0===e&&(e=function(e){e.control,e.controlProp;return!0}),t.state.isReady&&null!==t.state.googleChartControls?Object(r.createElement)(r.Fragment,null,t.state.googleChartControls.filter((function(t){var n=t.controlProp,r=t.control;return e({control:r,controlProp:n})})).map((function(e){var t=e.control;e.controlProp;return Object(r.createElement)("div",{key:t.getContainerId(),id:t.getContainerId()})}))):null},t.renderToolBar=function(){return null===t.props.toolbarItems?null:Object(r.createElement)("div",{ref:t.toolbar_ref})},t}return l(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.options,n=e.google,r=e.chartType,a=e.chartWrapperParams,i=e.toolbarItems,o=e.getChartEditor,s=e.getChartWrapper,l=u({chartType:r,options:t,containerId:this.getGraphID()},a),c=new n.visualization.ChartWrapper(l);c.setOptions(t),s(c,n);var d=new n.visualization.Dashboard(this.dashboard_ref),m=this.addControls(c,d);null!==i&&n.visualization.drawToolbar(this.toolbar_ref.current,i);var p=null;null!==o&&o({chartEditor:p=new n.visualization.ChartEditor,chartWrapper:c,google:n}),this.setState({googleChartEditor:p,googleChartControls:m,googleChartDashboard:d,googleChartWrapper:c,isReady:!0})},t.prototype.componentDidUpdate=function(){if(null!==this.state.googleChartWrapper&&null!==this.state.googleChartDashboard&&null!==this.state.googleChartControls)for(var e=this.props.controls,t=0;t<e.length;t+=1){var n=e[t],r=n.controlType,a=n.options,i=n.controlWrapperParams;i&&"state"in i&&this.state.googleChartControls[t].control.setState(i.state),this.state.googleChartControls[t].control.setOptions(a),this.state.googleChartControls[t].control.setControlType(r)}},t.prototype.shouldComponentUpdate=function(e,t){return this.state.isReady!==t.isReady||e.controls!==this.props.controls},t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,a=e.options,i=e.style,o=u({height:n||a&&a.height,width:t||a&&a.width},i);return null!==this.props.render?Object(r.createElement)("div",{ref:this.dashboard_ref,style:o},Object(r.createElement)("div",{ref:this.toolbar_ref,id:"toolbar"}),this.props.render({renderChart:this.renderChart,renderControl:this.renderControl,renderToolbar:this.renderToolBar})):Object(r.createElement)("div",{ref:this.dashboard_ref,style:o},this.renderControl((function(e){return"bottom"!==e.controlProp.controlPosition})),this.renderChart(),this.renderControl((function(e){return"bottom"===e.controlProp.controlPosition})),this.renderToolBar())},t}(r.Component),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isMounted=!1,t.state={loadingStatus:"loading",google:null},t.onLoad=function(e){if(t.isFullyLoaded(e))t.onSuccess(e);else var n=setInterval((function(){var e=window.google;t._isMounted?e&&t.isFullyLoaded(e)&&(clearInterval(n),t.onSuccess(e)):clearInterval(n)}),1e3)},t.onSuccess=function(e){t.setState({loadingStatus:"ready",google:e})},t.onError=function(){t.setState({loadingStatus:"errored"})},t}return l(t,e),t.prototype.render=function(){var e=this.props,t=e.chartLanguage,n=e.chartPackages,a=e.chartVersion,i=e.mapsApiKey,o=e.loader,s=e.errorElement;return Object(r.createElement)(M,{value:this.props},"ready"===this.state.loadingStatus&&null!==this.state.google?Object(r.createElement)(S,u({},this.props,{google:this.state.google})):"errored"===this.state.loadingStatus&&s?s:o,Object(r.createElement)(p,u({},{chartLanguage:t,chartPackages:n,chartVersion:a,mapsApiKey:i},{onLoad:this.onLoad,onError:this.onError})))},t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.isFullyLoaded=function(e){var t=this.props,n=t.controls,r=t.toolbarItems,a=t.getChartEditor;return e&&e.visualization&&e.visualization.ChartWrapper&&e.visualization.Dashboard&&(!n||e.visualization.ChartWrapper)&&(!a||e.visualization.ChartEditor)&&(!r||e.visualization.drawToolbar)},t.defaultProps=m,t}(r.Component),x=n(130),j=n.n(x);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var z=wp.element,F=z.Component,W=z.Fragment,N=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?P(e):t}(this,H(t).apply(this,arguments))).initDataTable=e.initDataTable.bind(P(e)),e.dataRenderer=e.dataRenderer.bind(P(e)),e.table,e.uniqueId=j()(),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.initDataTable(this.props.columns,this.props.rows)}},{key:"componentWillUnmount",value:function(){this.table.destroy()}},{key:"componentDidUpdate",value:function(e){this.props!==e&&(this.props.options.responsive_bool!==e.options.responsive_bool&&"true"===e.options.responsive_bool&&document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).classList.remove("collapsed"),this.table.destroy(),document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).innerHTML="",this.initDataTable(this.props.columns,this.props.rows))}},{key:"initDataTable",value:function(e,t){var n=this,r=this.props.options,a=e.map((function(e,t){var r=e.type;switch(e.type){case"number":r="num";break;case"date":case"datetime":case"timeofday":r="date"}return{title:e.label,data:e.label,type:r,render:n.dataRenderer(i,r,t)}})),i=t.map((function(e){var t={};return a.forEach((function(n,r){t[n.data]=e[r]})),t}));this.table=jQuery("#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).DataTable({destroy:!0,data:i,columns:a,paging:"true"===r.paging_bool,pageLength:r.pageLength_int||10,pagingType:r.pagingType,ordering:"false"!==r.ordering_bool,fixedHeader:"true"===r.fixedHeader_bool,scrollCollapse:!(!this.props.chartsScreen&&"true"!==r.scrollCollapse_bool),scrollY:(this.props.chartsScreen?180:"true"===r.scrollCollapse_bool&&Number(r.scrollY_int))||!1,responsive:!(!this.props.chartsScreen&&"true"!==r.responsive_bool),searching:!1,select:!1,lengthChange:!1,bFilter:!1,bInfo:!1})}},{key:"dataRenderer",value:function(e,t,n){var r=this.props.options;if(void 0===r.series[n])return e;if("date"===t||"datetime"===t||"timeofday"===t)return r.series[n].format&&r.series[n].format.from&&r.series[n].format.to?jQuery.fn.dataTable.render.moment(r.series[n].format.from,r.series[n].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");if("num"===t){var a,i=["","","","",""];return r.series[n].format.thousands&&(i[0]=r.series[n].format.thousands),r.series[n].format.decimal&&(i[1]=r.series[n].format.decimal),r.series[n].format.precision&&(i[2]=r.series[n].format.precision),r.series[n].format.prefix&&(i[3]=r.series[n].format.prefix),r.series[n].format.suffix&&(i[4]=r.series[n].format.suffix),(a=jQuery.fn.dataTable.render).number.apply(a,i)}return e}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(W,null,e.customcss&&wp.element.createElement("style",null,e.customcss.oddTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.odd {\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.color?"color: ".concat(e.customcss.oddTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow["background-color"]?"background-color: ".concat(e.customcss.oddTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.transform?"transform: rotate( ".concat(e.customcss.oddTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.evenTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.even {\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.color?"color: ".concat(e.customcss.evenTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow["background-color"]?"background-color: ".concat(e.customcss.evenTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.transform?"transform: rotate( ".concat(e.customcss.evenTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.tableCell&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr td,\n\t\t\t\t\t\t\t#dataTable-instances-").concat(this.props.id,"-").concat(this.uniqueId,"_wrapper tr th {\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.color?"color: ".concat(e.customcss.tableCell.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell["background-color"]?"background-color: ".concat(e.customcss.tableCell["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.transform?"transform: rotate( ".concat(e.customcss.tableCell.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}")),wp.element.createElement("table",{id:"dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)}))}}])&&C(n.prototype,r),a&&C(n,a),t}(F),R=n(4),I=n.n(R),B=n(131),U=n.n(B),V=function(e){return Object.keys(e["visualizer-series"]).map((function(t){void 0!==e["visualizer-series"][t].type&&"date"===e["visualizer-series"][t].type&&Object.keys(e["visualizer-data"]).map((function(n){return e["visualizer-data"][n][t]=new Date(e["visualizer-data"][n][t])}))})),e},J=function(e){var t;if(Array.isArray(e))return 0<e.length;if(I()(e)){for(t in e)return!0;return!1}return"string"==typeof e?0<e.length:null!=e},G=function(e){return U()(e,J)},q=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},G(e)},$=function(e){try{JSON.parse(e)}catch(e){return!1}return!0};function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Z(i,r,a,o,s,"next",e)}function s(e){Z(i,r,a,o,s,"throw",e)}o(void 0)}))}}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e,t){return(ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var re=lodash.startCase,ae=wp.i18n.__,ie=wp.apiFetch,oe=wp.element,se=oe.Component,le=oe.Fragment,ue=wp.components,ce=ue.Button,de=ue.Dashicon,me=ue.ExternalLink,pe=ue.Notice,he=ue.Placeholder,_e=ue.Spinner,fe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==K(t)&&"function"!=typeof t?te(e):t}(this,ee(t).apply(this,arguments))).loadMoreCharts=e.loadMoreCharts.bind(te(e)),e.state={charts:null,isBusy:!1,chartsLoaded:!1},e}var n,r,a,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ne(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=Q(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie({path:"wp/v2/visualizer/?per_page=6&meta_key=visualizer-chart-library&meta_value=ChartJS"});case 2:t=e.sent,this.setState({charts:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"loadMoreCharts",value:(i=Q(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.charts.length,n=this.state.chartsLoaded,this.setState({isBusy:!0}),e.next=5,ie({path:"wp/v2/visualizer/?per_page=6&meta_key=visualizer-chart-library&meta_value=ChartJS&offset=".concat(t)});case 5:6>(r=e.sent).length&&(n=!0),this.setState({charts:this.state.charts.concat(r),isBusy:!1,chartsLoaded:n});case 8:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=t.charts,r=t.isBusy,a=t.chartsLoaded;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(pe,{status:"warning",isDismissible:!1},ae("ChartJS charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag."),wp.element.createElement(me,{href:visualizerLocalize.adminPage},ae("Click here to visit Visualizer Charts Library."))),null!==n?1<=n.length?wp.element.createElement(le,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(n).map((function(t){var r,a,i=V(n[t].chart_data);if(r=i["visualizer-settings"].title?i["visualizer-settings"].title:"#".concat(n[t].id),a=0<=["gauge","table","timeline","dataTable"].indexOf(i["visualizer-chart-type"])?"dataTable"===i["visualizer-chart-type"]?i["visualizer-chart-type"]:re(i["visualizer-chart-type"]):"".concat(re(i["visualizer-chart-type"]),"Chart"),!i["visualizer-chart-library"]||"ChartJS"!==i["visualizer-chart-library"])return wp.element.createElement("div",{className:"visualizer-settings__charts-single"},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},r),"dataTable"===a?wp.element.createElement(N,{id:n[t].id,rows:i["visualizer-data"],columns:i["visualizer-series"],chartsScreen:!0,options:q(i["visualizer-settings"])}):wp.element.createElement(O,{chartType:a,rows:i["visualizer-data"],columns:i["visualizer-series"],options:q(i["visualizer-settings"])}),wp.element.createElement("div",{className:"visualizer-settings__charts-controls",title:ae("Insert Chart"),onClick:function(){return e.props.getChart(n[t].id)}},wp.element.createElement(de,{icon:"upload"})))}))),!a&&5<n.length&&wp.element.createElement(ce,{isPrimary:!0,isLarge:!0,onClick:this.loadMoreCharts,isBusy:r},ae("Load More"))):wp.element.createElement("p",{className:"visualizer-no-charts"},ae("No charts found.")):wp.element.createElement(he,null,wp.element.createElement(_e,null)))}}])&&X(n.prototype,r),a&&X(n,a),t}(se);function ye(e){return(ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ve(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var we=wp.i18n.__,ke=wp.element.Component,Le=wp.components,Ye=Le.Button,De=Le.ExternalLink,Te=Le.PanelBody,Se=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ye(t)&&"function"!=typeof t?ve(e):t}(this,be(t).apply(this,arguments))).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(ve(e)),e.uploadImport=e.uploadImport.bind(ve(e)),e.state={uploadLabel:we("Upload")},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Me(e,t)}(t,e),n=t,(r=[{key:"fileUploaded",value:function(e){"text/csv"===e.target.files[0].type&&this.setState({uploadLabel:we("Upload")})}},{key:"uploadImport",value:function(){this.props.readUploadedFile(this.uploadInput),this.setState({uploadLabel:we("Uploaded")})}},{key:"render",value:function(){return wp.element.createElement(Te,{title:we("Import data from file"),initialOpen:!1},wp.element.createElement("p",null,we("Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,we("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(De,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("input",{type:"file",accept:"text/csv",ref:this.uploadInput,onChange:this.fileUploaded}),wp.element.createElement(Ye,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&ge(n.prototype,r),a&&ge(n,a),t}(ke);function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function je(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var He=wp.i18n.__,Pe=wp.element.Component,Ae=wp.components,ze=Ae.Button,Fe=Ae.ExternalLink,We=Ae.PanelBody,Ne=Ae.SelectControl,Re=Ae.TextControl,Ie=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),je(this,Ee(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ce(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return wp.element.createElement(We,{title:He("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(We,{title:He("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,He("You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,He("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(Fe,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("p",null,He("You can also import data from Google Spreadsheet.")),wp.element.createElement(Re,{placeholder:He("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(ze,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},He("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(We,{title:He("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,He("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,He("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,He("We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.")),wp.element.createElement(Re,{placeholder:He("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(Ne,{label:He("How often do you want to check the url?"),value:this.props.chart["visualizer-chart-schedule"]?this.props.chart["visualizer-chart-schedule"]:1,options:[{label:He("Each hour"),value:"1"},{label:He("Each 12 hours"),value:"12"},{label:He("Each day"),value:"24"},{label:He("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(ze,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},He("Save Schedule"))):wp.element.createElement(We,{title:He("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,He("Enable this feature in BUSINESS version!")),wp.element.createElement(ze,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},He("Buy Now"))))}}])&&xe(n.prototype,r),a&&xe(n,a),t}(Pe);function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ue(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Je(e,t){return!t||"object"!==Be(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ge(e){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t){return(qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $e=wp.i18n.__,Ke=wp.apiFetch,Ze=wp.element,Qe=Ze.Component,Xe=Ze.Fragment,et=wp.components,tt=et.Button,nt=et.PanelBody,rt=et.Placeholder,at=et.SelectControl,it=et.Spinner,ot=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Je(this,Ge(t).apply(this,arguments))).state={id:"",charts:[]},e}var n,r,a,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qe(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(i=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ke({path:"wp/v2/visualizer/?per_page=100"});case 2:t=(t=e.sent).map((function(e,t){var r=e.chart_data["visualizer-settings"].title?e.chart_data["visualizer-settings"].title:"#".concat(e.id);return 0===t&&(n=e.id),{value:e.id,label:r}})),this.setState({id:n,charts:t});case 5:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var a=i.apply(e,t);function o(e){Ue(a,n,r,o,s,"next",e)}function s(e){Ue(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"community"!==visualizerLocalize.isPro?wp.element.createElement(nt,{title:$e("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(Xe,null,wp.element.createElement(at,{label:$e("You can import here data from your previously created charts."),value:this.state.id,options:this.state.charts,onChange:function(t){return e.setState({id:t})}}),wp.element.createElement(tt,{isPrimary:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},$e("Import Chart"))):wp.element.createElement(rt,null,wp.element.createElement(it,null))):wp.element.createElement(nt,{title:$e("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,$e("Enable this feature in PRO version!")),wp.element.createElement(tt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},$e("Buy Now")))}}])&&Ve(n.prototype,r),a&&Ve(n,a),t}(Qe),st=n(132);n(152);function lt(e){return(lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ct(e,t){return!t||"object"!==lt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mt(e,t){return(mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pt=wp.i18n.__,ht=wp.element.Component,_t=wp.components,ft=_t.Button,yt=_t.ButtonGroup,gt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ct(this,dt(t).apply(this,arguments))).data=[],e.dates=[],e.types=["string","number","boolean","date","datetime","timeofday"],e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mt(e,t)}(t,e),n=t,(r=[{key:"componentWillMount",value:function(){var e=this;this.data[this.data.length]=[],this.data[this.data.length]=[],this.props.chart["visualizer-series"].map((function(t,n){e.data[0][n]=t.label,e.data[1][n]=t.type,"date"===t.type&&e.dates.push(n)})),this.props.chart["visualizer-data"].map((function(t){e.data[e.data.length]=t}))}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"visualizer-chart-editor"},wp.element.createElement(st.HotTable,{data:this.data,allowInsertRow:!0,contextMenu:!0,rowHeaders:!0,colHeaders:!0,allowInvalid:!1,className:"htEditor",cells:function(t,n,r){var a;return 1===t&&(a={type:"autocomplete",source:e.types,strict:!1}),0<=e.dates.indexOf(n)&&1<t&&(a={type:"date",dateFormat:"YYYY-MM-DD",correctFormat:!0}),a}}),wp.element.createElement(yt,null,wp.element.createElement(ft,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},pt("Close")),wp.element.createElement(ft,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},pt("Save"))))}}])&&ut(n.prototype,r),a&&ut(n,a),t}(ht);function bt(e){return(bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Lt=wp.i18n.__,Yt=wp.element,Dt=Yt.Component,Tt=Yt.Fragment,St=wp.components,Ot=St.Button,xt=St.Modal,jt=St.PanelBody,Et=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==bt(t)&&"function"!=typeof t?wt(e):t}(this,Mt(t).apply(this,arguments))).toggleModal=e.toggleModal.bind(wt(e)),e.state={isOpen:!1},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kt(e,t)}(t,e),n=t,(r=[{key:"toggleModal",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return"community"!==visualizerLocalize.isPro?wp.element.createElement(Tt,null,wp.element.createElement(jt,{title:Lt("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,Lt("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(Ot,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},Lt("View Editor"))),this.state.isOpen&&wp.element.createElement(xt,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(gt,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(jt,{title:Lt("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Lt("Enable this feature in PRO version!")),wp.element.createElement(Ot,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Lt("Buy Now")))}}])&&vt(n.prototype,r),a&&vt(n,a),t}(Dt);function Ct(e){return(Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pt(e,t){return!t||"object"!==Ct(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function At(e){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ft=wp.i18n.__,Wt=wp.element.Component,Nt=wp.editor.ColorPalette,Rt=wp.components,It=Rt.BaseControl,Bt=Rt.CheckboxControl,Ut=Rt.PanelBody,Vt=Rt.SelectControl,Jt=Rt.TextControl,Gt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Pt(this,At(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:Ft("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];return-1>=["timeline"].indexOf(t)&&(r[1]={label:Ft("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:Ft("The tooltip will not be displayed"),value:"none"},wp.element.createElement(Ut,{title:Ft("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ut,{title:Ft("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jt,{label:Ft("Chart Title"),help:Ft("Text to display above the chart."),value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Vt,{label:Ft("Chart Title Position"),help:Ft("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:Ft("Inside the chart"),value:"in"},{label:Ft("Outside the chart"),value:"out"},{label:Ft("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(It,{label:Ft("Chart Title Color")},wp.element.createElement(Nt,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Vt,{label:Ft("Axes Titles Position"),help:Ft("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:Ft("Inside the chart"),value:"in"},{label:Ft("Outside the chart"),value:"out"},{label:Ft("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Ut,{title:Ft("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vt,{label:Ft("Font Family"),help:Ft("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:Ft("Arial"),value:"Arial"},{label:Ft("Sans Serif"),value:"Sans Serif"},{label:Ft("Serif"),value:"serif"},{label:Ft("Arial"),value:"Arial"},{label:Ft("Wide"),value:"Arial black"},{label:Ft("Narrow"),value:"Arial Narrow"},{label:Ft("Comic Sans MS"),value:"Comic Sans MS"},{label:Ft("Courier New"),value:"Courier New"},{label:Ft("Garamond"),value:"Garamond"},{label:Ft("Georgia"),value:"Georgia"},{label:Ft("Tahoma"),value:"Tahoma"},{label:Ft("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Vt,{label:Ft("Font Size"),help:Ft("The default font size for all text in the chart."),value:n.fontSize?n.fontSize:"15",options:[{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"}],onChange:function(t){n.fontSize=t,e.props.edit(n)}})),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Ut,{title:Ft("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vt,{label:Ft("Position"),help:Ft("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:[{label:Ft("Left of the chart"),value:"left"},{label:Ft("Right of the chart"),value:"right"},{label:Ft("Above the chart"),value:"top"},{label:Ft("Below the chart"),value:"bottom"},{label:Ft("Inside the chart"),value:"in"},{label:Ft("Omit the legend"),value:"none"}],onChange:function(r){if("pie"!==t){var a="left"===r?1:0;Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Vt,{label:Ft("Alignment"),help:Ft("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:Ft("Aligned to the start of the allocated area"),value:"start"},{label:Ft("Centered in the allocated area"),value:"center"},{label:Ft("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(It,{label:Ft("Font Color")},wp.element.createElement(Nt,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["table","gauge","geo","dataTable"].indexOf(t)&&wp.element.createElement(Ut,{title:Ft("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Vt,{label:Ft("Trigger"),help:Ft("Determines the user interaction that causes the tooltip to be displayed."),value:n.tooltip.trigger?n.tooltip.trigger:"focus",options:r,onChange:function(t){n.tooltip.trigger=t,e.props.edit(n)}}),wp.element.createElement(Vt,{label:Ft("Show Color Code"),help:Ft("If set to yes, will show colored squares next to the slice information in the tooltip."),value:n.tooltip.showColorCode?n.tooltip.showColorCode:"0",options:[{label:Ft("Yes"),value:"1"},{label:Ft("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Vt,{label:Ft("Text"),help:Ft("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:Ft("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:Ft("Display only the absolute value of the slice"),value:"value"},{label:Ft("Display only the percentage of the whole represented by the slice"),value:"percentage"}],onChange:function(t){n.tooltip.text=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Ut,{title:Ft("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bt,{label:Ft("Animate on startup?"),help:Ft("Determines if the chart will animate on the initial draw."),checked:Number(n.animation.startup),onChange:function(t){n.animation.startup=t?"1":"0",e.props.edit(n)}}),wp.element.createElement(Jt,{label:Ft("Duration"),help:Ft("The duration of the animation, in milliseconds."),type:"number",value:n.animation.duration,onChange:function(t){n.animation.duration=t,e.props.edit(n)}}),wp.element.createElement(Vt,{label:Ft("Easing"),help:Ft("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:Ft("Constant speed"),value:"linear"},{label:Ft("Start slow and speed up"),value:"in"},{label:Ft("Start fast and slow down"),value:"out"},{label:Ft("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&Ht(n.prototype,r),a&&Ht(n,a),t}(Wt);function qt(e){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e,t){return!t||"object"!==qt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zt(e){return(Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qt(e,t){return(Qt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Xt=wp.i18n.__,en=wp.element,tn=en.Component,nn=en.Fragment,rn=wp.editor.ColorPalette,an=wp.components,on=an.BaseControl,sn=an.ExternalLink,ln=an.PanelBody,un=an.SelectControl,cn=an.TextControl,dn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Kt(this,Zt(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ln,{title:Xt("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ln,{title:Xt("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(cn,{label:Xt("Axis Title"),help:Xt("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(un,{label:Xt("Text Position"),help:Xt("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Xt("Inside the chart"),value:"in"},{label:Xt("Outside the chart"),value:"out"},{label:Xt("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(un,{label:Xt("Direction"),help:Xt("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Xt("Identical Direction"),value:"1"},{label:Xt("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(on,{label:Xt("Base Line Color")},wp.element.createElement(rn,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(on,{label:Xt("Axis Text Color")},wp.element.createElement(rn,{value:n.hAxis.textStyle.color||n.hAxis.textStyle,onChange:function(t){n.hAxis.textStyle={},n.hAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(nn,null,wp.element.createElement(cn,{label:Xt("Number Format"),help:Xt("Enter custom format pattern to apply to horizontal axis labels."),value:n.hAxis.format,onChange:function(t){n.hAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,Xt("For number axis labels, this is a subset of the formatting "),wp.element.createElement(sn,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Xt("ICU pattern set.")),Xt(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Xt("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(sn,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Xt("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(nn,null,wp.element.createElement(ln,{title:Xt("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(cn,{label:Xt("Count"),help:Xt("The number of horizontal gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines."),value:n.hAxis.gridlines?n.hAxis.gridlines.count:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(on,{label:Xt("Color")},wp.element.createElement(rn,{value:n.hAxis.gridlines?n.hAxis.gridlines.color:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ln,{title:Xt("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(cn,{label:Xt("Count"),help:Xt("The number of horizontal minor gridlines between two regular gridlines."),value:n.hAxis.minorGridlines.count,onChange:function(t){n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(on,{label:Xt("Color")},wp.element.createElement(rn,{value:n.hAxis.minorGridlines.color,onChange:function(t){n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ln,{title:Xt("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(cn,{label:Xt("Maximun Value"),help:Xt("The maximum vertical data value to render."),value:n.hAxis.viewWindow.max,onChange:function(t){n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(cn,{label:Xt("Minimum Value"),help:Xt("The minimum vertical data value to render."),value:n.hAxis.viewWindow.min,onChange:function(t){n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&$t(n.prototype,r),a&&$t(n,a),t}(tn);function mn(e){return(mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hn(e,t){return!t||"object"!==mn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fn(e,t){return(fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var yn=wp.i18n.__,gn=wp.element,bn=gn.Component,vn=gn.Fragment,Mn=wp.editor.ColorPalette,wn=wp.components,kn=wn.BaseControl,Ln=wn.ExternalLink,Yn=wn.PanelBody,Dn=wn.SelectControl,Tn=wn.TextControl,Sn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),hn(this,_n(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(Yn,{title:yn("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Yn,{title:yn("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tn,{label:yn("Axis Title"),help:yn("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(Dn,{label:yn("Text Position"),help:yn("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:yn("Inside the chart"),value:"in"},{label:yn("Outside the chart"),value:"out"},{label:yn("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(Dn,{label:yn("Direction"),help:yn("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:yn("Identical Direction"),value:"1"},{label:yn("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(kn,{label:yn("Base Line Color")},wp.element.createElement(Mn,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(kn,{label:yn("Axis Text Color")},wp.element.createElement(Mn,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(vn,null,wp.element.createElement(Tn,{label:yn("Number Format"),help:yn("Enter custom format pattern to apply to Vertical axis labels."),value:n.vAxis.format,onChange:function(t){n.vAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,yn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ln,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},yn("ICU pattern set.")),yn(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,yn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Ln,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},yn("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(vn,null,wp.element.createElement(Yn,{title:yn("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tn,{label:yn("Count"),help:yn("The number of Vertical gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines."),value:n.vAxis.gridlines?n.vAxis.gridlines.count:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(kn,{label:yn("Color")},wp.element.createElement(Mn,{value:n.vAxis.gridlines?n.vAxis.gridlines.color:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(Yn,{title:yn("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tn,{label:yn("Count"),help:yn("The number of Vertical minor gridlines between two regular gridlines."),value:n.vAxis.minorGridlines.count,onChange:function(t){n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(kn,{label:yn("Color")},wp.element.createElement(Mn,{value:n.vAxis.minorGridlines.color,onChange:function(t){n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(Yn,{title:yn("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tn,{label:yn("Maximun Value"),help:yn("The maximum vertical data value to render."),value:n.vAxis.viewWindow.max,onChange:function(t){n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Tn,{label:yn("Minimum Value"),help:yn("The minimum vertical data value to render."),value:n.vAxis.viewWindow.min,onChange:function(t){n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&pn(n.prototype,r),a&&pn(n,a),t}(bn);function On(e){return(On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jn(e,t){return!t||"object"!==On(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function En(e){return(En=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cn(e,t){return(Cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Hn=wp.i18n.__,Pn=wp.element,An=Pn.Component,zn=Pn.Fragment,Fn=wp.editor.ColorPalette,Wn=wp.components,Nn=Wn.BaseControl,Rn=Wn.ExternalLink,In=Wn.PanelBody,Bn=Wn.SelectControl,Un=Wn.TextControl,Vn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),jn(this,En(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(In,{title:Hn("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(zn,null,wp.element.createElement(Un,{label:Hn("Number Format"),help:Hn("Enter custom format pattern to apply to chart labels."),value:t.format,onChange:function(n){t.format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Hn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Rn,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Hn("ICU pattern set.")),Hn(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Hn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Rn,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Hn("ICU date and time format.")))),wp.element.createElement(Bn,{label:Hn("Is 3D"),help:Hn("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:Hn("Yes"),value:"1"},{label:Hn("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Bn,{label:Hn("Reverse Categories"),help:Hn("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:Hn("Yes"),value:"1"},{label:Hn("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Bn,{label:Hn("Slice Text"),help:Hn("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:Hn("The percentage of the slice size out of the total"),value:"percentage"},{label:Hn("The quantitative value of the slice"),value:"value"},{label:Hn("The name of the slice"),value:"label"},{label:Hn("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:Hn("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Un,{label:Hn("Pie Hole"),help:Hn("If between 0 and 1, displays a donut chart. The hole with have a radius equal to number times the radius of the chart. Only applicable when the chart is two-dimensional."),placeholder:Hn("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Un,{label:Hn("Start Angle"),help:Hn("The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up."),value:t.pieStartAngle,onChange:function(n){t.pieStartAngle=n,e.props.edit(t)}}),wp.element.createElement(Nn,{label:Hn("Slice Border Color")},wp.element.createElement(Fn,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&xn(n.prototype,r),a&&xn(n,a),t}(An);function Jn(e){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qn(e,t){return!t||"object"!==Jn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kn(e,t){return(Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zn=wp.i18n.__,Qn=wp.element.Component,Xn=wp.editor.ColorPalette,er=wp.components,tr=er.BaseControl,nr=er.PanelBody,rr=er.TextControl,ar=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),qn(this,$n(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(nr,{title:Zn("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(rr,{label:Zn("Visibility Threshold"),help:Zn("The slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree."),placeholder:Zn("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(rr,{label:Zn("Residue Slice Label"),help:Zn("A label for the combination slice that holds all slices below slice visibility threshold."),value:t.pieResidueSliceLabel,onChange:function(n){t.pieResidueSliceLabel=n,e.props.edit(t)}}),wp.element.createElement(tr,{label:Zn("Residue Slice Color")},wp.element.createElement(Xn,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&Gn(n.prototype,r),a&&Gn(n,a),t}(Qn);function ir(e){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sr(e,t){return!t||"object"!==ir(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lr(e){return(lr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ur(e,t){return(ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var cr=wp.i18n.__,dr=wp.element,mr=dr.Component,pr=dr.Fragment,hr=wp.components,_r=hr.PanelBody,fr=hr.SelectControl,yr=hr.TextControl,gr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),sr(this,lr(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ur(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(_r,{title:cr("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(yr,{label:cr("Line Width"),help:cr("Data line width in pixels. Use zero to hide all lines."),value:n.lineWidth,onChange:function(t){n.lineWidth=t,e.props.edit(n)}}),wp.element.createElement(yr,{label:cr("Point Size"),help:cr("Diameter of displayed points in pixels. Use zero to hide all the points."),value:n.pointSize,onChange:function(t){n.pointSize=t,e.props.edit(n)}}),-1>=["area"].indexOf(t)&&wp.element.createElement(fr,{label:cr("Curve Type"),help:cr("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:cr("Straight line without curve"),value:"none"},{label:cr("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.curveType=t,e.props.edit(n)}}),-1>=["scatter"].indexOf(t)&&wp.element.createElement(fr,{label:cr("Focus Target"),help:cr("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:n.focusTarget?n.focusTarget:"datum",options:[{label:cr("Focus on a single data point."),value:"datum"},{label:cr("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(t){n.focusTarget=t,e.props.edit(n)}}),wp.element.createElement(fr,{label:cr("Selection Mode"),help:cr("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:cr("Single data point"),value:"single"},{label:cr("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(fr,{label:cr("Aggregation Target"),help:cr("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:n.aggregationTarget?n.aggregationTarget:"auto",options:[{label:cr("Group selected data by x-value"),value:"category"},{label:cr("Group selected data by series"),value:"series"},{label:cr("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:cr("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(yr,{label:cr("Point Opacity"),help:cr("The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent."),value:n.dataOpacity,onChange:function(t){n.dataOpacity=t,e.props.edit(n)}}),-1>=["scatter","line"].indexOf(t)&&wp.element.createElement(pr,null,wp.element.createElement(yr,{label:cr("Area Opacity"),help:cr("The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property."),value:n.areaOpacity,onChange:function(t){n.areaOpacity=t,e.props.edit(n)}}),wp.element.createElement(fr,{label:cr("Is Stacked"),help:cr("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:cr("Yes"),value:"1"},{label:cr("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(fr,{label:cr("Interpolate Nulls"),help:cr("Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point."),value:n.interpolateNulls?n.interpolateNulls:"0",options:[{label:cr("Yes"),value:"1"},{label:cr("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&or(n.prototype,r),a&&or(n,a),t}(mr);function br(e){return(br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mr(e,t){return!t||"object"!==br(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wr(e){return(wr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kr(e,t){return(kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Lr=wp.i18n.__,Yr=wp.element.Component,Dr=wp.components,Tr=Dr.PanelBody,Sr=Dr.SelectControl,Or=Dr.TextControl,xr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Mr(this,wr(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Tr,{title:Lr("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Sr,{label:Lr("Focus Target"),help:Lr("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:Lr("Focus on a single data point."),value:"datum"},{label:Lr("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Sr,{label:Lr("Is Stacked"),help:Lr("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Lr("Yes"),value:"1"},{label:Lr("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(Or,{label:Lr("Bars Opacity"),help:Lr("Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent."),value:t.dataOpacity,onChange:function(n){t.dataOpacity=n,e.props.edit(t)}}))}}])&&vr(n.prototype,r),a&&vr(n,a),t}(Yr);function jr(e){return(jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Er(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cr(e,t){return!t||"object"!==jr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hr(e){return(Hr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pr(e,t){return(Pr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ar=wp.i18n.__,zr=wp.element.Component,Fr=wp.editor.ColorPalette,Wr=wp.components,Nr=Wr.BaseControl,Rr=Wr.PanelBody,Ir=Wr.SelectControl,Br=Wr.TextControl,Ur=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cr(this,Hr(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Rr,{title:Ar("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Rr,{title:Ar("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ir,{label:Ar("Focus Target"),help:Ar("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:Ar("Focus on a single data point."),value:"datum"},{label:Ar("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Ir,{label:Ar("Selection Mode"),help:Ar("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Ar("Single data point"),value:"single"},{label:Ar("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Ir,{label:Ar("Aggregation Target"),help:Ar("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:t.aggregationTarget?t.aggregationTarget:"auto",options:[{label:Ar("Group selected data by x-value"),value:"category"},{label:Ar("Group selected data by series"),value:"series"},{label:Ar("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Ar("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Rr,{title:Ar("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Br,{label:Ar("Stroke Width"),help:Ar("The stroke width of falling candles."),value:t.candlestick.fallingColor.strokeWidth,onChange:function(n){t.candlestick.fallingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement(Nr,{label:Ar("Stroke Color")},wp.element.createElement(Fr,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Nr,{label:Ar("Fill Color")},wp.element.createElement(Fr,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Rr,{title:Ar("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Br,{label:Ar("Stroke Width"),help:Ar("The stroke width of rising candles."),value:t.candlestick.risingColor.strokeWidth,onChange:function(n){t.candlestick.risingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement(Nr,{label:Ar("Stroke Color")},wp.element.createElement(Fr,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Nr,{label:Ar("Fill Color")},wp.element.createElement(Fr,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&Er(n.prototype,r),a&&Er(n,a),t}(zr);function Vr(e){return(Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gr(e,t){return!t||"object"!==Vr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qr(e){return(qr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $r(e,t){return($r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Kr=wp.i18n.__,Zr=wp.element.Component,Qr=wp.components,Xr=Qr.ExternalLink,ea=Qr.PanelBody,ta=Qr.SelectControl,na=Qr.TextControl,ra=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gr(this,qr(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$r(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ea,{title:Kr("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ea,{title:Kr("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(na,{label:Kr("API Key"),help:Kr("Add the Google Maps API key."),value:t.map_api_key,onChange:function(n){t.map_api_key=n,e.props.edit(t)}}),wp.element.createElement(Xr,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},Kr("Get API Keys"))),wp.element.createElement(ea,{title:Kr("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Kr("A map of the entire world using 'world'.")),wp.element.createElement("li",null,Kr("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(Xr,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},Kr("More info here."))),wp.element.createElement("li",null,Kr("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(Xr,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},Kr("More info here."))),wp.element.createElement("li",null,Kr("A state in the United States, specified by its ISO 3166-2:US code, e.g., 'US-AL' for Alabama. Note that the resolution option must be set to either 'provinces' or 'metros'. "),wp.element.createElement(Xr,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},Kr("More info here.")))),wp.element.createElement(na,{label:Kr("Reigion"),help:Kr("Configure the region area to display on the map. (Surrounding areas will be displayed as well.)"),value:t.region,onChange:function(n){t.region=n,e.props.edit(t)}})),wp.element.createElement(ea,{title:Kr("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Kr("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,Kr("'provinces' - Supported only for country regions and US state regions. Not supported for all countries; please test a country to see whether this option is supported.")),wp.element.createElement("li",null,Kr("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(ta,{label:Kr("Resolution"),help:Kr("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:Kr("Countries"),value:"countries"},{label:Kr("Provinces"),value:"provinces"},{label:Kr("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(ea,{title:Kr("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Kr("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,Kr("'regions' - This is a region map.")),wp.element.createElement("li",null,Kr("'markers' - This is a marker map."))),wp.element.createElement(ta,{label:Kr("Display Mode"),help:Kr("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:Kr("Auto"),value:"auto"},{label:Kr("Regions"),value:"regions"},{label:Kr("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(ea,{title:Kr("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ta,{label:Kr("Trigger"),help:Kr("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:Kr("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:Kr("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&Jr(n.prototype,r),a&&Jr(n,a),t}(Zr);function aa(e){return(aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oa(e,t){return!t||"object"!==aa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sa(e){return(sa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function la(e,t){return(la=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ua=wp.i18n.__,ca=wp.element.Component,da=wp.editor.ColorPalette,ma=wp.components,pa=ma.BaseControl,ha=ma.PanelBody,_a=ma.TextControl,fa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),oa(this,sa(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&la(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ha,{title:ua("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(_a,{label:ua("Minimum Values"),help:ua("Determines the minimum values of color axis."),value:t.colorAxis.minValue,onChange:function(n){t.colorAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(_a,{label:ua("Maximum Values"),help:ua("Determines the maximum values of color axis."),value:t.colorAxis.maxValue,onChange:function(n){t.colorAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(pa,{label:ua("Minimum Value")},wp.element.createElement(da,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(pa,{label:ua("Intermediate Value")},wp.element.createElement(da,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(pa,{label:ua("Maximum Value")},wp.element.createElement(da,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(pa,{label:ua("Dateless Region")},wp.element.createElement(da,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&ia(n.prototype,r),a&&ia(n,a),t}(ca);function ya(e){return(ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ga(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ba(e,t){return!t||"object"!==ya(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function va(e){return(va=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ma(e,t){return(Ma=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wa=wp.i18n.__,ka=wp.element,La=ka.Component,Ya=ka.Fragment,Da=wp.components,Ta=Da.ExternalLink,Sa=Da.PanelBody,Oa=Da.TextControl,xa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ba(this,va(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ma(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Sa,{title:wa("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Oa,{label:wa("Minimum Values"),help:wa("Determines the minimum values of size axis."),value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(Oa,{label:wa("Maximum Values"),help:wa("Determines the maximum values of size axis."),value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Oa,{label:wa("Minimum Marker Radius"),help:wa("Determines the radius of the smallest possible bubbles, in pixels."),value:t.sizeAxis.minSize,onChange:function(n){t.sizeAxis.minSize=n,e.props.edit(t)}}),wp.element.createElement(Oa,{label:wa("Maximum Marker Radius"),help:wa("Determines the radius of the largest possible bubbles, in pixels."),value:t.sizeAxis.maxSize,onChange:function(n){t.sizeAxis.maxSize=n,e.props.edit(t)}}),wp.element.createElement(Oa,{label:wa("Marker Opacity"),help:wa("The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.markerOpacity,onChange:function(n){t.markerOpacity=n,e.props.edit(t)}}),wp.element.createElement(Ya,null,wp.element.createElement(Oa,{label:wa("Number Format"),help:wa("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,wa("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ta,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},wa("ICU pattern set.")),wa(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))))}}])&&ga(n.prototype,r),a&&ga(n,a),t}(La);function ja(e){return(ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ea(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ca(e,t){return!t||"object"!==ja(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ha(e){return(Ha=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pa(e,t){return(Pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Aa=wp.i18n.__,za=wp.element.Component,Fa=wp.components,Wa=Fa.PanelBody,Na=Fa.SelectControl,Ra=Fa.TextControl,Ia=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ca(this,Ha(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Wa,{title:Aa("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Na,{label:Aa("Enabled"),help:Aa("If yes, when the user lingers over a cluttered marker, a magnifiying glass will be opened."),value:t.magnifyingGlass.enable?t.magnifyingGlass.enable:"1",options:[{label:Aa("Yes"),value:"1"},{label:Aa("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(Ra,{label:Aa("Zoom Factor"),help:Aa("The zoom factor of the magnifying glass. Can be any number greater than 0."),value:t.magnifyingGlass.zoomFactor,onChange:function(n){t.magnifyingGlass.zoomFactor=n,e.props.edit(t)}}))}}])&&Ea(n.prototype,r),a&&Ea(n,a),t}(za);function Ba(e){return(Ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Va(e,t){return!t||"object"!==Ba(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ja(e){return(Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ga(e,t){return(Ga=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qa=wp.i18n.__,$a=wp.element,Ka=$a.Component,Za=$a.Fragment,Qa=wp.editor.ColorPalette,Xa=wp.components,ei=Xa.BaseControl,ti=Xa.ExternalLink,ni=Xa.PanelBody,ri=Xa.TextControl,ai=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Va(this,Ja(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ga(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ni,{title:qa("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ni,{title:qa("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ri,{label:qa("Minimum Values"),help:qa("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(ri,{label:qa("Maximum Values"),help:qa("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(ri,{label:qa("Minor Ticks"),help:qa("The number of minor tick section in each major tick section."),value:t.minorTicks,onChange:function(n){t.minorTicks=n,e.props.edit(t)}}),wp.element.createElement(Za,null,wp.element.createElement(ri,{label:qa("Number Format"),help:qa("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,qa("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ti,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},qa("ICU pattern set.")),qa(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")))),wp.element.createElement(ni,{title:qa("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ri,{label:qa("Minimum Range"),help:qa("The lowest values for a range marked by a green color."),value:t.greenFrom,onChange:function(n){t.greenFrom=n,e.props.edit(t)}}),wp.element.createElement(ri,{label:qa("Maximum Range"),help:qa("The highest values for a range marked by a green color."),value:t.greenTo,onChange:function(n){t.greenTo=n,e.props.edit(t)}}),wp.element.createElement(ei,{label:qa("Green Color")},wp.element.createElement(Qa,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(ni,{title:qa("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ri,{label:qa("Minimum Range"),help:qa("The lowest values for a range marked by a yellow color."),value:t.yellowFrom,onChange:function(n){t.yellowFrom=n,e.props.edit(t)}}),wp.element.createElement(ri,{label:qa("Maximum Range"),help:qa("The highest values for a range marked by a yellow color."),value:t.yellowTo,onChange:function(n){t.yellowTo=n,e.props.edit(t)}}),wp.element.createElement(ei,{label:qa("Yellow Color")},wp.element.createElement(Qa,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(ni,{title:qa("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ri,{label:qa("Minimum Range"),help:qa("The lowest values for a range marked by a red color."),value:t.redFrom,onChange:function(n){t.redFrom=n,e.props.edit(t)}}),wp.element.createElement(ri,{label:qa("Maximum Range"),help:qa("The highest values for a range marked by a red color."),value:t.redTo,onChange:function(n){t.redTo=n,e.props.edit(t)}}),wp.element.createElement(ei,{label:qa("Red Color")},wp.element.createElement(Qa,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&Ua(n.prototype,r),a&&Ua(n,a),t}(Ka);function ii(e){return(ii="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function si(e){return(si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function li(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ui(e,t){return(ui=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ci=wp.i18n.__,di=wp.element.Component,mi=wp.editor.ColorPalette,pi=wp.components,hi=pi.BaseControl,_i=pi.CheckboxControl,fi=pi.PanelBody,yi=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ii(t)&&"function"!=typeof t?li(e):t}(this,si(t).apply(this,arguments))).mapValues=e.mapValues.bind(li(e)),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ui(e,t)}(t,e),n=t,(r=[{key:"mapValues",value:function(e,t){return void 0===e.timeline?e[t]:e.timeline[t]}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return this.mapValues(t,"showRowLabels"),wp.element.createElement(fi,{title:ci("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(_i,{label:ci("Show Row Label"),help:ci("If checked, shows the category/row label."),checked:Number(this.mapValues(t,"showRowLabels")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.showRowLabels=!Number(e.mapValues(t,"showRowLabels")),e.props.edit(t)}}),wp.element.createElement(_i,{label:ci("Group by Row Label"),help:ci("If checked, groups the bars on the basis of the category/row label."),checked:Number(this.mapValues(t,"groupByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.groupByRowLabel=!Number(e.mapValues(t,"groupByRowLabel")),e.props.edit(t)}}),wp.element.createElement(_i,{label:ci("Color by Row Label"),help:ci("If checked, colors every bar on the row the same."),checked:Number(this.mapValues(t,"colorByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.colorByRowLabel=!Number(e.mapValues(t,"colorByRowLabel")),e.props.edit(t)}}),wp.element.createElement(hi,{label:ci("Single Color")},wp.element.createElement(mi,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&oi(n.prototype,r),a&&oi(n,a),t}(di);function gi(e){return(gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vi(e,t){return!t||"object"!==gi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mi(e){return(Mi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wi(e,t){return(wi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ki=wp.i18n.__,Li=wp.element,Yi=Li.Component,Di=Li.Fragment,Ti=wp.components,Si=Ti.CheckboxControl,Oi=Ti.PanelBody,xi=Ti.SelectControl,ji=Ti.TextControl,Ei=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),vi(this,Mi(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Oi,{title:ki("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Di,null,wp.element.createElement(Si,{label:ki("Enable Pagination"),help:ki("To enable paging through the data."),checked:"true"===t.paging_bool,onChange:function(n){t.paging_bool="true",n||(t.paging_bool="false"),e.props.edit(t)}}),wp.element.createElement(ji,{label:ki("Number of rows per page"),help:ki("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageLength_int,placeholder:10,onChange:function(n){t.pageLength_int=n,e.props.edit(t)}}),wp.element.createElement(xi,{label:ki("Pagination type"),help:ki("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:ki("Page number buttons only"),value:"numbers"},{label:ki("'Previous' and 'Next' buttons only"),value:"simple"},{label:ki("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:ki("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:ki("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:ki("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Scroll Collapse"),help:ki("Allow the table to reduce in height when a limited number of rows are shown."),checked:"true"===t.scrollCollapse_bool,onChange:function(n){t.scrollCollapse_bool="true",n||(t.scrollCollapse_bool="false"),e.props.edit(t)}}),"true"===t.scrollCollapse_bool&&wp.element.createElement(ji,{label:ki("Vertical Height"),help:ki("Vertical scrolling will constrain the table to the given height."),type:"number",value:t.scrollY_int,placeholder:300,onChange:function(n){t.scrollY_int=n,e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Disable Sort"),help:ki("To disable sorting on columns."),checked:"false"===t.ordering_bool,onChange:function(n){t.ordering_bool="true",n&&(t.ordering_bool="false"),e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Freeze Header/Footer"),help:ki("Freeze the header and footer."),checked:"true"===t.fixedHeader_bool,onChange:function(n){t.fixedHeader_bool="true",n||(t.fixedHeader_bool="false"),e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Responsive"),help:ki("Enable the table to be responsive."),checked:"true"===t.responsive_bool,onChange:function(n){t.responsive_bool="true",n||(t.responsive_bool="false"),e.props.edit(t)}})):wp.element.createElement(Di,null,wp.element.createElement(xi,{label:ki("Enable Pagination"),help:ki("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:ki("Enable"),value:"enable"},{label:ki("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(ji,{label:ki("Number of rows per page"),help:ki("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageSize,onChange:function(n){t.pageSize=n,e.props.edit(t)}}),wp.element.createElement(xi,{label:ki("Disable Sort"),help:ki("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:ki("Enable"),value:"enable"},{label:ki("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(ji,{label:ki("Freeze Columns"),help:ki("The number of columns from the left that will be frozen."),type:"number",value:t.frozenColumns,onChange:function(n){t.frozenColumns=n,e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Allow HTML"),help:ki("If enabled, formatted values of cells that include HTML tags will be rendered as HTML."),checked:Number(t.allowHtml),onChange:function(n){t.allowHtml=!Number(t.allowHtml),e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Right to Left table"),help:ki("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&bi(n.prototype,r),a&&bi(n,a),t}(Yi);function Ci(e){return(Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pi(e,t){return!t||"object"!==Ci(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ai(e){return(Ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zi(e,t){return(zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fi=wp.i18n.__,Wi=wp.element,Ni=Wi.Component,Ri=Wi.Fragment,Ii=wp.editor.ColorPalette,Bi=wp.components,Ui=Bi.BaseControl,Vi=Bi.PanelBody,Ji=Bi.TextControl,Gi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Pi(this,Ai(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Vi,{title:Fi("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Ri,null,wp.element.createElement(Vi,{title:Fi("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(Ri,null,wp.element.createElement(Vi,{title:Fi("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(Vi,{title:Fi("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ui,{label:Fi("Background Color")},wp.element.createElement(Ii,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Ui,{label:Fi("Color")},wp.element.createElement(Ii,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Ji,{label:Fi("Text Orientation"),help:Fi("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&Hi(n.prototype,r),a&&Hi(n,a),t}(Ni);function qi(e){return(qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ki(e,t){return!t||"object"!==qi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zi(e){return(Zi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qi(e,t){return(Qi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Xi=wp.i18n.__,eo=wp.element.Component,to=wp.components,no=to.PanelBody,ro=to.SelectControl,ao=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ki(this,Zi(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(no,{title:Xi("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ro,{label:Xi("Chart Type"),help:Xi("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Xi("Area"),value:"area"},{label:Xi("Bar"),value:"bars"},{label:Xi("Candlesticks"),value:"candlesticks"},{label:Xi("Line"),value:"line"},{label:Xi("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&$i(n.prototype,r),a&&$i(n,a),t}(eo);function io(e){return(io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function so(e,t){return!t||"object"!==io(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uo(e,t){return(uo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var co=wp.i18n.__,mo=wp.element,po=mo.Component,ho=mo.Fragment,_o=wp.editor.ColorPalette,fo=wp.components,yo=fo.BaseControl,go=fo.ExternalLink,bo=fo.PanelBody,vo=fo.SelectControl,Mo=fo.TextControl,wo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),so(this,lo(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uo(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=this.props.chart["visualizer-series"];return wp.element.createElement(bo,{title:co("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(n.series).map((function(a,i){return a++,wp.element.createElement(bo,{title:r[a].label,className:"visualizer-inner-sections",initialOpen:!1},-1>=["table","pie"].indexOf(t)&&wp.element.createElement(vo,{label:co("Visible In Legend"),help:co("Determines whether the series has to be presented in the legend or not."),value:n.series[i].visibleInLegend?n.series[i].visibleInLegend:"1",options:[{label:co("Yes"),value:"1"},{label:co("No"),value:"0"}],onChange:function(t){n.series[i].visibleInLegend=t,e.props.edit(n)}}),-1>=["table","candlestick","combo","column","bar"].indexOf(t)&&wp.element.createElement(ho,null,wp.element.createElement(Mo,{label:co("Line Width"),help:co("Overrides the global line width value for this series."),value:n.series[i].lineWidth,onChange:function(t){n.series[i].lineWidth=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:co("Point Size"),help:co("Overrides the global point size value for this series."),value:n.series[i].pointSize,onChange:function(t){n.series[i].pointSize=t,e.props.edit(n)}})),-1>=["candlestick"].indexOf(t)&&"number"===r[a].type?wp.element.createElement(ho,null,wp.element.createElement(Mo,{label:co("Format"),help:co("Enter custom format pattern to apply to this series value."),value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,co("For number axis labels, this is a subset of the formatting "),wp.element.createElement(go,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},co("ICU pattern set.")),co(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))):"date"===r[a].type&&wp.element.createElement(ho,null,wp.element.createElement(Mo,{label:co("Date Format"),help:co("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,co("This is a subset of the date formatting "),wp.element.createElement(go,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},co("ICU date and time format.")))),0<=["scatter","line"].indexOf(t)&&wp.element.createElement(vo,{label:co("Curve Type"),help:co("Determines whether the series has to be presented in the legend or not."),value:n.series[i].curveType?n.series[i].curveType:"none",options:[{label:co("Straight line without curve"),value:"none"},{label:co("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.series[i].curveType=t,e.props.edit(n)}}),0<=["area"].indexOf(t)&&wp.element.createElement(Mo,{label:co("Area Opacity"),help:co("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:n.series[i].areaOpacity,onChange:function(t){n.series[i].areaOpacity=t,e.props.edit(n)}}),0<=["combo"].indexOf(t)&&wp.element.createElement(vo,{label:co("Chart Type"),help:co("Select the type of chart to show for this series."),value:n.series[i].type?n.series[i].type:"area",options:[{label:co("Area"),value:"area"},{label:co("Bar"),value:"bars"},{label:co("Candlesticks"),value:"candlesticks"},{label:co("Line"),value:"line"},{label:co("Stepped Area"),value:"steppedArea"}],onChange:function(t){n.series[i].type=t,e.props.edit(n)}}),-1>=["table"].indexOf(t)&&wp.element.createElement(yo,{label:co("Color")},wp.element.createElement(_o,{value:n.series[i].color,onChange:function(t){n.series[i].color=t,e.props.edit(n)}})))})))}}])&&oo(n.prototype,r),a&&oo(n,a),t}(po);function ko(e){return(ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yo(e,t){return!t||"object"!==ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Do(e){return(Do=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function To(e,t){return(To=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var So=wp.i18n.__,Oo=wp.element.Component,xo=wp.editor.ColorPalette,jo=wp.components,Eo=jo.BaseControl,Co=jo.PanelBody,Ho=jo.TextControl,Po=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Yo(this,Do(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&To(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.slices).map((function(t){void 0!==e.slices[t]&&(e.slices[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-data"];return wp.element.createElement(Co,{title:So("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(Co,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ho,{label:So("Slice Offset"),help:So("How far to separate the slice from the rest of the pie, from 0.0 (not at all) to 1.0 (the pie's radius)."),value:t.slices[r].offset,onChange:function(n){t.slices[r].offset=n,e.props.edit(t)}}),wp.element.createElement(Eo,{label:So("Format")},wp.element.createElement(xo,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&Lo(n.prototype,r),a&&Lo(n,a),t}(Oo);function Ao(e){return(Ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fo(e,t){return!t||"object"!==Ao(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wo(e){return(Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function No(e,t){return(No=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ro=wp.i18n.__,Io=wp.element,Bo=Io.Component,Uo=Io.Fragment,Vo=wp.components,Jo=Vo.ExternalLink,Go=Vo.PanelBody,qo=Vo.TextControl,$o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Fo(this,Wo(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&No(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-series"];return wp.element.createElement(Go,{title:Ro("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(r){return wp.element.createElement(Go,{title:n[r].label,className:"visualizer-inner-sections",initialOpen:!1},("date"===n[r].type||"datetime"===n[r].type||"timeofday"===n[r].type)&&wp.element.createElement(Uo,null,wp.element.createElement(qo,{label:Ro("Display Date Format"),help:Ro("Enter custom format pattern to apply to this series value."),value:t.series[r].format?t.series[r].format.to:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.to=n,e.props.edit(t)}}),wp.element.createElement(qo,{label:Ro("Source Date Format"),help:Ro("What format is the source date in?"),value:t.series[r].format?t.series[r].format.from:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ro("You can find more info on "),wp.element.createElement(Jo,{href:"https://momentjs.com/docs/#/displaying/"},Ro("date and time formats here.")))),"number"===n[r].type&&wp.element.createElement(Uo,null,wp.element.createElement(qo,{label:Ro("Thousands Separator"),value:t.series[r].format?t.series[r].format.thousands:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(qo,{label:Ro("Decimal Separator"),value:t.series[r].format?t.series[r].format.decimal:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(qo,{label:Ro("Precision"),help:Ro("Round values to how many decimal places?"),value:t.series[r].format?t.series[r].format.precision:"",type:"number",onChange:function(n){100<n||(t.series[r].format||(t.series[r].format={}),t.series[r].format.precision=n,e.props.edit(t))}}),wp.element.createElement(qo,{label:Ro("Prefix"),value:t.series[r].format?t.series[r].format.prefix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(qo,{label:Ro("Suffix"),value:t.series[r].format?t.series[r].format.suffix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.suffix=n,e.props.edit(t)}})))})))}}])&&zo(n.prototype,r),a&&zo(n,a),t}(Bo);function Ko(e){return(Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qo(e,t){return!t||"object"!==Ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xo(e){return(Xo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function es(e,t){return(es=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ts=wp.i18n.__,ns=wp.element,rs=ns.Component,as=ns.Fragment,is=wp.editor.ColorPalette,os=wp.components,ss=os.BaseControl,ls=os.CheckboxControl,us=os.PanelBody,cs=os.SelectControl,ds=os.TextControl,ms=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Qo(this,Xo(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&es(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(us,{title:ts("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(us,{title:ts("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ds,{label:ts("Width of Chart"),help:ts("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(ds,{label:ts("Height of Chart"),help:ts("Determines the total height of the chart."),value:n.height,onChange:function(t){n.height=t,e.props.edit(n)}}),0<=["geo"].indexOf(t)&&wp.element.createElement(cs,{label:ts("Keep Aspect Ratio"),help:ts("If yes, the map will be drawn at the largest size that can fit inside the chart area at its natural aspect ratio. If only one of the width and height options is specified, the other one will be calculated according to the aspect ratio. If no, the map will be stretched to the exact size of the chart as specified by the width and height options."),value:n.keepAspectRatio?n.isStacked:"1",options:[{label:ts("Yes"),value:"1"},{label:ts("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge"].indexOf(t)&&wp.element.createElement(as,null,wp.element.createElement(ds,{label:ts("Stroke Width"),help:ts("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(ss,{label:ts("Stroke Color")},wp.element.createElement(is,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(ss,{label:ts("Background Color")},wp.element.createElement(is,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(ls,{label:ts("Transparent Background?"),checked:"transparent"===n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill="transparent"===n.backgroundColor.fill?"":"transparent",e.props.edit(n)}}))),-1>=["geo","gauge"].indexOf(t)&&wp.element.createElement(us,{title:ts("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ds,{label:ts("Left Margin"),help:ts("Determines how far to draw the chart from the left border."),value:n.chartArea.left,onChange:function(t){n.chartArea.left=t,e.props.edit(n)}}),wp.element.createElement(ds,{label:ts("Top Margin"),help:ts("Determines how far to draw the chart from the top border."),value:n.chartArea.top,onChange:function(t){n.chartArea.top=t,e.props.edit(n)}}),wp.element.createElement(ds,{label:ts("Width Of Chart Area"),help:ts("Determines the width of the chart area."),value:n.chartArea.width,onChange:function(t){n.chartArea.width=t,e.props.edit(n)}}),wp.element.createElement(ds,{label:ts("Height Of Chart Area"),help:ts("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Zo(n.prototype,r),a&&Zo(n,a),t}(rs);function ps(e){return(ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _s(e,t){return!t||"object"!==ps(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fs(e){return(fs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ys(e,t){return(ys=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gs=wp.i18n.__,bs=wp.element,vs=bs.Component,Ms=bs.Fragment,ws=wp.components,ks=ws.CheckboxControl,Ls=ws.PanelBody,Ys=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_s(this,fs(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ys(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];void 0===e.actions&&(e.actions=[]),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ls,{title:gs("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(Ms,null,wp.element.createElement(ks,{label:gs("Print"),help:gs("To enable printing the data."),checked:0<=t.actions.indexOf("print"),onChange:function(n){if(0<=t.actions.indexOf("print")){var r=t.actions.indexOf("print");-1!==r&&t.actions.splice(r,1)}else t.actions.push("print");e.props.edit(t)}}),wp.element.createElement(ks,{label:gs("CSV"),help:gs("To enable downloading the data as a CSV."),checked:0<=t.actions.indexOf("csv;application/csv"),onChange:function(n){if(0<=t.actions.indexOf("csv;application/csv")){var r=t.actions.indexOf("csv;application/csv");-1!==r&&t.actions.splice(r,1)}else t.actions.push("csv;application/csv");e.props.edit(t)}}),wp.element.createElement(ks,{label:gs("Excel"),help:gs("To enable downloading the data as an Excel spreadsheet."),checked:0<=t.actions.indexOf("xls;application/vnd.ms-excel"),onChange:function(n){if(0<=t.actions.indexOf("xls;application/vnd.ms-excel")){var r=t.actions.indexOf("xls;application/vnd.ms-excel");-1!==r&&t.actions.splice(r,1)}else t.actions.push("xls;application/vnd.ms-excel");e.props.edit(t)}}),wp.element.createElement(ks,{label:gs("Copy"),help:gs("To enable copying the data to the clipboard."),checked:0<=t.actions.indexOf("copy"),onChange:function(n){if(0<=t.actions.indexOf("copy")){var r=t.actions.indexOf("copy");-1!==r&&t.actions.splice(r,1)}else t.actions.push("copy");e.props.edit(t)}})))}}])&&hs(n.prototype,r),a&&hs(n,a),t}(vs);function Ds(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ts(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ds(e,t,n[t])}))}return e}var Ss={dark_vscode_tribute:{default:"#D4D4D4",background:"#1E1E1E",background_warning:"#1E1E1E",string:"#CE8453",number:"#B5CE9F",colon:"#49B8F7",keys:"#9CDCFE",keys_whiteSpace:"#AF74A5",primitive:"#6392C6"},light_mitsuketa_tribute:{default:"#D4D4D4",background:"#FCFDFD",background_warning:"#FEECEB",string:"#FA7921",number:"#70CE35",colon:"#49B8F7",keys:"#59A5D8",keys_whiteSpace:"#835FB6",primitive:"#386FA4"}},Os=n(2);const xs={getCaller:(e=1)=>{var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:(e="unknown function",t="unknown parameter",n="to be defined")=>{throw["@",e,"(): Expected parameter '",t,"' ",n].join("")},isUndefined:(e="<unknown parameter>",t)=>{[null,void 0].indexOf(t)>-1&&xs.throwError(xs.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||xs.throwError(xs.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&xs.throwError(xs.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&xs.throwError(xs.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Os.getType)(t)!==n.toLowerCase()&&xs.throwError(xs.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Os.getType)(t)===n&&xs.throwError(xs.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{xs.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&xs.throwError(xs.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{xs.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&xs.throwError(xs.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Os.locate)(t,n);r&&xs.throwError(xs.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{xs.isUndefined(e,t),xs.isNotType(e,t,"string"),xs.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&xs.throwError(xs.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&xs.throwError(xs.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{xs.isUndefined(e,t),xs.containsUndefined(e,t)}};var js=xs;const Es=(e,t)=>t?Object.keys(t).reduce((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"==typeof e?e:""+e)(t[n])),e):e;var Cs={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"};
65
  /** @license react-json-editor-ajrm v2.5.9
66
  *
67
  * This source code is licensed under the MIT license found in the
68
  * LICENSE file in the root directory of this source tree.
69
+ */class Hs extends r.Component{constructor(e){super(e),this.updateInternalProps=this.updateInternalProps.bind(this),this.createMarkup=this.createMarkup.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this),this.update=this.update.bind(this),this.getCursorPosition=this.getCursorPosition.bind(this),this.setCursorPosition=this.setCursorPosition.bind(this),this.scheduledUpdate=this.scheduledUpdate.bind(this),this.setUpdateTime=this.setUpdateTime.bind(this),this.renderLabels=this.renderLabels.bind(this),this.newSpan=this.newSpan.bind(this),this.renderErrorMessage=this.renderErrorMessage.bind(this),this.onScroll=this.onScroll.bind(this),this.showPlaceholder=this.showPlaceholder.bind(this),this.tokenize=this.tokenize.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onPaste=this.onPaste.bind(this),this.stopEvent=this.stopEvent.bind(this),this.refContent=null,this.refLabels=null,this.updateInternalProps(),this.renderCount=1,this.state={prevPlaceholder:"",markupText:"",plainText:"",json:"",jsObject:void 0,lines:!1,error:!1},this.props.locale||console.warn("[react-json-editor-ajrm - Deprecation Warning] You did not provide a 'locale' prop for your JSON input - This will be required in a future version. English has been set as a default.")}updateInternalProps(){let e={},t={},n=Ss.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Ss&&(n=Ss[this.props.theme]),e=n,"colors"in this.props&&(e={default:"default"in this.props.colors?this.props.colors.default:e.default,string:"string"in this.props.colors?this.props.colors.string:e.string,number:"number"in this.props.colors?this.props.colors.number:e.number,colon:"colon"in this.props.colors?this.props.colors.colon:e.colon,keys:"keys"in this.props.colors?this.props.colors.keys:e.keys,keys_whiteSpace:"keys_whiteSpace"in this.props.colors?this.props.colors.keys_whiteSpace:e.keys_whiteSpace,primitive:"primitive"in this.props.colors?this.props.colors.primitive:e.primitive,error:"error"in this.props.colors?this.props.colors.error:e.error,background:"background"in this.props.colors?this.props.colors.background:e.background,background_warning:"background_warning"in this.props.colors?this.props.colors.background_warning:e.background_warning}),this.colors=e,t="style"in this.props?{outerBox:"outerBox"in this.props.style?this.props.style.outerBox:{},container:"container"in this.props.style?this.props.style.container:{},warningBox:"warningBox"in this.props.style?this.props.style.warningBox:{},errorMessage:"errorMessage"in this.props.style?this.props.style.errorMessage:{},body:"body"in this.props.style?this.props.style.body:{},labelColumn:"labelColumn"in this.props.style?this.props.style.labelColumn:{},labels:"labels"in this.props.style?this.props.style.labels:{},contentBox:"contentBox"in this.props.style?this.props.style.contentBox:{}}:{outerBox:{},container:{},warningBox:{},errorMessage:{},body:{},labelColumn:{},labels:{},contentBox:{}},this.style=t,this.confirmGood=!("confirmGood"in this.props)||this.props.confirmGood;const r=this.props.height||"610px",a=this.props.width||"479px";this.totalHeight=r,this.totalWidth=a,"onKeyPressUpdate"in this.props&&!this.props.onKeyPressUpdate?this.timer&&(clearInterval(this.timer),this.timer=!1):this.timer||(this.timer=setInterval(this.scheduledUpdate,100)),this.updateTime=!1,this.waitAfterKeyPress="waitAfterKeyPress"in this.props?this.props.waitAfterKeyPress:1e3,this.resetConfiguration="reset"in this.props&&this.props.reset}render(){const e=this.props.id,t=this.state.markupText,n=this.state.error,r=this.colors,i=this.style,o=this.confirmGood,s=this.totalHeight,l=this.totalWidth,u=!!n&&"token"in n;return this.renderCount++,a.a.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:Ts({display:"block",overflow:"none",height:s,width:l,margin:0,boxSizing:"border-box",position:"relative"},i.outerBox)},o?a.a.createElement("div",{style:{opacity:u?0:1,height:"30px",width:"30px",position:"absolute",top:0,right:0,transform:"translate(-25%,25%)",pointerEvents:"none",transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"}},a.a.createElement("svg",{height:"30px",width:"30px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"green",opacity:"0.85",d:"M39.363,79L16,55.49l11.347-11.419L39.694,56.49L72.983,23L84,34.085L39.363,79z"}))):void 0,a.a.createElement("div",{name:"container",id:e&&e+"-container",style:Ts({display:"block",height:s,width:l,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},i.container),onClick:this.onClick},a.a.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:Ts({display:"block",overflow:"hidden",height:u?"60px":"0px",width:"100%",margin:0,backgroundColor:r.background_warning,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},i.warningBox),onClick:this.onClick},a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"60px",margin:0,boxSizing:"border-box",overflow:"hidden",verticalAlign:"top",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"relative",top:0,left:0,height:"60px",width:"60px",margin:0,pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("svg",{height:"25px",width:"25px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"red",d:"M73.9,5.75c0.467-0.467,1.067-0.7,1.8-0.7c0.7,0,1.283,0.233,1.75,0.7l16.8,16.8 c0.467,0.5,0.7,1.084,0.7,1.75c0,0.733-0.233,1.334-0.7,1.801L70.35,50l23.9,23.95c0.5,0.467,0.75,1.066,0.75,1.8 c0,0.667-0.25,1.25-0.75,1.75l-16.8,16.75c-0.534,0.467-1.117,0.7-1.75,0.7s-1.233-0.233-1.8-0.7L50,70.351L26.1,94.25 c-0.567,0.467-1.167,0.7-1.8,0.7c-0.667,0-1.283-0.233-1.85-0.7L5.75,77.5C5.25,77,5,76.417,5,75.75c0-0.733,0.25-1.333,0.75-1.8 L29.65,50L5.75,26.101C5.25,25.667,5,25.066,5,24.3c0-0.666,0.25-1.25,0.75-1.75l16.8-16.8c0.467-0.467,1.05-0.7,1.75-0.7 c0.733,0,1.333,0.233,1.8,0.7L50,29.65L73.9,5.75z"}))))),a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"calc(100% - 60px)",margin:0,overflow:"hidden",verticalAlign:"top",position:"absolute",pointerEvents:"none"},onClick:this.onClick},this.renderErrorMessage())),a.a.createElement("div",{name:"body",id:e&&e+"-body",style:Ts({display:"flex",overflow:"none",height:u?"calc(100% - 60px)":"100%",width:"",margin:0,resize:"none",fontFamily:"Roboto Mono, Monaco, monospace",fontSize:"11px",backgroundColor:r.background,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},i.body),onClick:this.onClick},a.a.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:Ts({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},i.labelColumn),onClick:this.onClick},this.renderLabels()),a.a.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:Ts({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"",flex:1,margin:0,padding:"5px",overflowX:"hidden",overflowY:"auto",wordWrap:"break-word",whiteSpace:"pre-line",color:"#D4D4D4",outline:"none"},i.contentBox),dangerouslySetInnerHTML:this.createMarkup(t),onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,onClick:this.onClick,onBlur:this.onBlur,onScroll:this.onScroll,onPaste:this.onPaste,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}))))}renderErrorMessage(){const e=this.props.locale||Cs,t=this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Ts({color:"red",fontSize:"12px",position:"absolute",width:"calc(100% - 60px)",height:"60px",boxSizing:"border-box",margin:0,padding:0,paddingRight:"10px",overflowWrap:"break-word",display:"flex",flexDirection:"column",justifyContent:"center"},n.errorMessage)},Es(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.state.error?this.state.error.line:-1,r=this.state.lines?this.state.lines:1;let i=new Array(r);for(var o=0;o<r-1;o++)i[o]=o+1;return i.map(r=>{const i=r!==n?e.default:"red";return a.a.createElement("div",{key:r,style:Ts({},t.labels,{color:i})},r)})}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,a=t.type,i=t.string,o="";switch(a){case"string":case"number":case"primitive":case"error":o=r[t.type];break;case"key":o=" "===i?r.keys_whiteSpace:r.keys;break;case"symbol":o=":"===i?r.colon:r.default;break;default:o=r.default}return i.length!==i.replace(/</g,"").replace(/>/g,"").length&&(i="<xmp style=display:inline;>"+i+"</xmp>"),'<span type="'+a+'" value="'+i+'" depth="'+n+'" style="color:'+o+'">'+i+"</span>"}getCursorPosition(e){let t,n=window.getSelection(),r=-1,a=0;if(n.focusNode&&(e=>{for(;null!==e;){if(e===this.refContent)return!0;e=e.parentNode}return!1})(n.focusNode))for(t=n.focusNode,r=n.focusOffset;t&&t!==this.refContent;)if(t.previousSibling)t=t.previousSibling,e&&"BR"===t.nodeName&&a++,r+=t.textContent.length;else if(null===(t=t.parentNode))break;return r+a}setCursorPosition(e){if([!1,null,void 0].indexOf(e)>-1)return;const t=(e,n,r)=>{if(r||((r=document.createRange()).selectNode(e),r.setStart(e,0)),0===n.count)r.setEnd(e,n.count);else if(e&&n.count>0)if(e.nodeType===Node.TEXT_NODE)e.textContent.length<n.count?n.count-=e.textContent.length:(r.setEnd(e,n.count),n.count=0);else for(var a=0;a<e.childNodes.length&&(r=t(e.childNodes[a],n,r),0!==n.count);a++);return r};e>0?(e=>{if(e<0)return;let n=window.getSelection(),r=t(this.refContent,{count:e});r&&(r.collapse(!1),n.removeAllRanges(),n.addRange(r))})(e):this.refContent.focus()}update(e=0,t=!0){const n=this.refContent,r=this.tokenize(n);"onChange"in this.props&&this.props.onChange({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error});let a=this.getCursorPosition(r.error)+e;this.setState({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error}),this.updateTime=!1,t&&this.setCursorPosition(a)}scheduledUpdate(){if("onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate)return;const{updateTime:e}=this;!1!==e&&(e>(new Date).getTime()||this.update())}setUpdateTime(){"onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate||(this.updateTime=(new Date).getTime()+this.waitAfterKeyPress)}stopEvent(e){e&&(e.preventDefault(),e.stopPropagation())}onKeyPress(e){const t=e.ctrlKey||e.metaKey;this.props.viewOnly&&!t&&this.stopEvent(e),t||this.setUpdateTime()}onKeyDown(e){const t=!!this.props.viewOnly,n=e.ctrlKey||e.metaKey;switch(e.key){case"Tab":if(this.stopEvent(e),t)break;document.execCommand("insertText",!1," "),this.setUpdateTime();break;case"Backspace":case"Delete":t&&this.stopEvent(e),this.setUpdateTime();break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this.setUpdateTime();break;case"a":case"c":t&&!n&&this.stopEvent(e);break;default:t&&this.stopEvent(e)}}onPaste(e){if(this.props.viewOnly)this.stopEvent(e);else{e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,t)}this.update()}onClick(){"viewOnly"in this.props&&this.props.viewOnly}onBlur(){"viewOnly"in this.props&&this.props.viewOnly||this.update(0,!1)}onScroll(e){this.refLabels.scrollTop=e.target.scrollTop}componentDidUpdate(){this.updateInternalProps(),this.showPlaceholder()}componentDidMount(){this.showPlaceholder()}componentWillUnmount(){this.timer&&clearInterval(this.timer)}showPlaceholder(){if(!("placeholder"in this.props))return;const{placeholder:e}=this.props;if([void 0,null].indexOf(e)>-1)return;const{prevPlaceholder:t,jsObject:n}=this.state,{resetConfiguration:r}=this,a=Object(Os.getType)(e);-1===["object","array"].indexOf(a)&&js.throwError("showPlaceholder","placeholder","either an object or an array");let i=!Object(Os.identical)(e,t);if(i||r&&void 0!==n&&(i=!Object(Os.identical)(e,n)),!i)return;const o=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:o.indentation,markupText:o.markup,lines:o.lines,error:o.error})}tokenize(e){if("object"!=typeof e)return console.error("tokenize() expects object type properties only. Got '"+typeof e+"' type instead.");const t=this.props.locale||Cs,n=this.newSpan;if("nodeType"in e){const w=e.cloneNode(!0);if(!w.hasChildNodes())return"";const k=w.childNodes;let L={tokens_unknown:[],tokens_proto:[],tokens_split:[],tokens_fallback:[],tokens_normalize:[],tokens_merge:[],tokens_plainText:"",indented:"",json:"",jsObject:void 0,markup:""};for(var r=0;r<k.length;r++){let e=k[r],t={};switch(e.nodeName){case"SPAN":t={string:e.textContent,type:e.attributes.type.textContent},L.tokens_unknown.push(t);break;case"DIV":L.tokens_unknown.push({string:e.textContent,type:"unknown"});break;case"BR":""===e.textContent&&L.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":L.tokens_unknown.push({string:e.wholeText,type:"unknown"});break;case"FONT":L.tokens_unknown.push({string:e.textContent,type:"unknown"});break;default:console.error("Unrecognized node:",{child:e})}}function a(e,t=""){let n={active:!1,string:"",number:"",symbol:"",space:"",delimiter:"",quarks:[]};function r(e,r){switch(r){case"symbol":case"delimiter":n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e;break;default:r!==n.active||[n.string,e].indexOf("\n")>-1?(n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e):n[r]+=e}}for(var a=0;a<e.length;a++){const t=e.charAt(a);switch(t){case'"':case"'":r(t,"delimiter");break;case" ":case" ":r(t,"space");break;case"{":case"}":case"[":case"]":case":":case",":r(t,"symbol");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":"string"===n.active?r(t,"string"):r(t,"number");break;case"-":if(a<e.length-1&&"0123456789".indexOf(e.charAt(a+1))>-1){r(t,"number");break}case".":if(a<e.length-1&&a>0&&"0123456789".indexOf(e.charAt(a+1))>-1&&"0123456789".indexOf(e.charAt(a-1))>-1){r(t,"number");break}default:r(t,"string")}}return n.active&&(n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=!1),n.quarks}for(r=0;r<L.tokens_unknown.length;r++){let e=L.tokens_unknown[r];L.tokens_proto=L.tokens_proto.concat(a(e.string,"proto"))}function i(e,t){let n="",r="",a=!1;switch(t){case"primitive":if(-1===["true","false","null","undefined"].indexOf(e))return!1;break;case"string":if(e.length<2)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),-1===(a="'\"".indexOf(n)))return!1;if(n!==r)return!1;for(var i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-1))return!1;break;case"key":if(0===e.length)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),(a="'\"".indexOf(n))>-1){if(1===e.length)return!1;if(n!==r)return!1;for(i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^  ";for(i=0;i<t.length;i++){const n=t.charAt(i);if(e.indexOf(n)>-1)return!1}}break;case"number":for(i=0;i<e.length;i++)if(-1==="0123456789".indexOf(e.charAt(i)))if(0===i){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(i))return!1;break;case"symbol":if(e.length>1)return!1;if(-1==="{[:]},".indexOf(e))return!1;break;case"colon":if(e.length>1)return!1;if(":"!==e)return!1;break;default:return!0}return!0}for(r=0;r<L.tokens_proto.length;r++){let e=L.tokens_proto[r];-1===e.type.indexOf("proto")?i(e.string,e.type)?L.tokens_split.push(e):L.tokens_split=L.tokens_split.concat(a(e.string,"split")):L.tokens_split.push(e)}for(r=0;r<L.tokens_split.length;r++){let e=L.tokens_split[r],t=e.type,n=e.string,a=n.length,i=[];t.indexOf("-")>-1&&("string"!==(t=t.slice(t.indexOf("-")+1))&&i.push("string"),i.push("key"),i.push("error"));let o={string:n,length:a,type:t,fallback:i};L.tokens_fallback.push(o)}function o(){const e=L.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=L.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let Y={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<L.tokens_fallback.length;r++){let e=L.tokens_fallback[r];const t=e.type,n=e.string;let a={type:t,string:n};switch(t){case"symbol":case"colon":if(Y.stringOpen){Y.isValue?a.type="string":a.type="key";break}switch(n){case"[":case"{":Y.brackets.push(n),Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case"]":case"}":Y.brackets.pop(),Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case",":if("colon"===o().type)break;Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case":":a.type="colon",Y.isValue=!0}break;case"delimiter":if(Y.isValue?a.type="string":a.type="key",!Y.stringOpen){Y.stringOpen=n;break}if(r>0){const e=L.tokens_fallback[r-1],t=e.string,n=e.type,a=t.charAt(t.length-1);if("string"===n&&"\\"===a)break}if(Y.stringOpen===n){Y.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(n)>-1){const e=L.tokens_normalize.length-1;if(e>=0){if("string"!==L.tokens_normalize[e].type){a.type="primitive";break}a.type="string";break}a.type="primitive";break}if("\n"===n&&!Y.stringOpen){a.type="linebreak";break}Y.isValue?a.type="string":a.type="key";break;case"space":case"number":Y.stringOpen&&(Y.isValue?a.type="string":a.type="key")}L.tokens_normalize.push(a)}for(r=0;r<L.tokens_normalize.length;r++){const e=L.tokens_normalize[r];let t={string:e.string,type:e.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(e.type)&&r+1<L.tokens_normalize.length){let n=0;for(var s=r+1;s<L.tokens_normalize.length;s++){const r=L.tokens_normalize[s];if(e.type!==r.type)break;t.string+=r.string,t.tokens.push(s),n++}r+=n}L.tokens_merge.push(t)}const D="'\"",T="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var l=!1,u=L.tokens_merge.length>0?1:0;function c(e,t,n=0){l={token:e,line:u,reason:t},L.tokens_merge[e+n].type="error"}function d(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),e===L.tokens_merge.length-1)return!1;for(var n=e+1;n<L.tokens_merge.length;n++){const e=L.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1&&n;default:return!1}}return!1}function m(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),0===e)return!1;for(var n=e-1;n>=0;n--){const e=L.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1;default:return!1}}return!1}function p(e){if(void 0===e&&console.error("tokenID argument must be an integer."),0===e)return!1;for(var t=e-1;t>=0;t--){const e=L.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}Y={brackets:[],stringOpen:!1,isValue:!1};let S=[];for(r=0;r<L.tokens_merge.length&&!l;r++){let e=L.tokens_merge[r],n=e.string,a=e.type,i=!1;switch(a){case"space":break;case"linebreak":u++;break;case"symbol":switch(n){case"{":case"[":if(i=m(r,["}","]"])){c(r,Es(t.invalidToken.tokenSequence.prohibited,{firstToken:L.tokens_merge[i].string,secondToken:n}));break}if("["===n&&r>0&&!m(r,[":","[",","])){c(r,Es(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&m(r,["{"])){c(r,Es(t.invalidToken.double,{token:"{"}));break}Y.brackets.push(n),Y.isValue="["===Y.brackets[Y.brackets.length-1],S.push({i:r,line:u,string:n});break;case"}":case"]":if("}"===n&&"{"!==Y.brackets[Y.brackets.length-1]){c(r,Es(t.brace.curly.missingOpen));break}if("}"===n&&m(r,[","])){c(r,Es(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==Y.brackets[Y.brackets.length-1]){c(r,Es(t.brace.square.missingOpen));break}if("]"===n&&m(r,[":"])){c(r,Es(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}Y.brackets.pop(),Y.isValue="["===Y.brackets[Y.brackets.length-1],S.push({i:r,line:u,string:n});break;case",":if(i=m(r,["{"])){if(d(r,["}"])){c(r,Es(t.brace.curly.cannotWrap,{token:","}));break}c(r,Es(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Es(t.noTrailingOrLeadingComma));break}switch(i=p(r)){case"key":case"colon":c(r,Es(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===i?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(m(r,["{"])){c(r,Es(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}Y.isValue="["===Y.brackets[Y.brackets.length-1]}L.json+=n;break;case"colon":if((i=m(r,["["]))&&d(r,["]"])){c(r,Es(t.brace.square.cannotWrap,{token:":"}));break}if(i){c(r,Es(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==p(r)){c(r,Es(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Es(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}Y.isValue=!0,L.json+=n;break;case"key":case"string":let e=n.charAt(0),o=n.charAt(n.length-1);D.indexOf(e);if(-1===D.indexOf(e)&&-1!==D.indexOf(o)){c(r,Es(t.string.missingOpen,{quote:e}));break}if(-1===D.indexOf(o)&&-1!==D.indexOf(e)){c(r,Es(t.string.missingClose,{quote:e}));break}if(D.indexOf(e)>-1&&e!==o){c(r,Es(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===D.indexOf(e)&&-1===D.indexOf(o)){c(r,Es(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Es(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===D.indexOf(e)&&-1===D.indexOf(o))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===T.indexOf(e)){c(r,Es(t.string.nonAlphanumeric,{token:e}));break}}if("'"===e?n='"'+n.slice(1,-1)+'"':'"'!==e&&(n='"'+n+'"'),"key"===a&&"key"===p(r)){if(r>0&&!isNaN(L.tokens_merge[r-1])){L.tokens_merge[r-1]+=L.tokens_merge[r],c(r,Es(t.key.numberAndLetterMissingQuotes));break}c(r,Es(t.key.spaceMissingQuotes));break}if("key"===a&&!m(r,["{",","])){c(r,Es(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!m(r,["[",":",","])){c(r,Es(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&Y.isValue){c(r,Es(t.string.unexpectedKey));break}if("string"===a&&!Y.isValue){c(r,Es(t.key.unexpectedString));break}L.json+=n;break;case"number":case"primitive":if(m(r,["{"]))L.tokens_merge[r].type="key",a=L.tokens_merge[r].type,n='"'+n+'"';else if("key"===p(r))L.tokens_merge[r].type="key",a=L.tokens_merge[r].type;else if(!m(r,["[",":",","])){c(r,Es(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}"key"!==a&&(Y.isValue||(L.tokens_merge[r].type="key",a=L.tokens_merge[r].type,n='"'+n+'"')),"primitive"===a&&"undefined"===n&&c(r,Es(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),L.json+=n}}let O="";for(r=0;r<L.json.length;r++){let e=L.json.charAt(r),t="";r+1<L.json.length&&(t=L.json.charAt(r+1),"\\"===e&&"'"===t)?(O+=t,r++):O+=e}if(L.json=O,!l){const e=Math.ceil(S.length/2);let n=0,r=!1;function _(e){S.splice(e+1,1),S.splice(e,1),r||(r=!0)}for(;S.length>0;){r=!1;for(var f=0;f<S.length-1;f++){const e=S[f].string+S[f+1].string;["[]","{}"].indexOf(e)>-1&&_(f)}if(n++,!r)break;if(n>=e)break}if(S.length>0){const e=S[0].string,n=S[0].i,r="["===e?"]":"}";u=S[0].line,c(n,Es(t.brace["]"===r?"square":"curly"].missingClose))}}if(!l&&-1===[void 0,""].indexOf(L.json))try{L.jsObject=JSON.parse(L.json)}catch(e){const n=e.message,r=n.indexOf("position");if(-1===r)throw new Error("Error parsing failed");const a=n.substring(r+9,n.length),i=parseInt(a);let o=0,s=0,d=!1,m=1,p=!1;for(;o<i&&!p&&("linebreak"===(d=L.tokens_merge[s]).type&&m++,-1===["space","linebreak"].indexOf(d.type)&&(o+=d.string.length),!(o>=i));)s++,L.tokens_merge[s+1]||(p=!0);u=m;let h=0;for(let e=0;e<d.string.length;e++){const n=d.string.charAt(e);"\\"===n?h=h>0?h+1:1:(h%2==0&&0!==h||-1==="'\"bfnrt".indexOf(n)&&c(s,Es(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Es(t.invalidToken.unexpected,{token:d.string}))}let x=1,j=0;function y(){for(var e=[],t=0;t<2*j;t++)e.push("&nbsp;");return e.join("")}function g(e=!1){return x++,j>0||e?"<br>":""}function b(e=!1){return g(e)+y()}if(!l)for(r=0;r<L.tokens_merge.length;r++){const e=L.tokens_merge[r],t=e.string;switch(e.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":L.markup+=(m(r,[",","["])?b():"")+n(r,e,j);break;case"key":L.markup+=b()+n(r,e,j);break;case"colon":L.markup+=n(r,e,j)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":L.markup+=(m(r,[":"])?"":b())+n(r,e,j),j++;break;case"]":case"}":j--;const t=r===L.tokens_merge.length-1,a=r>0?["[","{"].indexOf(L.tokens_merge[r-1].string)>-1?"":b(t):"";L.markup+=a+n(r,e,j);break;case",":L.markup+=n(r,e,j)}}}if(l){let e=1;function v(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}x=1;for(r=0;r<L.tokens_merge.length;r++){const t=L.tokens_merge[r],a=t.type,i=t.string;"linebreak"===a&&x++,L.markup+=n(r,t,j),e+=v(i)}e++,++x<e&&(x=e)}for(r=0;r<L.tokens_merge.length;r++){let e=L.tokens_merge[r];L.indented+=e.string,-1===["space","linebreak"].indexOf(e.type)&&(L.tokens_plainText+=e.string)}if(l){"modifyErrorText"in this.props&&((M=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(M)&&(l.reason=this.props.modifyErrorText(l.reason)))}return{tokens:L.tokens_merge,noSpaces:L.tokens_plainText,indented:L.indented,json:L.json,jsObject:L.jsObject,markup:L.markup,lines:x,error:l}}var M;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function w(){return"\\"===t.currentChar&&(t.inputText=(e=t.inputText,n=t.position,e.slice(0,n)+e.slice(n+1)),!0);var e,n}function k(){if(-1==="'\"".indexOf(t.currentChar))return!1;if(!t.stringOpen)return Y(),t.stringStart=t.position,t.stringOpen=t.currentChar,!0;if(t.stringOpen===t.currentChar){return Y(),D(t.inputText.substring(t.stringStart,t.position+1)),t.stringOpen=!1,!0}return!1}function L(){if(-1===":,{}[]".indexOf(t.currentChar))return!1;if(t.stringOpen)return!1;switch(Y(),D(t.currentChar),t.currentChar){case":":return t.isValue=!0,!0;case"{":case"[":t.brackets.push(t.currentChar);break;case"}":case"]":t.brackets.pop()}return":"!==t.currentChar&&(t.isValue="["===t.brackets[t.brackets.length-1]),!0}function Y(){return 0!==t.tokenSecondary.length&&(t.tokens.push(t.tokenSecondary),t.tokenSecondary="",!0)}function D(e){return 0!==e.length&&(t.tokens.push(e),!0)}for(r=0;r<t.inputText.length;r++){t.position=r,t.currentChar=t.inputText.charAt(t.position);const e=L(),n=k(),a=w();e||n||a||t.stringOpen||(t.tokenSecondary+=t.currentChar)}let a={brackets:[],isValue:!1,tokens:[]};a.tokens=t.tokens.map(e=>{let t="",n="",r="";switch(e){case",":t="symbol",n=e,r=e,a.isValue="["===a.brackets[a.brackets.length-1];break;case":":t="symbol",n=e,r=e,a.isValue=!0;break;case"{":case"[":t="symbol",n=e,r=e,a.brackets.push(e),a.isValue="["===a.brackets[a.brackets.length-1];break;case"}":case"]":t="symbol",n=e,r=e,a.brackets.pop(),a.isValue="["===a.brackets[a.brackets.length-1];break;case"undefined":t="primitive",n=e,r=void 0;break;case"null":t="primitive",n=e,r=null;break;case"false":t="primitive",n=e,r=!1;break;case"true":t="primitive",n=e,r=!0;break;default:const o=e.charAt(0);if("'\"".indexOf(o)>-1){if("key"===(t=a.isValue?"string":"key")&&(n=function(e){if(0===e.length)return e;if(['""',"''"].indexOf(e)>-1)return"''";let t=!1;for(var n=0;n<2;n++)if([e.charAt(0),e.charAt(e.length-1)].indexOf(['"',"'"][n])>-1){t=!0;break}t&&e.length>=2&&(e=e.slice(1,-1));const r=e.replace(/\w/g,""),a=(e.replace(/\W+/g,""),((e,t)=>{let n=!1;for(var r=0;r<t.length&&(0!==r||!isNaN(t.charAt(r)));r++)if(isNaN(t.charAt(r))){n=!0;break}return!(e.length>0||n)})(r,e));if((e=>{for(var t=0;t<e.length;t++)if(["'",'"'].indexOf(e.charAt(t))>-1)return!0;return!1})(r)){let t="";const n=e.split("");for(var i=0;i<n.length;i++){let e=n[i];["'",'"'].indexOf(e)>-1&&(e="\\"+e),t+=e}e=t}return a?e:"'"+e+"'"}(e)),"string"===t){n="";const t=e.slice(1,-1).split("");for(var i=0;i<t.length;i++){let e=t[i];"'\"".indexOf(e)>-1&&(e="\\"+e),n+=e}n="'"+n+"'"}r=n;break}if(!isNaN(e)){t="number",n=e,r=Number(e);break}if(e.length>0&&!a.isValue){t="key",(n=e).indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:a.brackets.length}});let i="";for(r=0;r<a.tokens.length;r++){i+=a.tokens[r].string}function T(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let o="";for(r=0;r<a.tokens.length;r++){let e=a.tokens[r];switch(e.string){case"[":case"{":const t=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(t.string)?o+=e.string+T(e.depth):o+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?o+=T(e.depth)+e.string:o+=e.string;break;case":":o+=e.string+" ";break;case",":o+=e.string+T(e.depth);break;default:o+=e.string}}let s=1;function S(e){var t=[];e>0&&s++;for(var n=0;n<2*e;n++)t.push("&nbsp;");return(e>0?"<br>":"")+t.join("")}let l="";const u=a.tokens.length-1;for(r=0;r<a.tokens.length;r++){let e=a.tokens[r],t=n(r,e,e.depth);switch(e.string){case"{":case"[":const n=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(n.string)?l+=t+S(e.depth):l+=t;break;case"}":case"]":const i=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(i.string)?l+=S(e.depth)+(u===r?"<br>":"")+t:l+=t;break;case":":l+=t+" ";break;case",":l+=t+S(e.depth);break;default:l+=t}}return s+=2,{tokens:a.tokens,noSpaces:i,indented:o,json:JSON.stringify(e),jsObject:e,markup:l,lines:s}}}}var Ps=Hs,As=n(133),zs=n.n(As);function Fs(e){return(Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ws(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ns(e){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Is(e,t){return(Is=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Bs=wp.i18n.__,Us=wp.element.Component,Vs=wp.components,Js=Vs.ExternalLink,Gs=Vs.PanelBody,qs=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Fs(t)&&"function"!=typeof t?Rs(e):t}(this,Ns(t).apply(this,arguments))).isValidJSON=e.isValidJSON.bind(Rs(e)),e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Is(e,t)}(t,e),n=t,(r=[{key:"isValidJSON",value:function(e){try{JSON.parse(e)}catch(e){return!1}return!0}},{key:"render",value:function(){var e,t=this,n=this.props.chart["visualizer-settings"];return e=0<=["gauge","table","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?this.props.chart["visualizer-chart-type"]:"".concat(this.props.chart["visualizer-chart-type"],"chart"),wp.element.createElement(Gs,{title:Bs("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,Bs("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(Js,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},Bs("Google Visualization API"))),wp.element.createElement(Ps,{locale:zs.a,theme:"light_mitsuketa_tribute",placeholder:$(n.manual)?JSON.parse(n.manual):{},width:"100%",height:"250px",style:{errorMessage:{height:"100%",fontSize:"10px"},container:{border:"1px solid #ddd",boxShadow:"inset 0 1px 2px rgba(0,0,0,.07)"},labelColumn:{background:"#F5F5F5",width:"auto",padding:"5px 10px 5px 10px"}},onChange:function(e){!1===e.error&&(n.manual=e.json,t.props.edit(n))}}))}}])&&Ws(n.prototype,r),a&&Ws(n,a),t}(Us);function $s(e){return($s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zs(e,t){return!t||"object"!==$s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qs(e){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xs(e,t){return(Xs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var el=wp.element,tl=el.Component,nl=el.Fragment,rl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Zs(this,Qs(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xs(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"];return wp.element.createElement(nl,null,wp.element.createElement(Gt,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(dn,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(Sn,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(nl,null,wp.element.createElement(Vn,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ar,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(gr,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(xr,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Ur,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(nl,null,wp.element.createElement(ra,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(fa,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(xa,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ia,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(ai,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(yi,{chart:this.props.chart,edit:this.props.edit}),0<=["table","dataTable"].indexOf(e)&&wp.element.createElement(nl,null,wp.element.createElement(Ei,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Gi,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(ao,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","gauge","geo","pie","dataTable"].indexOf(e)&&wp.element.createElement(wo,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Po,{chart:this.props.chart,edit:this.props.edit}),0<=["dataTable"].indexOf(e)&&wp.element.createElement($o,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(ms,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ys,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(qs,{chart:this.props.chart,edit:this.props.edit}))}}])&&Ks(n.prototype,r),a&&Ks(n,a),t}(tl);function al(e){return(al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function il(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ol(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){il(i,r,a,o,s,"next",e)}function s(e){il(i,r,a,o,s,"throw",e)}o(void 0)}))}}function sl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ll(e){return(ll=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cl(e,t){return(cl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var dl=wp.i18n.__,ml=wp.apiFetch,pl=wp.element,hl=pl.Component,_l=pl.Fragment,fl=wp.components,yl=fl.Button,gl=fl.PanelBody,bl=fl.SelectControl,vl=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==al(t)&&"function"!=typeof t?ul(e):t}(this,ll(t).apply(this,arguments))).getPermissionData=e.getPermissionData.bind(ul(e)),e.state={users:[],roles:[]},e}var n,r,a,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cl(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=ol(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=14;break}if(void 0===(t=this.props.chart["visualizer-permissions"]).permissions){e.next=14;break}if(void 0===t.permissions.read||void 0===t.permissions.edit){e.next=14;break}if("users"!==t.permissions.read&&"users"!==t.permissions.edit){e.next=9;break}return e.next=7,ml({path:"/visualizer/v1/get-permission-data?type=users"});case 7:n=e.sent,this.setState({users:n});case 9:if("roles"!==t.permissions.read&&"roles"!==t.permissions.edit){e.next=14;break}return e.next=12,ml({path:"/visualizer/v1/get-permission-data?type=roles"});case 12:r=e.sent,this.setState({roles:r});case 14:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPermissionData",value:(i=ol(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=11;break}if("users"!==t||0!==this.state.users.length){e.next=6;break}return e.next=4,ml({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 4:n=e.sent,this.setState({users:n});case 6:if("roles"!==t||0!==this.state.roles.length){e.next=11;break}return e.next=9,ml({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 9:r=e.sent,this.setState({roles:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"render",value:function(){var e,t=this;return"business"===visualizerLocalize.isPro&&(e=this.props.chart["visualizer-permissions"]),wp.element.createElement(_l,null,"business"===visualizerLocalize.isPro?wp.element.createElement(gl,{title:dl("Who can see this chart?"),initialOpen:!1},wp.element.createElement(bl,{label:dl("Select who can view the chart on the front-end."),value:e.permissions.read,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.read=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.read||"roles"===e.permissions.read)&&wp.element.createElement(bl,{multiple:!0,value:e.permissions["read-specific"],options:"users"===e.permissions.read&&this.state.users||"roles"===e.permissions.read&&this.state.roles,onChange:function(n){e.permissions["read-specific"]=n,t.props.edit(e)}})):wp.element.createElement(gl,{title:dl("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,dl("Enable this feature in BUSINESS version!")),wp.element.createElement(yl,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},dl("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(gl,{title:dl("Who can edit this chart?"),initialOpen:!1},wp.element.createElement(bl,{label:dl("Select who can edit the chart on the front-end."),value:e.permissions.edit,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.edit=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.edit||"roles"===e.permissions.edit)&&wp.element.createElement(bl,{multiple:!0,value:e.permissions["edit-specific"],options:"users"===e.permissions.edit&&this.state.users||"roles"===e.permissions.edit&&this.state.roles,onChange:function(n){e.permissions["edit-specific"]=n,t.props.edit(e)}})):wp.element.createElement(gl,{title:dl("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,dl("Enable this feature in BUSINESS version!")),wp.element.createElement(yl,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},dl("Buy Now"))))}}])&&sl(n.prototype,r),a&&sl(n,a),t}(hl),Ml=n(134),wl=n.n(Ml),kl=wp.components,Ll=kl.Button,Yl=kl.Dashicon,Dl=kl.G,Tl=kl.Path,Sl=kl.SVG;var Ol=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,i=e.onClick,o=wl()("components-panel__body","components-panel__body-button",r,{"visualizer-panel-back":a});return wp.element.createElement("div",{className:o},wp.element.createElement("h2",{className:"components-panel__body-title"},wp.element.createElement(Ll,{className:"components-panel__body-toggle",onClick:i},wp.element.createElement(Sl,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Dl,null,wp.element.createElement(Tl,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(Dl,null,wp.element.createElement(Tl,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(Yl,{icon:n,className:"components-panel__icon"}),t)))},xl=n(3),jl=n.n(xl);function El(e){return(El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hl(e,t){return!t||"object"!==El(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pl(e){return(Pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Al(e,t){return(Al=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zl=lodash.startCase,Fl=wp.i18n.__,Wl=wp.element,Nl=Wl.Component,Rl=Wl.Fragment,Il=wp.editor.InspectorControls,Bl=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Hl(this,Pl(t).apply(this,arguments))).state={route:"home"},e}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Al(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t=this,n=V(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===n["visualizer-chart-type"]?n["visualizer-chart-type"]:zl(this.props.chart["visualizer-chart-type"]):"".concat(zl(this.props.chart["visualizer-chart-type"]),"Chart"),wp.element.createElement(Rl,null,"home"===this.state.route&&wp.element.createElement(Il,null,wp.element.createElement(Se,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(Ie,{chart:this.props.chart,editURL:this.props.editURL,isLoading:this.props.isLoading,uploadData:this.props.uploadData,editSchedule:this.props.editSchedule}),wp.element.createElement(ot,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(Et,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Ol,{label:Fl("Advanced Options"),icon:"admin-tools",onClick:function(){return t.setState({route:"showAdvanced"})}}),wp.element.createElement(Ol,{label:Fl("Chart Permissions"),icon:"admin-users",onClick:function(){return t.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(Il,null,wp.element.createElement(Ol,{label:Fl("Chart Settings"),onClick:function(){return t.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(rl,{chart:this.props.chart,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(vl,{chart:this.props.chart,edit:this.props.editPermissions})),wp.element.createElement("div",{className:"visualizer-settings__chart"},null!==this.props.chart&&"dataTable"===e?wp.element.createElement(N,{id:this.props.id,rows:n["visualizer-data"],columns:n["visualizer-series"],options:n["visualizer-settings"]}):wp.element.createElement(O,{chartType:e,rows:n["visualizer-data"],columns:n["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?jl()(G(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):G(this.props.chart["visualizer-settings"]),height:"500px"})))}}])&&Cl(n.prototype,r),a&&Cl(n,a),t}(Nl);function Ul(e){return(Ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jl(e,t){return!t||"object"!==Ul(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gl(e){return(Gl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ql(e,t){return(ql=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $l=lodash.startCase,Kl=wp.i18n.__,Zl=wp.element,Ql=Zl.Component,Xl=Zl.Fragment,eu=wp.components,tu=eu.Button,nu=eu.Dashicon,ru=eu.Toolbar,au=eu.Tooltip,iu=wp.editor.BlockControls,ou=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Jl(this,Gl(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ql(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t=V(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===t["visualizer-chart-type"]?t["visualizer-chart-type"]:$l(this.props.chart["visualizer-chart-type"]):"".concat($l(this.props.chart["visualizer-chart-type"]),"Chart"),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(Xl,null,wp.element.createElement(iu,{key:"toolbar-controls"},wp.element.createElement(ru,{className:"components-toolbar"},wp.element.createElement(au,{text:Kl("Edit Chart")},wp.element.createElement(tu,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(nu,{icon:"edit"}))))),"dataTable"===e?wp.element.createElement(N,{id:this.props.id,rows:t["visualizer-data"],columns:t["visualizer-series"],options:t["visualizer-settings"]}):wp.element.createElement(O,{chartType:e,rows:t["visualizer-data"],columns:t["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?jl()(G(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):G(this.props.chart["visualizer-settings"]),height:"500px"})))}}])&&Vl(n.prototype,r),a&&Vl(n,a),t}(Ql);function su(e){return(su="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lu(n,!0).forEach((function(t){cu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lu(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function du(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function mu(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){du(i,r,a,o,s,"next",e)}function s(e){du(i,r,a,o,s,"throw",e)}o(void 0)}))}}function pu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hu(e){return(hu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fu(e,t){return(fu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var yu=wp.i18n.__,gu=wp,bu=gu.apiFetch,vu=gu.apiRequest,Mu=wp.element,wu=Mu.Component,ku=Mu.Fragment,Lu=wp.components,Yu=Lu.Button,Du=Lu.ButtonGroup,Tu=Lu.Dashicon,Su=Lu.Placeholder,Ou=Lu.Spinner,xu=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==su(t)&&"function"!=typeof t?_u(e):t}(this,hu(t).apply(this,arguments))).getChart=e.getChart.bind(_u(e)),e.editChart=e.editChart.bind(_u(e)),e.editSettings=e.editSettings.bind(_u(e)),e.editPermissions=e.editPermissions.bind(_u(e)),e.readUploadedFile=e.readUploadedFile.bind(_u(e)),e.editURL=e.editURL.bind(_u(e)),e.editSchedule=e.editSchedule.bind(_u(e)),e.uploadData=e.uploadData.bind(_u(e)),e.getChartData=e.getChartData.bind(_u(e)),e.editChartData=e.editChartData.bind(_u(e)),e.updateChart=e.updateChart.bind(_u(e)),e.state={route:e.props.attributes.route?e.props.attributes.route:"home",chart:null,isModified:!1,isLoading:!1,isScheduled:!1},e}var n,r,a,i,o,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fu(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(s=mu(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.attributes.id){e.next=5;break}return e.next=3,bu({path:"wp/v2/visualizer/".concat(this.props.attributes.id)});case 3:t=e.sent,this.setState({chart:t.chart_data});case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getChart",value:(o=mu(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChart"});case 2:return e.next=4,bu({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,this.setState({route:"chartSelect",chart:n.chart_data,isLoading:!1}),this.props.setAttributes({id:t,route:"chartSelect"});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"editChart",value:function(){this.setState({route:"chartSelect"}),this.props.setAttributes({route:"chartSelect"})}},{key:"editSettings",value:function(e){var t=uu({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=uu({},this.state.chart);t["visualizer-permissions"]=e,this.setState({chart:t,isModified:!0})}},{key:"readUploadedFile",value:function(e){var t=this,n=e.current.files[0],r=new FileReader;r.onload=function(){var e=function(e,t){t=t||",";for(var n=new RegExp("(\\"+t+"|\\r?\\n|\\r|^)(?:'([^']*(?:''[^']*)*)'|([^'\\"+t+"\\r\\n]*))","gi"),r=[[]],a=null;a=n.exec(e);){var i=a[1];i.length&&i!==t&&r.push([]);var o=void 0;o=a[2]?a[2].replace(new RegExp("''","g"),"'"):a[3],r[r.length-1].push(o)}return r}(r.result);t.editChartData(e,"Visualizer_Source_Csv")},r.readAsText(n)}},{key:"editURL",value:function(e){var t=uu({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=uu({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t})}},{key:"uploadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setState({isLoading:"uploadData",isScheduled:t}),vu({path:"/visualizer/v1/upload-data?url=".concat(this.state.chart["visualizer-chart-url"]),method:"POST"}).then((function(t){if(2<=Object.keys(t).length){var n=uu({},e.state.chart);n["visualizer-source"]="Visualizer_Source_Csv_Remote",n["visualizer-default-data"]=0,n["visualizer-series"]=t.series,n["visualizer-data"]=t.data;var r=n["visualizer-series"],a=n["visualizer-settings"],i=r,o="series";return"pie"===n["visualizer-chart-type"]&&(i=n["visualizer-data"],o="slices"),i.map((function(e,t){if("pie"===n["visualizer-chart-type"]||0!==t){var r="pie"!==n["visualizer-chart-type"]?t-1:t;void 0===a[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?i.length-1:i.length)})),n["visualizer-settings"]=a,e.setState({chart:n,isModified:!0,isLoading:!1}),t}e.setState({isLoading:!1})}),(function(t){return e.setState({isLoading:!1}),t}))}},{key:"getChartData",value:(i=mu(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChartData"});case 2:return e.next=4,bu({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=uu({},this.state.chart))["visualizer-source"]="Visualizer_Source_Csv",r["visualizer-default-data"]=0,r["visualizer-series"]=n.chart_data["visualizer-series"],r["visualizer-data"]=n.chart_data["visualizer-data"],this.setState({isLoading:!1,chart:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"editChartData",value:function(e,t){var n=uu({},this.state.chart),r=[],a=uu({},n["visualizer-settings"]);e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var i=r,o="series";"pie"===n["visualizer-chart-type"]&&(i=e,o="slices"),i.map((function(e,t){if("pie"===n["visualizer-chart-type"]||0!==t){var r="pie"!==n["visualizer-chart-type"]?t-1:t;void 0===a[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?i.length-1:i.length)})),n["visualizer-source"]=t,n["visualizer-default-data"]=0,n["visualizer-data"]=e,n["visualizer-series"]=r,n["visualizer-settings"]=a,n["visualizer-chart-url"]="",this.setState({chart:n,isModified:!0,isScheduled:!1})}},{key:"updateChart",value:function(){var e=this;this.setState({isLoading:"updateChart"});var t=this.state.chart;!1===this.state.isScheduled&&(t["visualizer-chart-schedule"]="");var n="series";"pie"===t["visualizer-chart-type"]&&(n="slices"),Object.keys(t["visualizer-settings"][n]).map((function(e){void 0!==t["visualizer-settings"][n][e]&&void 0!==t["visualizer-settings"][n][e].temp&&delete t["visualizer-settings"][n][e].temp})),vu({path:"/visualizer/v1/update-chart?id=".concat(this.props.attributes.id),method:"POST",data:t}).then((function(t){return e.setState({isLoading:!1,isModified:!1}),t}),(function(e){return e}))}},{key:"render",value:function(){var e=this;return"renderChart"===this.state.route&&null!==this.state.chart?wp.element.createElement(ou,{id:this.props.attributes.id,chart:this.state.chart,className:this.props.className,editChart:this.editChart}):wp.element.createElement("div",{className:"visualizer-settings"},wp.element.createElement("div",{className:"visualizer-settings__title"},wp.element.createElement(Tu,{icon:"chart-pie"}),yu("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},yu("Make a new chart or display an existing one?")),wp.element.createElement("a",{href:visualizerLocalize.adminPage,target:"_blank",className:"visualizer-settings__content-option"},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},yu("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Tu,{icon:"arrow-right-alt2"}))),wp.element.createElement("div",{className:"visualizer-settings__content-option",onClick:function(){e.setState({route:"showCharts"}),e.props.setAttributes({route:"showCharts"})}},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},yu("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Tu,{icon:"arrow-right-alt2"})))),("getChart"===this.state.isLoading||"chartSelect"===this.state.route&&null===this.state.chart||"renderChart"===this.state.route&&null===this.state.chart)&&wp.element.createElement(Su,null,wp.element.createElement(Ou,null)),"showCharts"===this.state.route&&!1===this.state.isLoading&&wp.element.createElement(fe,{getChart:this.getChart}),"chartSelect"===this.state.route&&null!==this.state.chart&&wp.element.createElement(Bl,{id:this.props.attributes.id,chart:this.state.chart,editSettings:this.editSettings,editPermissions:this.editPermissions,url:this.state.url,readUploadedFile:this.readUploadedFile,editURL:this.editURL,editSchedule:this.editSchedule,uploadData:this.uploadData,getChartData:this.getChartData,editChartData:this.editChartData,isLoading:this.state.isLoading}),wp.element.createElement("div",{className:"visualizer-settings__controls"},("showCharts"===this.state.route||"chartSelect"===this.state.route)&&wp.element.createElement(Du,null,wp.element.createElement(Yu,{isDefault:!0,isLarge:!0,onClick:function(){var t;"showCharts"===e.state.route?t="home":"chartSelect"===e.state.route&&(t="showCharts"),e.setState({route:t}),e.props.setAttributes({route:t})}},yu("Back")),"chartSelect"===this.state.route&&wp.element.createElement(ku,null,!1===this.state.isModified?wp.element.createElement(Yu,{isDefault:!0,isLarge:!0,onClick:function(){e.setState({route:"renderChart"}),e.props.setAttributes({route:"renderChart"})}},yu("Done")):wp.element.createElement(Yu,{isPrimary:!0,isLarge:!0,isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},yu("Save"))))))}}])&&pu(n.prototype,r),a&&pu(n,a),t}(wu),ju=(n(153),wp.i18n.__),Eu=wp.blocks.registerBlockType;t.default=Eu("visualizer/chart",{title:ju("Visualizer Chart"),description:ju("A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages."),category:"common",icon:"chart-pie",keywords:[ju("Visualizer"),ju("Chart"),ju("Google Charts")],attributes:{id:{type:"number"},route:{type:"string"}},supports:{customClassName:!1},edit:xu,save:function(){return null}})}]);
classes/Visualizer/Gutenberg/build/handsontable.css CHANGED
@@ -25,7 +25,7 @@
25
  *
26
  * Version: 5.0.2
27
  * Release date: 12/09/2018 (built at 11/09/2018 09:55:19)
28
- */.handsontable .table th,.handsontable .table td{border-top:none}.handsontable tr{background:#fff}.handsontable td{background-color:inherit}.handsontable .table caption+thead tr:first-child th,.handsontable .table caption+thead tr:first-child td,.handsontable .table colgroup+thead tr:first-child th,.handsontable .table colgroup+thead tr:first-child td,.handsontable .table thead:first-child tr:first-child th,.handsontable .table thead:first-child tr:first-child td{border-top:1px solid #CCCCCC}.handsontable .table-bordered{border:0;border-collapse:separate}.handsontable .table-bordered th,.handsontable .table-bordered td{border-left:none}.handsontable .table-bordered th:first-child,.handsontable .table-bordered td:first-child{border-left:1px solid #CCCCCC}.handsontable .table>tbody>tr>td,.handsontable .table>tbody>tr>th,.handsontable .table>tfoot>tr>td,.handsontable .table>tfoot>tr>th,.handsontable .table>thead>tr>td,.handsontable .table>thead>tr>th{line-height:21px;padding:0 4px}.col-lg-1.handsontable,.col-lg-10.handsontable,.col-lg-11.handsontable,.col-lg-12.handsontable,.col-lg-2.handsontable,.col-lg-3.handsontable,.col-lg-4.handsontable,.col-lg-5.handsontable,.col-lg-6.handsontable,.col-lg-7.handsontable,.col-lg-8.handsontable,.col-lg-9.handsontable,.col-md-1.handsontable,.col-md-10.handsontable,.col-md-11.handsontable,.col-md-12.handsontable,.col-md-2.handsontable,.col-md-3.handsontable,.col-md-4.handsontable,.col-md-5.handsontable,.col-md-6.handsontable,.col-md-7.handsontable,.col-md-8.handsontable,.col-md-9.handsontable .col-sm-1.handsontable,.col-sm-10.handsontable,.col-sm-11.handsontable,.col-sm-12.handsontable,.col-sm-2.handsontable,.col-sm-3.handsontable,.col-sm-4.handsontable,.col-sm-5.handsontable,.col-sm-6.handsontable,.col-sm-7.handsontable,.col-sm-8.handsontable,.col-sm-9.handsontable .col-xs-1.handsontable,.col-xs-10.handsontable,.col-xs-11.handsontable,.col-xs-12.handsontable,.col-xs-2.handsontable,.col-xs-3.handsontable,.col-xs-4.handsontable,.col-xs-5.handsontable,.col-xs-6.handsontable,.col-xs-7.handsontable,.col-xs-8.handsontable,.col-xs-9.handsontable{padding-left:0;padding-right:0}.handsontable .table-striped>tbody>tr:nth-of-type(even){background-color:#FFF}.handsontable{position:relative}.handsontable .hide{display:none}.handsontable .relative{position:relative}.handsontable.htAutoSize{visibility:hidden;left:-99000px;position:absolute;top:-99000px}.handsontable .wtHider{width:0}.handsontable .wtSpreader{position:relative;width:0;height:auto}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable td,.handsontable th,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:initial}.handsontable table.htCore{border-collapse:separate;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;cursor:default;max-width:none;max-height:none}.handsontable col{width:50px}.handsontable col.rowHeader{width:50px}.handsontable th,.handsontable td{border-top-width:0;border-left-width:0;border-right:1px solid #CCC;border-bottom:1px solid #CCC;height:22px;empty-cells:show;line-height:21px;padding:0 4px 0 4px;background-color:#FFF;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line;background-clip:padding-box}.handsontable td.htInvalid{background-color:#ff4c42 !important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable th:last-child{border-right:1px solid #CCC;border-bottom:1px solid #CCC}.handsontable tr:first-child th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable th.htNoFrame{border-left-width:0;background-color:white;border-color:#FFF}.handsontable th:first-child,.handsontable th:nth-child(2),.handsontable td:first-of-type,.handsontable .htNoFrame+th,.handsontable .htNoFrame+td{border-left:1px solid #CCC}.handsontable.htRowHeaders thead tr th:nth-child(2){border-left:1px solid #CCC}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top:1px solid #CCC}.ht_master:not(.innerBorderLeft):not(.emptyColumns) ~ .handsontable tbody tr th,.ht_master:not(.innerBorderLeft):not(.emptyColumns) ~ .handsontable:not(.ht_clone_top) thead tr th:first-child{border-right-width:0}.ht_master:not(.innerBorderTop) thead tr:last-child th,.ht_master:not(.innerBorderTop) ~ .handsontable thead tr:last-child th,.ht_master:not(.innerBorderTop) thead tr.lastChild th,.ht_master:not(.innerBorderTop) ~ .handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable th{background-color:#f0f0f0;color:#222;text-align:center;font-weight:normal;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#CCC}.handsontable thead th .relative{padding:2px 4px}#hot-display-license-info{font-size:10px;color:#323232;padding:5px 0 3px 0;font-family:Helvetica, Arial, sans-serif;text-align:left}.handsontable .manualColumnResizer{position:fixed;top:0;cursor:col-resize;z-index:110;width:5px;height:25px}.handsontable .manualRowResizer{position:fixed;left:0;cursor:row-resize;z-index:110;height:5px;width:50px}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active,.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{background-color:#34a9db}.handsontable .manualColumnResizerGuide{position:fixed;right:0;top:0;background-color:#34a9db;display:none;width:0;border-right:1px dashed #777;margin-left:5px}.handsontable .manualRowResizerGuide{position:fixed;left:0;bottom:0;background-color:#34a9db;display:none;height:0;border-bottom:1px dashed #777;margin-top:5px}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block;z-index:199}.handsontable .columnSorting{position:relative}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .columnSorting.ascending::after{content:'\25B2';color:#5f5f5f;position:absolute;right:-15px}.handsontable .columnSorting.descending::after{content:'\25BC';color:#5f5f5f;position:absolute;right:-15px}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable .wtBorder.hidden{display:none !important}.handsontable .wtBorder.current{z-index:10}.handsontable .wtBorder.area{z-index:8}.handsontable .wtBorder.fill{z-index:6}.handsontable td.area,.handsontable td.area-1,.handsontable td.area-2,.handsontable td.area-3,.handsontable td.area-4,.handsontable td.area-5,.handsontable td.area-6,.handsontable td.area-7{position:relative}.handsontable td.area:before,.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;bottom:-100%\9;background:#005eff}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.handsontable td.area:before,.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before{bottom:-100%}}.handsontable td.area:before{opacity:0.1}.handsontable td.area-1:before{opacity:0.2}.handsontable td.area-2:before{opacity:0.27}.handsontable td.area-3:before{opacity:0.35}.handsontable td.area-4:before{opacity:0.41}.handsontable td.area-5:before{opacity:0.47}.handsontable td.area-6:before{opacity:0.54}.handsontable td.area-7:before{opacity:0.58}.handsontable tbody th.ht__highlight,.handsontable thead th.ht__highlight{background-color:#dcdcdc}.handsontable tbody th.ht__active_highlight,.handsontable thead th.ht__active_highlight{background-color:#8eb0e7;color:#000}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:none;outline-width:0;margin:0;padding:1px 5px 0 5px;font-family:inherit;line-height:21px;font-size:inherit;box-shadow:0 0 0 2px #5292F7 inset;resize:none;display:block;color:#000;border-radius:0;background-color:#FFF}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:104}.htSelectEditor{-webkit-appearance:menulist-button !important;position:absolute;width:auto}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu{position:relative}.handsontable .htSubmenu :after{content:'\25B6';color:#777;position:absolute;right:5px;font-size:9px}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#EEE;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable td.area .htAutocompleteArrow{color:#d3d3d3}.handsontable .htCheckboxRendererInput{display:inline-block;vertical-align:middle}.handsontable .htCheckboxRendererInput.noValue{opacity:0.5}.handsontable .htCheckboxRendererLabel{cursor:pointer;display:inline-block;width:100%}.handsontable .handsontable.ht_clone_top .wtHider{padding:0 0 5px 0}.handsontable .autocompleteEditor.handsontable{padding-right:17px}.handsontable .autocompleteEditor.handsontable.htMacScroll{padding-right:15px}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{border:1px solid #ccc;border-collapse:separate;background:white}.handsontable.listbox th,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th,.handsontable.listbox tr:first-child td,.handsontable.listbox td{border-color:transparent}.handsontable.listbox th,.handsontable.listbox td{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr td.current,.handsontable.listbox tr:hover td{background:#eee}.ht_clone_top{z-index:101}.ht_clone_left{z-index:102}.ht_clone_top_left_corner,.ht_clone_bottom_left_corner{z-index:103}.ht_clone_debug{z-index:103}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.htBordered{border-width:1px}.htBordered.htTopBorderSolid{border-top-style:solid;border-top-color:#000}.htBordered.htRightBorderSolid{border-right-style:solid;border-right-color:#000}.htBordered.htBottomBorderSolid{border-bottom-style:solid;border-bottom-color:#000}.htBordered.htLeftBorderSolid{border-left-style:solid;border-left-color:#000}.handsontable tbody tr th:nth-last-child(2){border-right:1px solid #CCC}.handsontable thead tr:nth-last-child(2) th.htGroupIndicatorContainer{border-bottom:1px solid #CCC;padding-bottom:5px}.ht_clone_top_left_corner thead tr th:nth-last-child(2){border-right:1px solid #CCC}.htCollapseButton{width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;box-shadow:1px 1px 3px rgba(0,0,0,0.4);cursor:pointer;margin-bottom:3px;position:relative}.htCollapseButton:after{content:"";height:300%;width:1px;display:block;background:#ccc;margin-left:4px;position:absolute;bottom:10px}thead .htCollapseButton{right:5px;position:absolute;top:5px;background:#fff}thead .htCollapseButton:after{height:1px;width:700%;right:10px;top:4px}.handsontable tr th .htExpandButton{position:absolute;width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;box-shadow:1px 1px 3px rgba(0,0,0,0.4);cursor:pointer;top:0;display:none}.handsontable thead tr th .htExpandButton{top:5px}.handsontable tr th .htExpandButton.clickable{display:block}.collapsibleIndicator{position:absolute;top:50%;transform:translate(0%, -50%);right:5px;border:1px solid #A6A6A6;line-height:10px;color:#222;border-radius:10px;font-size:10px;width:10px;height:10px;cursor:pointer;box-shadow:0 0 0 6px #eee;background:#eee}.handsontable col.hidden{width:0 !important}.handsontable table tr th.lightRightBorder{border-right:1px solid #E6E6E6}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.ht_master,.ht_clone_left,.ht_clone_top,.ht_clone_bottom{overflow:hidden}.ht_master .wtHolder{overflow:auto}.handsontable .ht_master thead,.handsontable .ht_master tr th,.handsontable .ht_clone_left thead{visibility:hidden}.ht_clone_top .wtHolder,.ht_clone_left .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-overflow-scrolling:touch}.htMobileEditorContainer{display:none;position:absolute;top:0;width:70%;height:54pt;background:#f8f8f8;border-radius:20px;border:1px solid #ebebeb;z-index:999;box-sizing:border-box;-webkit-box-sizing:border-box;-webkit-text-size-adjust:none}.topLeftSelectionHandle:not(.ht_master .topLeftSelectionHandle),.topLeftSelectionHandle-HitArea:not(.ht_master .topLeftSelectionHandle-HitArea){z-index:9999}.topLeftSelectionHandle,.topLeftSelectionHandle-HitArea,.bottomRightSelectionHandle,.bottomRightSelectionHandle-HitArea{left:-10000px;top:-10000px}.htMobileEditorContainer.active{display:block}.htMobileEditorContainer .inputs{position:absolute;right:210pt;bottom:10pt;top:10pt;left:14px;height:34pt}.htMobileEditorContainer .inputs textarea{font-size:13pt;border:1px solid #a1a1a1;-webkit-appearance:none;box-shadow:none;position:absolute;left:14px;right:14px;top:0;bottom:0;padding:7pt}.htMobileEditorContainer .cellPointer{position:absolute;top:-13pt;height:0;width:0;left:30px;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #ebebeb}.htMobileEditorContainer .cellPointer.hidden{display:none}.htMobileEditorContainer .cellPointer:before{content:'';display:block;position:absolute;top:2px;height:0;width:0;left:-13pt;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #f8f8f8}.htMobileEditorContainer .moveHandle{position:absolute;top:10pt;left:5px;width:30px;bottom:0px;cursor:move;z-index:9999}.htMobileEditorContainer .moveHandle:after{content:"..\A..\A..\A..";white-space:pre;line-height:10px;font-size:20pt;display:inline-block;margin-top:-8px;color:#ebebeb}.htMobileEditorContainer .positionControls{width:205pt;position:absolute;right:5pt;top:0;bottom:0}.htMobileEditorContainer .positionControls>div{width:50pt;height:100%;float:left}.htMobileEditorContainer .positionControls>div:after{content:" ";display:block;width:15pt;height:15pt;text-align:center;line-height:50pt}.htMobileEditorContainer .leftButton:after,.htMobileEditorContainer .rightButton:after,.htMobileEditorContainer .upButton:after,.htMobileEditorContainer .downButton:after{transform-origin:5pt 5pt;-webkit-transform-origin:5pt 5pt;margin:21pt 0 0 21pt}.htMobileEditorContainer .leftButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(-45deg)}.htMobileEditorContainer .leftButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .rightButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(135deg)}.htMobileEditorContainer .rightButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .upButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(45deg)}.htMobileEditorContainer .upButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .downButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(225deg)}.htMobileEditorContainer .downButton:active:after{border-color:#cfcfcf}.handsontable.hide-tween{-webkit-animation:opacity-hide 0.3s;animation:opacity-hide 0.3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable.show-tween{-webkit-animation:opacity-show 0.3s;animation:opacity-show 0.3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}/*!
29
  * Pikaday
30
  * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
31
  */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif}.pika-single:before,.pika-single:after{content:" ";display:table}.pika-single:after{clear:both}.pika-single{*zoom:1}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,0.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;*display:inline;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-prev,.pika-next{display:block;cursor:pointer;position:relative;outline:none;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5;*position:absolute;*top:0}.pika-prev:hover,.pika-next:hover{opacity:1}.pika-prev,.is-rtl .pika-next{float:left;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");*left:0}.pika-next,.is-rtl .pika-prev{float:right;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");*right:0}.pika-prev.is-disabled,.pika-next.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block;*display:inline}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table th,.pika-table td{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:bold;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:none;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#33aaff;font-weight:bold}.is-selected .pika-button{color:#fff;font-weight:bold;background:#33aaff;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#33aaff;box-shadow:none;border-radius:3px}.is-disabled .pika-button,.is-outside-current-month .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-table abbr{border-bottom:none;cursor:help}.htCommentCell{position:relative}.htCommentCell:after{content:'';position:absolute;top:0;right:0;border-left:6px solid transparent;border-top:6px solid black}.htComments{display:none;z-index:1059;position:absolute}.htCommentTextArea{box-shadow:rgba(0,0,0,0.117647) 0 1px 3px,rgba(0,0,0,0.239216) 0 1px 2px;box-sizing:border-box;border:none;border-left:3px solid #ccc;background-color:#fff;width:215px;height:90px;font-size:12px;padding:5px;outline:0px !important;-webkit-appearance:none}.htCommentTextArea:focus{box-shadow:rgba(0,0,0,0.117647) 0 1px 3px,rgba(0,0,0,0.239216) 0 1px 2px,inset 0 0 0 1px #5292f7;border-left:3px solid #5292f7}/*!
25
  *
26
  * Version: 5.0.2
27
  * Release date: 12/09/2018 (built at 11/09/2018 09:55:19)
28
+ */.handsontable .table th,.handsontable .table td{border-top:none}.handsontable tr{background:#fff}.handsontable td{background-color:inherit}.handsontable .table caption+thead tr:first-child th,.handsontable .table caption+thead tr:first-child td,.handsontable .table colgroup+thead tr:first-child th,.handsontable .table colgroup+thead tr:first-child td,.handsontable .table thead:first-child tr:first-child th,.handsontable .table thead:first-child tr:first-child td{border-top:1px solid #CCCCCC}.handsontable .table-bordered{border:0;border-collapse:separate}.handsontable .table-bordered th,.handsontable .table-bordered td{border-left:none}.handsontable .table-bordered th:first-child,.handsontable .table-bordered td:first-child{border-left:1px solid #CCCCCC}.handsontable .table>tbody>tr>td,.handsontable .table>tbody>tr>th,.handsontable .table>tfoot>tr>td,.handsontable .table>tfoot>tr>th,.handsontable .table>thead>tr>td,.handsontable .table>thead>tr>th{line-height:21px;padding:0 4px}.col-lg-1.handsontable,.col-lg-10.handsontable,.col-lg-11.handsontable,.col-lg-12.handsontable,.col-lg-2.handsontable,.col-lg-3.handsontable,.col-lg-4.handsontable,.col-lg-5.handsontable,.col-lg-6.handsontable,.col-lg-7.handsontable,.col-lg-8.handsontable,.col-lg-9.handsontable,.col-md-1.handsontable,.col-md-10.handsontable,.col-md-11.handsontable,.col-md-12.handsontable,.col-md-2.handsontable,.col-md-3.handsontable,.col-md-4.handsontable,.col-md-5.handsontable,.col-md-6.handsontable,.col-md-7.handsontable,.col-md-8.handsontable,.col-md-9.handsontable .col-sm-1.handsontable,.col-sm-10.handsontable,.col-sm-11.handsontable,.col-sm-12.handsontable,.col-sm-2.handsontable,.col-sm-3.handsontable,.col-sm-4.handsontable,.col-sm-5.handsontable,.col-sm-6.handsontable,.col-sm-7.handsontable,.col-sm-8.handsontable,.col-sm-9.handsontable .col-xs-1.handsontable,.col-xs-10.handsontable,.col-xs-11.handsontable,.col-xs-12.handsontable,.col-xs-2.handsontable,.col-xs-3.handsontable,.col-xs-4.handsontable,.col-xs-5.handsontable,.col-xs-6.handsontable,.col-xs-7.handsontable,.col-xs-8.handsontable,.col-xs-9.handsontable{padding-left:0;padding-right:0}.handsontable .table-striped>tbody>tr:nth-of-type(even){background-color:#FFF}.handsontable{position:relative}.handsontable .hide{display:none}.handsontable .relative{position:relative}.handsontable.htAutoSize{visibility:hidden;left:-99000px;position:absolute;top:-99000px}.handsontable .wtHider{width:0}.handsontable .wtSpreader{position:relative;width:0;height:auto}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable td,.handsontable th,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:initial}.handsontable table.htCore{border-collapse:separate;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;cursor:default;max-width:none;max-height:none}.handsontable col{width:50px}.handsontable col.rowHeader{width:50px}.handsontable th,.handsontable td{border-top-width:0;border-left-width:0;border-right:1px solid #CCC;border-bottom:1px solid #CCC;height:22px;empty-cells:show;line-height:21px;padding:0 4px 0 4px;background-color:#FFF;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line;background-clip:padding-box}.handsontable td.htInvalid{background-color:#ff4c42 !important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable th:last-child{border-right:1px solid #CCC;border-bottom:1px solid #CCC}.handsontable tr:first-child th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable th.htNoFrame{border-left-width:0;background-color:white;border-color:#FFF}.handsontable th:first-child,.handsontable th:nth-child(2),.handsontable td:first-of-type,.handsontable .htNoFrame+th,.handsontable .htNoFrame+td{border-left:1px solid #CCC}.handsontable.htRowHeaders thead tr th:nth-child(2){border-left:1px solid #CCC}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top:1px solid #CCC}.ht_master:not(.innerBorderLeft):not(.emptyColumns) ~ .handsontable tbody tr th,.ht_master:not(.innerBorderLeft):not(.emptyColumns) ~ .handsontable:not(.ht_clone_top) thead tr th:first-child{border-right-width:0}.ht_master:not(.innerBorderTop) thead tr:last-child th,.ht_master:not(.innerBorderTop) ~ .handsontable thead tr:last-child th,.ht_master:not(.innerBorderTop) thead tr.lastChild th,.ht_master:not(.innerBorderTop) ~ .handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable th{background-color:#f0f0f0;color:#222;text-align:center;font-weight:normal;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#CCC}.handsontable thead th .relative{padding:2px 4px}#hot-display-license-info{font-size:10px;color:#323232;padding:5px 0 3px 0;font-family:Helvetica, Arial, sans-serif;text-align:left}.handsontable .manualColumnResizer{position:fixed;top:0;cursor:col-resize;z-index:110;width:5px;height:25px}.handsontable .manualRowResizer{position:fixed;left:0;cursor:row-resize;z-index:110;height:5px;width:50px}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active,.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{background-color:#34a9db}.handsontable .manualColumnResizerGuide{position:fixed;right:0;top:0;background-color:#34a9db;display:none;width:0;border-right:1px dashed #777;margin-left:5px}.handsontable .manualRowResizerGuide{position:fixed;left:0;bottom:0;background-color:#34a9db;display:none;height:0;border-bottom:1px dashed #777;margin-top:5px}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block;z-index:199}.handsontable .columnSorting{position:relative}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .columnSorting.ascending::after{content:'\25B2';color:#5f5f5f;position:absolute;right:-15px}.handsontable .columnSorting.descending::after{content:'\25BC';color:#5f5f5f;position:absolute;right:-15px}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable .wtBorder.hidden{display:none !important}.handsontable .wtBorder.current{z-index:10}.handsontable .wtBorder.area{z-index:8}.handsontable .wtBorder.fill{z-index:6}.handsontable td.area,.handsontable td.area-1,.handsontable td.area-2,.handsontable td.area-3,.handsontable td.area-4,.handsontable td.area-5,.handsontable td.area-6,.handsontable td.area-7{position:relative}.handsontable td.area:before,.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;bottom:-100%\9;background:#005eff}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.handsontable td.area:before,.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before{bottom:-100%}}.handsontable td.area:before{opacity:0.1}.handsontable td.area-1:before{opacity:0.2}.handsontable td.area-2:before{opacity:0.27}.handsontable td.area-3:before{opacity:0.35}.handsontable td.area-4:before{opacity:0.41}.handsontable td.area-5:before{opacity:0.47}.handsontable td.area-6:before{opacity:0.54}.handsontable td.area-7:before{opacity:0.58}.handsontable tbody th.ht__highlight,.handsontable thead th.ht__highlight{background-color:#dcdcdc}.handsontable tbody th.ht__active_highlight,.handsontable thead th.ht__active_highlight{background-color:#8eb0e7;color:#000}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:none;outline-width:0;margin:0;padding:1px 5px 0 5px;font-family:inherit;line-height:21px;font-size:inherit;box-shadow:0 0 0 2px #5292F7 inset;resize:none;display:block;color:#000;border-radius:0;background-color:#FFF}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:104}.htSelectEditor{-webkit-appearance:menulist-button !important;position:absolute;width:auto}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu{position:relative}.handsontable .htSubmenu :after{content:'\25B6';color:#777;position:absolute;right:5px;font-size:9px}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#EEE;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable td.area .htAutocompleteArrow{color:#d3d3d3}.handsontable .htCheckboxRendererInput{display:inline-block;vertical-align:middle}.handsontable .htCheckboxRendererInput.noValue{opacity:0.5}.handsontable .htCheckboxRendererLabel{cursor:pointer;display:inline-block;width:100%}.handsontable .handsontable.ht_clone_top .wtHider{padding:0 0 5px 0}.handsontable .autocompleteEditor.handsontable{padding-right:17px}.handsontable .autocompleteEditor.handsontable.htMacScroll{padding-right:15px}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{border:1px solid #ccc;border-collapse:separate;background:white}.handsontable.listbox th,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th,.handsontable.listbox tr:first-child td,.handsontable.listbox td{border-color:transparent}.handsontable.listbox th,.handsontable.listbox td{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr td.current,.handsontable.listbox tr:hover td{background:#eee}.ht_clone_top{z-index:101}.ht_clone_left{z-index:102}.ht_clone_top_left_corner,.ht_clone_bottom_left_corner{z-index:103}.ht_clone_debug{z-index:103}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.htBordered{border-width:1px}.htBordered.htTopBorderSolid{border-top-style:solid;border-top-color:#000}.htBordered.htRightBorderSolid{border-right-style:solid;border-right-color:#000}.htBordered.htBottomBorderSolid{border-bottom-style:solid;border-bottom-color:#000}.htBordered.htLeftBorderSolid{border-left-style:solid;border-left-color:#000}.handsontable tbody tr th:nth-last-child(2){border-right:1px solid #CCC}.handsontable thead tr:nth-last-child(2) th.htGroupIndicatorContainer{border-bottom:1px solid #CCC;padding-bottom:5px}.ht_clone_top_left_corner thead tr th:nth-last-child(2){border-right:1px solid #CCC}.htCollapseButton{width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;box-shadow:1px 1px 3px rgba(0,0,0,0.4);cursor:pointer;margin-bottom:3px;position:relative}.htCollapseButton:after{content:"";height:300%;width:1px;display:block;background:#ccc;margin-left:4px;position:absolute;bottom:10px}thead .htCollapseButton{right:5px;position:absolute;top:5px;background:#fff}thead .htCollapseButton:after{height:1px;width:700%;right:10px;top:4px}.handsontable tr th .htExpandButton{position:absolute;width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;box-shadow:1px 1px 3px rgba(0,0,0,0.4);cursor:pointer;top:0;display:none}.handsontable thead tr th .htExpandButton{top:5px}.handsontable tr th .htExpandButton.clickable{display:block}.collapsibleIndicator{position:absolute;top:50%;-webkit-transform:translate(0%, -50%);transform:translate(0%, -50%);right:5px;border:1px solid #A6A6A6;line-height:10px;color:#222;border-radius:10px;font-size:10px;width:10px;height:10px;cursor:pointer;box-shadow:0 0 0 6px #eee;background:#eee}.handsontable col.hidden{width:0 !important}.handsontable table tr th.lightRightBorder{border-right:1px solid #E6E6E6}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.ht_master,.ht_clone_left,.ht_clone_top,.ht_clone_bottom{overflow:hidden}.ht_master .wtHolder{overflow:auto}.handsontable .ht_master thead,.handsontable .ht_master tr th,.handsontable .ht_clone_left thead{visibility:hidden}.ht_clone_top .wtHolder,.ht_clone_left .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-overflow-scrolling:touch}.htMobileEditorContainer{display:none;position:absolute;top:0;width:70%;height:54pt;background:#f8f8f8;border-radius:20px;border:1px solid #ebebeb;z-index:999;box-sizing:border-box;-webkit-box-sizing:border-box;-webkit-text-size-adjust:none}.topLeftSelectionHandle:not(.ht_master .topLeftSelectionHandle),.topLeftSelectionHandle-HitArea:not(.ht_master .topLeftSelectionHandle-HitArea){z-index:9999}.topLeftSelectionHandle,.topLeftSelectionHandle-HitArea,.bottomRightSelectionHandle,.bottomRightSelectionHandle-HitArea{left:-10000px;top:-10000px}.htMobileEditorContainer.active{display:block}.htMobileEditorContainer .inputs{position:absolute;right:210pt;bottom:10pt;top:10pt;left:14px;height:34pt}.htMobileEditorContainer .inputs textarea{font-size:13pt;border:1px solid #a1a1a1;-webkit-appearance:none;box-shadow:none;position:absolute;left:14px;right:14px;top:0;bottom:0;padding:7pt}.htMobileEditorContainer .cellPointer{position:absolute;top:-13pt;height:0;width:0;left:30px;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #ebebeb}.htMobileEditorContainer .cellPointer.hidden{display:none}.htMobileEditorContainer .cellPointer:before{content:'';display:block;position:absolute;top:2px;height:0;width:0;left:-13pt;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #f8f8f8}.htMobileEditorContainer .moveHandle{position:absolute;top:10pt;left:5px;width:30px;bottom:0px;cursor:move;z-index:9999}.htMobileEditorContainer .moveHandle:after{content:"..\A..\A..\A..";white-space:pre;line-height:10px;font-size:20pt;display:inline-block;margin-top:-8px;color:#ebebeb}.htMobileEditorContainer .positionControls{width:205pt;position:absolute;right:5pt;top:0;bottom:0}.htMobileEditorContainer .positionControls>div{width:50pt;height:100%;float:left}.htMobileEditorContainer .positionControls>div:after{content:" ";display:block;width:15pt;height:15pt;text-align:center;line-height:50pt}.htMobileEditorContainer .leftButton:after,.htMobileEditorContainer .rightButton:after,.htMobileEditorContainer .upButton:after,.htMobileEditorContainer .downButton:after{transform-origin:5pt 5pt;-webkit-transform-origin:5pt 5pt;margin:21pt 0 0 21pt}.htMobileEditorContainer .leftButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(-45deg)}.htMobileEditorContainer .leftButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .rightButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(135deg)}.htMobileEditorContainer .rightButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .upButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(45deg)}.htMobileEditorContainer .upButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .downButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(225deg)}.htMobileEditorContainer .downButton:active:after{border-color:#cfcfcf}.handsontable.hide-tween{-webkit-animation:opacity-hide 0.3s;animation:opacity-hide 0.3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable.show-tween{-webkit-animation:opacity-show 0.3s;animation:opacity-show 0.3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}/*!
29
  * Pikaday
30
  * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
31
  */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif}.pika-single:before,.pika-single:after{content:" ";display:table}.pika-single:after{clear:both}.pika-single{*zoom:1}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,0.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;*display:inline;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-prev,.pika-next{display:block;cursor:pointer;position:relative;outline:none;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5;*position:absolute;*top:0}.pika-prev:hover,.pika-next:hover{opacity:1}.pika-prev,.is-rtl .pika-next{float:left;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");*left:0}.pika-next,.is-rtl .pika-prev{float:right;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");*right:0}.pika-prev.is-disabled,.pika-next.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block;*display:inline}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table th,.pika-table td{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:bold;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:none;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#33aaff;font-weight:bold}.is-selected .pika-button{color:#fff;font-weight:bold;background:#33aaff;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#33aaff;box-shadow:none;border-radius:3px}.is-disabled .pika-button,.is-outside-current-month .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-table abbr{border-bottom:none;cursor:help}.htCommentCell{position:relative}.htCommentCell:after{content:'';position:absolute;top:0;right:0;border-left:6px solid transparent;border-top:6px solid black}.htComments{display:none;z-index:1059;position:absolute}.htCommentTextArea{box-shadow:rgba(0,0,0,0.117647) 0 1px 3px,rgba(0,0,0,0.239216) 0 1px 2px;box-sizing:border-box;border:none;border-left:3px solid #ccc;background-color:#fff;width:215px;height:90px;font-size:12px;padding:5px;outline:0px !important;-webkit-appearance:none}.htCommentTextArea:focus{box-shadow:rgba(0,0,0,0.117647) 0 1px 3px,rgba(0,0,0,0.239216) 0 1px 2px,inset 0 0 0 1px #5292f7;border-left:3px solid #5292f7}/*!
classes/Visualizer/Gutenberg/build/handsontable.js CHANGED
@@ -27,7 +27,7 @@
27
  * Version: 5.0.2
28
  * Release date: 12/09/2018 (built at 11/09/2018 09:55:19)
29
  */
30
- var r;"undefined"!=typeof self&&self,r=function(e,n,r){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=207)}([function(e,t,n){"use strict";t.__esModule=!0,t.HTML_CHARACTERS=void 0,t.getParent=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,o=null,r=e;null!==r;){if(n===t){o=r;break}r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r=r.host:(n+=1,r=r.parentNode)}return o},t.closest=a,t.closestDown=function(e,t,n){for(var o=[],r=e;r&&(r=a(r,t,n))&&(!n||n.contains(r));)o.push(r),r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode;var i=o.length;return i?o[i-1]:null},t.isChildOf=function(e,t){var n=e.parentNode,o=[];for("string"==typeof t?o=Array.prototype.slice.call(document.querySelectorAll(t),0):o.push(t);null!==n;){if(o.indexOf(n)>-1)return!0;n=n.parentNode}return!1},t.isChildOfWebComponentTable=function(e){var t="hot-table",n=!1,o=s(e);function r(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===t.toUpperCase()}for(;null!==o;){if(r(o)){n=!0;break}if(o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n=r(o.host))break;o=o.host}o=o.parentNode}return n},t.polymerWrap=s,t.polymerUnwrap=l,t.index=function(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t},t.overlayContainsElement=function(e,t){var n=document.querySelector(".ht_clone_"+e);return n?n.contains(t):null},t.hasClass=function(e,t){return h(e,t)},t.addClass=function(e,t){return d(e,t)},t.removeClass=function(e,t){return f(e,t)},t.removeTextNodes=function e(t,n){if(3===t.nodeType)n.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var o=t.childNodes,r=o.length-1;r>=0;r--)e(o[r],t)},t.empty=y,t.fastInnerHTML=function(e,t){w.test(t)?e.innerHTML=t:b(e,t)},t.fastInnerText=b,t.isVisible=function e(t){for(var n=t;l(n)!==document.documentElement;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===n.style.display)return!1;n=n.parentNode}return!0},t.offset=function(e){var t=document.documentElement,n=e,o=void 0,i=void 0,a=void 0,s=void 0;if((0,r.hasCaptionProblem)()&&n.firstChild&&"CAPTION"===n.firstChild.nodeName)return{top:(s=n.getBoundingClientRect()).top+(window.pageYOffset||t.scrollTop)-(t.clientTop||0),left:s.left+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)};for(o=n.offsetLeft,i=n.offsetTop,a=n;(n=n.offsetParent)&&n!==document.body;)o+=n.offsetLeft,i+=n.offsetTop,a=n;return a&&"fixed"===a.style.position&&(o+=window.pageXOffset||t.scrollLeft,i+=window.pageYOffset||t.scrollTop),{left:o,top:i}},t.getWindowScrollTop=E,t.getWindowScrollLeft=S,t.getScrollTop=function(e){return e===window?E():e.scrollTop},t.getScrollLeft=function(e){return e===window?S():e.scrollLeft},t.getScrollableElement=function(e){for(var t=["auto","scroll"],n=e.parentNode,o=void 0,r=void 0,i=void 0,a="",s="",l="",u="";n&&n.style&&document.body!==n;){if(o=n.style.overflow,r=n.style.overflowX,i=n.style.overflowY,"scroll"===o||"scroll"===r||"scroll"===i)return n;if(window.getComputedStyle&&(a=window.getComputedStyle(n),s=a.getPropertyValue("overflow"),l=a.getPropertyValue("overflow-y"),u=a.getPropertyValue("overflow-x"),"scroll"===s||"scroll"===u||"scroll"===l))return n;if(n.clientHeight<=n.scrollHeight+1&&(-1!==t.indexOf(i)||-1!==t.indexOf(o)||-1!==t.indexOf(s)||-1!==t.indexOf(l)))return n;if(n.clientWidth<=n.scrollWidth+1&&(-1!==t.indexOf(r)||-1!==t.indexOf(o)||-1!==t.indexOf(s)||-1!==t.indexOf(u)))return n;n=n.parentNode}return window},t.getTrimmingContainer=function(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var n=window.getComputedStyle(t);if("visible"!==n.getPropertyValue("overflow")&&""!==n.getPropertyValue("overflow"))return t}t=t.parentNode}return window},t.getStyle=function(e,t){if(e){if(e===window)return"width"===t?window.innerWidth+"px":"height"===t?window.innerHeight+"px":void 0;var n,o=e.style[t];return""!==o&&void 0!==o?o:""!==(n=O(e))[t]&&void 0!==n[t]?n[t]:void 0}},t.getComputedStyle=O,t.outerWidth=function(e){return e.offsetWidth},t.outerHeight=function(e){return(0,r.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.addEvent=function(e,t,n){window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEvent=function(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange(),o=n.duplicate();return n.moveToBookmark(t.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();return null==t?0:e.createTextRange().text.indexOf(t.text)+t.text.length}return 0},t.getSelectionText=function(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e},t.setCaretPosition=function(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var o=e.parentNode,r=o.style.display;o.style.display="block",e.setSelectionRange(t,n),o.style.display=r}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}},t.getScrollbarWidth=function(){return void 0===m&&(m=function(){var e=document.createElement("div");e.style.height="200px",e.style.width="100%";var t=document.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var o=e.offsetWidth;return n==o&&(o=t.clientWidth),(document.body||document.documentElement).removeChild(t),n-o}()),m},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.setOverlayPosition=function(e,t,n){(0,o.isIE8)()||(0,o.isIE9)()?(e.style.top=n,e.style.left=t):(0,o.isSafari)()?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)"},t.getCssTransform=function(e){var t=void 0;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")},t.isInput=T,t.isOutsideInput=function(e){return T(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")};var o=n(39),r=n(40);function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t,n){for(var o=e;null!==o&&o!==n;){if(o.nodeType===Node.ELEMENT_NODE&&(t.indexOf(o.nodeName)>-1||t.indexOf(o)>-1))return o;o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode}return null}function s(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function l(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}var u,c=!!document.documentElement.classList,h=void 0,d=void 0,f=void 0;function p(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}if(c){var g=((u=document.createElement("div")).classList.add("test","test2"),u.classList.contains("test2"));h=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},d=function(e,t){var n,o=t;if("string"==typeof o&&(o=o.split(" ")),(o=p(o)).length>0)if(g)(n=e.classList).add.apply(n,i(o));else for(var r=0;o&&o[r];)e.classList.add(o[r]),r+=1},f=function(e,t){var n,o=t;if("string"==typeof o&&(o=o.split(" ")),(o=p(o)).length>0)if(g)(n=e.classList).remove.apply(n,i(o));else for(var r=0;o&&o[r];)e.classList.remove(o[r]),r+=1}}else{var v=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};h=function(e,t){return void 0!==e.className&&v(t).test(e.className)},d=function(e,t){var n=0,o=e.className,r=t;if("string"==typeof r&&(r=r.split(" ")),""===o)o=r.join(" ");else for(;r&&r[n];)v(r[n]).test(o)||(o+=" "+r[n]),n+=1;e.className=o},f=function(e,t){var n=0,o=e.className,r=t;for("string"==typeof r&&(r=r.split(" "));r&&r[n];)o=o.replace(v(r[n])," ").trim(),n+=1;e.className!==o&&(e.className=o)}}function y(e){for(var t=void 0;t=e.lastChild;)e.removeChild(t)}var m,w=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,C=!!document.createTextNode("test").textContent;function b(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?C?n.textContent=t:n.data=t:(y(e),e.appendChild(document.createTextNode(t)))}function E(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function S(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function O(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function T(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.duckSchema=function e(t){var n=void 0;return Array.isArray(t)?n=[]:(n={},l(t,(function(t,r){"__children"!==r&&(t&&"object"===(void 0===t?"undefined":o(t))&&!Array.isArray(t)?n[r]=e(t):Array.isArray(t)?t.length&&"object"===o(t[0])&&!Array.isArray(t[0])?n[r]=[e(t[0])]:n[r]=[]:n[r]=null)}))),n},t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e},t.extend=function(e,t){return l(t,(function(t,n){e[n]=t})),e},t.deepExtend=function e(t,n){l(n,(function(r,i){n[i]&&"object"===o(n[i])?(t[i]||(Array.isArray(n[i])?t[i]=[]:"[object Date]"===Object.prototype.toString.call(n[i])?t[i]=n[i]:t[i]={}),e(t[i],n[i])):t[i]=n[i]}))},t.deepClone=a,t.clone=function(e){var t={};return l(e,(function(e,n){t[n]=e})),t},t.mixin=function(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,r.arrayEach)(n,(function(t){e.MIXINS.push(t.MIXIN_NAME),l(t,(function(t,n){if(void 0!==e.prototype[n])throw new Error("Mixin conflict. Property '"+n+"' already exist and cannot be overwritten.");var o,r,i;"function"==typeof t?e.prototype[n]=t:Object.defineProperty(e.prototype,n,{get:(o=n,r=t,i="_"+o,function(){var e;return void 0===this[i]&&(this[i]=(e=r,(Array.isArray(e)||s(e))&&(e=a(e)),e)),this[i]}),set:function(e){var t="_"+e;return function(e){this[t]=e}}(n),configurable:!0})}))})),e},t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.isObject=s,t.defineGetter=function(e,t,n,o){o.value=n,o.writable=!1!==o.writable,o.enumerable=!1!==o.enumerable,o.configurable=!1!==o.configurable,Object.defineProperty(e,t,o)},t.objectEach=l,t.getProperty=function(e,t){var n=t.split("."),o=e;return l(n,(function(e){if(void 0===(o=o[e]))return o=void 0,!1})),o},t.deepObjectSize=function(e){return s(e)?function e(t){var n=0;return s(t)?l(t,(function(t){n+=e(t)})):n+=1,n}(e):0},t.createObjectPropListener=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",o="_"+n,r=(i(t={_touched:!1},o,e),i(t,"isTouched",(function(){return this._touched})),t);return Object.defineProperty(r,n,{get:function(){return this[o]},set:function(e){this._touched=!0,this[o]=e},enumerable:!0,configurable:!0}),r},t.hasOwnProperty=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return"object"===(void 0===e?"undefined":o(e))?JSON.parse(JSON.stringify(e)):e}function s(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){for(var n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}},function(e,t,n){"use strict";function o(e,t,n,o){var r=-1,i=e,a=n;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(o&&s&&(a=i[r+=1]),r+=1;r<s;)a=t(a,i[r],r,i),r+=1;return a}function r(e,t){var n=0,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length;n<r&&!1!==t(o[n],n,o);)n+=1;return e}function i(e){return o(e,(function(e,t){return e+t}),0)}t.__esModule=!0,t.to2dArray=function(e){for(var t=e.length,n=0;n<t;)e[n]=[e[n]],n+=1},t.extendArray=function(e,t){for(var n=t.length,o=0;o<n;)e.push(t[o]),o+=1},t.pivot=function(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,o=e[0].length,r=0;r<n;r++)for(var i=0;i<o;i++)t[i]||(t[i]=[]),t[i][r]=e[r][i];return t},t.arrayReduce=o,t.arrayFilter=function(e,t){var n=0,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length,i=[],a=-1;n<r;){var s=o[n];t(s,n,o)&&(i[a+=1]=s),n+=1}return i},t.arrayMap=function(e,t){var n=0,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length,i=[],a=-1;n<r;){var s=o[n];i[a+=1]=t(s,n,o),n+=1}return i},t.arrayEach=r,t.arraySum=i,t.arrayMax=function(e){return o(e,(function(e,t){return e>t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return o(e,(function(e,t){return e<t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayAvg=function(e){return e.length?i(e)/e.length:0},t.arrayFlatten=function e(t){return o(t,(function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])},t.arrayUnique=function(e){var t=[];return r(e,(function(e){-1===t.indexOf(e)&&t.push(e)})),t}},function(e,t,n){var o=n(15),r=n(37),i=n(29),a=n(28),s=n(30),l=function(e,t,n){var u,c,h,d,f=e&l.F,p=e&l.G,g=e&l.S,v=e&l.P,y=e&l.B,m=p?o:g?o[t]||(o[t]={}):(o[t]||{}).prototype,w=p?r:r[t]||(r[t]={}),C=w.prototype||(w.prototype={});for(u in p&&(n=t),n)h=((c=!f&&m&&void 0!==m[u])?m:n)[u],d=y&&c?s(h,o):v&&"function"==typeof h?s(Function.call,h):h,m&&a(m,u,h,e&l.U),w[u]!=h&&i(w,u,d),v&&C[u]!=h&&(C[u]=h)};o.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";t.__esModule=!0,t.Viewport=t.TableRenderer=t.Table=t.Settings=t.Selection=t.Scroll=t.Overlays=t.Event=t.Core=t.default=t.Border=t.TopLeftCornerOverlay=t.TopOverlay=t.LeftOverlay=t.DebugOverlay=t.RowFilter=t.ColumnFilter=t.CellRange=t.CellCoords=t.ViewportRowsCalculator=t.ViewportColumnsCalculator=void 0,n(98),n(113),n(114),n(118),n(119),n(121),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(143),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(88),n(158),n(159),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(169),n(170),n(171),n(173),n(174),n(175);var o=S(n(176)),r=S(n(177)),i=S(n(56)),a=S(n(178)),s=S(n(179)),l=S(n(180)),u=S(n(229)),c=S(n(230)),h=S(n(231)),d=S(n(232)),f=S(n(189)),p=S(n(181)),g=S(n(182)),v=S(n(183)),y=S(n(184)),m=S(n(233)),w=S(n(185)),C=S(n(186)),b=S(n(187)),E=S(n(188));function S(e){return e&&e.__esModule?e:{default:e}}t.ViewportColumnsCalculator=o.default,t.ViewportRowsCalculator=r.default,t.CellCoords=i.default,t.CellRange=a.default,t.ColumnFilter=s.default,t.RowFilter=l.default,t.DebugOverlay=u.default,t.LeftOverlay=c.default,t.TopOverlay=h.default,t.TopLeftCornerOverlay=d.default,t.Border=f.default,t.default=p.default,t.Core=p.default,t.Event=g.default,t.Overlays=v.default,t.Scroll=y.default,t.Selection=m.default,t.Settings=w.default,t.Table=C.default,t.TableRenderer=b.default,t.Viewport=E.default},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.getListenersCounter=function(){return l};var r=n(0),i=n(1),a=n(40),s=n(13),l=0,u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return o(e,[{key:"addEventListener",value:function(e,t,n){var o=this,r=this.context;function i(e){n.call(this,c(r,e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i}),window.addEventListener?e.addEventListener(t,i,!1):e.attachEvent("on"+t,i),l+=1,function(){o.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var o=this.context.eventListeners.length,r=void 0;o;)if(o-=1,(r=this.context.eventListeners[o]).event===t&&r.element===e){if(n&&n!==r.callback)continue;this.context.eventListeners.splice(o,1),r.element.removeEventListener?r.element.removeEventListener(r.event,r.callbackProxy,!1):r.element.detachEvent("on"+r.event,r.callbackProxy),l-=1}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e;){e-=1;var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0},o=void 0;document.createEvent?(o=document.createEvent("MouseEvents")).initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||document.body.parentNode):o=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on"+t,o)}}]),e}();function c(e,t){var n=void 0,o=void 0,l=void 0,c=void 0,h=void 0;t.isTargetWebComponent=!1,t.realTarget=t.target;var d=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){d.apply(this),(0,s.stopImmediatePropagation)(this)},!u.isHotTableEnv)return t;for(h=(t=(0,r.polymerWrap)(t)).path?t.path.length:0;h;){if(h-=1,"HOT-TABLE"===t.path[h].nodeName)n=!0;else if(n&&t.path[h].shadowRoot){c=t.path[h];break}0!==h||c||(c=t.path[h])}return c||(c=t.target),t.isTargetWebComponent=!0,(0,a.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,i.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,i.hasOwnProperty)(e,"hot")?o=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?o=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(o=e.wtTable.TABLE.parentNode.parentNode),l=(0,r.closest)(t.target,["HOT-TABLE"],o),t.realTarget=l&&o.querySelector("HOT-TABLE")||t.target),Object.defineProperty(t,"target",{get:function(){return(0,r.polymerWrap)(c)},enumerable:!0,configurable:!0}),t}t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isNumeric=function(e){var t=void 0===e?"undefined":o(e);return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)},t.rangeEach=function(e,t,n){var o=-1;for("function"==typeof t?(n=t,t=e):o=e-1;++o<=t&&!1!==n(o););},t.rangeEachReverse=function(e,t,n){var o=e+1;for("function"==typeof t&&(n=t,t=0);--o>=t&&!1!==n(o););},t.valueAccordingPercent=function(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)}},function(e,t,n){"use strict";t.__esModule=!0;var o=t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items",r=(t.CONTEXTMENU_ITEMS_ROW_ABOVE=o+".insertRowAbove",t.CONTEXTMENU_ITEMS_ROW_BELOW=o+".insertRowBelow",t.CONTEXTMENU_ITEMS_INSERT_LEFT=o+".insertColumnOnTheLeft",t.CONTEXTMENU_ITEMS_INSERT_RIGHT=o+".insertColumnOnTheRight",t.CONTEXTMENU_ITEMS_REMOVE_ROW=o+".removeRow",t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=o+".removeColumn",t.CONTEXTMENU_ITEMS_UNDO=o+".undo",t.CONTEXTMENU_ITEMS_REDO=o+".redo",t.CONTEXTMENU_ITEMS_READ_ONLY=o+".readOnly",t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=o+".clearColumn",t.CONTEXTMENU_ITEMS_COPY=o+".copy",t.CONTEXTMENU_ITEMS_CUT=o+".cut",t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=o+".freezeColumn",t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=o+".unfreezeColumn",t.CONTEXTMENU_ITEMS_MERGE_CELLS=o+".mergeCells",t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=o+".unmergeCells",t.CONTEXTMENU_ITEMS_ADD_COMMENT=o+".addComment",t.CONTEXTMENU_ITEMS_EDIT_COMMENT=o+".editComment",t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=o+".removeComment",t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=o+".readOnlyComment",t.CONTEXTMENU_ITEMS_ALIGNMENT=o+".align",t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=o+".align.left",t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=o+".align.center",t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=o+".align.right",t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=o+".align.justify",t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=o+".align.top",t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=o+".align.middle",t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=o+".align.bottom",t.CONTEXTMENU_ITEMS_BORDERS=o+".borders",t.CONTEXTMENU_ITEMS_BORDERS_TOP=o+".borders.top",t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=o+".borders.right",t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=o+".borders.bottom",t.CONTEXTMENU_ITEMS_BORDERS_LEFT=o+".borders.left",t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=o+".borders.remove",t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=o+".nestedHeaders.insertChildRow",t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=o+".nestedHeaders.detachFromParent",t.CONTEXTMENU_ITEMS_HIDE_COLUMN=o+".hideColumn",t.CONTEXTMENU_ITEMS_SHOW_COLUMN=o+".showColumn",t.CONTEXTMENU_ITEMS_HIDE_ROW=o+".hideRow",t.CONTEXTMENU_ITEMS_SHOW_ROW=o+".showRow",t.FILTERS_NAMESPACE="Filters:"),i=t.FILTERS_CONDITIONS_NAMESPACE=r+"conditions";t.FILTERS_CONDITIONS_NONE=i+".none",t.FILTERS_CONDITIONS_EMPTY=i+".isEmpty",t.FILTERS_CONDITIONS_NOT_EMPTY=i+".isNotEmpty",t.FILTERS_CONDITIONS_EQUAL=i+".isEqualTo",t.FILTERS_CONDITIONS_NOT_EQUAL=i+".isNotEqualTo",t.FILTERS_CONDITIONS_BEGINS_WITH=i+".beginsWith",t.FILTERS_CONDITIONS_ENDS_WITH=i+".endsWith",t.FILTERS_CONDITIONS_CONTAINS=i+".contains",t.FILTERS_CONDITIONS_NOT_CONTAIN=i+".doesNotContain",t.FILTERS_CONDITIONS_BY_VALUE=i+".byValue",t.FILTERS_CONDITIONS_GREATER_THAN=i+".greaterThan",t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=i+".greaterThanOrEqualTo",t.FILTERS_CONDITIONS_LESS_THAN=i+".lessThan",t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=i+".lessThanOrEqualTo",t.FILTERS_CONDITIONS_BETWEEN=i+".isBetween",t.FILTERS_CONDITIONS_NOT_BETWEEN=i+".isNotBetween",t.FILTERS_CONDITIONS_AFTER=i+".after",t.FILTERS_CONDITIONS_BEFORE=i+".before",t.FILTERS_CONDITIONS_TODAY=i+".today",t.FILTERS_CONDITIONS_TOMORROW=i+".tomorrow",t.FILTERS_CONDITIONS_YESTERDAY=i+".yesterday",t.FILTERS_DIVS_FILTER_BY_CONDITION=r+"labels.filterByCondition",t.FILTERS_DIVS_FILTER_BY_VALUE=r+"labels.filterByValue",t.FILTERS_LABELS_CONJUNCTION=r+"labels.conjunction",t.FILTERS_LABELS_DISJUNCTION=r+"labels.disjunction",t.FILTERS_VALUES_BLANK_CELLS=r+"values.blankCells",t.FILTERS_BUTTONS_SELECT_ALL=r+"buttons.selectAll",t.FILTERS_BUTTONS_CLEAR=r+"buttons.clear",t.FILTERS_BUTTONS_OK=r+"buttons.ok",t.FILTERS_BUTTONS_CANCEL=r+"buttons.cancel",t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=r+"buttons.placeholder.search",t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=r+"buttons.placeholder.value",t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=r+"buttons.placeholder.secondValue"},function(e,t,n){"use strict";t.__esModule=!0,t.getPluginName=t.getRegistredPluginNames=t.getPlugin=t.registerPlugin=void 0;var o,r=n(16),i=(o=r)&&o.__esModule?o:{default:o},a=n(1),s=n(33),l=new WeakMap;t.registerPlugin=function(e,t){var n=(0,s.toUpperCaseFirst)(e);i.default.getSingleton().add("construct",(function(){l.has(this)||l.set(this,{});var e=l.get(this);e[n]||(e[n]=new t(this))})),i.default.getSingleton().add("afterDestroy",(function(){if(l.has(this)){var e=l.get(this);(0,a.objectEach)(e,(function(e){return e.destroy()})),l.delete(this)}}))},t.getPlugin=function(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,s.toUpperCaseFirst)(t);if(l.has(e)&&l.get(e)[n])return l.get(e)[n]},t.getRegistredPluginNames=function(e){return l.has(e)?Object.keys(l.get(e)):[]},t.getPluginName=function(e,t){var n=null;return l.has(e)&&(0,a.objectEach)(l.get(e),(function(e,o){e===t&&(n=o)})),n}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1),i=n(2),a=n(195),s=n(8),l=new WeakMap,u=null,c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,r.defineGetter)(this,"hot",t,{writable:!1}),(0,r.defineGetter)(this,"t",(0,a.getTranslator)(t),{writable:!1}),l.set(this,{hooks:{}}),u=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",(function(){return n.onAfterPluginsInitialized()})),this.hot.addHook("afterUpdateSettings",(function(){return n.onUpdateSettings()})),this.hot.addHook("beforeInit",(function(){return n.init()}))}return o(e,[{key:"init",value:function(){this.pluginName=(0,s.getPluginName)(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),u||(u=(0,s.getRegistredPluginNames)(this.hot)),u.indexOf(this.pluginName)>=0&&u.splice(u.indexOf(this.pluginName),1),u.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,t){l.get(this).hooks[e]=l.get(this).hooks[e]||[];var n=l.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),l.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;(0,i.arrayEach)(l.get(this).hooks[e]||[],(function(n){t.hot.removeHook(e,n)}))}},{key:"clearHooks",value:function(){var e=this,t=l.get(this).hooks;(0,r.objectEach)(t,(function(t,n){return e.removeHooks(n)})),t.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){(0,i.arrayEach)(this.pluginsInitializedCallbacks,(function(e){return e()})),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,r.objectEach)(this,(function(t,n){"hot"!==n&&"t"!==n&&(e[n]=null)})),delete this.t,delete this.hot}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(o=["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "],r=["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})));t.stringify=function(e){var t=void 0;switch(void 0===e?"undefined":i(e)){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t},t.isDefined=function(e){return void 0!==e},t.isUndefined=h,t.isEmpty=d,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t._injectProductInfo=function(e,t){e=m(e||"");var n="",o=!0,r=function(e){var t=[][f],n=t;if(e[f]!==y("Z"))return!1;for(var o="",r="B<H4P+".split(""),i=y(r.shift());i;i=y(r.shift()||"A"))--i<""[f]?n|=(g(""+g(p(o)+(p(v(e,Math.abs(i),2))+[]).padStart(2,"0")))%97||2)>>1:o=v(e,i,i?1===r[f]?9:8:6);return n===t}(e),i=C(),s=d(e)||"trial"===e;if(s||r)if(r){var l=Math.floor((0,u.default)("12/09/2018","DD/MM/YYYY").toDate().getTime()/864e5),h=w(e);(h>45e3||h!==parseInt(h,10))&&(n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly."),n||(l>h+1&&(n=(0,c.toSingleLine)(a)),o=l>h+15)}else n="Evaluation version of Handsontable Pro. Not licensed for use in a production environment.";else n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.";if(i&&(n=!1,o=!1),n&&!b&&(console[s?"info":"warn"](n),b=!0),o&&t.parentNode){var E=document.createElement("div");E.id="hot-display-license-info",E.appendChild(document.createTextNode("Evaluation version of Handsontable Pro.")),E.appendChild(document.createElement("br")),E.appendChild(document.createTextNode("Not licensed for production use.")),t.parentNode.insertBefore(E,t.nextSibling)}};var s,l=n(57),u=(s=l)&&s.__esModule?s:{default:s},c=n(42);function h(e){return void 0===e}function d(e){return null===e||""===e||h(e)}var f="length",p=function(e){return parseInt(e,16)},g=function(e){return parseInt(e,10)},v=function(e,t,n){return e.substr(t,n)},y=function(e){return e.codePointAt(0)-65},m=function(e){return(""+e).replace(/\-/g,"")},w=function(e){return p(v(m(e),p("12"),y("F")))/(p(v(m(e),y("B"),~~![][f]))||9)},C=function(){return"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},b=!1},function(e,t,n){var o=n(79)("wks"),r=n(50),i=n(15).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){"use strict";t.__esModule=!0,t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0},t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.stopPropagation=function(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.pageX=function(e){return e.pageX?e.pageX:e.clientX+(0,o.getWindowScrollLeft)()},t.pageY=function(e){return e.pageY?e.pageY:e.clientY+(0,o.getWindowScrollTop)()},t.isRightClick=function(e){return 2===e.button},t.isLeftClick=function(e){return 0===e.button};var o=n(0)},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.getRenderer=t.registerRenderer=void 0;var o=h(n(38)),r=h(n(243)),i=h(n(244)),a=h(n(245)),s=h(n(246)),l=h(n(247)),u=h(n(249)),c=h(n(250));function h(e){return e&&e.__esModule?e:{default:e}}var d=(0,o.default)("renderers"),f=d.register,p=d.getItem,g=d.hasItem,v=d.getNames,y=d.getValues;f("base",r.default),f("autocomplete",i.default),f("checkbox",a.default),f("html",s.default),f("numeric",l.default),f("password",u.default),f("text",c.default),t.registerRenderer=f,t.getRenderer=function(e){if("function"==typeof e)return e;if(!g(e))throw Error('No registered renderer found under "'+e+'" name');return p(e)},t.hasRenderer=g,t.getRegisteredRendererNames=v,t.getRegisteredRenderers=y},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(2),i=n(1),a=["afterCellMetaReset","afterChange","afterChangesObserved","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","afterRender","beforeRenderer","afterRenderer","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyCol","unmodifyCol","unmodifyRow","modifyColHeader","modifyColWidth","modifyRow","modifyRowHeader","modifyRowHeight","modifyData","modifyRowData","modifyGetCellCoords","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnMove","afterColumnMove","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","modifyColumnHeaderHeight","beforeUndo","afterUndo","beforeRedo","afterRedo","modifyRowHeaderWidth","beforeAutofillInsidePopulate","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","skipLengthCache","afterTrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","hiddenRow","hiddenColumn","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten"],s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalBucket=this.createEmptyBucket()}return o(e,null,[{key:"getSingleton",value:function(){return l}}]),o(e,[{key:"createEmptyBucket",value:function(){var e=Object.create(null);return(0,r.arrayEach)(a,(function(t){return e[t]=[]})),e}},{key:"getBucket",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,r.arrayEach)(t,(function(t){return n.add(e,t,o)}));else{var i=this.getBucket(o);if(void 0===i[e]&&(this.register(e),i[e]=[]),t.skip=!1,-1===i[e].indexOf(t)){var a=!1;t.initialHook&&(0,r.arrayEach)(i[e],(function(n,o){if(n.initialHook)return i[e][o]=t,a=!0,!1})),a||i[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,r.arrayEach)(t,(function(t){return n.once(e,t,o)})):(t.runOnce=!0,this.add(e,t,o))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=this.getBucket(n);return void 0!==o[e]&&o[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,o,r,i,a,s){var l=this.globalBucket[t],u=l?l.length:0,c=0;if(u)for(;c<u;)if(l[c]&&!l[c].skip){var h=l[c].call(e,n,o,r,i,a,s);void 0!==h&&(n=h),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}else c+=1;var d=this.getBucket(e)[t],f=d?d.length:0,p=0;if(f)for(;p<f;)if(d[p]&&!d[p].skip){var g=d[p].call(e,n,o,r,i,a,s);void 0!==g&&(n=g),d[p]&&d[p].runOnce&&this.remove(t,d[p],e),p+=1}else p+=1;return n}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.objectEach)(this.getBucket(e),(function(e,t,n){return n[t].length=0}))}},{key:"register",value:function(e){this.isRegistered(e)||a.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&a.splice(a.indexOf(e),1)}},{key:"isRegistered",value:function(e){return a.indexOf(e)>=0}},{key:"getRegistered",value:function(){return a}}]),e}(),l=new s;t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=t.getEditorInstance=t.getEditor=t.registerEditor=void 0,t.RegisteredEditor=S,t._getEditorInstance=O;var o=g(n(38)),r=g(n(16)),i=g(n(55)),a=g(n(190)),s=g(n(235)),l=g(n(236)),u=g(n(239)),c=g(n(191)),h=g(n(240)),d=g(n(241)),f=g(n(242)),p=g(n(59));function g(e){return e&&e.__esModule?e:{default:e}}var v=new WeakMap,y=(0,o.default)("editors"),m=y.register,w=y.getItem,C=y.hasItem,b=y.getNames,E=y.getValues;function S(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},r.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function O(e,t){var n=void 0;if("function"==typeof e)v.get(e)||T(null,e),n=v.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=w(e)}if(!n)throw Error('No editor registered under name "'+e+'"');return n.getInstance(t)}function T(e,t){var n=new S(t);"string"==typeof e&&m(e,n),v.set(t,n)}T("base",i.default),T("autocomplete",a.default),T("checkbox",s.default),T("date",l.default),T("dropdown",u.default),T("handsontable",c.default),T("numeric",h.default),T("password",d.default),T("select",f.default),T("text",p.default),t.registerEditor=T,t.getEditor=function(e){if(!C(e))throw Error('No registered editor found under "'+e+'" name');return w(e).getConstructor()},t.getEditorInstance=O,t.hasEditor=C,t.getRegisteredEditorNames=b,t.getRegisteredEditors=E},function(e,t,n){var o=n(9);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";t.__esModule=!0,t.normalizeSelection=function(e){return(0,o.arrayMap)(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))},t.isSeparator=function(e){return(0,r.hasClass)(e,"htSeparator")},t.hasSubMenu=function(e){return(0,r.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,r.hasClass)(e,"htDisabled")},t.isSelectionDisabled=function(e){return(0,r.hasClass)(e,"htSelectionDisabled")},t.getValidSelection=function(e){var t=e.getSelected();return t?t[0]<0?null:t:null},t.prepareVerticalAlignClass=a,t.prepareHorizontalAlignClass=s,t.getAlignmentClasses=function(e,t){var n={};return(0,o.arrayEach)(e,(function(e){for(var o=e.from,r=e.to,i=o.row;i<=r.row;i++)for(var a=o.col;a<=r.col;a++)n[i]||(n[i]=[]),n[i][a]=t(i,a)})),n},t.align=function(e,t,n,r,i){(0,o.arrayEach)(e,(function(e){var o=e.from,a=e.to;if(o.row===a.row&&o.col===a.col)l(o.row,o.col,t,n,r,i);else for(var s=o.row;s<=a.row;s++)for(var u=o.col;u<=a.col;u++)l(s,u,t,n,r,i)}))},t.checkSelectionConsistency=function(e,t){var n=!1;return Array.isArray(e)&&(0,o.arrayEach)(e,(function(e){return e.forAll((function(e,o){if(t(e,o))return n=!0,!1})),n})),n},t.markLabelAsSelected=function(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+e},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.filterSeparators=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.KEY,n=e.slice(0);return n=function(e){var t=[];return(0,o.arrayEach)(e,(function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(n=function(e,t){var n=e.slice(0);return n.reverse(),(n=u(n,t)).reverse(),n}(n=u(n,t),t))};var o=n(2),r=n(0),i=n(95);function a(e,t){return-1!==e.indexOf(t)?e:e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")+" "+t}function s(e,t){return-1!==e.indexOf(t)?e:e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")+" "+t}function l(e,t,n,o,r,i){var l=r(e,t),u=o;l.className&&(u="vertical"===n?a(l.className,o):s(l.className,o)),i(e,t,"className",u)}function u(e,t){for(var n=e.slice(0);0<n.length&&n[0].name===t;)n.shift();return n}},function(e,t,n){var o=n(18),r=n(100),i=n(75),a=Object.defineProperty;t.f=n(22)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";t.__esModule=!0,t.KEY_CODES=void 0,t.isPrintableChar=function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90},t.isMetaKey=function(e){return-1!==[r.ARROW_DOWN,r.ARROW_UP,r.ARROW_LEFT,r.ARROW_RIGHT,r.HOME,r.END,r.DELETE,r.BACKSPACE,r.F1,r.F2,r.F3,r.F4,r.F5,r.F6,r.F7,r.F8,r.F9,r.F10,r.F11,r.F12,r.TAB,r.PAGE_DOWN,r.PAGE_UP,r.ENTER,r.ESCAPE,r.SHIFT,r.CAPS_LOCK,r.ALT].indexOf(e)},t.isCtrlKey=function(e){var t=[];return window.navigator.platform.includes("Mac")?t.push(r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX):t.push(r.CONTROL),t.includes(e)},t.isCtrlMetaKey=function(e){return[r.CONTROL,r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX].includes(e)},t.isKey=function(e,t){var n=t.split("|"),i=!1;return(0,o.arrayEach)(n,(function(t){if(e===r[t])return i=!0,!1})),i};var o=n(2),r=t.KEY_CODES={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},function(e,t,n){e.exports=!n(23)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(77),r=n(36);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(60),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(3),r=n(37),i=n(23);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],a={};a[e]=t(n),o(o.S+o.F*i((function(){n(1)})),"Object",a)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(15),r=n(29),i=n(27),a=n(50)("src"),s=Function.toString,l=(""+s).split("toString");n(37).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(u&&(i(n,a)||r(n,a,e[t]?""+e[t]:l.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(e,t,n){var o=n(20),r=n(51);e.exports=n(22)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(63);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var o=n(36);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(50)("meta"),r=n(9),i=n(27),a=n(20).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(23)((function(){return l(Object.preventExtensions({}))})),c=function(e){a(e,o,{value:{i:"O"+ ++s,w:{}}})},h=e.exports={KEY:o,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,o)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[o].i},getWeak:function(e,t){if(!i(e,o)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[o].w},onFreeze:function(e){return u&&h.NEED&&l(e)&&!i(e,o)&&c(e),e}}},function(e,t,n){"use strict";t.__esModule=!0,t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},t.equalsIgnoreCase=function(){for(var e=[],t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=n.length;i;){i-=1;var a=(0,o.stringify)(n[i]).toLowerCase();-1===e.indexOf(a)&&e.push(a)}return 1===e.length},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.substitute=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,(function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]}))},t.stripTags=function(e){return(""+e).replace(r,"")};var o=n(11),r=/<\/?\w+\/?>|<\w+[\s|\/][^>]*>/gi},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=t.getValidator=t.registerValidator=void 0;var o=l(n(38)),r=l(n(251)),i=l(n(252)),a=l(n(253)),s=l(n(254));function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,o.default)("validators"),c=u.register,h=u.getItem,d=u.hasItem,f=u.getNames,p=u.getValues;c("autocomplete",r.default),c("date",i.default),c("numeric",a.default),c("time",s.default),t.registerValidator=c,t.getValidator=function(e){if("function"==typeof e)return e;if(!d(e))throw Error('No registered validator found under "'+e+'" name');return h(e)},t.hasValidator=d,t.getRegisteredValidatorNames=f,t.getRegisteredValidators=p},function(e,t,n){var o=n(101),r=n(80);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.__esModule=!0,t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);var t=r.get(e);return{register:function(e,n){t.set(e,n)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[].concat(o(t.keys()))},getValues:function(){return[].concat(o(t.values()))}}};var r=t.collection=new Map},function(e,t,n){"use strict";t.__esModule=!0,t.setBrowserMeta=a,t.isChrome=function(){return i.chrome.value},t.isEdge=function(){return i.edge.value},t.isIE=function(){return i.ie.value},t.isIE8=function(){return i.ie8.value},t.isIE9=function(){return i.ie9.value},t.isMSBrowser=function(){return i.ie.value||i.edge.value},t.isMobileBrowser=function(){return i.mobile.value},t.isSafari=function(){return i.safari.value};var o=n(1),r=function(e){var t={value:!1,test:function(n,o){t.value=e(n,o)}};return t},i={chrome:r((function(e,t){return/Chrome/.test(e)&&/Google/.test(t)})),edge:r((function(e){return/Edge/.test(e)})),ie:r((function(e){return/Trident/.test(e)})),ie8:r((function(){return!document.createTextNode("test").textContent})),ie9:r((function(){return!!document.documentMode})),mobile:r((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:r((function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)}))};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,r=e.vendor,a=void 0===r?navigator.vendor:r;(0,o.objectEach)(i,(function(e){(0,e.test)(n,a)}))}a()},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.requestAnimationFrame=function(e){return a.call(window,e)},t.cancelAnimationFrame=function(e){s.call(window,e)},t.isTouchSupported=function(){return"ontouchstart"in window},t.isWebComponentSupportedNatively=function(){var e=document.createElement("div");return!(!e.createShadowRoot||!e.createShadowRoot.toString().match(/\[native code\]/))},t.hasCaptionProblem=function(){return void 0===u&&function(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var n=document.createElement("CAPTION");n.innerHTML="c<br>c<br>c<br>c",n.style.padding=0,n.style.margin=0,e.insertBefore(n,t),document.body.appendChild(e),u=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}(),u},t.getComparisonFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c||(c="object"===("undefined"==typeof Intl?"undefined":o(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return(""+e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})};for(var r=0,i=["ms","moz","webkit","o"],a=window.requestAnimationFrame,s=window.cancelAnimationFrame,l=0;l<i.length&&!a;++l)a=window[i[l]+"RequestAnimationFrame"],s=window[i[l]+"CancelAnimationFrame"]||window[i[l]+"CancelRequestAnimationFrame"];a||(a=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-r)),o=window.setTimeout((function(){e(t+n)}),n);return r=t+n,o}),s||(s=function(e){clearTimeout(e)});var u=void 0,c=void 0},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=n(2),s=u(n(5)),l=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var c={},h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,i.defineGetter)(this,"wot",t,{writable:!1}),this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=this.wot.wtTable.TABLE,this.hider=this.wot.wtTable.hider,this.spreader=this.wot.wtTable.spreader,this.holder=this.wot.wtTable.holder,this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.areElementSizesAdjusted=!1,this.updateStateOfRendering()}return o(e,null,[{key:"registerOverlay",value:function(t,n){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error("Unsupported overlay ("+t+").");c[t]=n}},{key:"createOverlay",value:function(e,t){return new c[e](t)}},{key:"hasOverlay",value:function(e){return void 0!==c[e]}},{key:"isOverlayTypeOf",value:function(e,t){return!(!e||!c[t])&&e instanceof c[t]}},{key:"CLONE_TOP",get:function(){return"top"}},{key:"CLONE_BOTTOM",get:function(){return"bottom"}},{key:"CLONE_LEFT",get:function(){return"left"}},{key:"CLONE_TOP_LEFT_CORNER",get:function(){return"top_left_corner"}},{key:"CLONE_BOTTOM_LEFT_CORNER",get:function(){return"bottom_left_corner"}},{key:"CLONE_DEBUG",get:function(){return"debug"}},{key:"CLONE_TYPES",get:function(){return[e.CLONE_TOP,e.CLONE_BOTTOM,e.CLONE_LEFT,e.CLONE_TOP_LEFT_CORNER,e.CLONE_BOTTOM_LEFT_CORNER,e.CLONE_DEBUG]}}]),o(e,[{key:"updateStateOfRendering",value:function(){var e=this.needFullRender;this.needFullRender=this.shouldBeRendered();var t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}},{key:"shouldBeRendered",value:function(){return!0}},{key:"updateTrimmingContainer",value:function(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){this.mainTableScrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE)}},{key:"makeClone",value:function(t){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error('Clone type "'+t+'" is not supported.');var n=document.createElement("DIV"),o=document.createElement("TABLE");n.className="ht_clone_"+t+" handsontable",n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.overflow="hidden",o.className=this.wot.wtTable.TABLE.className,n.appendChild(o),this.type=t,this.wot.wtTable.wtRootElement.parentNode.appendChild(n);var i=this.wot.getSetting("preventOverflow");return!0===i||"horizontal"===i&&this.type===e.CLONE_TOP||"vertical"===i&&this.type===e.CLONE_LEFT?this.mainTableScrollableElement=window:this.mainTableScrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE),new l.default({cloneSource:this.wot,cloneOverlay:this,table:o})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,o=t.style,r=e.parentNode.style;(0,a.arrayEach)([n,o,r],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new s.default(this.clone).destroy()}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(0,o.arrayReduce)(e,(function(e,t,o){return e+t.replace(/(?:\r?\n\s+)/g,"")+(n[o]?n[o]:"")}),"").trim()};var o=n(2)},function(e,t,n){"use strict";t.__esModule=!0,t.isFunction=function(e){return"function"==typeof e},t.throttle=r,t.throttleAfterHits=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=r(e,t),i=n;function a(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return i?(i-=1,e.apply(this,n)):o.apply(this,n)}return a.clearHits=function(){i=n},a},t.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null,o=void 0;return function(){for(var r=this,i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout((function(){o=e.apply(r,a)}),t),o}},t.pipe=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t.slice(1);return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.arrayReduce)(i,(function(e,t){return t(e)}),r.apply(this,t))}},t.partial=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.apply(this,n.concat(o))}},t.curry=function(e){var t=e.length;return function n(o){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=o.concat(i);return s.length>=t?e.apply(this,s):n(s)}}([])},t.curryRight=function(e){var t=e.length;return function n(o){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=o.concat(i.reverse());return s.length>=t?e.apply(this,s):n(s)}}([])};var o=n(2);function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,o={lastCallThrottled:!0},r=null;return function(){for(var i=this,a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=Date.now(),c=!1;o.lastCallThrottled=!0,n||(n=u,c=!0);var h=t-(u-n);return c?(o.lastCallThrottled=!1,e.apply(this,s)):(r&&clearTimeout(r),r=setTimeout((function(){o.lastCallThrottled=!1,e.apply(i,s),n=0,r=void 0}),h)),o}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var o=n(12)("unscopables"),r=Array.prototype;null==r[o]&&n(29)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(2),r=n(1),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this._localHooks[e]&&(0,o.arrayEach)(this._localHooks[e],(function(e){return e.apply(t,r)}))},clearLocalHooks:function(){return this._localHooks={},this}};(0,r.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1}),t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.createId=i,t.createDefaultCustomBorder=a,t.createSingleEmptyBorder=s,t.createDefaultHtBorder=l,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}},t.extendDefaultBorder=function(e,t){return(0,o.hasOwnProperty)(t,"border")&&(e.border=t.border),(0,o.hasOwnProperty)(t,"top")&&(t.top?((0,o.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top)),(0,o.hasOwnProperty)(t,"right")&&(t.right?((0,o.isObject)(t.right)||(t.right={width:1,color:"#000"}),e.right=t.right):(t.right={hide:!0},e.right=t.right)),(0,o.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,o.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom)),(0,o.hasOwnProperty)(t,"left")&&(t.left?((0,o.isObject)(t.left)||(t.left={width:1,color:"#000"}),e.left=t.left):(t.left={hide:!0},e.left=t.left)),e},t.checkSelectionBorders=function(e,t){var n=!1;return(0,r.arrayEach)(e.getSelectedRange(),(function(r){r.forAll((function(r,i){var a=e.getCellMeta(r,i).borders;if(a){if(!t)return n=!0,!1;if(!(0,o.hasOwnProperty)(a[t],"hide")||!1===a[t].hide)return n=!0,!1}}))})),n},t.markSelected=function(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+e};var o=n(1),r=n(2);function i(e,t){return"border_row"+e+"col"+t}function a(){return{width:1,color:"#000"}}function s(){return{hide:!0}}function l(){return{width:1,color:"#000",cornerVisible:!1}}},function(e,t){e.exports=!1},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){var o=n(20).f,r=n(27),i=n(12)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";t.__esModule=!0,t.EditorState=void 0;var o=n(4),r=n(11),i=t.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};function a(e){this.instance=e,this.state=i.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}a.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},a.prototype.init=function(){},a.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},a.prototype.setValue=function(){throw Error("Editor setValue() method unimplemented")},a.prototype.open=function(){throw Error("Editor open() method unimplemented")},a.prototype.close=function(){throw Error("Editor close() method unimplemented")},a.prototype.prepare=function(e,t,n,o,r,a){this.TD=o,this.row=e,this.col=t,this.prop=n,this.originalValue=r,this.cellProperties=a,this.state=i.VIRGIN},a.prototype.extend=function(){var e=this.constructor;return function(e,t){function n(){}return n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e}((function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.apply(this,n)}),e)},a.prototype.saveValue=function(e,t){var n=void 0,o=void 0;t?((n=this.instance.getSelectedLast())[0]>n[2]&&(o=n[0],n[0]=n[2],n[2]=o),n[1]>n[3]&&(o=n[1],n[1]=n[3],n[3]=o)):n=[this.row,this.col,null,null],this.instance.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")},a.prototype.beginEditing=function(e,t){if(this.state===i.VIRGIN){if(this.instance.view.scrollViewport(new o.CellCoords(this.row,this.col)),this.state=i.EDITING,this.isInFullEditMode()){var n="string"==typeof e?e:(0,r.stringify)(this.originalValue);this.setValue(n)}this.open(t),this._opened=!0,this.focus(),this.instance.view.render(),this.instance.runHooks("afterBeginEditing",this.row,this.col)}},a.prototype.finishEditing=function(e,t,n){var o=this,r=void 0;if(n){var a=this._closeCallback;this._closeCallback=function(e){a&&a(e),n(e),o.instance.view.render()}}if(!this.isWaiting())if(this.state!==i.VIRGIN){if(this.state===i.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();var s=this.getValue();r=this.instance.getSettings().trimWhitespace?[["string"==typeof s?String.prototype.trim.call(s||""):s]]:[[s]],this.state=i.WAITING,this.saveValue(r,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",(function(e){o.state=i.FINISHED,o.discardEditor(e)})):(this.state=i.FINISHED,this.discardEditor(!0))}}else this.instance._registerTimeout((function(){o._fireCallbacks(!0)}))},a.prototype.cancelChanges=function(){this.state=i.FINISHED,this.discardEditor()},a.prototype.discardEditor=function(e){this.state===i.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=i.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=i.VIRGIN,this._fireCallbacks(!0)))},a.prototype.enableFullEditMode=function(){this._fullEditMode=!0},a.prototype.isInFullEditMode=function(){return this._fullEditMode},a.prototype.isOpened=function(){return this._opened},a.prototype.isWaiting=function(){return this.state===i.WAITING},a.prototype.checkEditorSection=function(){var e=this.instance.countRows(),t="";return this.row<this.instance.getSettings().fixedRowsTop?t=this.col<this.instance.getSettings().fixedColumnsLeft?"top-left-corner":"top":this.instance.getSettings().fixedRowsBottom&&this.row>=e-this.instance.getSettings().fixedRowsBottom?t=this.col<this.instance.getSettings().fixedColumnsLeft?"bottom-left-corner":"bottom":this.col<this.instance.getSettings().fixedColumnsLeft&&(t="left"),t},t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.row=null,this.col=null,void 0!==t&&void 0!==n&&(this.row=t,this.col=n)}return o(e,[{key:"isValid",value:function(e){return!(this.row<0||this.col<0||this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}();t.default=r},function(t,n){t.exports=e},function(e,t,n){"use strict";t.__esModule=!0,t.log=function(){var e;(0,o.isDefined)(console)&&(e=console).log.apply(e,arguments)},t.warn=function(){var e;(0,o.isDefined)(console)&&(e=console).warn.apply(e,arguments)},t.info=function(){var e;(0,o.isDefined)(console)&&(e=console).info.apply(e,arguments)},t.error=function(){var e;(0,o.isDefined)(console)&&(e=console).error.apply(e,arguments)};var o=n(11)},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=c(n(234)),i=n(55),a=c(i),s=c(n(5)),l=n(21),u=n(13);function c(e){return e&&e.__esModule?e:{default:e}}var h=a.default.prototype.extend();h.prototype.init=function(){var e=this;this.createElements(),this.eventManager=new s.default(this),this.bindEvents(),this.autoResize=(0,r.default)(),this.holderZIndex=-1,this.instance.addHook("afterDestroy",(function(){e.destroy()}))},h.prototype.prepare=function(e,t,n,o,r,s){for(var l=this,u=this.state,c=arguments.length,h=Array(c>6?c-6:0),d=6;d<c;d++)h[d-6]=arguments[d];if(a.default.prototype.prepare.apply(this,[e,t,n,o,r,s].concat(h)),!s.readOnly){this.refreshDimensions(!0);var f=s.allowInvalid,p=s.fragmentSelection;f&&(this.TEXTAREA.value=""),u!==i.EditorState.FINISHED&&this.hideEditableElement();var g=!p;g&&this.instance._registerImmediate((function(){return l.focus()}))}},h.prototype.hideEditableElement=function(){this.textareaParentStyle.top="-9999px",this.textareaParentStyle.left="-9999px",this.textareaParentStyle.zIndex="-1",this.textareaParentStyle.position="fixed"},h.prototype.showEditableElement=function(){this.textareaParentStyle.zIndex=this.holderZIndex>=0?this.holderZIndex:"",this.textareaParentStyle.position=""},h.prototype.getValue=function(){return this.TEXTAREA.value},h.prototype.setValue=function(e){this.TEXTAREA.value=e},h.prototype.beginEditing=function(){if(this.state===i.EditorState.VIRGIN){this.TEXTAREA.value="";for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];a.default.prototype.beginEditing.apply(this,t)}};var d=function(e){var t=this.getActiveEditor(),n=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===t.TEXTAREA&&!(0,u.isImmediatePropagationStopped)(e))if(17!==e.keyCode&&224!==e.keyCode&&91!==e.keyCode&&93!==e.keyCode){switch(e.keyCode){case l.KEY_CODES.ARROW_RIGHT:case l.KEY_CODES.ARROW_LEFT:t.isInFullEditMode()&&(!t.isWaiting()&&!t.allowKeyEventPropagation||!t.isWaiting()&&t.allowKeyEventPropagation&&!t.allowKeyEventPropagation(e.keyCode))&&(0,u.stopImmediatePropagation)(e);break;case l.KEY_CODES.ARROW_UP:case l.KEY_CODES.ARROW_DOWN:t.isInFullEditMode()&&(!t.isWaiting()&&!t.allowKeyEventPropagation||!t.isWaiting()&&t.allowKeyEventPropagation&&!t.allowKeyEventPropagation(e.keyCode))&&(0,u.stopImmediatePropagation)(e);break;case l.KEY_CODES.ENTER:var r=this.selection.isMultiple();if(n&&!r||e.altKey){if(t.isOpened()){var i=(0,o.getCaretPosition)(t.TEXTAREA),a=t.getValue(),s=a.slice(0,i)+"\n"+a.slice(i);t.setValue(s),(0,o.setCaretPosition)(t.TEXTAREA,i+1)}else t.beginEditing(t.originalValue+"\n");(0,u.stopImmediatePropagation)(e)}e.preventDefault();break;case l.KEY_CODES.A:case l.KEY_CODES.X:case l.KEY_CODES.C:case l.KEY_CODES.V:n&&(0,u.stopImmediatePropagation)(e);break;case l.KEY_CODES.BACKSPACE:case l.KEY_CODES.DELETE:case l.KEY_CODES.HOME:case l.KEY_CODES.END:(0,u.stopImmediatePropagation)(e)}-1===[l.KEY_CODES.ARROW_UP,l.KEY_CODES.ARROW_RIGHT,l.KEY_CODES.ARROW_DOWN,l.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&t.autoResize.resize(String.fromCharCode(e.keyCode))}else(0,u.stopImmediatePropagation)(e)};h.prototype.open=function(){this.refreshDimensions(),this.showEditableElement(),this.instance.addHook("beforeKeyDown",d)},h.prototype.close=function(){this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.hideEditableElement(),this.instance.removeHook("beforeKeyDown",d)},h.prototype.focus=function(){this.TEXTAREA.select(),(0,o.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)},h.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),this.TEXTAREA.tabIndex=-1,(0,o.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),(0,o.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.zIndex="-1",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement.appendChild(this.TEXTAREA_PARENT)},h.prototype.getEditedCell=function(){var e=void 0;switch(this.checkEditorSection()){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=101;break;case"top-left-corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"bottom-left-corner":e=this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;case"bottom":e=this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.holderZIndex=-1}return-1!==e&&-2!==e?e:void 0},h.prototype.refreshValue=function(){var e=this.instance.toPhysicalRow(this.row),t=this.instance.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()},h.prototype.refreshDimensions=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===i.EditorState.EDITING||e)if(this.TD=this.getEditedCell(),this.TD){var t=(0,o.offset)(this.TD),n=(0,o.offset)(this.instance.rootElement),r=this.instance.view.wt.wtOverlays.topOverlay.mainTableScrollableElement,a=this.instance.countRows(),s=r!==window?r.scrollTop:0,l=r!==window?r.scrollLeft:0,u=this.checkEditorSection(),c=["","left"].includes(u)?s:0,h=["","top","bottom"].includes(u)?l:0,d=t.top===n.top?0:1,f=this.instance.getSettings(),p=this.instance.hasColHeaders(),g=this.TD.style.backgroundColor,v=t.top-n.top-d-c,y=t.left-n.left-1-h,m=void 0;switch(u){case"top":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":m=(0,o.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(p&&0===this.instance.getSelectedLast()[0]||f.fixedRowsBottom&&this.instance.getSelectedLast()[0]===a-f.fixedRowsBottom)&&(v+=1),0===this.instance.getSelectedLast()[1]&&(y+=1),m&&-1!==m?this.textareaParentStyle[m[0]]=m[1]:(0,o.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top=v+"px",this.textareaParentStyle.left=y+"px",this.showEditableElement();var w=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,C=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,b=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),E=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),S=(0,o.getScrollbarWidth)(),O=this.TD.offsetTop+w-E,T=this.TD.offsetLeft+C-b,_=(0,o.innerWidth)(this.TD)-8,R=(0,o.hasVerticalScrollbar)(r)?S:0,k=(0,o.hasHorizontalScrollbar)(r)?S:0,M=this.instance.view.maximumVisibleElementWidth(T)-9-R,A=this.TD.scrollHeight+1,N=Math.max(this.instance.view.maximumVisibleElementHeight(O)-k,23),P=(0,o.getComputedStyle)(this.TD);this.TEXTAREA.style.fontSize=P.fontSize,this.TEXTAREA.style.fontFamily=P.fontFamily,this.TEXTAREA.style.backgroundColor=g||(0,o.getComputedStyle)(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(A,N),maxHeight:N,minWidth:Math.min(_,M),maxWidth:M},!0)}else e||this.close(!0)},h.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",(function(e){(0,u.stopPropagation)(e)})),this.eventManager.addEventListener(this.TEXTAREA,"paste",(function(e){(0,u.stopPropagation)(e)})),this.instance.addHook("afterScrollHorizontally",(function(){e.refreshDimensions()})),this.instance.addHook("afterScrollVertically",(function(){e.refreshDimensions()})),this.instance.addHook("afterColumnResize",(function(){e.refreshDimensions(),e.focus()})),this.instance.addHook("afterRowResize",(function(){e.refreshDimensions(),e.focus()})),this.instance.addHook("afterDestroy",(function(){e.eventManager.destroy()}))},h.prototype.destroy=function(){this.eventManager.destroy()},t.default=h},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(60),r=Math.max,i=Math.min;e.exports=function(e,t){return(e=o(e))<0?r(e+t,0):i(e,t)}},function(e,t,n){var o=n(28);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var o=n(30),r=n(104),i=n(105),a=n(18),s=n(25),l=n(106),u={},c={};(t=e.exports=function(e,t,n,h,d){var f,p,g,v,y=d?function(){return e}:l(e),m=o(n,h,t?2:1),w=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(f=s(e.length);f>w;w++)if((v=t?m(a(p=e[w])[0],p[1]):m(e[w]))===u||v===c)return v}else for(g=y.call(e);!(p=g.next()).done;)if((v=r(g,m,p.value,t))===u||v===c)return v}).BREAK=u,t.RETURN=c},function(e,t,n){"use strict";var o=n(15),r=n(3),i=n(28),a=n(62),s=n(32),l=n(65),u=n(64),c=n(9),h=n(23),d=n(81),f=n(53),p=n(210);e.exports=function(e,t,n,g,v,y){var m=o[e],w=m,C=v?"set":"add",b=w&&w.prototype,E={},S=function(e){var t=b[e];i(b,e,"delete"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof w&&(y||b.forEach&&!h((function(){(new w).entries().next()})))){var O=new w,T=O[C](y?{}:-0,1)!=O,_=h((function(){O.has(1)})),R=d((function(e){new w(e)})),k=!y&&h((function(){for(var e=new w,t=5;t--;)e[C](t,t);return!e.has(-0)}));R||((w=t((function(t,n){u(t,w,e);var o=p(new m,t,w);return null!=n&&l(n,v,o[C],o),o}))).prototype=b,b.constructor=w),(_||k)&&(S("delete"),S("has"),v&&S("get")),(k||T)&&S(C),y&&b.clear&&delete b.clear}else w=g.getConstructor(t,e,v,C),a(w.prototype,n),s.NEED=!0;return f(w,e),E[e]=w,r(r.G+r.W+r.F*(w!=m),E),y||g.setStrong(w,e,v),w}},function(e,t,n){var o=n(54),r=n(51),i=n(24),a=n(75),s=n(27),l=n(100),u=Object.getOwnPropertyDescriptor;t.f=n(22)?u:function(e,t){if(e=i(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(30),r=n(77),i=n(31),a=n(25),s=n(211);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,h=6==e,d=5==e||h,f=t||s;return function(t,s,p){for(var g,v,y=i(t),m=r(y),w=o(s,p,3),C=a(m.length),b=0,E=n?f(t,C):l?f(t,0):void 0;C>b;b++)if((d||b in m)&&(v=w(g=m[b],b,y),e))if(n)E[b]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return b;case 2:E.push(g)}else if(c)return!1;return h?-1:u||c?c:E}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(29),r=n(28),i=n(23),a=n(36),s=n(12);e.exports=function(e,t,n){var l=s(e),u=n(a,l,""[e]),c=u[0],h=u[1];i((function(){var t={};return t[l]=function(){return 7},7!=""[e](t)}))&&(r(String.prototype,e,c),o(RegExp.prototype,l,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.DEFAULT_LANGUAGE_CODE=t.getLanguagesDictionaries=t.getDefaultLanguageDictionary=t.hasLanguageDictionary=t.getLanguageDictionary=t.registerLanguageDictionary=void 0;var o=n(1),r=n(199),i=s(n(38)),a=s(n(270));function s(e){return e&&e.__esModule?e:{default:e}}var l=a.default.languageCode,u=(0,i.default)("languagesDictionaries"),c=u.register,h=u.getItem,d=u.hasItem,f=u.getValues;function p(e,t){var n=e,i=t;return(0,o.isObject)(e)&&(n=(i=e).languageCode),function(e,t){e!==l&&(0,r.extendNotExistingKeys)(t,h(l))}(n,i),c(n,(0,o.deepClone)(i)),(0,o.deepClone)(i)}function g(e){return d(e)}t.registerLanguageDictionary=p,t.getLanguageDictionary=function(e){return g(e)?(0,o.deepClone)(h(e)):null},t.hasLanguageDictionary=g,t.getDefaultLanguageDictionary=function(){return a.default},t.getLanguagesDictionaries=function(){return f()},t.DEFAULT_LANGUAGE_CODE=l,p(a.default)},function(e,t,n){"use strict";t.__esModule=!0,t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.detectSelectionType=v,t.normalizeSelectionFactory=y,t.transformSelectionToColumnDistance=function(e){var t=v(e);if(t===l||t===u)return[];var n=y(t),r=new Set;(0,a.arrayEach)(e,(function(e){var t=n(e),i=o(t,4),s=i[1],l=i[3]-s+1;(0,a.arrayEach)(Array.from(new Array(l),(function(e,t){return s+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,a.arrayReduce)(i,(function(e,t,n,o){return 0!==n&&t===o[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[])},t.transformSelectionToRowDistance=function(e){var t=v(e);if(t===l||t===u)return[];var n=y(t),r=new Set;(0,a.arrayEach)(e,(function(e){var t=n(e),i=o(t,3),s=i[0],l=i[2]-s+1;(0,a.arrayEach)(Array.from(new Array(l),(function(e,t){return s+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,a.arrayReduce)(i,(function(e,t,n,o){return 0!==n&&t===o[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[])},t.isValidCoord=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&e<t};var i=n(4),a=n(2),s=n(11),l=t.SELECTION_TYPE_UNRECOGNIZED=0,u=t.SELECTION_TYPE_EMPTY=1,c=t.SELECTION_TYPE_ARRAY=2,h=t.SELECTION_TYPE_OBJECT=3,d=t.SELECTION_TYPES=[h,c],f=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],p=Symbol("root"),g=Symbol("child");function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;if(t!==p&&t!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),o=t===p,a=l;if(n){var s=e[0];0===e.length?a=u:o&&s instanceof i.CellRange?a=h:o&&Array.isArray(s)?a=v(s,g):e.length>=2&&e.length<=4&&!e.some((function(e,t){return!f[t].includes(void 0===e?"undefined":r(e))}))&&(a=c)}return a}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,o=void 0!==n&&n,r=t.propToCol;if(!d.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===h,i=n?t.from.row:t[0],a=n?t.from.col:t[1],l=n?t.to.row:t[2],u=n?t.to.col:t[3];if("function"==typeof r&&("string"==typeof a&&(a=r(a)),"string"==typeof u&&(u=r(u))),(0,s.isUndefined)(l)&&(l=i),(0,s.isUndefined)(u)&&(u=a),!o){var c=i,d=a,f=l,p=u;i=Math.min(c,f),a=Math.min(d,p),l=Math.max(c,f),u=Math.max(d,p)}return[i,a,l,u]}}},function(e,t,n){"use strict";t.__esModule=!0,t.FIRST_AFTER_SECOND=t.FIRST_BEFORE_SECOND=t.DO_NOT_SWAP=void 0,t.getSortFunctionForColumn=function(e){return e.sortFunction?e.sortFunction:"date"===e.type?o.default:"numeric"===e.type?i.default:r.default};var o=a(n(292)),r=a(n(293)),i=a(n(294));function a(e){return e&&e.__esModule?e:{default:e}}t.DO_NOT_SWAP=0,t.FIRST_BEFORE_SECOND=-1,t.FIRST_AFTER_SECOND=1},function(e,t,n){var o=n(9),r=n(15).document,i=o(r)&&o(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(18),r=n(208),i=n(80),a=n(78)("IE_PROTO"),s=function(){},l=function(){var e,t=n(74)("iframe"),o=i.length;for(t.style.display="none",n(103).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;o--;)delete l.prototype[i[o]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(44);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t,n){var o=n(79)("keys"),r=n(50);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(37),r=n(15),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:n(49)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var o=n(12)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],a=i[o]();a.next=function(){return{done:n=!0}},i[o]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){var o,r,i,a=n(30),s=n(214),l=n(103),u=n(74),c=n(15),h=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,v=0,y={},m=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},w=function(e){m.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){s("function"==typeof e?e:Function(e),t)},o(v),v},f=function(e){delete y[e]},"process"==n(44)(h)?o=function(e){h.nextTick(a(m,e,1))}:g&&g.now?o=function(e){g.now(a(m,e,1))}:p?(i=(r=new p).port2,r.port1.onmessage=w,o=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(o=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):o="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(a(m,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){var o=n(15).navigator;e.exports=o&&o.userAgent||""},function(e,t,n){var o=n(101),r=n(80).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){var o=n(144),r=n(36);e.exports=function(e,t,n){if(o(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},function(e,t,n){var o=n(12)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var o=n(20),r=n(51);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){"use strict";var o=n(46),r=n(110),i=n(52),a=n(24);e.exports=n(108)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";t.__esModule=!0,t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=t.getCellType=t.registerCellType=void 0;var o=v(n(38)),r=n(17),i=n(14),a=n(34),s=v(n(255)),l=v(n(256)),u=v(n(257)),c=v(n(258)),h=v(n(259)),d=v(n(260)),f=v(n(261)),p=v(n(262)),g=v(n(263));function v(e){return e&&e.__esModule?e:{default:e}}var y=(0,o.default)("cellTypes"),m=y.register,w=y.getItem,C=y.hasItem,b=y.getNames,E=y.getValues;function S(e,t){var n=t.editor,o=t.renderer,s=t.validator;n&&(0,r.registerEditor)(e,n),o&&(0,i.registerRenderer)(e,o),s&&(0,a.registerValidator)(e,s),m(e,t)}S("autocomplete",s.default),S("checkbox",l.default),S("date",u.default),S("dropdown",c.default),S("handsontable",h.default),S("numeric",d.default),S("password",f.default),S("text",p.default),S("time",g.default),t.registerCellType=S,t.getCellType=function(e){if(!C(e))throw Error('You declared cell type "'+e+'" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by "Handsontable.cellTypes.registerCellType" method');return w(e)},t.hasCellType=C,t.getRegisteredCellTypeNames=b,t.getRegisteredCellTypes=E},function(e,n,r){"use strict";n.__esModule=!0;var i,a,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=(i=["Deprecation warning: This method is going to be removed in the next release.\n If you want to select a cell using props, please use the `selectCell` method."],a=["Deprecation warning: This method is going to be removed in the next release.\n If you want to select a cell using props, please use the \\`selectCell\\` method."],Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(a)}})));n.default=function(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=!1,W=this,z=function(){},Y=new m.default(W),G=void 0,K=void 0,X=void 0,q=void 0,J=void 0;(0,w.extend)(z.prototype,L.default.prototype),(0,w.extend)(z.prototype,n),(0,w.extend)(z.prototype,re(n)),(0,j.applyLanguageSetting)(z.prototype,n.language),(0,N.hasValidParameter)(i)&&(0,N.registerAsRootInstance)(this),(0,F.startObserving)(),this.isDestroyed=!1,this.rootElement=e,this.isHotTableEnv=(0,c.isChildOfWebComponentTable)(this.rootElement),m.default.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),this.guid="ht_"+(0,T.randomString)();var Q=(0,A.getTranslator)(W);X=new k.default(W),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),G={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new z,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var Z=new B.Selection(G.settings,{countCols:function(){return W.countCols()},countRows:function(){return W.countRows()},propToCol:function(e){return K.propToCol(e)},isEditorOpened:function(){return!!W.getActiveEditor()&&W.getActiveEditor().isOpened()}});function $(e){var t=(0,j.normalizeLanguageCode)(e);(0,x.hasLanguageDictionary)(t)?(W.runHooks("beforeLanguageChange",t),z.prototype.language=t,W.runHooks("afterLanguageChange",t)):(0,j.warnUserAboutLanguageRegistration)(e)}function ee(){var e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function te(e,t,n){var o,r,i,a=new ee;a.onQueueEmpty=function(){var o=void 0;e.length&&(o=W.runHooks("beforeChange",e,t||"edit"),(0,d.isFunction)(o)?(0,f.warn)("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed)."):!1===o&&e.splice(0,e.length)),n()};for(var s=e.length-1;s>=0;s--)if(null===e[s])e.splice(s,1);else{var u=l(e[s],4),h=u[0],p=u[1],g=u[3],v=K.propToCol(p),y=W.getCellMeta(h,v);"numeric"===y.type&&"string"==typeof g&&(i=g).length>0&&/^-?[\d\s]*(\.|,)?\d*$/.test(i)&&(e[s][3]=(r=void 0,r=(o=g).replace(",","."),!1===isNaN(parseFloat(r))?parseFloat(r):o)),W.getCellValidator(y)&&(a.addValidatorToQueue(),W.validateCell(e[s][3],y,function(t,n){return function(o){if("boolean"!=typeof o)throw new Error("Validation error: result is not boolean");if(!1===o&&!1===n.allowInvalid){e.splice(t,1),n.valid=!0;var r=W.getCell(n.visualRow,n.visualCol);(0,c.removeClass)(r,W.getSettings().invalidCellClassName)}a.removeValidatorFormQueue()}}(s,y),t))}a.checkIfQueueIsEmpty()}function ne(e,t){var n=e.length-1;if(!(n<0)){for(;n>=0;n--){var o=!1;if(null!==e[n]){if(null!==e[n][2]&&void 0!==e[n][2]||null!==e[n][3]&&void 0!==e[n][3]){if(G.settings.allowInsertRow)for(;e[n][0]>W.countRows()-1;)if(0===K.createRow(void 0,void 0,t)){o=!0;break}if(!o){if("array"===W.dataType&&(!G.settings.columns||0===G.settings.columns.length)&&G.settings.allowInsertColumn)for(;K.propToCol(e[n][1])>W.countCols()-1;)K.createCol(void 0,void 0,t);K.set(e[n][0],e[n][1],e[n][3])}}}else e.splice(n,1)}W.forceFullRender=!0,q.adjustRowsAndCols(),W.runHooks("beforeChangeRender",e,t),J.lockEditor(),W._refreshBorders(null),J.unlockEditor(),W.view.wt.wtOverlays.adjustElementsSize(),W.runHooks("afterChange",e,t||"edit");var r=W.getActiveEditor();r&&(0,p.isDefined)(r.refreshValue)&&r.refreshValue()}}function oe(e,t,n){return"object"===(void 0===e?"undefined":s(e))?e:[[e,t,n]]}function re(e){if((0,w.hasOwnProperty)(e,"type")){var t={},n=void 0;for(var o in"object"===s(e.type)?n=e.type:"string"==typeof e.type&&(n=(0,D.getCellType)(e.type)),n)(0,w.hasOwnProperty)(n,o)&&!(0,w.hasOwnProperty)(e,o)&&(t[o]=n[o]);return t}}this.selection=Z,this.selection.addLocalHook("beforeSetRangeStart",(function(e){r.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(function(e){r.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(function(e){r.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=r.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=r.view.wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(function(e){var t=(0,w.createObjectPropListener)(!1),n=r.selection.getSelectedRange(),o=n.current(),i=o.from,s=o.to,l=n.size()-1;r.runHooks("afterSelection",i.row,i.col,s.row,s.col,t,l),r.runHooks("afterSelectionByProp",i.row,W.colToProp(i.col),s.row,W.colToProp(s.col),t,l);var u=r.selection.isSelectedByAnyHeader(),h=r.selection.selectedRange.current(),d=!0;a&&(d=!1),t.isTouched()&&(d=!t.value);var f=r.selection.isSelectedByRowHeader(),p=r.selection.isSelectedByColumnHeader();!1!==d&&(u?f?r.view.scrollViewportVertically(e.row):p&&r.view.scrollViewportHorizontally(e.col):h&&!r.selection.isMultiple()?r.view.scrollViewport(h.from):r.view.scrollViewport(e)),f&&p?(0,c.addClass)(r.rootElement,["ht__selection--rows","ht__selection--columns"]):f?((0,c.removeClass)(r.rootElement,"ht__selection--columns"),(0,c.addClass)(r.rootElement,"ht__selection--rows")):p?((0,c.removeClass)(r.rootElement,"ht__selection--rows"),(0,c.addClass)(r.rootElement,"ht__selection--columns")):(0,c.removeClass)(r.rootElement,["ht__selection--rows","ht__selection--columns"]),r._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(function(e){var t=e.length-1,n=e[t],o=n.from,i=n.to;r.runHooks("afterSelectionEnd",o.row,o.col,i.row,i.col,t),r.runHooks("afterSelectionEndByProp",o.row,W.colToProp(o.col),i.row,W.colToProp(i.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(function(e){var t=r.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(function(e){r.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",(function(e,t,n){r.runHooks("afterModifyTransformStart",e,t,n)})),this.selection.addLocalHook("beforeModifyTransformEnd",(function(e){r.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",(function(e,t,n){r.runHooks("afterModifyTransformEnd",e,t,n)})),this.selection.addLocalHook("afterDeselect",(function(){J.destroyEditor(),r._refreshBorders(),(0,c.removeClass)(r.rootElement,["ht__selection--rows","ht__selection--columns"]),r.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(function(e){r.alter("insert_row",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(function(e){r.alter("insert_col",e,1,"auto")})),q={alter:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments[3],r=arguments[4],i=void 0;function a(e,t,n,o){var r=(0,C.arrayMap)(new Array(n),(function(){return e=void 0,"array"===o?e=[]:"object"===o&&(e={}),e;var e}));r.unshift(t,0),e.splice.apply(e,V(r))}var s=function(e){if(0===e.length)return[];var t=[].concat(V(e));return t.sort((function(e,t){var n=l(e,1)[0],o=l(t,1)[0];return n===o?0:n>o?1:-1})),(0,C.arrayReduce)(t,(function(e,t){var n=l(t,2),o=n[0],r=n[1],i=e[e.length-1],a=l(i,2),s=a[0]+a[1];if(o<=s){var u=Math.max(r-(s-o),0);i[1]+=u}else e.push([o,r]);return e}),[t[0]])};switch(e){case"insert_row":var u=W.countSourceRows();if(W.getSettings().maxRows===u)return;t=(0,p.isDefined)(t)?t:u,i=K.createRow(t,n,o),a(G.cellSettings,t,n,"array"),i&&(Z.isSelected()&&Z.selectedRange.current().from.row>=t?(Z.selectedRange.current().from.row+=i,Z.transformEnd(i,0)):W._refreshBorders());break;case"insert_col":i=K.createCol(t,n,o);for(var c=0,h=W.countSourceRows();c<h;c++)G.cellSettings[c]&&a(G.cellSettings[c],t,n);if(i){if(Array.isArray(W.getSettings().colHeaders)){var d=[t,0];d.length+=i,Array.prototype.splice.apply(W.getSettings().colHeaders,d)}Z.isSelected()&&Z.selectedRange.current().from.col>=t?(Z.selectedRange.current().from.col+=i,Z.transformEnd(0,i)):W._refreshBorders()}break;case"remove_row":var f=function(e){var t=0;(0,C.arrayEach)(e,(function(e){var r=l(e,2),i=r[0],a=r[1],s=(0,p.isEmpty)(i)?W.countRows()-1:Math.max(i-t,0);Number.isInteger(i)&&(i=Math.max(i-t,0)),K.removeRow(i,a,o),G.cellSettings.splice(s,n);var u=W.countRows(),c=W.getSettings().fixedRowsTop;c>=s+1&&(W.getSettings().fixedRowsTop-=Math.min(a,c-s));var h=W.getSettings().fixedRowsBottom;h&&s>=u-h&&(W.getSettings().fixedRowsBottom-=Math.min(a,h)),t+=a}))};Array.isArray(t)?f(s(t)):f([[t,n]]),q.adjustRowsAndCols(),W._refreshBorders();break;case"remove_col":var g=function(e){var t=0;(0,C.arrayEach)(e,(function(e){var n=l(e,2),r=n[0],i=n[1],a=(0,p.isEmpty)(r)?W.countCols()-1:Math.max(r-t,0),s=Q.toPhysicalColumn(a);Number.isInteger(r)&&(r=Math.max(r-t,0)),K.removeCol(r,i,o);for(var u=0,c=W.countSourceRows();u<c;u++)G.cellSettings[u]&&G.cellSettings[u].splice(s,i);var h=W.getSettings().fixedColumnsLeft;h>=a+1&&(W.getSettings().fixedColumnsLeft-=Math.min(i,h-a)),Array.isArray(W.getSettings().colHeaders)&&(void 0===s&&(s=-1),W.getSettings().colHeaders.splice(s,i)),t+=i}))};Array.isArray(t)?g(s(t)):g([[t,n]]),q.adjustRowsAndCols(),W._refreshBorders();break;default:throw new Error('There is no such action "'+e+'"')}r||q.adjustRowsAndCols()},adjustRowsAndCols:function(){if(G.settings.minRows){var e=W.countRows();if(e<G.settings.minRows)for(var t=0,n=G.settings.minRows;t<n-e;t++)K.createRow(W.countRows(),1,"auto")}if(G.settings.minSpareRows){var o=W.countEmptyRows(!0);if(o<G.settings.minSpareRows)for(;o<G.settings.minSpareRows&&W.countSourceRows()<G.settings.maxRows;o++)K.createRow(W.countRows(),1,"auto")}var r=void 0;if((G.settings.minCols||G.settings.minSpareCols)&&(r=W.countEmptyCols(!0)),G.settings.minCols&&!G.settings.columns&&W.countCols()<G.settings.minCols)for(;W.countCols()<G.settings.minCols;r++)K.createCol(W.countCols(),1,"auto");if(G.settings.minSpareCols&&!G.settings.columns&&"array"===W.dataType&&r<G.settings.minSpareCols)for(;r<G.settings.minSpareCols&&W.countCols()<G.settings.maxCols;r++)K.createCol(W.countCols(),1,"auto");var i=W.countRows(),a=W.countCols();0!==i&&0!==a||Z.deselect(),Z.isSelected()&&(0,C.arrayEach)(Z.selectedRange,(function(e){var t=!1,n=e.from.row,o=e.from.col,r=e.to.row,s=e.to.col;n>i-1?(t=!0,r>(n=i-1)&&(r=n)):r>i-1&&(t=!0,n>(r=i-1)&&(n=r)),o>a-1?(t=!0,s>(o=a-1)&&(s=o)):s>a-1&&(t=!0,o>(s=a-1)&&(o=s)),t&&W.selectCell(n,o,r,s)})),W.view&&W.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,n,o,r,i,a){var l=void 0,u=void 0,c=void 0,h=void 0,d=[],f={};if(0===(u=t.length))return!1;var g=void 0,v=void 0,y=void 0,m=void 0;switch(r){case"shift_down":for(g=n?n.col-e.col+1:0,v=n?n.row-e.row+1:0,c=0,h=(t=(0,M.translateRowsToColumns)(t)).length,y=Math.max(h,g);c<y;c++)if(c<h){var C;for(l=0,u=t[c].length;l<v-u;l++)t[c].push(t[c][l%u]);t[c].unshift(e.col+c,e.row,0),(C=W).spliceCol.apply(C,V(t[c]))}else{var b;t[c%h][0]=e.col+c,(b=W).spliceCol.apply(b,V(t[c%h]))}break;case"shift_right":for(g=n?n.col-e.col+1:0,v=n?n.row-e.row+1:0,l=0,u=t.length,m=Math.max(u,v);l<m;l++)if(l<u){var E;for(c=0,h=t[l].length;c<g-h;c++)t[l].push(t[l][c%h]);t[l].unshift(e.row+l,e.col,0),(E=W).spliceRow.apply(E,V(t[l]))}else{var S;t[l%u][0]=e.row+l,(S=W).spliceRow.apply(S,V(t[l%u]))}break;case"overwrite":default:f.row=e.row,f.col=e.col;var O={row:n&&e?n.row-e.row+1:1,col:n&&e?n.col-e.col+1:1},T=0,_=0,R=!0,k=void 0,A=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=t[e%t.length];return null!==n?o[n%o.length]:o},N=t.length,P=n?n.row-e.row+1:0;for(u=n?P:Math.max(N,P),l=0;l<u&&!(n&&f.row>n.row&&P>N||!G.settings.allowInsertRow&&f.row>W.countRows()-1||f.row>=G.settings.maxRows);l++){var H=l-T,L=A(H).length,D=n?n.col-e.col+1:0;if(h=n?D:Math.max(L,D),f.col=e.col,k=W.getCellMeta(f.row,f.col),"CopyPaste.paste"!==o&&"Autofill.autofill"!==o||!k.skipRowOnPaste){for(_=0,c=0;c<h&&!(n&&f.col>n.col&&D>L||!G.settings.allowInsertColumn&&f.col>W.countCols()-1||f.col>=G.settings.maxCols);c++)if(k=W.getCellMeta(f.row,f.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!k.skipColumnOnPaste)if(k.readOnly)f.col+=1;else{var I=c-_,x=A(H,I),j=W.getDataAtCell(f.row,f.col),F={row:H,col:I};if("Autofill.fill"===o){var B=W.runHooks("beforeAutofillInsidePopulate",F,i,t,a,{},O);B&&(x=(0,p.isUndefined)(B.value)?x:B.value)}if(null!==x&&"object"===(void 0===x?"undefined":s(x)))if(null===j||"object"!==(void 0===j?"undefined":s(j)))R=!1;else{var U=(0,w.duckSchema)(j[0]||j),z=(0,w.duckSchema)(x[0]||x);(0,w.isObjectEqual)(U,z)?x=(0,w.deepClone)(x):R=!1}else null!==j&&"object"===(void 0===j?"undefined":s(j))&&(R=!1);R&&d.push([f.row,f.col,x]),R=!0,f.col+=1}else _+=1,f.col+=1,h+=1;f.row+=1}else T+=1,f.row+=1,u+=1}W.setDataAtCell(d,null,null,o||"populateFromArray")}}},this.init=function(){X.setData(G.settings.data),W.runHooks("beforeInit"),(0,g.isMobileBrowser)()&&(0,c.addClass)(W.rootElement,"mobile"),this.updateSettings(G.settings,!0),this.view=new R.default(this),J=y.default.getInstance(W,G,Z,K),this.forceFullRender=!0,W.runHooks("init"),this.view.render(),"object"===s(G.firstRun)&&(W.runHooks("afterChange",G.firstRun[0],G.firstRun[1]),G.firstRun=!1),W.runHooks("afterInit")},this.validateCell=function(e,t,n,o){var r,i=W.getCellValidator(t);function a(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!0===t.hidden)n(e);else{var o=t.visualCol,r=t.visualRow,i=W.getCell(r,o,!0);i&&"TH"!==i.nodeName&&W.view.wt.wtSettings.settings.cellRenderer(r,o,i),n(e)}}(0,p.isRegExp)(i)&&(r=i,i=function(e,t){t(r.test(e))}),(0,d.isFunction)(i)?(e=W.runHooks("beforeValidate",e,t.visualRow,t.prop,o),W._registerTimeout(setTimeout((function(){i.call(t,e,(function(n){n=W.runHooks("afterValidate",n,e,t.visualRow,t.prop,o),t.valid=n,a(n),W.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,o)}))}),0))):W._registerTimeout(setTimeout((function(){t.valid=!0,a(t.valid,!1)}),0))},this.setDataAtCell=function(e,t,n,o){var r,i=oe(e,t,n),a=[],l=o,u=void 0,c=void 0;for(u=0,r=i.length;u<r;u++){if("object"!==s(i[u]))throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof i[u][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");c=K.colToProp(i[u][1]),a.push([i[u][0],c,X.getAtCell(Q.toPhysicalRow(i[u][0]),i[u][1]),i[u][2]])}l||"object"!==(void 0===e?"undefined":s(e))||(l=t),W.runHooks("afterSetDataAtCell",a,l),te(a,l,(function(){ne(a,l)}))},this.setDataAtRowProp=function(e,t,n,o){var r,i=oe(e,t,n),a=[],l=o,u=void 0;for(u=0,r=i.length;u<r;u++)a.push([i[u][0],i[u][1],X.getAtCell(Q.toPhysicalRow(i[u][0]),i[u][1]),i[u][2]]);l||"object"!==(void 0===e?"undefined":s(e))||(l=t),W.runHooks("afterSetDataAtRowProp",a,l),te(a,l,(function(){ne(a,l)}))},this.listen=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e){var t=!document.activeElement||document.activeElement&&void 0===document.activeElement.nodeName;document.activeElement&&document.activeElement!==document.body&&!t?document.activeElement.blur():t&&document.body.focus()}W&&!W.isListening()&&(U=W.guid,W.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(U=null,W.runHooks("afterUnlisten"))},this.isListening=function(){return U===W.guid},this.destroyEditor=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,o,r,i,a,l,u){if("object"!==(void 0===n?"undefined":s(n))||"object"!==s(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var c="number"==typeof o?new P.CellCoords(o,r):null;return q.populateFromArray(new P.CellCoords(e,t),n,c,i,a,l,u)},this.spliceCol=function(e,t,n){for(var o,r=arguments.length,i=Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];return(o=K).spliceCol.apply(o,[e,t,n].concat(i))},this.spliceRow=function(e,t,n){for(var o,r=arguments.length,i=Array(r>3?r-3:0),a=3;a<r;a++)i[a-3]=arguments[a];return(o=K).spliceRow.apply(o,[e,t,n].concat(i))},this.getSelected=function(){if(Z.isSelected())return(0,C.arrayMap)(Z.getSelectedRange(),(function(e){var t=e.from,n=e.to;return[t.row,t.col,n.row,n.col]}))},this.getSelectedLast=function(){var e=this.getSelected(),t=void 0;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Z.isSelected())return Array.from(Z.getSelectedRange())},this.getSelectedRangeLast=function(){var e=this.getSelectedRange(),t=void 0;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(){var e=this;if(Z.isSelected()){var t=[];(0,C.arrayEach)(Z.getSelectedRange(),(function(n){var o=n.getTopLeftCorner(),r=n.getBottomRightCorner();(0,_.rangeEach)(o.row,r.row,(function(n){(0,_.rangeEach)(o.col,r.col,(function(o){e.getCellMeta(n,o).readOnly||t.push([n,o,""])}))}))})),t.length>0&&this.setDataAtCell(t)}},this.render=function(){W.view&&(W.renderCall=!0,W.forceFullRender=!0,J.lockEditor(),W._refreshBorders(null),J.unlockEditor())},this.loadData=function(e){if(Array.isArray(G.settings.dataSchema)?W.dataType="array":(0,d.isFunction)(G.settings.dataSchema)?W.dataType="function":W.dataType="object",K&&K.destroy(),K=new v.default(W,G,z),"object"===(void 0===e?"undefined":s(e))&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error("loadData only accepts array of objects or array of arrays ("+(void 0===e?"undefined":s(e))+" given)");var t=K.getSchema();e=[];var n,o=void 0,r=0;for(r=0,n=G.settings.startRows;r<n;r++)if("object"!==W.dataType&&"function"!==W.dataType||!G.settings.dataSchema)if("array"===W.dataType)o=(0,w.deepClone)(t[0]),e.push(o);else{o=[];for(var i=0,a=G.settings.startCols;i<a;i++)o.push(null);e.push(o)}else o=(0,w.deepClone)(t),e.push(o)}G.isPopulated=!1,z.prototype.data=e,Array.isArray(e[0])&&(W.dataType="array"),K.dataSource=e,X.data=e,X.dataType=W.dataType,X.colToProp=K.colToProp.bind(K),X.propToCol=K.propToCol.bind(K),G.cellSettings.length=0,q.adjustRowsAndCols(),W.runHooks("afterLoadData",G.firstRun),G.firstRun?G.firstRun=[null,"loadData"]:(W.runHooks("afterChange",null,"loadData"),W.render()),G.isPopulated=!0},this.getData=function(e,t,n,o){return(0,p.isUndefined)(e)?K.getAll():K.getRange(new P.CellCoords(e,t),new P.CellCoords(n,o),K.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,o){return K.getCopyableText(new P.CellCoords(e,t),new P.CellCoords(n,o))},this.getCopyableData=function(e,t){return K.getCopyable(e,K.colToProp(t))},this.getSchema=function(){return K.getSchema()},this.updateSettings=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1,o=void 0,r=void 0,i=void 0;if((0,p.isDefined)(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if((0,p.isDefined)(e.cols))throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(o in e)"data"!==o&&("language"!==o?H.default.getSingleton().getRegistered().indexOf(o)>-1?((0,d.isFunction)(e[o])||Array.isArray(e[o]))&&(e[o].initialHook=!0,W.addHook(o,e[o])):!t&&(0,w.hasOwnProperty)(e,o)&&(z.prototype[o]=e[o]):$(e.language));void 0===e.data&&void 0===G.settings.data?W.loadData(null):void 0!==e.data?W.loadData(e.data):void 0!==e.columns&&K.createMap(),i=W.countCols();var a=e.columns||z.prototype.columns;if(a&&(0,d.isFunction)(a)&&(i=W.countSourceCols(),n=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(G.cellSettings.length=0),i>0){var s=void 0,l=void 0;for(o=0,r=0;o<i;o++)n&&!a(o)||(G.columnSettings[r]=(0,h.columnFactory)(z,G.columnsSettingConflicts),s=G.columnSettings[r].prototype,a&&(l=n?a(o):a[r])&&((0,w.extend)(s,l),(0,w.extend)(s,re(l))),r+=1)}(0,p.isDefined)(e.cell)&&(0,w.objectEach)(e.cell,(function(e){W.setCellMetaObject(e.row,e.col,e)})),W.runHooks("afterCellMetaReset"),(0,p.isDefined)(e.className)&&(z.prototype.className&&(0,c.removeClass)(W.rootElement,z.prototype.className),e.className&&(0,c.addClass)(W.rootElement,e.className));var u=W.rootElement.style.height;""!==u&&(u=parseInt(W.rootElement.style.height,10));var f=e.height;if((0,d.isFunction)(f)&&(f=f()),t){var g=W.rootElement.getAttribute("style");g&&W.rootElement.setAttribute("data-initialstyle",W.rootElement.getAttribute("style"))}if(null===f){var v=W.rootElement.getAttribute("data-initialstyle");v&&(v.indexOf("height")>-1||v.indexOf("overflow")>-1)?W.rootElement.setAttribute("style",v):(W.rootElement.style.height="",W.rootElement.style.overflow="")}else void 0!==f&&(W.rootElement.style.height=f+"px",W.rootElement.style.overflow="hidden");if(void 0!==e.width){var y=e.width;(0,d.isFunction)(y)&&(y=y()),W.rootElement.style.width=y+"px"}t||(K.clearLengthCache(),W.view&&W.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),W.runHooks("afterUpdateSettings",e)),q.adjustRowsAndCols(),W.view&&!G.firstRun&&(W.forceFullRender=!0,J.lockEditor(),W._refreshBorders(null),J.unlockEditor()),t||!W.view||""!==u&&""!==f&&void 0!==f||u===f||W.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=W.getSelectedLast();if(z.prototype.getValue){if((0,d.isFunction)(z.prototype.getValue))return z.prototype.getValue.call(W);if(e)return W.getData()[e[0][0]][z.prototype.getValue]}else if(e)return W.getDataAtCell(e[0],e[1])},this.getSettings=function(){return G.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,o,r){q.alter(e,t,n,o,r)},this.getCell=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return W.view.getCellAtCoords(new P.CellCoords(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return K.colToProp(e)},this.propToCol=function(e){return K.propToCol(e)},this.toVisualRow=function(e){return Q.toVisualRow(e)},this.toVisualColumn=function(e){return Q.toVisualColumn(e)},this.toPhysicalRow=function(e){return Q.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return Q.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return K.get(e,K.colToProp(t))},this.getDataAtRowProp=function(e,t){return K.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,V(K.getRange(new P.CellCoords(0,e),new P.CellCoords(G.settings.data.length-1,e),K.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,n=K.getRange(new P.CellCoords(0,K.propToCol(e)),new P.CellCoords(G.settings.data.length-1,K.propToCol(e)),K.DESTINATION_RENDERER);return(t=[]).concat.apply(t,V(n))},this.getSourceData=function(e,t,n,o){return void 0===e?X.getData():X.getByRange(new P.CellCoords(e,t),new P.CellCoords(n,o))},this.getSourceDataArray=function(e,t,n,o){return void 0===e?X.getData(!0):X.getByRange(new P.CellCoords(e,t),new P.CellCoords(n,o),!0)},this.getSourceDataAtCol=function(e){return X.getAtColumn(e)},this.getSourceDataAtRow=function(e){return X.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return X.getAtCell(e,t)},this.getDataAtRow=function(e){return K.getRange(new P.CellCoords(e,0),new P.CellCoords(e,this.countCols()-1),K.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,o){var r=this,i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,o],a=i[0],s=i[1],l=i[2],u=i[3],c=null,h=null;void 0===l&&(l=a),void 0===u&&(u=s);var d="mixed";return(0,_.rangeEach)(Math.min(a,l),Math.max(a,l),(function(e){var t=!0;return(0,_.rangeEach)(Math.min(s,u),Math.max(s,u),(function(n){var o=r.getCellMeta(e,n);return h=o.type,c?t=c===h:c=h,t})),d=t?h:"mixed",t})),d},this.removeCellMeta=function(e,t,n){var o=Q.toPhysical(e,t),r=l(o,2),i=r[0],a=r[1],s=G.cellSettings[i][a][n];!1!==W.runHooks("beforeRemoveCellMeta",e,t,n,s)&&(delete G.cellSettings[i][a][n],W.runHooks("afterRemoveCellMeta",e,t,n,s)),s=null},this.spliceCellsMeta=function(e,t){for(var n,o=arguments.length,r=Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];(n=G.cellSettings).splice.apply(n,[e,t].concat(r))},this.setCellMetaObject=function(e,t,n){var o=this;"object"===(void 0===n?"undefined":s(n))&&(0,w.objectEach)(n,(function(n,r){o.setCellMeta(e,t,r,n)}))},this.setCellMeta=function(e,t,n,o){var r=Q.toPhysical(e,t),i=l(r,2),a=i[0],s=i[1];G.columnSettings[s]||(G.columnSettings[s]=(0,h.columnFactory)(z,G.columnsSettingConflicts)),G.cellSettings[a]||(G.cellSettings[a]=[]),G.cellSettings[a][s]||(G.cellSettings[a][s]=new G.columnSettings[s]),G.cellSettings[a][s][n]=o,W.runHooks("afterSetCellMeta",e,t,n,o)},this.getCellsMeta=function(){return(0,C.arrayFlatten)(G.cellSettings)},this.getCellMeta=function(e,t){var n=K.colToProp(t),o=Q.toPhysical(e,t),r=l(o,2),i=r[0],a=r[1],s=i;null===s&&(s=e),G.columnSettings[a]||(G.columnSettings[a]=(0,h.columnFactory)(z,G.columnsSettingConflicts)),G.cellSettings[s]||(G.cellSettings[s]=[]),G.cellSettings[s][a]||(G.cellSettings[s][a]=new G.columnSettings[a]);var u=G.cellSettings[s][a];if(u.row=s,u.col=a,u.visualRow=e,u.visualCol=t,u.prop=n,u.instance=W,W.runHooks("beforeGetCellMeta",e,t,u),(0,w.extend)(u,re(u)),u.cells){var c=u.cells.call(u,s,a,n);c&&((0,w.extend)(u,c),(0,w.extend)(u,re(c)))}return W.runHooks("afterGetCellMeta",e,t,u),u},this.getCellMetaAtRow=function(e){return G.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===W.dataType||W.getSettings().columns)};var ie=(0,M.cellMethodLookupFactory)("renderer");this.getCellRenderer=function(e,t){return(0,S.getRenderer)(ie.call(this,e,t))},this.getCellEditor=(0,M.cellMethodLookupFactory)("editor");var ae=(0,M.cellMethodLookupFactory)("validator");this.getCellValidator=function(e,t){var n=ae.call(this,e,t);return"string"==typeof n&&(n=(0,O.getValidator)(n)),n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){var o=new ee;e&&(o.onQueueEmpty=e);for(var r=W.countRows()-1;r>=0;)if(void 0===t||-1!==t.indexOf(r)){for(var i=W.countCols()-1;i>=0;)void 0===n||-1!==n.indexOf(i)?(o.addValidatorToQueue(),W.validateCell(W.getDataAtCell(r,i),W.getCellMeta(r,i),(function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(o.valid=!1),o.removeValidatorFormQueue()}),"validateCells"),i-=1):i-=1;r-=1}else r-=1;o.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=G.settings.rowHeaders,n=e;return void 0!==n&&(n=W.runHooks("modifyRowHeader",n)),void 0===n?(t=[],(0,_.rangeEach)(W.countRows()-1,(function(e){t.push(W.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[n]?t=t[n]:(0,d.isFunction)(t)?t=t(n):t&&"string"!=typeof t&&"number"!=typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!G.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==G.settings.colHeaders&&null!==G.settings.colHeaders)return!!G.settings.colHeaders;for(var e=0,t=W.countCols();e<t;e++)if(W.getColHeader(e))return!0;return!1},this.getColHeader=function(e){var t=G.settings.columns&&(0,d.isFunction)(G.settings.columns),n=W.runHooks("modifyColHeader",e),o=G.settings.colHeaders;if(void 0===n){for(var r=[],i=t?W.countSourceCols():W.countCols(),a=0;a<i;a++)r.push(W.getColHeader(a));o=r}else{var s=n,l=W.runHooks("modifyCol",s),u=function(e){for(var t=[],n=W.countSourceCols(),o=0;o<n;o++)(0,d.isFunction)(W.getSettings().columns)&&W.getSettings().columns(o)&&t.push(o);return t[e]}(l);G.settings.columns&&(0,d.isFunction)(G.settings.columns)&&G.settings.columns(u)&&G.settings.columns(u).title?o=G.settings.columns(u).title:G.settings.columns&&G.settings.columns[l]&&G.settings.columns[l].title?o=G.settings.columns[l].title:Array.isArray(G.settings.colHeaders)&&void 0!==G.settings.colHeaders[l]?o=G.settings.colHeaders[l]:(0,d.isFunction)(G.settings.colHeaders)?o=G.settings.colHeaders(l):G.settings.colHeaders&&"string"!=typeof G.settings.colHeaders&&"number"!=typeof G.settings.colHeaders&&(o=(0,M.spreadsheetColumnLabel)(s))}return o},this._getColWidthFromSettings=function(e){var t=W.getCellMeta(0,e),n=t.width;if(void 0!==n&&n!==G.settings.width||(n=t.colWidths),null!=n){switch(void 0===n?"undefined":s(n)){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return n},this.getColWidth=function(e){var t=W._getColWidthFromSettings(e);return void 0===(t=W.runHooks("modifyColWidth",t,e))&&(t=P.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){var t=G.settings.rowHeights;if(null!=t){switch(void 0===t?"undefined":s(t)){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){var t=W._getRowHeightFromSettings(e);return t=W.runHooks("modifyRowHeight",t,e)},this.countSourceRows=function(){return W.runHooks("modifySourceLength")||(W.getSourceData()?W.getSourceData().length:0)},this.countSourceCols=function(){var e=W.getSourceData()&&W.getSourceData()[0]?W.getSourceData()[0]:[];return(0,w.isObject)(e)?(0,w.deepObjectSize)(e):e.length||0},this.countRows=function(){return K.getLength()},this.countCols=function(){var e=this.getSettings().maxCols,t=!1,n=0;if("array"===W.dataType&&(t=G.settings.data&&G.settings.data[0]&&G.settings.data[0].length),t&&(n=G.settings.data[0].length),G.settings.columns)if((0,d.isFunction)(G.settings.columns))if("array"===W.dataType){for(var o=0,r=0;r<n;r++)G.settings.columns(r)&&(o+=1);n=o}else"object"!==W.dataType&&"function"!==W.dataType||(n=K.colToPropCache.length);else n=G.settings.columns.length;else"object"!==W.dataType&&"function"!==W.dataType||(n=K.colToPropCache.length);return Math.min(e,n)},this.rowOffset=function(){return W.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return W.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return W.view.wt.drawn?W.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return W.view.wt.drawn?W.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return W.view.wt.drawn?W.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return W.view.wt.drawn?W.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,_.rangeEachReverse)(W.countRows()-1,(function(n){if(W.isEmptyRow(n))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(W.countRows()<1)return 0;var t=0;return(0,_.rangeEachReverse)(W.countCols()-1,(function(n){if(W.isEmptyCol(n))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return G.settings.isEmptyRow.call(W,e)},this.isEmptyCol=function(e){return G.settings.isEmptyCol.call(W,e)},this.selectCell=function(e,t,n,o){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,p.isUndefined)(e)&&!(0,p.isUndefined)(t)&&this.selectCells([[e,t,n,o]],r,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&(a=!0);var o=Z.selectCells(e);return o&&n&&W.listen(),a=!1,o},this.selectCellByProp=function(e,t,n,o){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return(0,f.warn)((0,b.toSingleLine)(u)),this.selectCells([[e,t,n,o]],r,i)},this.selectColumns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return Z.selectColumns(e,t)},this.selectRows=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return Z.selectRows(e,t)},this.deselectCell=function(){Z.deselect()},this.selectAll=function(){a=!0,Z.selectAll(),a=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=!n,i=!o,a=!1;return void 0!==e&&void 0!==t&&(a=W.view.scrollViewport(new P.CellCoords(e,t),r,o,n,i)),"number"==typeof e&&"number"!=typeof t&&(a=W.view.scrollViewportVertically(e,r,n)),"number"==typeof t&&"number"!=typeof e&&(a=W.view.scrollViewportHorizontally(t,o,i)),a},this.destroy=function(){W._clearTimeouts(),W._clearImmediates(),W.view&&W.view.destroy(),X&&X.destroy(),X=null,(0,F.stopObserving)(),(0,c.empty)(W.rootElement),Y.destroy(),J&&J.destroy(),W.runHooks("afterDestroy"),H.default.getSingleton().destroy(W),(0,w.objectEach)(W,(function(e,t,n){var o;(0,d.isFunction)(e)?n[t]=(o=t,function(){throw new Error('The "'+o+'" method cannot be called because this Handsontable instance has been destroyed')}):"guid"!==t&&(n[t]=null)})),W.isDestroyed=!0,K&&K.destroy(),K=null,G=null,q=null,Z=null,J=null,W=null,z=null},this.getActiveEditor=function(){return J.getActiveEditor()},this.getPlugin=function(e){return(0,E.getPlugin)(this,e)},this.getInstance=function(){return W},this.addHook=function(e,t){H.default.getSingleton().add(e,t,W)},this.hasHook=function(e){return H.default.getSingleton().has(e,W)},this.addHookOnce=function(e,t){H.default.getSingleton().once(e,t,W)},this.removeHook=function(e,t){H.default.getSingleton().remove(e,t,W)},this.runHooks=function(e,t,n,o,r,i,a){return H.default.getSingleton().run(W,e,t,n,o,r,i,a)},this.getTranslatedPhrase=function(e,t){return(0,I.getTranslatedPhrase)(G.settings.language,e,t)},this.timeouts=[],this._registerTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"==typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){(0,C.arrayEach)(this.timeouts,(function(e){clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(t(e))},this._clearImmediates=function(){(0,C.arrayEach)(this.immediates,(function(e){o(e)}))},this._refreshBorders=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];J.destroyEditor(e),W.view.render(),t&&Z.isSelected()&&J.prepareEditor()},H.default.getSingleton().run(W,"construct")};var c=r(0),h=r(91),d=r(43),f=r(58),p=r(11),g=r(39),v=W(r(264)),y=W(r(267)),m=W(r(5)),w=r(1),C=r(2),b=r(42),E=r(8),S=r(14),O=r(34),T=r(33),_=r(6),R=W(r(268)),k=W(r(269)),M=r(92),A=r(195),N=r(196),P=r(4),H=W(r(16)),L=W(r(197)),D=r(89),I=r(198),x=r(71),j=r(199),F=r(200),B=r(201);function W(e){return e&&e.__esModule?e:{default:e}}function V(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var U=null},function(e,t,n){"use strict";t.__esModule=!0,t.columnFactory=function(e,t){function n(){}(0,o.inherit)(n,e);for(var r=0,i=t.length;r<i;r++)n.prototype[t[r]]=void 0;return n};var o=n(1)},function(e,t,n){"use strict";t.__esModule=!0,t.spreadsheetColumnLabel=s,t.spreadsheetColumnIndex=function(e){var t=0;if(e)for(var n=0,o=e.length-1;n<e.length;n+=1,o-=1)t+=Math.pow(a,o)*(i.indexOf(e[n])+1);return t-=1},t.createSpreadsheetData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],o=void 0,r=void 0;for(o=0;o<e;o++){var i=[];for(r=0;r<t;r++)i.push(s(r)+(o+1));n.push(i)}return n},t.createSpreadsheetObjectData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],o=void 0,r=void 0;for(o=0;o<e;o++){var i={};for(r=0;r<t;r++)i["prop"+r]=s(r)+(o+1);n.push(i)}return n},t.createEmptySpreadsheetData=function(e,t){for(var n=[],o=void 0,r=0;r<e;r++){o=[];for(var i=0;i<t;i++)o.push("");n.push(o)}return n},t.translateRowsToColumns=function(e){var t,n=[],o=void 0,r=void 0,i=void 0,a=0;for(o=0,t=e.length;o<t;o++)for(r=0,i=e[o].length;r<i;r++)r===a&&(n.push([]),a+=1),n[r].push(e[o][r]);return n},t.cellMethodLookupFactory=function(e,t){var n=void 0===t||t;return function(t,i){return function t(i){if(i){if((0,r.hasOwnProperty)(i,e)&&void 0!==i[e])return i[e];if((0,r.hasOwnProperty)(i,"type")&&i.type){if("string"!=typeof i.type)throw new Error("Cell type must be a string ");var a=(0,o.getCellType)(i.type);if((0,r.hasOwnProperty)(a,e))return a[e];if(n)return}return t(Object.getPrototypeOf(i))}}("number"==typeof t?this.getCellMeta(t,i):t)}};var o=n(89),r=n(1),i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=i.length;function s(e){for(var t=e+1,n="",o=void 0;t>0;)o=(t-1)%a,n=String.fromCharCode(65+o)+n,t=parseInt((t-o)/a,10);return n}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return o(e,[{key:"addRow",value:function(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"addColumnHeadersRow",value:function(e){var t=this.hot.getColHeader(0);if(null!=t){var n={row:-1};this.rows.push(n),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tHead.appendChild(this.createColumnHeadersRow()),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}}},{key:"addColumn",value:function(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"getHeights",value:function(e){this.injected||this.injectTable(),(0,i.arrayEach)(this.rows,(function(t){e(t.row,(0,r.outerHeight)(t.table)-1)}))}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,i.arrayEach)(this.columns,(function(t){e(t.col,(0,r.outerWidth)(t.table))}))}},{key:"setSettings",value:function(e){this.settings=e}},{key:"setSetting",value:function(e,t){this.settings||(this.settings={}),this.settings[e]=t}},{key:"getSettings",value:function(){return this.settings}},{key:"getSetting",value:function(e){return this.settings?this.settings[e]:null}},{key:"createColGroupsCol",value:function(){var e=this,t=document.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1)),this.samples.forEach((function(n){(0,i.arrayEach)(n.strings,(function(n){t.appendChild(e.createColElement(n.col))}))})),t}},{key:"createRow",value:function(e){var t=this,n=document,o=n.createDocumentFragment(),r=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),o.appendChild(r)),this.samples.forEach((function(r){(0,i.arrayEach)(r.strings,(function(r){var i=r.col,a=t.hot.getCellMeta(e,i);a.col=i,a.row=e;var s=t.hot.getCellRenderer(a),l=n.createElement("td");s(t.hot,l,e,i,t.hot.colToProp(i),r.value,a),o.appendChild(l)}))})),o}},{key:"createColumnHeadersRow",value:function(){var e=this,t=document,n=t.createDocumentFragment();if(this.hot.hasRowHeaders()){var o=t.createElement("th");this.hot.view.appendColHeader(-1,o),n.appendChild(o)}return this.samples.forEach((function(o){(0,i.arrayEach)(o.strings,(function(o){var r=o.col,i=t.createElement("th");e.hot.view.appendColHeader(r,i),n.appendChild(i)}))})),n}},{key:"createCol",value:function(e){var t=this,n=document,o=n.createDocumentFragment();return this.samples.forEach((function(r){(0,i.arrayEach)(r.strings,(function(r){var i=r.row,a=t.hot.getCellMeta(i,e);a.col=e,a.row=i;var s=t.hot.getCellRenderer(a),l=n.createElement("td"),u=n.createElement("tr");s(t.hot,l,i,e,t.hot.colToProp(e),r.value,a),u.appendChild(l),o.appendChild(u)}))})),o}},{key:"clean",value:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}},{key:"injectTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(e){var t=document.createElement("col");return t.style.width=this.hot.view.wt.wtTable.getStretchedColumnWidth(e)+"px",t}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document,n=t.createDocumentFragment(),o=t.createElement("table"),i=t.createElement("thead"),a=t.createElement("tbody"),s=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&o.appendChild(s),this.isHorizontal()&&(l.appendChild(u),i.appendChild(l),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(i),this.isVertical()&&a.appendChild(l),o.appendChild(a),(0,r.addClass)(o,e),n.appendChild(o),{fragment:n,table:o,tHead:i,tBody:a,colGroup:s,tr:l,th:u}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document,n=t.createDocumentFragment(),o=t.createElement("div"),i="htGhostTable htAutoSize "+e.trim();return(0,r.addClass)(o,i),n.appendChild(o),{fragment:n,container:o}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o=n(2),r=n(1),i=n(6),a={_arrayMap:[],getValueByIndex:function(e){var t=null;return e<this._arrayMap.length&&(t=this._arrayMap[e]),t},getIndexByValue:function(e){var t;return-1===(t=this._arrayMap.indexOf(e))?null:t},insertItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=(0,o.arrayMax)(this._arrayMap)+1,a=[];return(0,i.rangeEach)(n-1,(function(n){a.push(t._arrayMap.splice(e+n,0,r+n))})),a},removeItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=[];if(Array.isArray(e)){var i=[].concat(this._arrayMap);e.sort((function(e,t){return t-e})),r=(0,o.arrayReduce)(e,(function(e,n){return t._arrayMap.splice(n,1),e.concat(i.slice(n,n+1))}),[])}else r=this._arrayMap.splice(e,n);return r},unshiftItems:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.removeItems(e,t);function r(e){return(0,o.arrayReduce)(n,(function(t,n){var o=t;return e>n&&(o+=1),o}),0)}this._arrayMap=(0,o.arrayMap)(this._arrayMap,(function(e){var t=e,n=r(t);return n&&(t-=n),t}))},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=(0,o.arrayMap)(this._arrayMap,(function(t){var o=t;return o>=e&&(o+=n),o})),(0,i.rangeEach)(n-1,(function(n){t._arrayMap.splice(e+n,0,e+n)}))},swapIndexes:function(e,t){var n;(n=this._arrayMap).splice.apply(n,[t,0].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,r.defineGetter)(a,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1}),t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{name:o}};var o=t.KEY="---------"},function(e,t,n){"use strict";var o;t.__esModule=!0,t.ITEMS=t.UNDO=t.SEPARATOR=t.ROW_BELOW=t.ROW_ABOVE=t.REMOVE_ROW=t.REMOVE_COLUMN=t.REDO=t.READ_ONLY=t.COLUMN_RIGHT=t.COLUMN_LEFT=t.CLEAR_COLUMN=t.ALIGNMENT=void 0;var r=n(305);Object.defineProperty(t,"ALIGNMENT",{enumerable:!0,get:function(){return r.KEY}});var i=n(306);Object.defineProperty(t,"CLEAR_COLUMN",{enumerable:!0,get:function(){return i.KEY}});var a=n(307);Object.defineProperty(t,"COLUMN_LEFT",{enumerable:!0,get:function(){return a.KEY}});var s=n(308);Object.defineProperty(t,"COLUMN_RIGHT",{enumerable:!0,get:function(){return s.KEY}});var l=n(309);Object.defineProperty(t,"READ_ONLY",{enumerable:!0,get:function(){return l.KEY}});var u=n(310);Object.defineProperty(t,"REDO",{enumerable:!0,get:function(){return u.KEY}});var c=n(311);Object.defineProperty(t,"REMOVE_COLUMN",{enumerable:!0,get:function(){return c.KEY}});var h=n(312);Object.defineProperty(t,"REMOVE_ROW",{enumerable:!0,get:function(){return h.KEY}});var d=n(313);Object.defineProperty(t,"ROW_ABOVE",{enumerable:!0,get:function(){return d.KEY}});var f=n(314);Object.defineProperty(t,"ROW_BELOW",{enumerable:!0,get:function(){return f.KEY}});var p=n(95);Object.defineProperty(t,"SEPARATOR",{enumerable:!0,get:function(){return p.KEY}});var g=n(315);Object.defineProperty(t,"UNDO",{enumerable:!0,get:function(){return g.KEY}}),t.predefinedItems=function(){var e={};return(0,v.objectEach)(P,(function(t,n){e[n]=t()})),e},t.addItem=function(e,t){-1===N.indexOf(e)&&(P[e]=t)};var v=n(1),y=M(r),m=M(i),w=M(a),C=M(s),b=M(l),E=M(u),S=M(c),O=M(h),T=M(d),_=M(f),R=M(p),k=M(g);function M(e){return e&&e.__esModule?e:{default:e}}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N=t.ITEMS=[d.KEY,f.KEY,a.KEY,s.KEY,i.KEY,h.KEY,c.KEY,g.KEY,u.KEY,l.KEY,r.KEY,p.KEY],P=(A(o={},p.KEY,R.default),A(o,d.KEY,T.default),A(o,f.KEY,_.default),A(o,a.KEY,w.default),A(o,s.KEY,C.default),A(o,i.KEY,m.default),A(o,h.KEY,O.default),A(o,c.KEY,S.default),A(o,g.KEY,k.default),A(o,u.KEY,E.default),A(o,l.KEY,b.default),A(o,r.KEY,y.default),o)},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=c(["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."],["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."]),i=c(["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."],["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."]),a=c(["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.']),s=c(["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.']),l=n(4),u=n(42);function c(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var h=function(){function e(t,n,o,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.row=t,this.col=n,this.rowspan=o,this.colspan=r,this.removed=!1}return o(e,[{key:"normalize",value:function(e){var t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col)}},{key:"includes",value:function(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}},{key:"includesHorizontally",value:function(e){return this.col<=e&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return this.row<=e&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,t){var n=e[0]||e[1],o=t+Math.abs(e[0]||e[1])-1,r=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,o),s=Math.max(t,o),l=this[i],u=this[i]+this[r]-1;if(l>=t&&(this[i]+=n),n>0)t<=u&&t>l&&(this[r]+=n);else if(n<0){if(a<=l&&s>=u)return this.removed=!0,!1;if(l>=a&&l<=s){var c=s-l+1,h=Math.abs(n)-c;this[i]-=h+n,this[r]-=c}else if(l<=a&&u>=s)this[r]+=n;else if(l<=a&&u>=a&&u<s){var d=u-a+1;this[r]-=d}}return!0}},{key:"isFarther",value:function(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return new l.CellRange(new l.CellCoords(this.row,this.col),new l.CellCoords(this.row,this.col),new l.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,u.toSingleLine)(r,e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,u.toSingleLine)(i,e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,u.toSingleLine)(a,e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,u.toSingleLine)(s,e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}},{key:"isSingleCell",value:function(e){return 1===e.colspan&&1===e.rowspan}},{key:"containsZeroSpan",value:function(e){return 0===e.colspan||0===e.rowspan}},{key:"isOutOfBounds",value:function(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}]),e}();t.default=h},function(e,t,n){"use strict";var o=n(99),r=n(45);e.exports=n(66)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=o.getEntry(r(this,"Map"),e);return t&&t.v},set:function(e,t){return o.def(r(this,"Map"),0===e?0:e,t)}},o,!0)},function(e,t,n){"use strict";var o=n(20).f,r=n(76),i=n(62),a=n(30),s=n(64),l=n(65),u=n(108),c=n(110),h=n(111),d=n(22),f=n(32).fastKey,p=n(45),g=d?"_s":"size",v=function(e,t){var n,o=f(t);if("F"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,o){s(e,c,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[g]=0,null!=o&&l(o,n,e[u],e)}));return i(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=p(this,t),o=v(n,e);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[g]--}return!!o},forEach:function(e){p(this,t);for(var n,o=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(p(this,t),e)}}),d&&o(c.prototype,"size",{get:function(){return p(this,t)[g]}}),c},def:function(e,t,n){var o,r,i=v(e,t);return i?i.v=n:(e._l=i={i:r=f(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[g]++,"F"!==r&&(e._i[r]=i)),e},getEntry:v,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=p(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))}),n?"entries":"values",!n,!0),h(t)}}},function(e,t,n){e.exports=!n(22)&&!n(23)((function(){return 7!=Object.defineProperty(n(74)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(27),r=n(24),i=n(102)(!1),a=n(78)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,u=[];for(n in s)n!=a&&o(s,n)&&u.push(n);for(;t.length>l;)o(s,n=t[l++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){var o=n(24),r=n(25),i=n(61);e.exports=function(e){return function(t,n,a){var s,l=o(t),u=r(l.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var o=n(15).document;e.exports=o&&o.documentElement},function(e,t,n){var o=n(18);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(52),r=n(12)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){var o=n(107),r=n(12)("iterator"),i=n(52);e.exports=n(37).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},function(e,t,n){var o=n(44),r=n(12)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:i?o(t):"Object"==(a=o(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var o=n(49),r=n(3),i=n(28),a=n(29),s=n(52),l=n(209),u=n(53),c=n(109),h=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,p,g,v,y){l(n,t,p);var m,w,C,b=function(e){if(!d&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",S="values"==g,O=!1,T=e.prototype,_=T[h]||T["@@iterator"]||g&&T[g],R=_||b(g),k=g?S?b("entries"):R:void 0,M="Array"==t&&T.entries||_;if(M&&(C=c(M.call(new e)))!==Object.prototype&&C.next&&(u(C,E,!0),o||"function"==typeof C[h]||a(C,h,f)),S&&_&&"values"!==_.name&&(O=!0,R=function(){return _.call(this)}),o&&!y||!d&&!O&&T[h]||a(T,h,R),s[t]=R,s[E]=f,g)if(m={values:S?R:b("values"),keys:v?R:b("keys"),entries:k},y)for(w in m)w in T||i(T,w,m[w]);else r(r.P+r.F*(d||O),t,m);return m}},function(e,t,n){var o=n(27),r=n(31),i=n(78)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var o=n(15),r=n(20),i=n(22),a=n(12)("species");e.exports=function(e){var t=o[e];i&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var o=n(9),r=n(18),i=function(e,t){if(r(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{(o=n(30)(Function.call,n(67).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var o=n(99),r=n(45);e.exports=n(66)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"Set"),e=0===e?0:e,e)}},o)},function(e,t,n){"use strict";var o,r=n(68)(0),i=n(28),a=n(32),s=n(116),l=n(117),u=n(9),c=n(23),h=n(45),d=a.getWeak,f=Object.isExtensible,p=l.ufstore,g={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(u(e)){var t=d(e);return!0===t?p(h(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(h(this,"WeakMap"),e,t)}},m=e.exports=n(66)("WeakMap",v,y,l,!0,!0);c((function(){return 7!=(new m).set((Object.freeze||Object)(g),7).get(g)}))&&(s((o=l.getConstructor(v,"WeakMap")).prototype,y),a.NEED=!0,r(["delete","has","get","set"],(function(e){var t=m.prototype,n=t[e];i(t,e,(function(t,r){if(u(t)&&!f(t)){this._f||(this._f=new o);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)}))})))},function(e,t,n){var o=n(44);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(35),r=n(69),i=n(54),a=n(31),s=n(77),l=Object.assign;e.exports=!l||n(23)((function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=o}))?function(e,t){for(var n=a(e),l=arguments.length,u=1,c=r.f,h=i.f;l>u;)for(var d,f=s(arguments[u++]),p=c?o(f).concat(c(f)):o(f),g=p.length,v=0;g>v;)h.call(f,d=p[v++])&&(n[d]=f[d]);return n}:l},function(e,t,n){"use strict";var o=n(62),r=n(32).getWeak,i=n(18),a=n(9),s=n(64),l=n(65),u=n(68),c=n(27),h=n(45),d=u(5),f=u(6),p=0,g=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return d(e.a,(function(e){return e[0]===t}))};v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var u=e((function(e,o){s(e,u,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=o&&l(o,n,e[i],e)}));return o(u.prototype,{delete:function(e){if(!a(e))return!1;var n=r(e);return!0===n?g(h(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=r(e);return!0===n?g(h(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var o=r(i(t),!0);return!0===o?g(e).set(t,n):o[e._i]=n,e},ufstore:g}},function(e,t,n){"use strict";var o=n(117),r=n(45);n(66)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"WeakSet"),e,!0)}},o,!1,!0)},function(e,t,n){"use strict";var o,r,i,a,s=n(49),l=n(15),u=n(30),c=n(107),h=n(3),d=n(9),f=n(63),p=n(64),g=n(65),v=n(213),y=n(82).set,m=n(215)(),w=n(120),C=n(216),b=n(83),E=n(217),S=l.TypeError,O=l.process,T=O&&O.versions,_=T&&T.v8||"",R=l.Promise,k="process"==c(O),M=function(){},A=r=w.f,N=!!function(){try{var e=R.resolve(1),t=(e.constructor={})[n(12)("species")]=function(e){e(M,M)};return(k||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof t&&0!==_.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},H=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var o=e._v,r=1==e._s,i=0,a=function(t){var n,i,a,s=r?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{s?(r||(2==e._h&&I(e),e._h=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),a=!0)),n===t.promise?u(S("Promise-chain cycle")):(i=P(n))?i.call(n,l,u):l(n)):u(o)}catch(e){c&&!a&&c.exit(),u(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){y.call(l,(function(){var t,n,o,r=e._v,i=D(e);if(i&&(t=C((function(){k?O.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",r)})),e._h=k||D(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},D=function(e){return 1!==e._h&&0===(e._a||e._c).length},I=function(e){y.call(l,(function(){var t;k?O.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},x=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),H(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=P(e))?m((function(){var o={_w:n,_d:!1};try{t.call(e,u(j,o,1),u(x,o,1))}catch(e){x.call(o,e)}})):(n._v=e,n._s=1,H(n,!1))}catch(e){x.call({_w:n,_d:!1},e)}}};N||(R=function(e){p(this,R,"Promise","_h"),f(e),o.call(this);try{e(u(j,this,1),u(x,this,1))}catch(e){x.call(this,e)}},(o=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(62)(R.prototype,{then:function(e,t){var n=A(v(this,R));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=k?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&H(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new o;this.promise=e,this.resolve=u(j,e,1),this.reject=u(x,e,1)},w.f=A=function(e){return e===R||e===a?new i(e):r(e)}),h(h.G+h.W+h.F*!N,{Promise:R}),n(53)(R,"Promise"),n(111)("Promise"),a=n(37).Promise,h(h.S+h.F*!N,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(s||!N),"Promise",{resolve:function(e){return E(s&&this===a?R:this,e)}}),h(h.S+h.F*!(N&&n(81)((function(e){R.all(e).catch(M)}))),"Promise",{all:function(e){var t=this,n=A(t),o=n.resolve,r=n.reject,i=C((function(){var n=[],i=0,a=1;g(e,!1,(function(e){var s=i++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||o(n))}),r)})),--a||o(n)}));return i.e&&r(i.v),n.promise},race:function(e){var t=this,n=A(t),o=n.reject,r=C((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,o)}))}));return r.e&&o(r.v),n.promise}})},function(e,t,n){"use strict";var o=n(63);function r(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(15),r=n(27),i=n(22),a=n(3),s=n(28),l=n(32).KEY,u=n(23),c=n(79),h=n(53),d=n(50),f=n(12),p=n(122),g=n(218),v=n(219),y=n(115),m=n(18),w=n(9),C=n(24),b=n(75),E=n(51),S=n(76),O=n(123),T=n(67),_=n(20),R=n(35),k=T.f,M=_.f,A=O.f,N=o.Symbol,P=o.JSON,H=P&&P.stringify,L=f("_hidden"),D=f("toPrimitive"),I={}.propertyIsEnumerable,x=c("symbol-registry"),j=c("symbols"),F=c("op-symbols"),B=Object.prototype,W="function"==typeof N,V=o.QObject,U=!V||!V.prototype||!V.prototype.findChild,z=i&&u((function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(e,t,n){var o=k(B,t);o&&delete B[t],M(e,t,n),o&&e!==B&&M(B,t,o)}:M,Y=function(e){var t=j[e]=S(N.prototype);return t._k=e,t},G=W&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},K=function(e,t,n){return e===B&&K(F,t,n),m(e),t=b(t,!0),m(n),r(j,t)?(n.enumerable?(r(e,L)&&e[L][t]&&(e[L][t]=!1),n=S(n,{enumerable:E(0,!1)})):(r(e,L)||M(e,L,E(1,{})),e[L][t]=!0),z(e,t,n)):M(e,t,n)},X=function(e,t){m(e);for(var n,o=v(t=C(t)),r=0,i=o.length;i>r;)K(e,n=o[r++],t[n]);return e},q=function(e){var t=I.call(this,e=b(e,!0));return!(this===B&&r(j,e)&&!r(F,e))&&(!(t||!r(this,e)||!r(j,e)||r(this,L)&&this[L][e])||t)},J=function(e,t){if(e=C(e),t=b(t,!0),e!==B||!r(j,t)||r(F,t)){var n=k(e,t);return!n||!r(j,t)||r(e,L)&&e[L][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=A(C(e)),o=[],i=0;n.length>i;)r(j,t=n[i++])||t==L||t==l||o.push(t);return o},Z=function(e){for(var t,n=e===B,o=A(n?F:C(e)),i=[],a=0;o.length>a;)!r(j,t=o[a++])||n&&!r(B,t)||i.push(j[t]);return i};W||(s((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(F,n),r(this,L)&&r(this[L],e)&&(this[L][e]=!1),z(this,e,E(1,n))};return i&&U&&z(B,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),T.f=J,_.f=K,n(84).f=O.f=Q,n(54).f=q,n(69).f=Z,i&&!n(49)&&s(B,"propertyIsEnumerable",q,!0),p.f=function(e){return Y(f(e))}),a(a.G+a.W+a.F*!W,{Symbol:N});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;$.length>ee;)f($[ee++]);for(var te=R(f.store),ne=0;te.length>ne;)g(te[ne++]);a(a.S+a.F*!W,"Symbol",{for:function(e){return r(x,e+="")?x[e]:x[e]=N(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in x)if(x[t]===e)return t},useSetter:function(){U=!0},useSimple:function(){U=!1}}),a(a.S+a.F*!W,"Object",{create:function(e,t){return void 0===t?S(e):X(S(e),t)},defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),P&&a(a.S+a.F*(!W||u((function(){var e=N();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(w(t)||void 0!==e)&&!G(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),o[1]=t,H.apply(P,o)}}),N.prototype[D]||n(29)(N.prototype,D,N.prototype.valueOf),h(N,"Symbol"),h(Math,"Math",!0),h(o.JSON,"JSON",!0)},function(e,t,n){t.f=n(12)},function(e,t,n){var o=n(24),r=n(84).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(o(e))}},function(e,t,n){var o=n(9),r=n(32).onFreeze;n(26)("freeze",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(9),r=n(32).onFreeze;n(26)("seal",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(9),r=n(32).onFreeze;n(26)("preventExtensions",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(9);n(26)("isFrozen",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(9);n(26)("isSealed",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(9);n(26)("isExtensible",(function(e){return function(t){return!!o(t)&&(!e||e(t))}}))},function(e,t,n){var o=n(24),r=n(67).f;n(26)("getOwnPropertyDescriptor",(function(){return function(e,t){return r(o(e),t)}}))},function(e,t,n){var o=n(31),r=n(109);n(26)("getPrototypeOf",(function(){return function(e){return r(o(e))}}))},function(e,t,n){var o=n(31),r=n(35);n(26)("keys",(function(){return function(e){return r(o(e))}}))},function(e,t,n){n(26)("getOwnPropertyNames",(function(){return n(123).f}))},function(e,t,n){var o=n(3);o(o.S+o.F,"Object",{assign:n(116)})},function(e,t,n){var o=n(3);o(o.S,"Object",{is:n(220)})},function(e,t,n){var o=n(3);o(o.S,"Object",{setPrototypeOf:n(112).set})},function(e,t,n){var o=n(20).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(22)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){var o=n(3),r=n(24),i=n(25);o(o.S,"String",{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<o&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){var o=n(3),r=n(61),i=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var o=n(3),r=n(221)(!1);o(o.P,"String",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){var o=n(3);o(o.P,"String",{repeat:n(142)})},function(e,t,n){"use strict";var o=n(60),r=n(36);e.exports=function(e){var t=String(r(this)),n="",i=o(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";var o=n(3),r=n(25),i=n(85),a="".startsWith;o(o.P+o.F*n(86)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return a?a.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){var o=n(9),r=n(44),i=n(12)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(3),r=n(25),i=n(85),a="".endsWith;o(o.P+o.F*n(86)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),s=void 0===n?o:Math.min(r(n),o),l=String(e);return a?a.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var o=n(3),r=n(85);o(o.P+o.F*n(86)("includes"),"String",{includes:function(e){return!!~r(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(22)&&"g"!=/./g.flags&&n(20).f(RegExp.prototype,"flags",{configurable:!0,get:n(222)})},function(e,t,n){n(70)("match",1,(function(e,t,n){return[function(n){"use strict";var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},n]}))},function(e,t,n){n(70)("replace",2,(function(e,t,n){return[function(o,r){"use strict";var i=e(this),a=null==o?void 0:o[t];return void 0!==a?a.call(o,i,r):n.call(String(i),o,r)},n]}))},function(e,t,n){n(70)("split",2,(function(e,t,o){"use strict";var r=n(144),i=o,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];o=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!r(e))return i.call(n,e,t);var o,l,u,c,h,d=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,g=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,f+"g");for(s||(o=new RegExp("^"+v.source+"$(?!\\s)",f));(l=v.exec(n))&&!((u=l.index+l[0].length)>p&&(d.push(n.slice(p,l.index)),!s&&l.length>1&&l[0].replace(o,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(l[h]=void 0)})),l.length>1&&l.index<n.length&&a.apply(d,l.slice(1)),c=l[0].length,p=u,d.length>=g));)v.lastIndex===l.index&&v.lastIndex++;return p===n.length?!c&&v.test("")||d.push(""):d.push(n.slice(p)),d.length>g?d.slice(0,g):d}}else"0".split(void 0,0).length&&(o=function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)});return[function(n,r){var i=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):o.call(String(i),n,r)},o]}))},function(e,t,n){n(70)("search",1,(function(e,t,n){return[function(n){"use strict";var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},n]}))},function(e,t,n){"use strict";var o=n(30),r=n(3),i=n(31),a=n(104),s=n(105),l=n(25),u=n(87),c=n(106);r(r.S+r.F*!n(81)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,h,d=i(e),f="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g,y=0,m=c(d);if(v&&(g=o(g,p>2?arguments[2]:void 0,2)),null==m||f==Array&&s(m))for(n=new f(t=l(d.length));t>y;y++)u(n,y,v?g(d[y],y):d[y]);else for(h=m.call(d),n=new f;!(r=h.next()).done;y++)u(n,y,v?a(h,g,[r.value,y],!0):r.value);return n.length=y,n}})},function(e,t,n){"use strict";var o=n(3),r=n(87);o(o.S+o.F*n(23)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){var o=n(3);o(o.P,"Array",{copyWithin:n(223)}),n(46)("copyWithin")},function(e,t,n){"use strict";var o=n(3),r=n(68)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),o(o.P+o.F*i,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("find")},function(e,t,n){"use strict";var o=n(3),r=n(68)(6),i="findIndex",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),o(o.P+o.F*a,"Array",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)(i)},function(e,t,n){var o=n(3);o(o.P,"Array",{fill:n(224)}),n(46)("fill")},function(e,t,n){var o=n(3),r=n(15).isFinite;o(o.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){var o=n(3);o(o.S,"Number",{isInteger:n(160)})},function(e,t,n){var o=n(9),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){var o=n(3),r=n(160),i=Math.abs;o(o.S,"Number",{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){var o=n(3);o(o.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(3);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(3);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(3);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";var o=n(3),r=n(102)(!0);o(o.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("includes")},function(e,t,n){var o=n(3),r=n(168)(!1);o(o.S,"Object",{values:function(e){return r(e)}})},function(e,t,n){var o=n(35),r=n(24),i=n(54).f;e.exports=function(e){return function(t){for(var n,a=r(t),s=o(a),l=s.length,u=0,c=[];l>u;)i.call(a,n=s[u++])&&c.push(e?[n,a[n]]:a[n]);return c}}},function(e,t,n){var o=n(3),r=n(168)(!0);o(o.S,"Object",{entries:function(e){return r(e)}})},function(e,t,n){var o=n(3),r=n(225),i=n(24),a=n(67),s=n(87);o(o.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),l=a.f,u=r(o),c={},h=0;u.length>h;)void 0!==(n=l(o,t=u[h++]))&&s(c,t,n);return c}})},function(e,t,n){"use strict";var o=n(3),r=n(172),i=n(83);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var o=n(25),r=n(142),i=n(36);e.exports=function(e,t,n,a){var s=String(i(e)),l=s.length,u=void 0===n?" ":String(n),c=o(t);if(c<=l||""==u)return s;var h=c-l,d=r.call(u,Math.ceil(h/u.length));return d.length>h&&(d=d.slice(0,h)),a?d+s:s+d}},function(e,t,n){"use strict";var o=n(3),r=n(172),i=n(83);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){var o=n(3),r=n(82);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(88),r=n(35),i=n(28),a=n(15),s=n(29),l=n(52),u=n(12),c=u("iterator"),h=u("toStringTag"),d=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=r(f),g=0;g<p.length;g++){var v,y=p[g],m=f[y],w=a[y],C=w&&w.prototype;if(C&&(C[c]||s(C,c,d),C[h]||s(C,h,y),l[y]=d,m))for(v in o)C[v]||i(C,v,o[v],!0)}},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=new WeakMap,i=function(){function e(t,n,o,i,a,s,l){var u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:function(e){return e};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.set(this,{viewportWidth:t,scrollOffset:n,totalColumns:o,columnWidthFn:i,overrideFn:a,onlyFullyVisible:s,stretchingColumnWidthFn:u}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=l,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}return o(e,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),o(e,[{key:"calculate",value:function(){for(var e=0,t=!0,n=[],o=void 0,i=r.get(this),a=i.onlyFullyVisible,s=i.overrideFn,l=i.scrollOffset,u=i.totalColumns,c=i.viewportWidth,h=0;h<u;h++)if(o=this._getColumnWidth(h),e<=l&&!a&&(this.startColumn=h),e>=l&&e+o<=l+(l>0?c+1:c)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=h),this.endColumn=h),n.push(e),e+=o,a||(this.endColumn=h),e>=l+c){t=!1;break}if(this.endColumn===u-1&&t)for(this.startColumn=this.endColumn;this.startColumn>0;){var d=n[this.endColumn]+o-n[this.startColumn-1];if((d<=c||!a)&&(this.startColumn-=1),d>c)break}null!==this.startColumn&&s&&s(this),this.startPosition=n[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}},{key:"refreshStretching",value:function(e){if("none"!==this.stretch){var t=e;this.totalTargetWidth=t;for(var n=r.get(this),o=n.totalColumns,i=0,a=0;a<o;a++){var s=this._getColumnWidth(a),l=n.stretchingColumnWidthFn(void 0,a);"number"==typeof l?t-=l:i+=s}var u=t-i;if("all"===this.stretch&&u>0)this.stretchAllRatio=t/i,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var c=this._getColumnWidth(o-1),h=u+c;this.stretchLastWidth=h>=0?h:c}}}},{key:"getStretchedColumnWidth",value:function(e,t){var n=null;return"all"===this.stretch&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}},{key:"_getStretchedAllColumnWidth",value:function(e,t){var n=0,o=r.get(this),i=o.totalColumns;if(!this.stretchAllColumnsWidth[e]){var a=Math.round(t*this.stretchAllRatio),s=o.stretchingColumnWidthFn(a,e);this.stretchAllColumnsWidth[e]=void 0===s?a:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===i&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var l=0;l<this.stretchAllColumnsWidth.length;l++)n+=this.stretchAllColumnsWidth[l];n!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-n)}return this.stretchAllColumnsWidth[e]}},{key:"_getStretchedLastColumnWidth",value:function(e){return e===r.get(this).totalColumns-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(t){var n=r.get(this).columnWidthFn(t);return isNaN(n)&&(n=e.DEFAULT_WIDTH),n}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=new WeakMap,i=function(){function e(t,n,o,i,a,s,l){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.set(this,{viewportHeight:t,scrollOffset:n,totalRows:o,rowHeightFn:i,overrideFn:a,onlyFullyVisible:s,horizontalScrollbarHeight:l}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()}return o(e,null,[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),o(e,[{key:"calculate",value:function(){for(var t=0,n=!0,o=[],i=r.get(this),a=i.onlyFullyVisible,s=i.overrideFn,l=i.rowHeightFn,u=i.scrollOffset,c=i.totalRows,h=i.viewportHeight,d=i.horizontalScrollbarHeight||0,f=void 0,p=0;p<c;p++)if(f=l(p),isNaN(f)&&(f=e.DEFAULT_HEIGHT),t<=u&&!a&&(this.startRow=p),t>=u&&t+f<=u+h-d&&(null===this.startRow&&(this.startRow=p),this.endRow=p),o.push(t),t+=f,a||(this.endRow=p),t>=u+h-d){n=!1;break}if(this.endRow===c-1&&n)for(this.startRow=this.endRow;this.startRow>0;){var g=o[this.endRow]+f-o[this.startRow-1];if((g<=h-d||!a)&&(this.startRow-=1),g>=h-d)break}null!==this.startRow&&s&&s(this),this.startPosition=o[this.startRow],void 0===this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(56),a=(o=i)&&o.__esModule?o:{default:o},s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.highlight=t,this.from=n,this.to=o}return r(e,[{key:"setHighlight",value:function(e){return this.highlight=e,this}},{key:"setFrom",value:function(e){return this.from=e,this}},{key:"setTo",value:function(e){return this.to=e,this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row===this.to.row&&this.from.col===this.to.col}},{key:"getHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"includes",value:function(e){var t=e.row,n=e.col,o=this.getTopLeftCorner(),r=this.getBottomRightCorner();return o.row<=t&&r.row>=t&&o.col<=n&&r.col>=n}},{key:"includesRange",value:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}},{key:"isEqual",value:function(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}},{key:"overlaps",value:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getTopRightCorner().col>=e.getTopLeftCorner().col&&this.getTopRightCorner().col<=e.getTopRightCorner().col||this.getTopLeftCorner().col<=e.getTopRightCorner().col&&this.getTopLeftCorner().col>=e.getTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getBottomRightCorner().row>=e.getTopRightCorner().row&&this.getBottomRightCorner().row<=e.getBottomRightCorner().row||this.getTopRightCorner().row<=e.getBottomRightCorner().row&&this.getTopRightCorner().row>=e.getTopRightCorner().row}},{key:"expand",value:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(e.row<t.row||e.col<t.col||e.row>n.row||e.col>n.col)&&(this.from=new a.default(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new a.default(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=this.getDirection(),r=e.getTopLeftCorner(),i=e.getBottomRightCorner(),s=Math.min(t.row,r.row),l=Math.min(t.col,r.col),u=Math.max(n.row,i.row),c=Math.max(n.col,i.col),h=new a.default(s,l),d=new a.default(u,c);return this.from=h,this.to=d,this.setDirection(o),this.highlight.row===this.getBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}},{key:"setDirection",value:function(e){switch(e){case"NW-SE":var t=[this.getTopLeftCorner(),this.getBottomRightCorner()];this.from=t[0],this.to=t[1];break;case"NE-SW":var n=[this.getTopRightCorner(),this.getBottomLeftCorner()];this.from=n[0],this.to=n[1];break;case"SE-NW":var o=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=o[0],this.to=o[1];break;case"SW-NE":var r=[this.getBottomLeftCorner(),this.getTopRightCorner()];this.from=r[0],this.to=r[1]}}},{key:"getVerticalDirection",value:function(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}},{key:"flipDirectionVertically",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}},{key:"flipDirectionHorizontally",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}},{key:"getTopLeftCorner",value:function(){return new a.default(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new a.default(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new a.default(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new a.default(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new a.default(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new a.default(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new a.default(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new a.default(t.to.row,t.to.col))))||e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner())}},{key:"getOppositeCorner",value:function(e,t){if(!(e instanceof a.default))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new a.default(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new a.default(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new a.default(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new a.default(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var t=Math.min(this.from.row,this.to.row),n=Math.max(this.from.row,this.to.row),o=Math.min(this.from.col,this.to.col),r=Math.max(this.from.col,this.to.col),i=Math.min(e.from.row,e.to.row),a=Math.max(e.from.row,e.to.row),s=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),u=[];return t===i&&u.push("top"),r===l&&u.push("right"),n===a&&u.push("bottom"),o===s&&u.push("left"),u}},{key:"getInner",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var r=e.col;r<=t.col;r++)this.from.row===o&&this.from.col===r||this.to.row===o&&this.to.col===r||n.push(new a.default(o,r));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var r=e.col;r<=t.col;r++)e.row===o&&e.col===r?n.push(e):t.row===o&&t.col===r?n.push(t):n.push(new a.default(o,r));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=t.row;o<=n.row;o++)for(var r=t.col;r<=n.col;r++)if(!1===e(o,r))return}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t,this.total=n,this.countTH=o}return o(e,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleRowHeadedColumnToSourceColumn",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceColumnToVisibleRowHeadedColumn",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),e}();t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t,this.total=n,this.countTH=o}return o(e,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleColHeadedRowToSourceRow",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceRowToVisibleColHeadedRow",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),e}();t.default=r},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=n(33),s=f(n(182)),l=f(n(183)),u=f(n(184)),c=f(n(185)),h=f(n(186)),d=f(n(188));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=[];if(this.guid="wt_"+(0,a.randomString)(),t.cloneSource?(this.cloneSource=t.cloneSource,this.cloneOverlay=t.cloneOverlay,this.wtSettings=t.cloneSource.wtSettings,this.wtTable=new h.default(this,t.table,t.wtRootElement),this.wtScroll=new u.default(this),this.wtViewport=t.cloneSource.wtViewport,this.wtEvent=new s.default(this),this.selections=this.cloneSource.selections):(this.wtSettings=new c.default(this,t),this.wtTable=new h.default(this,t.table),this.wtScroll=new u.default(this),this.wtViewport=new d.default(this),this.wtEvent=new s.default(this),this.selections=this.getSetting("selections"),this.wtOverlays=new l.default(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var o=0,i=this.wtTable.THEAD.childNodes[0].childNodes.length;o<i;o++)n.push(this.wtTable.THEAD.childNodes[0].childNodes[o].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,t){(0,r.fastInnerText)(t,n[e])}])}this.drawn=!1,this.drawInterrupted=!1}return o(e,[{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||(0,r.isVisible)(this.wtTable.TABLE)?this.wtTable.draw(e):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.wtTable.getCell(e);var n=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),r=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row<o&&e.col<i)return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<i&&e.row>=n-r){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<i)return this.wtOverlays.leftOverlay.clone.wtTable.getCell(e);if(e.row<n&&e.row>n-r&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}},{key:"update",value:function(e,t){return this.wtSettings.update(e,t)}},{key:"scrollViewport",value:function(e,t,n,o,r){return this.wtScroll.scrollViewport(e,t,n,o,r)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return this.wtScroll.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return this.wtScroll.scrollViewportVertically(e,t,n)}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"getOverlayName",value:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"}},{key:"isOverlayName",value:function(e){return!!this.cloneOverlay&&this.cloneOverlay.type===e}},{key:"exportSettingsAsClassNames",value:function(){var e=this,t=[],n=[];(0,i.objectEach)({rowHeaders:["array"],columnHeaders:["array"]},(function(o,r){o.indexOf("array")>-1&&e.getSetting(r).length&&n.push("ht"+(0,a.toUpperCaseFirst)(r)),t.push("ht"+(0,a.toUpperCaseFirst)(r))})),(0,r.removeClass)(this.wtTable.wtRootElement.parentNode,t),(0,r.addClass)(this.wtTable.wtRootElement.parentNode,n)}},{key:"getSetting",value:function(e,t,n,o,r){return this.wtSettings.getSetting(e,t,n,o,r)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}]),e}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(43),a=n(39),s=n(5),l=(o=s)&&o.__esModule?o:{default:o};function u(e){var t=this,n=new l.default(e),o=void 0;this.instance=e;var s=[null,null];this.dblClickTimeout=[null,null];var u=function(e){var n=document.activeElement,o=(0,i.partial)(r.getParent,e.realTarget),a=e.realTarget;if(a!==n&&o(0)!==n&&o(1)!==n){var l=t.parentCell(a);(0,r.hasClass)(a,"corner")?t.instance.getSetting("onCellCornerMouseDown",e,a):l.TD&&t.instance.hasSetting("onCellMouseDown")&&t.instance.getSetting("onCellMouseDown",e,l.coords,l.TD,t.instance),2!==e.button&&l.TD&&(s[0]=l.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout((function(){s[0]=null}),1e3))}},c=function(){t.instance.touchMoving=!0},h=function(e){n.addEventListener(this,"touchmove",c),t.checkIfTouchMove=setTimeout((function(){!0===t.instance.touchMoving&&(t.instance.touchMoving=void 0,n.removeEventListener("touchmove",c,!1)),u(e)}),30)},d=function(e){if(2!==e.button){var n=t.parentCell(e.realTarget);n.TD===s[0]&&n.TD===s[1]?((0,r.hasClass)(e.realTarget,"corner")?t.instance.getSetting("onCellCornerDblClick",e,n.coords,n.TD,t.instance):t.instance.getSetting("onCellDblClick",e,n.coords,n.TD,t.instance),s[0]=null,s[1]=null):n.TD===s[0]?(t.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,t.instance),s[1]=n.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout((function(){s[1]=null}),500)):n.TD&&t.instance.hasSetting("onCellMouseUp")&&t.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,t.instance)}},f=function(e){var n=e.target;!1!==function(e){var n=t.parentCell(e).coords;if(o&&n){var r=[n.row,o.from.row],i=r[0],a=r[1],s=[n.col,o.from.col];return i===a&&s[0]===s[1]}return!1}(n)&&!1!==["A","BUTTON","INPUT"].includes(n.tagName)||(e.preventDefault(),d(e))};if(n.addEventListener(this.instance.wtTable.holder,"mousedown",u),n.addEventListener(this.instance.wtTable.holder,"contextmenu",(function(e){if(t.instance.hasSetting("onCellContextMenu")){var n=t.parentCell(e.realTarget);n.TD&&t.instance.getSetting("onCellContextMenu",e,n.coords,n.TD,t.instance)}})),n.addEventListener(this.instance.wtTable.TABLE,"mouseover",(function(e){var n=void 0,o=void 0,i=void 0;t.instance.hasSetting("onCellMouseOver")&&(n=t.instance.wtTable.TABLE,o=(0,r.closestDown)(e.realTarget,["TD","TH"],n),i=t.instance.cloneSource||t.instance,o&&o!==i.lastMouseOver&&(0,r.isChildOf)(o,n)&&(i.lastMouseOver=o,t.instance.getSetting("onCellMouseOver",e,t.instance.wtTable.getCoords(o),o,t.instance)))})),n.addEventListener(this.instance.wtTable.TABLE,"mouseout",(function(e){var n=void 0,o=void 0,i=void 0;t.instance.hasSetting("onCellMouseOut")&&(n=t.instance.wtTable.TABLE,o=(0,r.closestDown)(e.realTarget,["TD","TH"],n),i=(0,r.closestDown)(e.relatedTarget,["TD","TH"],n),o&&o!==i&&(0,r.isChildOf)(o,n)&&t.instance.getSetting("onCellMouseOut",e,t.instance.wtTable.getCoords(o),o,t.instance))})),n.addEventListener(this.instance.wtTable.holder,"mouseup",d),this.instance.wtTable.holder.parentNode.parentNode&&(0,a.isMobileBrowser)()&&!t.instance.wtTable.isWorkingOnClone()){var p="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");n.addEventListener(this.instance.wtTable.holder,"touchstart",(function(n){o=e.selections.getCell().cellRange,t.instance.touchApplied=!0,(0,r.isChildOf)(n.target,p)&&h.call(n.target,n)})),n.addEventListener(this.instance.wtTable.holder,"touchend",(function(e){t.instance.touchApplied=!1,(0,r.isChildOf)(e.target,p)&&f.call(e.target,e)})),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),n.addEventListener(this.instance.wtTable.holder,"scroll",(function(){clearTimeout(t.instance.momentumScrolling._timeout),t.instance.momentumScrolling.ongoing||t.instance.getSetting("onBeforeTouchScroll"),t.instance.momentumScrolling.ongoing=!0,t.instance.momentumScrolling._timeout=setTimeout((function(){t.instance.touchApplied||(t.instance.momentumScrolling.ongoing=!1,t.instance.getSetting("onAfterMomentumScroll"))}),200)}))}n.addEventListener(window,"resize",(function(){"none"!==t.instance.getSetting("stretchH")&&t.instance.draw()})),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),n.destroy()}}u.prototype.parentCell=function(e){var t={},n=this.instance.wtTable.TABLE,o=(0,r.closestDown)(e,["TD","TH"],n);return o?(t.coords=this.instance.wtTable.getCoords(o),t.TD=o):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"current")?(t.coords=this.instance.selections.getCell().cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"area")&&this.instance.selections.createOrGetArea().cellRange&&(t.coords=this.instance.selections.createOrGetArea().cellRange.to,t.TD=this.instance.wtTable.getCell(t.coords)),t},t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=n(21),s=n(39),l=c(n(5)),u=c(n(41));function c(e){return e&&e.__esModule?e:{default:e}}var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=parseInt(getComputedStyle(document.body).lineHeight,10),o=1.2*parseInt(getComputedStyle(document.body).fontSize,10);this.wot=t,this.instance=this.wot,this.eventManager=new l.default(this.wot),this.wot.update("scrollbarWidth",(0,r.getScrollbarWidth)()),this.wot.update("scrollbarHeight",(0,r.getScrollbarWidth)()),this.scrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE),this.prepareOverlays(),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},bottom:{top:null,left:0},left:{top:0,left:null}},this.pendingScrollCallbacks={master:{top:0,left:0},top:{left:0},bottom:{left:0},left:{top:0}},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.delegatedScrollCallback=!1,this.registeredListeners=[],this.browserLineHeight=n||o,this.registerListeners()}return o(e,[{key:"prepareOverlays",value:function(){var e=!1;return this.topOverlay?e=this.topOverlay.updateStateOfRendering()||e:this.topOverlay=u.default.createOverlay(u.default.CLONE_TOP,this.wot),u.default.hasOverlay(u.default.CLONE_BOTTOM)||(this.bottomOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),u.default.hasOverlay(u.default.CLONE_BOTTOM_LEFT_CORNER)||(this.bottomLeftCornerOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),this.bottomOverlay?e=this.bottomOverlay.updateStateOfRendering()||e:this.bottomOverlay=u.default.createOverlay(u.default.CLONE_BOTTOM,this.wot),this.leftOverlay?e=this.leftOverlay.updateStateOfRendering()||e:this.leftOverlay=u.default.createOverlay(u.default.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay?e=this.topLeftCornerOverlay.updateStateOfRendering()||e:this.topLeftCornerOverlay=u.default.createOverlay(u.default.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.bottomLeftCornerOverlay?e=this.bottomLeftCornerOverlay.updateStateOfRendering()||e:this.bottomLeftCornerOverlay=u.default.createOverlay(u.default.CLONE_BOTTOM_LEFT_CORNER,this.wot)),this.wot.getSetting("debug")&&!this.debug&&(this.debug=u.default.createOverlay(u.default.CLONE_DEBUG,this.wot)),e}},{key:"refreshAll",value:function(){this.wot.drawn&&(this.wot.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.leftOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}},{key:"registerListeners",value:function(){var e=this,t=this.topOverlay.mainTableScrollableElement,n=this.leftOverlay.mainTableScrollableElement,o=[];for(o.push([document.documentElement,"keydown",function(t){return e.onKeyDown(t)}]),o.push([document.documentElement,"keyup",function(){return e.onKeyUp()}]),o.push([document,"visibilitychange",function(){return e.onKeyUp()}]),o.push([t,"scroll",function(t){return e.onTableScroll(t)}]),t!==n&&o.push([n,"scroll",function(t){return e.onTableScroll(t)}]),window.devicePixelRatio&&window.devicePixelRatio>1||!(0,s.isChrome)()?o.push([this.instance.wtTable.wtRootElement.parentNode,"wheel",function(t){return e.onCloneWheel(t)}]):(this.topOverlay.needFullRender&&o.push([this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomOverlay.needFullRender&&o.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.leftOverlay.needFullRender&&o.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&o.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&o.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}])),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&o.push([window,"wheel",function(t){var n=void 0,o=t.wheelDeltaY||t.deltaY,r=t.wheelDeltaX||t.deltaX;e.topOverlay.clone.wtTable.holder.contains(t.realTarget)?n="top":e.bottomOverlay.clone&&e.bottomOverlay.clone.wtTable.holder.contains(t.realTarget)?n="bottom":e.leftOverlay.clone.wtTable.holder.contains(t.realTarget)?n="left":e.topLeftCornerOverlay&&e.topLeftCornerOverlay.clone&&e.topLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)?n="topLeft":e.bottomLeftCornerOverlay&&e.bottomLeftCornerOverlay.clone&&e.bottomLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)&&(n="bottomLeft"),("top"===n&&0!==o||"left"===n&&0!==r||"bottom"===n&&0!==o||("topLeft"===n||"bottomLeft"===n)&&(0!==o||0!==r))&&t.preventDefault()}]);o.length;){var r=o.pop();this.eventManager.addEventListener(r[0],r[1],r[2]),this.registeredListeners.push(r)}}},{key:"deregisterListeners",value:function(){for(;this.registeredListeners.length;){var e=this.registeredListeners.pop();this.eventManager.removeEventListener(e[0],e[1],e[2])}}},{key:"onTableScroll",value:function(e){var t=this.leftOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,o=e.target;this.keyPressed&&(n!==window&&o!==window&&!e.target.contains(n)||t!==window&&o!==window&&!e.target.contains(t))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e){this.scrollableElement!==window&&e.preventDefault();var t=this.leftOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,o=e.target,r=n!==window&&o!==window&&!e.target.contains(n),i=t!==window&&o!==window&&!e.target.contains(t);this.keyPressed&&(r||i)||this.translateMouseWheelToScroll(e)}},{key:"onKeyDown",value:function(e){this.keyPressed=(0,a.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,n=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;return 1===e.deltaMode&&(n+=n*this.browserLineHeight,t+=t*this.browserLineHeight),this.scrollVertically(t),this.scrollHorizontally(n),!1}},{key:"scrollVertically",value:function(e){if(0===e)return 0;this.scrollableElement.scrollTop+=e}},{key:"scrollHorizontally",value:function(e){if(0===e)return 0;this.scrollableElement.scrollLeft+=e}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var e=this.topOverlay.clone.wtTable.holder,t=this.leftOverlay.clone.wtTable.holder,n=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],o=n[0],r=n[1];if(this.horizontalScrolling=e.scrollLeft!==o,this.verticalScrolling=t.scrollTop!==r,this.horizontalScrolling){e.scrollLeft=o;var i=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;i&&(i.scrollLeft=o)}this.verticalScrolling&&(t.scrollTop=r),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,t=e.scrollLeft,n=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement(),this.scrollableElement=(0,r.getScrollableElement)(this.wot.wtTable.TABLE),this.registerListeners()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,o=t.clientHeight;n===this.spreaderLastSize.width&&o===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,this.spreaderLastSize.height=o,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot.getSetting("totalColumns"),n=this.wot.getSetting("totalRows"),o=this.wot.wtViewport.getRowHeaderWidth(),r=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width=o+this.leftOverlay.sumCellSizes(0,t)+"px",i.height=r+this.topOverlay.sumCellSizes(0,n)+1+"px",this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.clone&&this.bottomOverlay.adjustElementsSize(e)}},{key:"applyToDOM",value:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{key:"getParentOverlay",value:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return(0,i.arrayEach)(t,(function(t){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)})),n}}]),e}();t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=t}return o(e,[{key:"scrollViewport",value:function(e,t,n,o,r){var i=this.scrollViewportHorizontally(e.col,n,r),a=this.scrollViewportVertically(e.row,t,o);return i||a}},{key:"scrollViewportHorizontally",value:function(e,t,n){if(!this.wot.drawn)return!1;var o=this._getVariables(),r=o.fixedColumnsLeft,i=o.leftOverlay,a=o.totalColumns,s=!1;return e>=0&&e<=Math.max(a-1,0)&&(e>=r&&(e<this.getFirstVisibleColumn()||n)?s=i.scrollTo(e):(e>this.getLastVisibleColumn()||t)&&(s=i.scrollTo(e,!0))),s}},{key:"scrollViewportVertically",value:function(e,t,n){if(!this.wot.drawn)return!1;var o=this._getVariables(),r=o.fixedRowsBottom,i=o.fixedRowsTop,a=o.topOverlay,s=o.totalRows,l=!1;return e>=0&&e<=Math.max(s-1,0)&&(e>=i&&(e<this.getFirstVisibleRow()||t)?l=a.scrollTo(e):(e>this.getLastVisibleRow()&&e<s-r||n)&&(l=a.scrollTo(e,!0))),l}},{key:"getFirstVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,o=e.wtViewport,a=e.totalRows,s=e.fixedRowsTop,l=n.getFirstVisibleRow();if(t.mainTableScrollableElement===window){var u=(0,r.offset)(n.wtRootElement),c=(0,r.innerHeight)(n.hider),h=(0,r.innerHeight)(window),d=(0,r.getScrollTop)(window);if(u.top+c-h<=d){var f=o.getColumnHeaderHeight();f+=t.sumCellSizes(0,s),(0,i.rangeEachReverse)(a,1,(function(e){if(f+=t.sumCellSizes(e-1,e),u.top+c-f<=d)return l=e,!1}))}}return l}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,o=e.wtViewport,a=e.totalRows,s=n.getLastVisibleRow();if(t.mainTableScrollableElement===window){var l=(0,r.offset)(n.wtRootElement),u=(0,r.innerHeight)(window),c=(0,r.getScrollTop)(window);if(l.top>c){var h=o.getColumnHeaderHeight();(0,i.rangeEach)(1,a,(function(e){if(h+=t.sumCellSizes(e-1,e),l.top+h-c>=u)return s=e-2,!1}))}}return s}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,o=e.wtViewport,a=e.totalColumns,s=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===window){var l=(0,r.offset)(n.wtRootElement),u=(0,r.innerWidth)(n.hider),c=(0,r.innerWidth)(window),h=(0,r.getScrollLeft)(window);if(l.left+u-c<=h){var d=o.getRowHeaderWidth();(0,i.rangeEachReverse)(a,1,(function(e){if(d+=t.sumCellSizes(e-1,e),l.left+u-d<=h)return s=e,!1}))}}return s}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,o=e.wtViewport,a=e.totalColumns,s=n.getLastVisibleColumn();if(t.mainTableScrollableElement===window){var l=(0,r.offset)(n.wtRootElement),u=(0,r.innerWidth)(window),c=(0,r.getScrollLeft)(window);if(l.left>c){var h=o.getRowHeaderWidth();(0,i.rangeEach)(1,a,(function(e){if(h+=t.sumCellSizes(e-1,e),l.left+h-c>=u)return s=e-2,!1}))}}return s}},{key:"_getVariables",value:function(){var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=t,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},data:void 0,freezeOverlays:!1,fixedColumnsLeft:0,fixedRowsTop:0,fixedRowsBottom:0,minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,n){var i=o.getSetting("data",e,t);(0,r.fastInnerText)(n,null==i?"":i)},columnWidth:function(){},rowHeight:function(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:function(e){return e},onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null},this.settings={},(0,i.objectEach)(this.defaults,(function(e,t){if(void 0!==n[t])o.settings[t]=n[t];else{if(void 0===e)throw new Error('A required setting "'+t+'" was not provided');o.settings[t]=e}}))}return o(e,[{key:"update",value:function(e,t){var n=this;return void 0===t?(0,i.objectEach)(e,(function(e,t){n.settings[t]=e})):this.settings[e]=t,this.wot}},{key:"getSetting",value:function(e,t,n,o,r){return"function"==typeof this.settings[e]?this.settings[e](t,n,o,r):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}},{key:"has",value:function(e){return!!this.settings[e]}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),s=n(43),l=f(n(56)),u=f(n(179)),c=f(n(180)),h=f(n(187)),d=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=this.wot,this.TABLE=n,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,(0,a.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var r=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return o._modifyRowHeaderWidth(r)}}return i(e,[{key:"fixTableDomTree",value:function(){this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=document.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=document.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=document.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(document.createElement("TR"))}},{key:"createSpreader",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,a.hasClass)(t,"wtHolder")||((n=document.createElement("div")).className="wtSpreader",t&&t.insertBefore(n,e),n.appendChild(e)),n.style.position="relative",n}},{key:"createHider",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,a.hasClass)(t,"wtHolder")||((n=document.createElement("div")).className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),n}},{key:"createHolder",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,a.hasClass)(t,"wtHolder")||((n=document.createElement("div")).style.position="relative",n.className="wtHolder",t&&t.insertBefore(n,e),this.isWorkingOnClone()||(n.parentNode.className+="ht_master handsontable"),n.appendChild(e)),n}},{key:"alignOverlaysWithTrimmingContainer",value:function(){var e=(0,a.getTrimmingContainer)(this.wtRootElement);this.isWorkingOnClone()||(this.holder.parentNode.style.position="relative",e===window?this.wot.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible"):(this.holder.style.width=(0,a.getStyle)(e,"width"),this.holder.style.height=(0,a.getStyle)(e,"height"),this.holder.style.overflow=""))}},{key:"isWorkingOnClone",value:function(){return!!this.wot.cloneSource}},{key:"draw",value:function(e){var t=this.wot,n=t.wtOverlays,o=t.wtViewport,r=this.instance.getSetting("totalRows"),i=this.wot.getSetting("rowHeaders").length,s=this.wot.getSetting("columnHeaders").length,l=!1,h=e;if(!this.isWorkingOnClone()&&(this.holderOffset=(0,a.offset)(this.holder),h=o.createRenderCalculators(h),i&&!this.wot.getSetting("fixedColumnsLeft"))){var f=n.leftOverlay.getScrollPosition(),p=this.correctHeaderWidth;this.correctHeaderWidth=f>0,p!==this.correctHeaderWidth&&(h=!1)}if(this.isWorkingOnClone()||(l=n.prepareOverlays()),h)this.isWorkingOnClone()||o.createVisibleCalculators(),n&&n.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.wot.cloneSource.wtTable.tableOffset:this.tableOffset=(0,a.offset)(this.TABLE);var g=void 0;g=d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_DEBUG)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_TOP)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_TOP_LEFT_CORNER)?0:d.default.isOverlayTypeOf(this.instance.cloneOverlay,d.default.CLONE_BOTTOM)||d.default.isOverlayTypeOf(this.instance.cloneOverlay,d.default.CLONE_BOTTOM_LEFT_CORNER)?Math.max(r-this.wot.getSetting("fixedRowsBottom"),0):o.rowsRenderCalculator.startRow;var v=void 0;v=d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_DEBUG)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_LEFT)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_TOP_LEFT_CORNER)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_BOTTOM_LEFT_CORNER)?0:o.columnsRenderCalculator.startColumn,this.rowFilter=new c.default(g,r,s),this.columnFilter=new u.default(v,this.wot.getSetting("totalColumns"),i),this.alignOverlaysWithTrimmingContainer(),this._doDraw()}return this.refreshSelections(h),this.isWorkingOnClone()||(n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&n.bottomOverlay.resetFixedPosition(),n.leftOverlay.resetFixedPosition(),n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition()),l&&n.syncScrollWithMaster(),this.wot.drawn=!0,this}},{key:"_doDraw",value:function(){new h.default(this).render()}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll("."+e),n=0,o=t.length;n<o;n++)(0,a.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){if(this.wot.selections){var t=Array.from(this.wot.selections),n=t.length;if(e){for(var o=[],r=0;r<n;r++){for(var i=t[r].settings,a=i.highlightHeaderClassName,s=i.highlightRowClassName,l=i.highlightColumnClassName,u=t[r].classNames,c=u.length,h=0;h<c;h++)o.includes(u[h])||o.push(u[h]);a&&!o.includes(a)&&o.push(a),s&&!o.includes(s)&&o.push(s),l&&!o.includes(l)&&o.push(l)}var d=this.wot.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(d))for(var f=0;f<d.length;f++)o.push(d[f]);for(var p=o.length,g=0;g<p;g++)this.removeClassFromCells(o[g])}for(var v=0;v<n;v++)t[v].draw(this.wot,e)}}},{key:"getCell",value:function(e){var t=e.row,n=e.col,o=this.wot.getSetting("onModifyGetCellCoords",t,n);if(o&&Array.isArray(o)){var i=r(o,2);t=i[0],n=i[1]}if(this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;var a=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)];return a?a.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)]:void 0}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];if(n)return n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getRowHeader",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,a.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,o=n.parentNode,r=(0,a.index)(n),i=t.cellIndex;return(0,a.overlayContainsElement)(d.default.CLONE_TOP_LEFT_CORNER,t)||(0,a.overlayContainsElement)(d.default.CLONE_TOP,t)?"THEAD"===o.nodeName&&(r-=o.childNodes.length):r=o===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(r):this.rowFilter.renderedToSource(r),i=(0,a.overlayContainsElement)(d.default.CLONE_TOP_LEFT_CORNER,t)||(0,a.overlayContainsElement)(d.default.CLONE_LEFT,t)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new l.default(r,i)}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"getFirstRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.startRow}},{key:"getFirstVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.startRow}},{key:"getFirstRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.startColumn}},{key:"getFirstVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.startColumn}},{key:"getLastRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.endRow}},{key:"getLastVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.endRow}},{key:"getLastRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.endColumn}},{key:"getLastVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.endColumn}},{key:"isRowBeforeRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)<0&&e>=0}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastVisibleColumn()}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"getRenderedColumnsCount",value:function(){var e=this.wot.wtViewport.columnsRenderCalculator.count,t=this.wot.getSetting("totalColumns");if(this.wot.isOverlayName(d.default.CLONE_DEBUG))e=t;else if(this.wot.isOverlayName(d.default.CLONE_LEFT)||this.wot.isOverlayName(d.default.CLONE_TOP_LEFT_CORNER)||this.wot.isOverlayName(d.default.CLONE_BOTTOM_LEFT_CORNER))return Math.min(this.wot.getSetting("fixedColumnsLeft"),t);return e}},{key:"getRenderedRowsCount",value:function(){var e=this.wot.wtViewport.rowsRenderCalculator.count,t=this.wot.getSetting("totalRows");return this.wot.isOverlayName(d.default.CLONE_DEBUG)?e=t:this.wot.isOverlayName(d.default.CLONE_TOP)||this.wot.isOverlayName(d.default.CLONE_TOP_LEFT_CORNER)?e=Math.min(this.wot.getSetting("fixedRowsTop"),t):(this.wot.isOverlayName(d.default.CLONE_BOTTOM)||this.wot.isOverlayName(d.default.CLONE_BOTTOM_LEFT_CORNER))&&(e=Math.min(this.wot.getSetting("fixedRowsBottom"),t)),e}},{key:"getVisibleRowsCount",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"getRowHeight",value:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),n=this.wot.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}},{key:"getColumnHeaderHeight",value:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,n=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}},{key:"getVisibleColumnsCount",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getColumnWidth",value:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"===(void 0===t?"undefined":o(t))&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getColumnWidth(e),n=null==t?this.instance.wtSettings.settings.defaultColumnWidth:t,o=this.wot.wtViewport.columnsRenderCalculator;if(o){var r=o.getStretchedColumnWidth(e,n);r&&(n=r)}return n}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,s.isFunction)(e)?e():null;return Array.isArray(t)?(t=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t)))[t.length-1]=this._correctRowHeaderWidth(t[t.length-1]):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){var t=e;return"number"!=typeof e&&(t=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}]),e}();t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=(o=['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number \n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.'],r=['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number \n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.'],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}}))),l=n(0),u=n(58),c=n(42),h=n(41),d=(i=h)&&i.__esModule?i:{default:i},f=!1,p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wtTable=t,this.wot=t.instance,this.instance=t.instance,this.rowFilter=t.rowFilter,this.columnFilter=t.columnFilter,this.TABLE=t.TABLE,this.THEAD=t.THEAD,this.TBODY=t.TBODY,this.COLGROUP=t.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0,this.fixedRowsBottom=0}return a(e,[{key:"render",value:function(){if(!this.wtTable.isWorkingOnClone()){var e={};if(this.wot.getSetting("beforeDraw",!0,e),!0===e.skipRender)return}this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.fixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var t=this.wtTable.getRenderedColumnsCount(),n=this.wtTable.getRenderedRowsCount(),o=this.wot.getSetting("totalColumns"),r=this.wot.getSetting("totalRows"),i=void 0,a=!1;if((d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_BOTTOM)||d.default.isOverlayTypeOf(this.wot.cloneOverlay,d.default.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),o>=0&&(this.adjustAvailableNodes(),a=!0,this.renderColumnHeaders(),this.renderRows(r,n,t),this.wtTable.isWorkingOnClone()||(i=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(t),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),a||this.adjustAvailableNodes(),this.removeRedundantRows(n),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(d.default.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(d.default.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var s=(0,l.outerWidth)(this.wtTable.hider),u=(0,l.outerWidth)(this.wtTable.TABLE);if(0!==s&&u!==s&&this.adjustColumnWidths(t),i!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var c=this.wtTable.getFirstRenderedColumn(),h=this.wtTable.getLastRenderedColumn(),f=this.wot.getSetting("defaultColumnWidth"),p=this.wot.getSetting("rowHeaderWidth");if(null!=(p=this.instance.getSetting("onModifyRowHeaderWidth",p)))for(var g=0;g<this.rowHeaderCount;g++){var v=Array.isArray(p)?p[g]:p;v=null==v?f:v,this.COLGROUP.childNodes[g].style.width=v+"px"}for(var y=c;y<h;y++){var m=this.wtTable.getStretchedColumnWidth(y),w=this.columnFilter.sourceToRendered(y);this.COLGROUP.childNodes[w+this.rowHeaderCount].style.width=m+"px"}}this.wot.getSetting("onDraw",!0)}}},{key:"removeRedundantRows",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}},{key:"renderRows",value:function(e,t,n){for(var o=void 0,r=0,i=this.rowFilter.renderedToSource(r),a=this.wtTable.isWorkingOnClone();i<e&&i>=0&&(!f&&r>1e3&&(f=!0,(0,u.warn)((0,c.toSingleLine)(s))),void 0===t||r!==t);){if(o=this.getOrCreateTrForRow(r,o),this.renderRowHeaders(i,o),this.adjustColumns(o,n+this.rowHeaderCount),this.renderCells(i,o,n),a&&!this.wot.isOverlayName(d.default.CLONE_BOTTOM)||this.resetOversizedRow(i),o.firstChild){var l=this.wot.wtTable.getRowHeight(i);l?(l-=1,o.firstChild.style.height=l+"px"):o.firstChild.style.height=""}r+=1,i=this.rowFilter.renderedToSource(r)}}},{key:"resetOversizedRow",value:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e=this.instance.wtTable.TBODY.childNodes.length,t=void 0,n=void 0,o=void 0,r=void 0,i=void 0;if(e*this.instance.wtSettings.settings.defaultRowHeight!=(0,l.innerHeight)(this.instance.wtTable.TBODY)-1||this.instance.getSetting("fixedRowsBottom"))for(;e;)e-=1,o=this.instance.wtTable.rowFilter.renderedToSource(e),t=this.instance.wtTable.getRowHeight(o),n=(i=(r=this.instance.wtTable.getTrForRow(o)).querySelector("th"))?(0,l.innerHeight)(i):(0,l.innerHeight)(r)-1,(!t&&this.instance.wtSettings.settings.defaultRowHeight<n||t<n)&&(n+=1,this.instance.wtViewport.oversizedRows[o]=n)}}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot.getOverlayName();if(this.columnHeaderCount&&!this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]&&!this.wtTable.isWorkingOnClone()){for(var t=this.wtTable.getRenderedColumnsCount(),n=0;n<this.columnHeaderCount;n++)for(var o=-1*this.rowHeaderCount;o<t;o++)this.markIfOversizedColumnHeader(o);this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]=!0}}},{key:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot.getSetting("columnHeaders"),t=this.wot.wtTable.THEAD.childNodes,n=this.wot.wtViewport.oversizedColumnHeaders,o=0,r=e.length;o<r;o++)if(n[o]){if(!t[o]||0===t[o].childNodes.length)return;t[o].childNodes[0].style.height=n[o]+"px"}}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t=this.wot.wtTable.columnFilter.renderedToSource(e),n=this.columnHeaderCount,o=this.wot.wtSettings.settings.defaultRowHeight,r=void 0,i=void 0,a=void 0,s=this.wot.getSetting("columnHeaderHeight")||[];n;)n-=1,r=this.wot.wtTable.getColumnHeaderHeight(n),(i=this.wot.wtTable.getColumnHeader(t,n))&&(a=(0,l.innerHeight)(i),(!r&&o<a||r<a)&&(this.wot.wtViewport.oversizedColumnHeaders[n]=a),Array.isArray(s)?null!==s[n]&&void 0!==s[n]&&(this.wot.wtViewport.oversizedColumnHeaders[n]=s[n]):isNaN(s)||(this.wot.wtViewport.oversizedColumnHeaders[n]=s),this.wot.wtViewport.oversizedColumnHeaders[n]<(s[n]||s)&&(this.wot.wtViewport.oversizedColumnHeaders[n]=s[n]||s))}},{key:"renderCells",value:function(e,t,n){for(var o=void 0,r=void 0,i=0;i<n;i++)r=this.columnFilter.renderedToSource(i),"TH"===(o=0===i?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)]:o.nextSibling).nodeName&&(o=v(o,t)),(0,l.hasClass)(o,"hide")||(o.className=""),o.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,r,o);return o}},{key:"adjustColumnWidths",value:function(e){var t=0,n=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=this.wot.getSetting("defaultColumnWidth"),r=this.wot.getSetting("rowHeaderWidth");if(n.offsetHeight<n.scrollHeight&&(t=(0,l.getScrollbarWidth)()),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t),null!=(r=this.instance.getSetting("onModifyRowHeaderWidth",r)))for(var i=0;i<this.rowHeaderCount;i++){var a=Array.isArray(r)?r[i]:r;a=null==a?o:a,this.COLGROUP.childNodes[i].style.width=a+"px"}for(var s=0;s<e;s++){var u=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(s));this.COLGROUP.childNodes[s+this.rowHeaderCount].style.width=u+"px"}}},{key:"appendToTbody",value:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength+=1}},{key:"getOrCreateTrForRow",value:function(e,t){var n=void 0;return e>=this.wtTable.tbodyChildrenLength?(n=this.createRow(),this.appendToTbody(n)):n=0===e?this.TBODY.firstChild:t.nextSibling,n.className&&n.removeAttribute("class"),n}},{key:"createRow",value:function(){for(var e=document.createElement("TR"),t=0;t<this.rowHeaderCount;t++)e.appendChild(document.createElement("TH"));return e}},{key:"renderRowHeader",value:function(e,t,n){n.className="",n.removeAttribute("style"),this.rowHeaders[t](e,n,t)}},{key:"renderRowHeaders",value:function(e,t){for(var n=t.firstChild,o=0;o<this.rowHeaderCount;o++)n?"TD"===n.nodeName&&(n=g(n,t)):(n=document.createElement("TH"),t.appendChild(n)),this.renderRowHeader(e,o,n),n=n.nextSibling}},{key:"adjustAvailableNodes",value:function(){this.adjustColGroups(),this.adjustThead()}},{key:"renderColumnHeaders",value:function(){if(this.columnHeaderCount)for(var e=this.wtTable.getRenderedColumnsCount(),t=0;t<this.columnHeaderCount;t++)for(var n=this.getTrForColumnHeaders(t),o=-1*this.rowHeaderCount;o<e;o++){var r=this.columnFilter.renderedToSource(o);this.renderColumnHeader(t,r,n.childNodes[o+this.rowHeaderCount])}}},{key:"adjustColGroups",value:function(){for(var e=this.wtTable.getRenderedColumnsCount();this.wtTable.colgroupChildrenLength<e+this.rowHeaderCount;)this.COLGROUP.appendChild(document.createElement("COL")),this.wtTable.colgroupChildrenLength+=1;for(;this.wtTable.colgroupChildrenLength>e+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength-=1;this.rowHeaderCount&&(0,l.addClass)(this.COLGROUP.childNodes[0],"rowHeader")}},{key:"adjustThead",value:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var n=0,o=this.columnHeaders.length;n<o;n++){for((t=this.THEAD.childNodes[n])||(t=document.createElement("TR"),this.THEAD.appendChild(t)),this.theadChildrenLength=t.childNodes.length;this.theadChildrenLength<e+this.rowHeaderCount;)t.appendChild(document.createElement("TH")),this.theadChildrenLength+=1;for(;this.theadChildrenLength>e+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength-=1}var r=this.THEAD.childNodes.length;if(r>this.columnHeaders.length)for(var i=this.columnHeaders.length;i<r;i++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&(0,l.empty)(t)}},{key:"getTrForColumnHeaders",value:function(e){return this.THEAD.childNodes[e]}},{key:"renderColumnHeader",value:function(e,t,n){return n.className="",n.removeAttribute("style"),this.columnHeaders[e](t,n,e)}},{key:"adjustColumns",value:function(e,t){for(var n=e.childNodes.length;n<t;){var o=document.createElement("TD");e.appendChild(o),n+=1}for(;n>t;)e.removeChild(e.lastChild),n-=1}},{key:"removeRedundantColumns",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}}]),e}();function g(e,t){var n=document.createElement("TH");return t.insertBefore(n,e),t.removeChild(e),n}function v(e,t){var n=document.createElement("TD");return t.insertBefore(n,e),t.removeChild(e),n}t.default=p},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(1),a=u(n(5)),s=u(n(176)),l=u(n(177));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wot=t,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new a.default(this.wot),this.eventManager.addEventListener(window,"resize",(function(){n.clientHeight=n.getWorkspaceHeight()}))}return o(e,[{key:"getWorkspaceHeight",value:function(){var e=this.instance.wtOverlays.topOverlay.trimmingContainer;return e===window?document.documentElement.clientHeight:(0,r.outerHeight)(e)>0&&e.clientHeight>0?e.clientHeight:1/0}},{key:"getWorkspaceWidth",value:function(){var e=void 0,t=this.wot.getSetting("totalColumns"),n=this.instance.wtOverlays.leftOverlay.trimmingContainer,o=void 0,i=this.wot.getSetting("stretchH"),a=document.documentElement.offsetWidth;return this.wot.getSetting("preventOverflow")?(0,r.outerWidth)(this.instance.wtTable.wtRootElement):(e=this.wot.getSetting("freezeOverlays")?Math.min(a-this.getWorkspaceOffset().left,a):Math.min(this.getContainerFillWidth(),a-this.getWorkspaceOffset().left,a),n===window&&t>0&&this.sumColumnWidths(0,t-1)>e?document.documentElement.clientWidth:n===window||"scroll"!==(o=(0,r.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"))&&"hidden"!==o&&"auto"!==o?"none"!==i&&i?e:Math.max(e,(0,r.outerWidth)(this.instance.wtTable.TABLE)):Math.max(e,n.clientWidth))}},{key:"hasVerticalScroll",value:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(e,t){for(var n=this.wot.wtTable,o=0,r=e;r<t;)o+=n.getColumnWidth(r),r+=1;return o}},{key:"getContainerFillWidth",value:function(){if(this.containerWidth)return this.containerWidth;var e=this.instance.wtTable.holder,t=document.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);var n=t.offsetWidth;return this.containerWidth=n,e.removeChild(t),n}},{key:"getWorkspaceOffset",value:function(){return(0,r.offset)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualHeight",value:function(){return(0,r.outerHeight)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualWidth",value:function(){return(0,r.outerWidth)(this.wot.wtTable.TABLE)||(0,r.outerWidth)(this.wot.wtTable.TBODY)||(0,r.outerWidth)(this.wot.wtTable.THEAD)}},{key:"getColumnHeaderHeight",value:function(){return isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,r.outerHeight)(this.wot.wtTable.THEAD)),this.columnHeaderHeight}},{key:"getViewportHeight",value:function(){var e=this.getWorkspaceHeight();if(e===1/0)return e;var t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var n=0,o=t.length;n<o;n++)this.rowHeaderWidth+=e[n]||e}if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth))if(t.length){var i=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var a=0,s=t.length;a<s;a++)i?(this.rowHeaderWidth+=(0,r.outerWidth)(i),i=i.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.instance.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}},{key:"getViewportWidth",value:function(){var e=this.getWorkspaceWidth();if(e===1/0)return e;var t=this.getRowHeaderWidth();return t>0?e-t:e}},{key:"createRowsCalculator",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=void 0,o=void 0,i=void 0;this.rowHeaderWidth=NaN,n=this.wot.wtSettings.settings.renderAllRows&&!t?1/0:this.getViewportHeight();var a=this.wot.wtOverlays.topOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset();a<0&&(a=0);var s=this.wot.getSetting("fixedRowsTop"),u=this.wot.getSetting("fixedRowsBottom"),c=this.wot.getSetting("totalRows");return s&&(a+=i=this.wot.wtOverlays.topOverlay.sumCellSizes(0,s),n-=i),u&&this.wot.wtOverlays.bottomOverlay.clone&&(n-=i=this.wot.wtOverlays.bottomOverlay.sumCellSizes(c-u,c)),o=this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight?0:(0,r.getScrollbarWidth)(),new l.default(n,a,this.wot.getSetting("totalRows"),(function(t){return e.wot.wtTable.getRowHeight(t)}),t?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,t,o)}},{key:"createColumnsCalculator",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getViewportWidth(),o=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,o<0&&(o=0);var i=this.wot.getSetting("fixedColumnsLeft");if(i){var a=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,i);o+=a,n-=a}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(n-=(0,r.getScrollbarWidth)()),new s.default(n,o,this.wot.getSetting("totalColumns"),(function(t){return e.wot.wtTable.getColumnWidth(t)}),t?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,t,this.wot.getSetting("stretchH"),(function(t,n){return e.wot.getSetting("onBeforeStretchingColumnWidth",t,n)}))}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e;if(t){var n=this.createRowsCalculator(!0),o=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(n)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(t=!1)}return t||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,t}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){return!(!this.rowsVisibleCalculator||e.startRow<this.rowsRenderCalculator.startRow||e.startRow===this.rowsRenderCalculator.startRow&&e.startRow>0||e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1)}},{key:"areAllProposedVisibleColumnsAlreadyRendered",value:function(e){return!(!this.columnsVisibleCalculator||e.startColumn<this.columnsRenderCalculator.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&e.startColumn>0||e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1)}},{key:"resetHasOversizedColumnHeadersMarked",value:function(){(0,i.objectEach)(this.hasOversizedColumnHeadersMarked,(function(e,t,n){n[t]=void 0}))}}]),e}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(13),s=n(1),l=n(39),u=h(n(5)),c=h(n(56));function h(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&(this.eventManager=new u.default(t),this.instance=t,this.wot=t,this.settings=n,this.mouseDown=!1,this.main=null,this.top=null,this.left=null,this.bottom=null,this.right=null,this.topStyle=null,this.leftStyle=null,this.bottomStyle=null,this.rightStyle=null,this.cornerDefaultStyle={width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(n),this.registerListeners())}return r(e,[{key:"registerListeners",value:function(){var e=this;this.eventManager.addEventListener(document.body,"mousedown",(function(){return e.onMouseDown()})),this.eventManager.addEventListener(document.body,"mouseup",(function(){return e.onMouseUp()}));for(var t=function(t,n){e.eventManager.addEventListener(e.main.childNodes[t],"mouseenter",(function(n){return e.onMouseEnter(n,e.main.childNodes[t])}))},n=0,o=this.main.childNodes.length;n<o;n++)t(n)}},{key:"onMouseDown",value:function(){this.mouseDown=!0}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onMouseEnter",value:function(e,t){if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),(0,a.stopImmediatePropagation)(e);var n=this,o=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",(function e(r){var i;((i=r).clientY<Math.floor(o.top)||i.clientY>Math.ceil(o.top+o.height)||i.clientX<Math.floor(o.left)||i.clientX>Math.ceil(o.left+o.width))&&(n.eventManager.removeEventListener(document.body,"mousemove",e),t.style.display="block")}))}}},{key:"createBorders",value:function(e){this.main=document.createElement("div");var t=["top","left","bottom","right","corner"],n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(var o=0;o<5;o++){var r=t[o],i=document.createElement("div");i.className="wtBorder "+(this.settings.className||""),this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),(n=i.style).backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,n.height=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",n.width=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",this.main.appendChild(i)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,l.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();var a=this.wot.wtTable.bordersHolder;a||((a=document.createElement("div")).className="htBorders",this.wot.wtTable.bordersHolder=a,this.wot.wtTable.spreader.appendChild(a)),a.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var e=this;this.selectionHandles={topLeft:document.createElement("DIV"),topLeftHitArea:document.createElement("DIV"),bottomRight:document.createElement("DIV"),bottomRightHitArea:document.createElement("DIV")},this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var t={position:"absolute",height:"40px",width:"40px","border-radius":parseInt(40/1.5,10)+"px"};(0,s.objectEach)(t,(function(t,n){e.selectionHandles.styles.bottomRightHitArea[n]=t,e.selectionHandles.styles.topLeftHitArea[n]=t}));var n={position:"absolute",height:"10px",width:"10px","border-radius":parseInt(10/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};(0,s.objectEach)(n,(function(t,n){e.selectionHandles.styles.bottomRight[n]=t,e.selectionHandles.styles.topLeft[n]=t})),this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)}},{key:"isPartRange",value:function(e,t){var n=this.wot.selections.createOrGetArea();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,t,n,o,r,i){var a=parseInt(this.selectionHandles.styles.topLeft.width,10),s=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(n-a,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(o-a,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(n-s/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(o-s/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(n+i,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(o+r,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(n+i-s/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(o+r-s/4,10)+"px",this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")}},{key:"appear",value:function(e){if(!this.disabled){for(var t=void 0,n=void 0,r=void 0,a=void 0,s=this.wot.wtTable.getRenderedRowsCount(),u=0;u<s;u+=1){var h=this.wot.wtTable.rowFilter.renderedToSource(u);if(h>=e[0]&&h<=e[2]){t=h;break}}for(var d=s-1;d>=0;d-=1){var f=this.wot.wtTable.rowFilter.renderedToSource(d);if(f>=e[0]&&f<=e[2]){n=f;break}}for(var p=this.wot.wtTable.getRenderedColumnsCount(),g=0;g<p;g+=1){var v=this.wot.wtTable.columnFilter.renderedToSource(g);if(v>=e[1]&&v<=e[3]){r=v;break}}for(var y=p-1;y>=0;y-=1){var m=this.wot.wtTable.columnFilter.renderedToSource(y);if(m>=e[1]&&m<=e[3]){a=m;break}}if(void 0!==t&&void 0!==r){var w=this.wot.wtTable.getCell(new c.default(t,r)),C=t!==n||r!==a,b=C?this.wot.wtTable.getCell(new c.default(n,a)):w,E=(0,i.offset)(w),S=C?(0,i.offset)(b):E,O=(0,i.offset)(this.wot.wtTable.TABLE),T=E.top,_=E.left,R=_-O.left-1,k=S.left+(0,i.outerWidth)(b)-_;if(this.isEntireColumnSelected(t,n)){var M=this.getDimensionsFromHeader("columns",r,a,O),A=null;if(M){var N=o(M,3);A=N[0],R=N[1],k=N[2]}A&&(w=A)}var P=T-O.top-1,H=S.top+(0,i.outerHeight)(b)-T;if(this.isEntireRowSelected(r,a)){var L=this.getDimensionsFromHeader("rows",t,n,O),D=null;if(L){var I=o(L,3);D=I[0],P=I[1],H=I[2]}D&&(w=D)}var x=(0,i.getComputedStyle)(w);parseInt(x.borderTopWidth,10)>0&&(P+=1,H=H>0?H-1:0),parseInt(x.borderLeftWidth,10)>0&&(R+=1,k=k>0?k-1:0),this.topStyle.top=P+"px",this.topStyle.left=R+"px",this.topStyle.width=k+"px",this.topStyle.display="block",this.leftStyle.top=P+"px",this.leftStyle.left=R+"px",this.leftStyle.height=H+"px",this.leftStyle.display="block";var j=Math.floor(this.settings.border.width/2);this.bottomStyle.top=P+H-j+"px",this.bottomStyle.left=R+"px",this.bottomStyle.width=k+"px",this.bottomStyle.display="block",this.rightStyle.top=P+"px",this.rightStyle.left=R+k-j+"px",this.rightStyle.height=H+1+"px",this.rightStyle.display="block";var F=this.settings.border.cornerVisible;F="function"==typeof F?F(this.settings.layerLevel):F;var B=this.wot.getSetting("onModifyGetCellCoords",n,a),W=n,V=a;if(B&&Array.isArray(B)){var U=o(B,4);W=U[2],V=U[3]}if((0,l.isMobileBrowser)()||!F||this.isPartRange(W,V))this.cornerStyle.display="none";else{this.cornerStyle.top=P+H-4+"px",this.cornerStyle.left=R+k-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var z=(0,i.getTrimmingContainer)(this.wot.wtTable.TABLE),Y=z===window;Y&&(z=document.documentElement),a===this.wot.getSetting("totalColumns")-1&&(Y?b.getBoundingClientRect().left:b.offsetLeft)+(0,i.outerWidth)(b)+parseInt(this.cornerDefaultStyle.width,10)/2>=(0,i.innerWidth)(z)&&(this.cornerStyle.left=Math.floor(R+k-3-parseInt(this.cornerDefaultStyle.width,10)/2)+"px",this.cornerStyle.borderRightWidth=0),n===this.wot.getSetting("totalRows")-1&&(Y?b.getBoundingClientRect().top:b.offsetTop)+(0,i.outerHeight)(b)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,i.innerHeight)(z)&&(this.cornerStyle.top=Math.floor(P+H-3-parseInt(this.cornerDefaultStyle.height,10)/2)+"px",this.cornerStyle.borderBottomWidth=0),this.cornerStyle.display="block"}(0,l.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,a,P,R,k,H)}else this.disappear()}}},{key:"isEntireColumnSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,t,n,o){var r=this,a=this.wot.wtTable.wtRootElement.parentNode,s=null,l=null,u=null,c=null,h=null,d=null,f=null,p=null;switch(e){case"rows":s=function(){var e;return(e=r.wot.wtTable).getRowHeader.apply(e,arguments)},l=function(){return i.outerHeight.apply(void 0,arguments)},u="ht__selection--rows",d="top";break;case"columns":s=function(){var e;return(e=r.wot.wtTable).getColumnHeader.apply(e,arguments)},l=function(){return i.outerWidth.apply(void 0,arguments)},u="ht__selection--columns",d="left"}if(a.className.includes(u)){var g=this.wot.getSetting("columnHeaders").length;if(f=s(t,g-1),p=s(n,g-1),!f||!p)return!1;var v=(0,i.offset)(f),y=(0,i.offset)(p);return f&&p&&(c=v[d]-o[d]-1,h=y[d]+l(p)-v[d]),[f,c,h]}return!1}},{key:"changeBorderStyle",value:function(e,t){var n=this[e].style,o=t[e];!o||o.hide?(0,i.addClass)(this[e],"hidden"):((0,i.hasClass)(this[e],"hidden")&&(0,i.removeClass)(this[e],"hidden"),n.backgroundColor=o.color,"top"!==e&&"bottom"!==e||(n.height=o.width+"px"),"right"!==e&&"left"!==e||(n.width=o.width+"px"))}},{key:"changeBorderToDefaultStyle",value:function(e){var t=1,n="#000",o=this[e].style;o.backgroundColor=n,o.width=t+"px",o.height=t+"px"}},{key:"toggleHiddenClass",value:function(e,t){this.changeBorderToDefaultStyle(e),t?(0,i.addClass)(this[e],"hidden"):(0,i.removeClass)(this[e],"hidden")}},{key:"disappear",value:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",(0,l.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}}]),e}();t.default=d},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(21),i=n(11),a=n(33),s=n(2),l=n(0),u=n(191),c=(o=u)&&o.__esModule?o:{default:o},h=c.default.prototype.extend();h.prototype.init=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.init.apply(this,t),this.query=null,this.strippedChoices=[],this.rawChoices=[]},h.prototype.getValue=function(){var e=this,t=this.rawChoices.find((function(t){return e.stripValueIfNeeded(t)===e.TEXTAREA.value}));return(0,i.isDefined)(t)?t:this.TEXTAREA.value},h.prototype.createElements=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.createElements.apply(this,t),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===window.navigator.platform.indexOf("Mac")?"":"htMacScroll")};var d=!1;function f(e){d=!1;var t=this.getActiveEditor();if((0,r.isPrintableChar)(e.keyCode)||e.keyCode===r.KEY_CODES.BACKSPACE||e.keyCode===r.KEY_CODES.DELETE||e.keyCode===r.KEY_CODES.INSERT){var n=0;if(e.keyCode===r.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;t.isOpened()||(n+=10),t.htEditor&&t.instance._registerTimeout((function(){t.queryChoices(t.TEXTAREA.value),d=!0}),n)}}h.prototype.prepare=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.prepare.apply(this,t)},h.prototype.open=function(){this.instance.addHook("beforeKeyDown",f),this.TEXTAREA_PARENT.style.overflow="auto";for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.open.apply(this,t),this.TEXTAREA_PARENT.style.overflow="";var o=this.htEditor.getInstance(),r=this,a=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus(),o.updateSettings({colWidths:a?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:a?(0,l.outerWidth)(this.TEXTAREA)+(0,l.getScrollbarWidth)()+2:void 0,afterRenderer:function(e,t,n,o,a){var s=r.cellProperties,l=s.filteringCaseSensitive,u=s.allowHtml,c=(0,i.stringify)(a),h=void 0,d=void 0;c&&!u&&-1!==(h=!0===l?c.indexOf(this.query):c.toLowerCase().indexOf(r.query.toLowerCase()))&&(d=c.substr(h,r.query.length),c=c.replace(d,"<strong>"+d+"</strong>")),e.innerHTML=c},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize").widths,o=e;return n[t]&&(o=n[t]),a?o:o+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=(0,l.getScrollbarWidth)()+2+"px",d&&(d=!1),r.instance._registerTimeout((function(){r.queryChoices(r.TEXTAREA.value)}))},h.prototype.queryChoices=function(e){var t=this;this.query=e;var n=this.cellProperties.source;"function"==typeof n?n.call(this.cellProperties,e,(function(e){t.rawChoices=e,t.updateChoicesList(t.stripValuesIfNeeded(e))})):Array.isArray(n)?(this.rawChoices=n,this.updateChoicesList(this.stripValuesIfNeeded(n))):this.updateChoicesList([])},h.prototype.updateChoicesList=function(e){var t=(0,l.getCaretPosition)(this.TEXTAREA),n=(0,l.getSelectionEndPosition)(this.TEXTAREA),o=this.cellProperties.sortByRelevance,r=this.cellProperties.filter,i=null,a=null,u=e;o&&(i=h.sortByRelevance(this.stripValueIfNeeded(this.getValue()),u,this.cellProperties.filteringCaseSensitive));var c=Array.isArray(i)?i.length:0;if(!1===r)c&&(a=i[0]);else{for(var d=[],f=0,p=u.length;f<p&&!(o&&c<=f);f++)c?d.push(u[i[f]]):d.push(u[f]);a=0,u=d}this.strippedChoices=u,this.htEditor.loadData((0,s.pivot)([u])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a),this.instance.listen(!1),(0,l.setCaretPosition)(this.TEXTAREA,t,t===n?void 0:n)},h.prototype.flipDropdownIfNeeded=function(){var e=(0,l.offset)(this.TEXTAREA),t=(0,l.outerHeight)(this.TEXTAREA),n=this.getDropdownHeight(),o=(0,l.getTrimmingContainer)(this.instance.view.wt.wtTable.TABLE),r=o.scrollTop,i=(0,l.outerHeight)(this.instance.view.wt.wtTable.THEAD),a={row:0,col:0};o!==window&&(a=(0,l.offset)(o));var s=e.top-a.top-i+r,u=o.scrollHeight-s-i-t,c=n>u&&s>u;return c?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(c?s:u,n),c},h.prototype.limitDropdownIfNeeded=function(e,t){if(t>e){var n,o=0,r=0,i=0;do{o+=i=this.htEditor.getRowHeight(r)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,r+=1}while(o<e);n=o-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-n+"px"),this.setDropdownHeight(o-i)}},h.prototype.flipDropdown=function(e){var t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0},h.prototype.unflipDropdown=function(){var e=this.htEditor.rootElement.style;"absolute"===e.position&&(e.position="",e.top=""),this.htEditor.flipped=void 0},h.prototype.updateDropdownHeight=function(){var e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)()+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},h.prototype.setDropdownHeight=function(e){this.htEditor.updateSettings({height:e})},h.prototype.finishEditing=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];c.default.prototype.finishEditing.apply(this,[e].concat(n))},h.prototype.highlightBestMatchingChoice=function(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()},h.sortByRelevance=function(e,t,n){var o=[],r=void 0,s=e.length,l=void 0,u=void 0,c=[],h=void 0,d=t.length;if(0===s){for(h=0;h<d;h++)c.push(h);return c}for(h=0;h<d;h++)r=(0,a.stripTags)((0,i.stringify)(t[h])),-1!==(l=n?r.indexOf(e):r.toLowerCase().indexOf(e.toLowerCase()))&&(u=r.length-l-s,o.push({baseIndex:h,index:l,charsLeft:u,value:r}));for(o.sort((function(e,t){if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),h=0,d=o.length;h<d;h++)c.push(o[h].baseIndex);return c},h.prototype.getDropdownHeight=function(){var e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8},h.prototype.stripValueIfNeeded=function(e){return this.stripValuesIfNeeded([e])[0]},h.prototype.stripValuesIfNeeded=function(e){var t=this.cellProperties.allowHtml,n=(0,s.arrayMap)(e,(function(e){return(0,i.stringify)(e)}));return(0,s.arrayMap)(n,(function(e){return t?e:(0,a.stripTags)(e)}))},h.prototype.allowKeyEventPropagation=function(e){var t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1,o=!1;return e===r.KEY_CODES.ARROW_DOWN&&n>0&&n<this.htEditor.countRows()-1&&(o=!0),e===r.KEY_CODES.ARROW_UP&&n>-1&&(o=!0),o},h.prototype.close=function(){this.instance.removeHook("beforeKeyDown",f);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.close.apply(this,t)},h.prototype.discardEditor=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];c.default.prototype.discardEditor.apply(this,t),this.instance.view.render()},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(21),i=n(1),a=n(0),s=n(13),l=n(59),u=(o=l)&&o.__esModule?o:{default:o},c=u.default.prototype.extend();c.prototype.createElements=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.createElements.apply(this,t);var o=document.createElement("DIV");o.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(o),this.htContainer=o,this.assignHooks()},c.prototype.prepare=function(e,t,n,o,r,a){for(var s=arguments.length,l=Array(s>6?s-6:0),c=6;c<s;c++)l[c-6]=arguments[c];u.default.prototype.prepare.apply(this,[e,t,n,o,r,a].concat(l));var h=this,d={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown:function(e,t){var n=this.getSourceData(t.row,t.col);void 0!==n&&h.setValue(n),h.instance.destroyEditor()}};this.cellProperties.handsontable&&(0,i.extend)(d,a.handsontable),this.htOptions=d};var h=function(e){if(!(0,s.isImmediatePropagationStopped)(e)){var t=this.getActiveEditor(),n=t.htEditor.getInstance(),o=void 0,i=void 0;if(e.keyCode===r.KEY_CODES.ARROW_DOWN)if(n.getSelectedLast()||n.flipped){if(n.getSelectedLast())if(n.flipped)o=n.getSelectedLast()[0]+1;else if(!n.flipped){var a=n.countRows()-1;i=n.getSelectedLast()[0],o=Math.min(a,i+1)}}else o=0;else e.keyCode===r.KEY_CODES.ARROW_UP&&(!n.getSelectedLast()&&n.flipped?o=n.countRows()-1:n.getSelectedLast()&&(n.flipped?(i=n.getSelectedLast()[0],o=Math.max(0,i-1)):o=(i=n.getSelectedLast()[0])-1));void 0!==o&&(o<0||n.flipped&&o>n.countRows()-1?n.deselectCell():n.selectCell(o,0),n.getData().length&&(e.preventDefault(),(0,s.stopImmediatePropagation)(e),t.instance.listen(),t.TEXTAREA.focus()))}};c.prototype.open=function(){this.instance.addHook("beforeKeyDown",h);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.open.apply(this,t),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.instance.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,a.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length)},c.prototype.close=function(){this.htEditor.rootElement.style.display="none",this.instance.removeHook("beforeKeyDown",h);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.close.apply(this,t)},c.prototype.focus=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];u.default.prototype.focus.apply(this,t)},c.prototype.beginEditing=function(){var e=this.instance.getSettings().onBeginEditing;if(!e||!1!==e()){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];u.default.prototype.beginEditing.apply(this,n)}},c.prototype.finishEditing=function(){if(this.htEditor&&this.htEditor.isListening()&&this.instance.listen(),this.htEditor&&this.htEditor.getSelectedLast()){var e=this.htEditor.getInstance().getValue();void 0!==e&&this.setValue(e)}for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return u.default.prototype.finishEditing.apply(this,n)},c.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",(function(){e.htEditor&&e.htEditor.destroy()}))},t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){var t=new Date(e);return isNaN(new Date(e+"T00:00").getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}},function(e,t,n){"use strict";!function(e){function n(e){return e.split('"').length-1}var o=function(e){var t,o,r,i,a,s,l,u=[],c=0;for((r=e.split("\n")).length>1&&""===r[r.length-1]&&r.pop(),t=0,o=r.length;t<o;t+=1){for(r[t]=r[t].split("\t"),i=0,a=r[t].length;i<a;i+=1)u[c]||(u[c]=[]),s&&0===i?(l=u[c].length-1,u[c][l]=u[c][l]+"\n"+r[t][0],s&&1&n(r[t][0])&&(s=!1,u[c][l]=u[c][l].substring(0,u[c][l].length-1).replace(/""/g,'"'))):i===a-1&&0===r[t][i].indexOf('"')&&1&n(r[t][i])?(u[c].push(r[t][i].substring(1).replace(/""/g,'"')),s=!0):(u[c].push(r[t][i].replace(/""/g,'"')),s=!1);s||(c+=1)}return u},r=function(e){var t,n,o,r,i,a="";for(t=0,n=e.length;t<n;t+=1){for(r=e[t].length,o=0;o<r;o+=1)o>0&&(a+="\t"),"string"==typeof(i=e[t][o])?i.indexOf("\n")>-1?a+='"'+i.replace(/"/g,'""')+'"':a+=i:a+=null==i?"":i;t!==n-1&&(a+="\n")}return a};t.parse=o,t.stringify=r}(window)},function(e,t,n){"use strict";t.__esModule=!0,t.mouseDown=i,t.mouseOver=a,t.handleMouseEvent=function(e,t){var n=t.coords,r=t.selection,i=t.controller;s.get(e.type)({coords:n,selection:r,controller:i,isShiftKey:e.shiftKey,isLeftClick:(0,o.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,o.isRightClick)(e)})};var o=n(13),r=n(4);function i(e){var t=e.isShiftKey,n=e.isLeftClick,o=e.isRightClick,i=e.coords,a=e.selection,s=e.controller,l=a.isSelected()?a.getSelectedRange().current():null,u=a.isSelectedByCorner(),c=a.isSelectedByRowHeader();if(t&&l)i.row>=0&&i.col>=0&&!s.cells?a.setRangeEnd(i):(u||c)&&i.row>=0&&i.col>=0&&!s.cells?a.setRangeEnd(new r.CellCoords(i.row,i.col)):u&&i.row<0&&!s.column?a.setRangeEnd(new r.CellCoords(l.to.row,i.col)):c&&i.col<0&&!s.row?a.setRangeEnd(new r.CellCoords(i.row,l.to.col)):(!u&&!c&&i.col<0||u&&i.col<0)&&!s.row?a.selectRows(l.from.row,i.row):(!u&&!c&&i.row<0||c&&i.row<0)&&!s.column&&a.selectColumns(l.from.col,i.col);else{var h=new r.CellCoords(i.row,i.col);h.row<0&&(h.row=0),h.col<0&&(h.col=0);var d=!a.inInSelection(h),f=n||o&&d;i.row<0&&i.col>=0&&!s.column?f&&a.selectColumns(i.col):i.col<0&&i.row>=0&&!s.row?f&&a.selectRows(i.row):i.col>=0&&i.row>=0&&!s.cells?f&&a.setRangeStart(i):i.col<0&&i.row<0&&a.setRangeStart(i)}}function a(e){var t=e.isLeftClick,n=e.coords,o=e.selection,i=e.controller;if(t){var a=o.isSelectedByRowHeader(),s=o.isSelectedByColumnHeader(),l=o.tableProps.countCols(),u=o.tableProps.countRows();s&&!i.column?o.setRangeEnd(new r.CellCoords(u-1,n.col)):a&&!i.row?o.setRangeEnd(new r.CellCoords(n.row,l-1)):i.cell||o.setRangeEnd(n)}}var s=new Map([["mousedown",i],["mouseover",a],["touchstart",i]])},function(e,t,n){"use strict";t.__esModule=!0,t.RecordTranslator=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.registerIdentity=function(e,t){u.set(e,t)},t.getTranslator=function(e){var t=e instanceof a.default?e:h(e),n=void 0;return c.has(t)?n=c.get(t):(n=new l(t),c.set(t,n)),n},t.getIdentity=h;var r,i=n(90),a=(r=i)&&r.__esModule?r:{default:r},s=n(1),l=t.RecordTranslator=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t}return o(e,[{key:"toVisualRow",value:function(e){return this.hot.runHooks("unmodifyRow",e)}},{key:"toVisualColumn",value:function(e){return this.hot.runHooks("unmodifyCol",e)}},{key:"toVisual",value:function(e,t){return(0,s.isObject)(e)?{row:this.toVisualRow(e.row),column:this.toVisualColumn(e.column)}:[this.toVisualRow(e),this.toVisualColumn(t)]}},{key:"toPhysicalRow",value:function(e){return this.hot.runHooks("modifyRow",e)}},{key:"toPhysicalColumn",value:function(e){return this.hot.runHooks("modifyCol",e)}},{key:"toPhysical",value:function(e,t){return(0,s.isObject)(e)?{row:this.toPhysicalRow(e.row),column:this.toPhysicalColumn(e.column)}:[this.toPhysicalRow(e),this.toPhysicalColumn(t)]}}]),e}(),u=new WeakMap,c=new WeakMap;function h(e){if(!u.has(e))throw Error("Record translator was not registered for this object identity");return u.get(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.registerAsRootInstance=function(e){o.set(e,!0)},t.hasValidParameter=function(e){return e===r},t.isRootInstance=function(e){return o.has(e)};var o=t.holder=new WeakMap,r=t.rootInstanceSymbol=Symbol("rootInstance")},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(11),i=n(1);function a(){}a.prototype={licenseKey:"trial",data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:void 0,colHeaders:null,colWidths:void 0,rowHeights:void 0,columns:void 0,cells:void 0,cell:[],comments:!1,customBorders:!1,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,allowInsertRow:!0,allowInsertColumn:!0,allowRemoveRow:!0,allowRemoveColumn:!0,selectionMode:"multiple",fillHandle:{autoInsertRow:!1},fixedRowsTop:0,fixedRowsBottom:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!0,autoWrapCol:!0,persistentState:void 0,currentRowClassName:void 0,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",activeHeaderClassName:"ht__active_highlight",className:void 0,tableClassName:void 0,stretchH:"none",isEmptyRow:function(e){var t,n=void 0,a=void 0,s=void 0;for(n=0,t=this.countCols();n<t;n++)if(""!==(a=this.getDataAtCell(e,n))&&null!==a&&(0,r.isDefined)(a))return"object"===(void 0===a?"undefined":o(a))&&(s=this.getCellMeta(e,n),(0,i.isObjectEqual)(this.getSchema()[s.prop],a));return!0},isEmptyCol:function(e){var t,n=void 0,o=void 0;for(n=0,t=this.countRows();n<t;n++)if(""!==(o=this.getDataAtCell(n,e))&&null!==o&&(0,r.isDefined)(o))return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,allowEmpty:!0,invalidCellClassName:"htInvalid",placeholder:void 0,placeholderCellClassName:"htPlaceholder",readOnlyCellClassName:"htDimmed",renderer:void 0,commentedCellClassName:"htCommentCell",fragmentSelection:!1,readOnly:!1,skipColumnOnPaste:!1,search:!1,type:"text",copyable:!0,editor:void 0,visibleRows:10,trimDropdown:!0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,copyPaste:!0,undo:void 0,columnSorting:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,mergeCells:!1,viewportRowRenderingOffset:"auto",viewportColumnRenderingOffset:"auto",validator:void 0,disableVisualSelection:!1,sortIndicator:void 0,manualColumnFreeze:void 0,trimWhitespace:!0,source:void 0,title:void 0,checkedTemplate:void 0,uncheckedTemplate:void 0,label:void 0,numericFormat:void 0,language:"en-US",selectOptions:void 0,autoColumnSize:void 0,autoRowSize:void 0,dateFormat:"DD/MM/YYYY",correctFormat:!1,defaultDate:void 0,strict:void 0,allowHtml:!1,renderAllRows:void 0,preventOverflow:!1,bindRowsWithHeaders:void 0,collapsibleColumns:void 0,columnSummary:void 0,dropdownMenu:void 0,filters:void 0,formulas:void 0,ganttChart:void 0,headerTooltips:void 0,hiddenColumns:void 0,hiddenRows:void 0,nestedHeaders:void 0,trimRows:void 0,rowHeaderWidth:void 0,columnHeaderHeight:void 0,observeChanges:void 0,sortFunction:void 0,sortByRelevance:!0,filter:!0,filteringCaseSensitive:!1,dragToScroll:!0,nestedRows:void 0},t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.getTranslatedPhrase=function(e,t,n){var s=(0,r.getLanguageDictionary)(e);if(null===s)return null;var l=s[t];if((0,a.isUndefined)(l))return null;var u=function(e,t){var n=e;return(0,o.arrayEach)((0,i.getPhraseFormatters)(),(function(o){n=o(e,t)})),n}(l,n);return Array.isArray(u)?u[0]:u};var o=n(2),r=n(71),i=n(271),a=n(11)},function(e,t,n){"use strict";t.__esModule=!0;var o,r,i=(o=['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.'],r=['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.'],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})));t.extendNotExistingKeys=function(e,t){return(0,s.objectEach)(t,(function(t,n){(0,a.isUndefined)(e[n])&&(e[n]=t)})),e},t.createCellHeadersRange=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,r=n,i=o;if(e>t){var a=[i,r];r=a[0],i=a[1]}return r+"-"+i},t.normalizeLanguageCode=h,t.applyLanguageSetting=function(e,t){var n=h(t);(0,c.hasLanguageDictionary)(n)?e.language=n:(e.language=c.DEFAULT_LANGUAGE_CODE,d(t))},t.warnUserAboutLanguageRegistration=d;var a=n(11),s=n(1),l=n(58),u=n(42),c=n(71);function h(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);return t?t[1].toLowerCase()+"-"+t[2].toUpperCase():e}function d(e){(0,a.isDefined)(e)&&(0,l.error)((0,u.toSingleLine)(i,e))}},function(e,t,n){"use strict";t.__esModule=!0,t.stopObserving=t.startObserving=t.isPressedCtrlKey=t.isPressed=t._resetState=t._getRefCount=void 0;var o,r=n(5),i=(o=r)&&o.__esModule?o:{default:o},a=n(21),s=new i.default,l=new Set,u=0;function c(){s.clearEvents(),l.clear(),u=0}t._getRefCount=function(){return u},t._resetState=c,t.isPressed=function(e){return Array.from(l.values()).some((function(t){return(0,a.isKey)(t,e)}))},t.isPressedCtrlKey=function(){var e=Array.from(l.values());return e.some((function(e){return(0,a.isCtrlMetaKey)(e)}))&&e.every((function(e){return!(0,a.isPrintableChar)(e)}))},t.startObserving=function(){0===u&&(s.addEventListener(document,"keydown",(function(e){l.has(e.keyCode)||l.add(e.keyCode)})),s.addEventListener(document,"keyup",(function(e){l.has(e.keyCode)&&l.delete(e.keyCode)})),s.addEventListener(document,"visibilitychange",(function(){document.hidden&&l.clear()}))),u+=1},t.stopObserving=function(){u>0&&(u-=1),0===u&&c()}},function(e,t,n){"use strict";t.__esModule=!0,t.normalizeSelectionFactory=t.detectSelectionType=t.Selection=t.Highlight=t.handleMouseEvent=void 0;var o=s(n(202)),r=s(n(280)),i=n(194),a=n(72);function s(e){return e&&e.__esModule?e:{default:e}}t.handleMouseEvent=i.handleMouseEvent,t.Highlight=o.default,t.Selection=r.default,t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory},function(e,t,n){"use strict";t.__esModule=!0,t.CUSTOM_SELECTION=t.HEADER_TYPE=t.FILL_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(273),i=n(2);function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var s=t.ACTIVE_HEADER_TYPE="active-header",l=t.AREA_TYPE="area",u=t.CELL_TYPE="cell",c=t.FILL_TYPE="fill",h=t.HEADER_TYPE="header",d=t.CUSTOM_SELECTION="custom-selection",f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.layerLevel=0,this.cell=(0,r.createHighlight)(u,t),this.fill=(0,r.createHighlight)(c,t),this.areas=new Map,this.headers=new Map,this.activeHeaders=new Map,this.customSelections=[]}return o(e,[{key:"isEnabledFor",value:function(e){var t="current"===e?u:e,n=this.options.disableHighlight;return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(t)}},{key:"useLayerLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var e=this.layerLevel,t=void 0;return this.areas.has(e)?t=this.areas.get(e):(t=(0,r.createHighlight)(l,Object.assign({layerLevel:e},this.options)),this.areas.set(e,t)),t}},{key:"getAreas",value:function(){return[].concat(a(this.areas.values()))}},{key:"createOrGetHeader",value:function(){var e=this.layerLevel,t=void 0;return this.headers.has(e)?t=this.headers.get(e):(t=(0,r.createHighlight)(h,Object.assign({},this.options)),this.headers.set(e,t)),t}},{key:"getHeaders",value:function(){return[].concat(a(this.headers.values()))}},{key:"createOrGetActiveHeader",value:function(){var e=this.layerLevel,t=void 0;return this.activeHeaders.has(e)?t=this.activeHeaders.get(e):(t=(0,r.createHighlight)(s,Object.assign({},this.options)),this.activeHeaders.set(e,t)),t}},{key:"getActiveHeaders",value:function(){return[].concat(a(this.activeHeaders.values()))}},{key:"getCustomSelections",value:function(){return[].concat(a(this.customSelections.values()))}},{key:"addCustomSelection",value:function(e){this.customSelections.push((0,r.createHighlight)(d,Object.assign({},e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),(0,i.arrayEach)(this.areas.values(),(function(e){e.clear()})),(0,i.arrayEach)(this.headers.values(),(function(e){e.clear()})),(0,i.arrayEach)(this.activeHeaders.values(),(function(e){e.clear()}))}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat(a(this.areas.values()),a(this.headers.values()),a(this.activeHeaders.values()),a(this.customSelections))[Symbol.iterator]()}}]),e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1),i=n(6),a=n(11),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.samples=null,this.dataFactory=t,this.customSampleCount=null,this.allowDuplicates=!1}return o(e,null,[{key:"SAMPLE_COUNT",get:function(){return 3}}]),o(e,[{key:"getSampleCount",value:function(){return this.customSampleCount?this.customSampleCount:e.SAMPLE_COUNT}},{key:"setSampleCount",value:function(e){this.customSampleCount=e}},{key:"setAllowDuplicates",value:function(e){this.allowDuplicates=e}},{key:"generateRowSamples",value:function(e,t){return this.generateSamples("row",t,e)}},{key:"generateColumnSamples",value:function(e,t){return this.generateSamples("col",t,e)}},{key:"generateSamples",value:function(e,t,n){var o=this,r=new Map,a="number"==typeof n?{from:n,to:n}:n,s=a.from,l=a.to;return(0,i.rangeEach)(s,l,(function(n){var i=o.generateSample(e,t,n);r.set(n,i)})),r}},{key:"generateSample",value:function(e,t,n){var o=this;if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");var s=new Map,l="row"===e?"col":"row",u=[];return(0,i.rangeEach)(t.from,t.to,(function(t){var i="row"===e?o.dataFactory(n,t):o.dataFactory(t,n),c=i.value,h=i.bundleCountSeed,d=h>0,f=void 0;f=(0,r.isObject)(c)?Object.keys(c).length:Array.isArray(c)?c.length:(0,a.stringify)(c).length,d&&(f+=h),s.has(f)||s.set(f,{needed:o.getSampleCount(),strings:[]});var p=s.get(f);p.needed&&(!(u.indexOf(c)>-1)||o.allowDuplicates||d)&&(p.strings.push(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({value:c},l,t)),u.push(c),p.needed-=1)})),s}}]),e}();t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(6),i=0,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this._element=null,this.state=i}return o(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=document.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=i}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{key:"setPosition",value:function(e,t){(0,r.isNumeric)(e)&&(this._element.style.top=e+"px"),(0,r.isNumeric)(t)&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,t){(0,r.isNumeric)(e)&&(this._element.style.width=e+"px"),(0,r.isNumeric)(t)&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,t){(0,r.isNumeric)(e)&&(this._element.style.marginTop=e+"px"),(0,r.isNumeric)(t)&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),e}();t.default=a},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=0,i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this._element=null,this.state=r}return o(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=document.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=r}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{key:"setPosition",value:function(e,t){void 0!==e&&(this._element.style.top=e+"px"),void 0!==t&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,t){e&&(this._element.style.width=e+"px"),t&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,t){e&&(this._element.style.marginTop=e+"px"),t&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),e}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.applySpanProperties=function(e,t,n,o){t?t.row===n&&t.col===o?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},function(e,t,n){"use strict";t.__esModule=!0,n(98),n(113),n(114),n(118),n(119),n(121),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(143),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(88),n(158),n(159),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(169),n(170),n(171),n(173),n(174),n(175),n(226),n(227),n(228);var o=n(17),r=n(14),i=n(34),a=n(89),s=D(n(90)),l=D(n(283)),u=n(5),c=D(u),h=D(n(16)),d=D(n(93)),f=L(n(2)),p=L(n(39)),g=L(n(92)),v=L(n(192)),y=L(n(40)),m=L(n(43)),w=L(n(11)),C=L(n(6)),b=L(n(1)),E=L(n(91)),S=L(n(33)),O=L(n(21)),T=L(n(0)),_=L(n(13)),R=L(n(284)),k=n(8),M=D(n(197)),A=n(196),N=n(198),P=L(n(7)),H=n(71);function L(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function D(e){return e&&e.__esModule?e:{default:e}}function I(e,t){var n=new s.default(e,t||{},A.rootInstanceSymbol);return n.init(),n}(0,l.default)(I),I.Core=s.default,I.DefaultSettings=M.default,I.EventManager=c.default,I._getListenersCounter=u.getListenersCounter,I.buildDate="11/09/2018 09:55:19",I.packageName="handsontable",I.version="5.0.2",I.hooks=h.default.getSingleton(),I.__GhostTable=d.default;var x=[f,p,g,v,y,m,w,C,b,E,S,O],j=[T,_];I.helper={},I.dom={},f.arrayEach(x,(function(e){f.arrayEach(Object.getOwnPropertyNames(e),(function(t){"_"!==t.charAt(0)&&(I.helper[t]=e[t])}))})),f.arrayEach(j,(function(e){f.arrayEach(Object.getOwnPropertyNames(e),(function(t){"_"!==t.charAt(0)&&(I.dom[t]=e[t])}))})),I.cellTypes={},f.arrayEach((0,a.getRegisteredCellTypeNames)(),(function(e){I.cellTypes[e]=(0,a.getCellType)(e)})),I.cellTypes.registerCellType=a.registerCellType,I.cellTypes.getCellType=a.getCellType,I.editors={},f.arrayEach((0,o.getRegisteredEditorNames)(),(function(e){I.editors[S.toUpperCaseFirst(e)+"Editor"]=(0,o.getEditor)(e)})),I.editors.registerEditor=o.registerEditor,I.editors.getEditor=o.getEditor,I.renderers={},f.arrayEach((0,r.getRegisteredRendererNames)(),(function(e){var t=(0,r.getRenderer)(e);"base"===e&&(I.renderers.cellDecorator=t),I.renderers[S.toUpperCaseFirst(e)+"Renderer"]=t})),I.renderers.registerRenderer=r.registerRenderer,I.renderers.getRenderer=r.getRenderer,I.validators={},f.arrayEach((0,i.getRegisteredValidatorNames)(),(function(e){I.validators[S.toUpperCaseFirst(e)+"Validator"]=(0,i.getValidator)(e)})),I.validators.registerValidator=i.registerValidator,I.validators.getValidator=i.getValidator,I.plugins={},f.arrayEach(Object.getOwnPropertyNames(R),(function(e){var t=R[e];"Base"===e?I.plugins[e+"Plugin"]=t:I.plugins[e]=t})),I.plugins.registerPlugin=k.registerPlugin,I.languages={},I.languages.dictionaryKeys=P,I.languages.getLanguageDictionary=H.getLanguageDictionary,I.languages.getLanguagesDictionaries=H.getLanguagesDictionaries,I.languages.registerLanguageDictionary=H.registerLanguageDictionary,I.languages.getTranslatedPhrase=function(){return N.getTranslatedPhrase.apply(void 0,arguments)},t.default=I},function(e,t,n){var o=n(20),r=n(18),i=n(35);e.exports=n(22)?Object.defineProperties:function(e,t){r(e);for(var n,a=i(t),s=a.length,l=0;s>l;)o.f(e,n=a[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(76),r=n(51),i=n(53),a={};n(29)(a,n(12)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=o(a,{next:r(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var o=n(9),r=n(112).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&o(i)&&r&&r(e,i),e}},function(e,t,n){var o=n(212);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){var o=n(9),r=n(115),i=n(12)("species");e.exports=function(e){var t;return r(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!r(t.prototype)||(t=void 0),o(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var o=n(18),r=n(63),i=n(12)("species");e.exports=function(e,t){var n,a=o(e).constructor;return void 0===a||null==(n=o(a)[i])?t:r(n)}},function(e,t){e.exports=function(e,t,n){var o=void 0===n;switch(t.length){case 0:return o?e():e.call(n);case 1:return o?e(t[0]):e.call(n,t[0]);case 2:return o?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var o=n(15),r=n(82).set,i=o.MutationObserver||o.WebKitMutationObserver,a=o.process,s=o.Promise,l="process"==n(44)(a);e.exports=function(){var e,t,n,u=function(){var o,r;for(l&&(o=a.domain)&&o.exit();e;){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,o&&o.enter()};if(l)n=function(){a.nextTick(u)};else if(!i||o.navigator&&o.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){r.call(o,u)};else{var h=!0,d=document.createTextNode("");new i(u).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(o){var r={fn:o,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var o=n(18),r=n(9),i=n(120);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var o=n(15),r=n(37),i=n(49),a=n(122),s=n(20).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var o=n(35),r=n(69),i=n(54);e.exports=function(e){var t=o(e),n=r.f;if(n)for(var a,s=n(e),l=i.f,u=0;s.length>u;)l.call(e,a=s[u++])&&t.push(a);return t}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var o=n(60),r=n(36);e.exports=function(e){return function(t,n){var i,a,s=String(r(t)),l=o(n),u=s.length;return l<0||l>=u?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var o=n(18);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o=n(31),r=n(61),i=n(25);e.exports=[].copyWithin||function(e,t){var n=o(this),a=i(n.length),s=r(e,a),l=r(t,a),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?a:r(u,a))-l,a-s),h=1;for(l<s&&s<l+c&&(h=-1,l+=c-1,s+=c-1);c-- >0;)l in n?n[s]=n[l]:delete n[s],s+=h,l+=h;return n}},function(e,t,n){"use strict";var o=n(31),r=n(61),i=n(25);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,u=void 0===l?n:r(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){var o=n(84),r=n(69),i=n(18),a=n(15).Reflect;e.exports=a&&a.ownKeys||function(e){var t=o.f(i(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(41),a=(o=i)&&o.__esModule?o:{default:o},s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(a.default.CLONE_DEBUG),n.clone.wtTable.holder.style.opacity=.4,n.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",(0,r.addClass)(n.clone.wtTable.holder.parentNode,"wtDebugVisible"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(a.default);a.default.registerOverlay(a.default.CLONE_DEBUG,s),t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(41),s=(o=a)&&o.__esModule?o:{default:o},l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(s.default.CLONE_LEFT),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||n&&"horizontal"===n)t=this.getScrollPosition(),(0,i.resetCssTransform)(e);else{var o=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(o.left),a=Math.ceil(o.right),s=void 0,l=void 0;l=""===(l=this.wot.wtTable.hider.style.top)?0:l,t=s=r<0&&a-e.offsetWidth>0?-r:0,s+="px",(0,i.setOverlayPosition)(e,s,l)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=!1;return this.mainTableScrollableElement===window&&window.scrollX!==e?(window.scrollTo(e,(0,i.getWindowScrollTop)()),t=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.defaultColumnWidth,o=e,r=0;o<t;)r+=this.wot.wtTable.getStretchedColumnWidth(o)||n,o+=1;return r}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientHeight===e.offsetHeight?0:(0,i.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||"vertical"===o){var r=this.wot.wtViewport.getWorkspaceHeight()-t;r=Math.min(r,(0,i.innerHeight)(this.wot.wtTable.wtRootElement)),n.height=r+"px"}else n.height="";this.clone.wtTable.holder.style.height=n.height;var a=(0,i.outerWidth)(this.clone.wtTable.TABLE);n.width=(0===a?a:a+4)+"px"}},{key:"adjustRootChildrenSize",value:function(){var e=(0,i.getScrollbarWidth)();this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width=parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e+"px"}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.top=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,r=0;return t&&o.offsetWidth!==o.clientWidth&&(r=(0,i.getScrollbarWidth)()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=r,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){var e=0;return this.wot.getSetting("preventOverflow")||this.trimmingContainer!==window||(e=this.wot.wtTable.holderOffset.left),e}},{key:"getScrollPosition",value:function(){return(0,i.getScrollLeft)(this.mainTableScrollableElement)}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode,n=this.wot.getSetting("rowHeaders"),o=this.wot.getSetting("fixedColumnsLeft");if(this.wot.getSetting("totalRows")?(0,i.removeClass)(t,"emptyRows"):(0,i.addClass)(t,"emptyRows"),o&&!n.length)(0,i.addClass)(t,"innerBorderLeft");else if(!o&&n.length){var r=(0,i.hasClass)(t,"innerBorderLeft");e?(0,i.addClass)(t,"innerBorderLeft"):(0,i.removeClass)(t,"innerBorderLeft"),(!r&&e||r&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}]),t}(s.default);s.default.registerOverlay(s.default.CLONE_LEFT,l),t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(2),s=n(41),l=(o=s)&&o.__esModule?o:{default:o},u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(l.default.CLONE_TOP),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||n&&"vertical"===n)t=this.getScrollPosition(),(0,i.resetCssTransform)(e);else{var o=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(o.top),a=Math.ceil(o.bottom),s=void 0,l=void 0;s=""===(s=this.wot.wtTable.hider.style.left)?0:s,t=l=r<0&&a-e.offsetHeight>0?-r:0,l+="px",(0,i.setOverlayPosition)(e,s,l)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=!1;return this.mainTableScrollableElement===window&&window.scrollY!==e?(window.scrollTo((0,i.getWindowScrollLeft)(),e),t=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.settings.defaultRowHeight,o=e,r=0;o<t;){var i=this.wot.wtTable.getRowHeight(o);r+=void 0===i?n:i,o+=1}return r}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientWidth===e.offsetWidth?0:(0,i.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode.style,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||"horizontal"===o){var r=this.wot.wtViewport.getWorkspaceWidth()-t;r=Math.min(r,(0,i.innerWidth)(this.wot.wtTable.wtRootElement)),n.width=r+"px"}else n.width="";this.clone.wtTable.holder.style.width=n.width;var a=(0,i.outerHeight)(this.clone.wtTable.TABLE);n.height=(0===a?a:a+4)+"px"}},{key:"adjustRootChildrenSize",value:function(){var e=(0,i.getScrollbarWidth)();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height=parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e+"px"}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,r=0;if(t&&o.offsetHeight!==o.clientHeight&&(r=(0,i.getScrollbarWidth)()),t){var a=this.wot.getSetting("fixedRowsBottom"),s=this.wot.getSetting("totalRows");n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight()-this.sumCellSizes(s-a,s),n+=1}else n+=this.sumCellSizes(this.wot.getSetting("fixedRowsTop"),e);return n+=r,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,i.getScrollTop)(this.mainTableScrollableElement)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange){var t=e.getBorder(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var e=this,t=this.wot.selections;this.redrawSelectionBorders(t.getCell()),(0,a.arrayEach)(t.getAreas(),(function(t){e.redrawSelectionBorders(t)})),this.redrawSelectionBorders(t.getFill()),this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh()}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode;if(this.wot.getSetting("totalColumns")?(0,i.removeClass)(t,"emptyColumns"):(0,i.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=(0,i.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?(0,i.addClass)(t,"innerBorderTop"):(0,i.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var o=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(o)for(var r=0;r<o.length;r++)o[r].style["border-left-width"]=0}}}]),t}(l.default);l.default.registerOverlay(l.default.CLONE_TOP,u),t.default=u},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(41),s=(o=a)&&o.__esModule?o:{default:o},l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(s.default.CLONE_TOP_LEFT_CORNER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length||!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.updateTrimmingContainer(),this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=(0,i.outerHeight)(this.clone.wtTable.TABLE),n=(0,i.outerWidth)(this.clone.wtTable.TABLE),o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer===window){var r=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(r.top),s=Math.ceil(r.left),l=Math.ceil(r.bottom),u=Math.ceil(r.right),c="0",h="0";o&&"vertical"!==o||s<0&&u-e.offsetWidth>0&&(c=-s+"px"),o&&"horizontal"!==o||a<0&&l-e.offsetHeight>0&&(h=-a+"px"),(0,i.setOverlayPosition)(e,c,h)}else(0,i.resetCssTransform)(e);e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===n?n:n+4)+"px"}}}]),t}(s.default);s.default.registerOverlay(s.default.CLONE_TOP_LEFT_CORNER,l),t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),s=c(n(189)),l=c(n(56)),u=c(n(178));function c(e){return e&&e.__esModule?e:{default:e}}var h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.settings=t,this.cellRange=n||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}return i(e,[{key:"getBorder",value:function(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new s.default(e,this.settings)),this.instanceBorders[e.guid]}},{key:"isEmpty",value:function(){return null===this.cellRange}},{key:"add",value:function(e){return this.isEmpty()?this.cellRange=new u.default(e):this.cellRange.expand(e),this}},{key:"replace",value:function(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}},{key:"clear",value:function(){return this.cellRange=null,this}},{key:"getCorners",value:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]}},{key:"addClassAtCoords",value:function(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=e.wtTable.getCell(new l.default(t,n));if("object"===(void 0===s?"undefined":r(s))){var u=o;i&&(u=this.classNameGenerator(s),this.classNames.includes(u)||this.classNames.push(u)),(0,a.addClass)(s,u)}return this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===r)return e;var i=r>=0?r:t,s=e,l=0==(i-=1)?e:e+"-"+i;if((0,a.hasClass)(o,l)){var u=i+1;s=e+"-"+u}else s=n(o,i);return s}}},{key:"draw",value:function(e){if(this.isEmpty())this.settings.border&&this.getBorder(e).disappear();else{for(var t=e.wtTable.getRenderedRowsCount(),n=e.wtTable.getRenderedColumnsCount(),r=this.getCorners(),i=o(r,4),s=i[0],l=i[1],u=i[2],c=i[3],h=0;h<n;h+=1){var d=e.wtTable.columnFilter.renderedToSource(h);if(d>=l&&d<=c){var f=e.wtTable.getColumnHeader(d);if(f){var p=[];this.settings.highlightHeaderClassName&&p.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&p.push(this.settings.highlightColumnClassName),(0,a.addClass)(f,p)}}}for(var g=0;g<t;g+=1){var v=e.wtTable.rowFilter.renderedToSource(g);if(v>=s&&v<=u){var y=e.wtTable.getRowHeader(v);if(y){var m=[];this.settings.highlightHeaderClassName&&m.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&m.push(this.settings.highlightRowClassName),(0,a.addClass)(y,m)}}for(var w=0;w<n;w+=1){var C=e.wtTable.columnFilter.renderedToSource(w);v>=s&&v<=u&&C>=l&&C<=c?this.settings.className&&this.addClassAtCoords(e,v,C,this.settings.className,this.settings.markIntersections):v>=s&&v<=u?this.settings.highlightRowClassName&&this.addClassAtCoords(e,v,C,this.settings.highlightRowClassName):C>=l&&C<=c&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,v,C,this.settings.highlightColumnClassName);var b=e.getSetting("onAfterDrawSelection",v,C,r,this.settings.layerLevel);"string"==typeof b&&this.addClassAtCoords(e,v,C,b)}}e.getSetting("onBeforeDrawBorders",r,this.settings.className),this.settings.border&&this.getBorder(e).appear(r)}}}]),e}();t.default=h},function(e,t,n){"use strict";e.exports=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=document.body,o=document.createTextNode(""),r=document.createElement("SPAN"),i=function(e,t,n){e.addEventListener(t,n,!1)},a=function(e,t,n){e.removeEventListener(t,n,!1)},s=function(i){var a,s;i?/^[a-zA-Z \.,\\\/\|0-9]$/.test(i)||(i="."):i="",void 0!==o.textContent?o.textContent=e.value+i:o.data=e.value+i,r.style.fontSize=c(e).fontSize,r.style.fontFamily=c(e).fontFamily,r.style.whiteSpace="pre",n.appendChild(r),a=r.clientWidth+2,n.removeChild(r),e.style.height=t.minHeight+"px",t.minWidth>a?e.style.width=t.minWidth+"px":a>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=a+"px",s=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>s?e.style.height=t.minHeight+"px":t.maxHeight<s?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=s+"px"},l=function(){window.setTimeout(s,0)},u=function(n,a,u){e=n,function(n){if(n&&n.minHeight)if("inherit"==n.minHeight)t.minHeight=e.clientHeight;else{var i=parseInt(n.minHeight);isNaN(i)||(t.minHeight=i)}if(n&&n.maxHeight)if("inherit"==n.maxHeight)t.maxHeight=e.clientHeight;else{var a=parseInt(n.maxHeight);isNaN(a)||(t.maxHeight=a)}if(n&&n.minWidth)if("inherit"==n.minWidth)t.minWidth=e.clientWidth;else{var s=parseInt(n.minWidth);isNaN(s)||(t.minWidth=s)}if(n&&n.maxWidth)if("inherit"==n.maxWidth)t.maxWidth=e.clientWidth;else{var l=parseInt(n.maxWidth);isNaN(l)||(t.maxWidth=l)}r.firstChild||(r.className="autoResize",r.style.display="inline-block",r.appendChild(o))}(a),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),u&&(i(e,"change",s),i(e,"cut",l),i(e,"paste",l),i(e,"drop",l),i(e,"keydown",l),i(e,"focus",s),i(e,"compositionstart",l),i(e,"compositionupdate",l),i(e,"compositionend",l)),s()};function c(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,n){u(e,t,n)},unObserve:function(){a(e,"change",s),a(e,"cut",l),a(e,"paste",l),a(e,"drop",l),a(e,"keydown",l),a(e,"focus",s),a(e,"compositionstart",l),a(e,"compositionupdate",l),a(e,"compositionend",l)},resize:s}}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(55),a=(o=i)&&o.__esModule?o:{default:o},s=n(0),l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"beginEditing",value:function(e,t){if(t&&"mouseup"===t.type){var n=this.TD.querySelector('input[type="checkbox"]');(0,s.hasClass)(n,"htBadValue")||n.click()}}},{key:"finishEditing",value:function(){}},{key:"init",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"focus",value:function(){}}]),t}(a.default);t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},i=d(n(57)),a=d(n(237));n(238);var s=n(0),l=n(1),u=d(n(5)),c=n(21),h=n(13);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.defaultDateFormat="DD/MM/YYYY",n.isCellEdited=!1,n.parentDestroyed=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"init",value:function(){var e=this;if("function"!=typeof i.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof a.default)throw new Error("You need to include Pikaday to your project.");r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",(function(){e.parentDestroyed=!0,e.destroyElements()}))}},{key:"createElements",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"createElements",this).call(this),this.datePicker=document.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,(0,s.addClass)(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new a.default(this.getDatePickerConfig()),new u.default(this).addEventListener(this.datePicker,"mousedown",(function(e){return(0,h.stopPropagation)(e)})),this.hideDatepicker()}},{key:"destroyElements",value:function(){this.$datePicker.destroy()}},{key:"prepare",value:function(e,n,o,i,a,s){this._opened=!1,r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepare",this).call(this,e,n,o,i,a,s)}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout((function(){e.instance._refreshBorders()})),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var o=this.originalValue;void 0!==o&&this.setValue(o)}this.hideDatepicker(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t=this.TD.getBoundingClientRect(),n=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.$datePicker.config(),r=void 0,a=this.instance.view.isMouseDown(),l=!!e&&(0,c.isMetaKey)(e.keyCode);this.datePickerStyle.top=window.pageYOffset+t.top+(0,s.outerHeight)(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+t.left+"px",this.$datePicker._onInputFocus=function(){},o.format=n,this.originalValue?(r=this.originalValue,(0,i.default)(r,n,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(r,n),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),l||a||this.setValue("")):this.cellProperties.defaultDate?(r=this.cellProperties.defaultDate,o.defaultDate=r,(0,i.default)(r,n,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(r,n),!0),l||a||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var e=this,t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,l.deepExtend)(n,this.cellProperties.datePickerConfig);var o=n.onSelect,r=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.format=n.format||this.defaultDateFormat,n.reposition=n.reposition||!1,n.onSelect=function(t){var n=t;isNaN(n.getTime())||(n=(0,i.default)(n).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(n),e.hideDatepicker(),o&&o()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),r&&r()},n}}]),t}(d(n(59)).default);t.default=f},function(e,t){e.exports=r},function(e,t){},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=a(n(190)),i=a(n(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"prepare",value:function(e,n,o,r,i,a){(function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepare",this).call(this,e,n,o,r,i,a),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}]),t}(r.default);i.default.getSingleton().add("beforeValidate",(function(e,t,n){var o=this.getCellMeta(t,this.propToCol(n));o.editor===s&&void 0===o.strict&&(o.filter=!1,o.strict=!0)})),t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(59),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((o=r)&&o.__esModule?o:{default:o}).default);t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),a=n(59),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"createElements",value:function(){(function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"createElements",this).call(this),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,i.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}]),t}(((o=a)&&o.__esModule?o:{default:o}).default);t.default=s},function(e,t,n){"use strict";t.__esModule=!0;var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(0),a=n(13),s=n(21),l=n(55),u=(o=l)&&o.__esModule?o:{default:o},c=n(1),h=u.default.prototype.extend();h.prototype.init=function(){this.select=document.createElement("SELECT"),(0,i.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement.appendChild(this.select),this.registerHooks()},h.prototype.registerHooks=function(){var e=this;this.instance.addHook("afterScrollHorizontally",(function(){return e.refreshDimensions()})),this.instance.addHook("afterScrollVertically",(function(){return e.refreshDimensions()})),this.instance.addHook("afterColumnResize",(function(){return e.refreshDimensions()})),this.instance.addHook("afterRowResize",(function(){return e.refreshDimensions()}))},h.prototype.prepare=function(){for(var e=this,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];u.default.prototype.prepare.apply(this,n);var r=this.cellProperties.selectOptions,a=void 0;a="function"==typeof r?this.prepareOptions(r(this.row,this.col,this.prop)):this.prepareOptions(r),(0,i.empty)(this.select),(0,c.objectEach)(a,(function(t,n){var o=document.createElement("OPTION");o.value=n,(0,i.fastInnerHTML)(o,t),e.select.appendChild(o)}))},h.prototype.prepareOptions=function(e){var t={};if(Array.isArray(e))for(var n=0,o=e.length;n<o;n++)t[e[n]]=e[n];else"object"===(void 0===e?"undefined":r(e))&&(t=e);return t},h.prototype.getValue=function(){return this.select.value},h.prototype.setValue=function(e){this.select.value=e};var d=function(e){var t=this.getActiveEditor(),n=t.select.selectedIndex-1,o=t.select.selectedIndex+1;switch(e.keyCode){case s.KEY_CODES.ARROW_UP:n>=0&&(t.select[n].selected=!0),(0,a.stopImmediatePropagation)(e),e.preventDefault();break;case s.KEY_CODES.ARROW_DOWN:o<=t.select.length-1&&(t.select[o].selected=!0),(0,a.stopImmediatePropagation)(e),e.preventDefault()}};h.prototype.open=function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.instance.addHook("beforeKeyDown",d)},h.prototype.close=function(){this._opened=!1,this.select.style.display="none",this.instance.removeHook("beforeKeyDown",d)},h.prototype.focus=function(){this.select.focus()},h.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},h.prototype.refreshDimensions=function(){if(this.state===l.EditorState.EDITING)if(this.TD=this.getEditedCell(),this.TD){var e=(0,i.offset)(this.TD),t=(0,i.offset)(this.instance.rootElement),n=(0,i.getScrollableElement)(this.TD),o=this.checkEditorSection(),r=(0,i.outerWidth)(this.TD)+1,a=(0,i.outerHeight)(this.TD)+1,s=e.top-t.top-1-(n.scrollTop||0),u=e.left-t.left-1-(n.scrollLeft||0),c=void 0;switch(o){case"top":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":c=(0,i.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelectedLast()[0]&&(s+=1),0===this.instance.getSelectedLast()[1]&&(u+=1);var h=this.select.style;c&&-1!==c?h[c[0]]=c[1]:(0,i.resetCssTransform)(this.select);var d=(0,i.getComputedStyle)(this.TD);parseInt(d.borderTopWidth,10)>0&&(a-=1),parseInt(d.borderLeftWidth,10)>0&&(r-=1),h.height=a+"px",h.minWidth=r+"px",h.top=s+"px",h.left=u+"px",h.margin="0px"}else this.close()},h.prototype.getEditedCell=function(){var e=void 0;switch(this.checkEditorSection()){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.select.style.zIndex=""}return-1!==e&&-2!==e?e:void 0},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0);t.default=function(e,t,n,r,i,a,s){var l=[],u=[];s.className&&(t.className?t.className=t.className+" "+s.className:t.className=s.className),s.readOnly&&l.push(s.readOnlyCellClassName),!1===s.valid&&s.invalidCellClassName?l.push(s.invalidCellClassName):u.push(s.invalidCellClassName),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!a&&s.placeholder&&l.push(s.placeholderCellClassName),(0,o.removeClass)(t,u),(0,o.addClass)(t,l)}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(5),a=(o=i)&&o.__esModule?o:{default:o},s=n(4),l=n(14);document.createElement("DIV").className="htAutocompleteWrapper";var u=document.createElement("DIV");u.className="htAutocompleteArrow",u.appendChild(document.createTextNode(String.fromCharCode(9660))),t.default=function(e,t,n,o,i,c,h){for(var d=h.allowHtml?"html":"text",f=u.cloneNode(!0),p=arguments.length,g=Array(p>7?p-7:0),v=7;v<p;v++)g[v-7]=arguments[v];if((0,l.getRenderer)(d).apply(this,[e,t,n,o,i,c,h].concat(g)),t.firstChild||t.appendChild(document.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,r.addClass)(t,"htAutocomplete"),!e.acArrowListener){var y=new a.default(e);e.acArrowListener=function(i){(0,r.hasClass)(i.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new s.CellCoords(n,o),t)},y.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(function(){y.destroy()}))}}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(0),i=n(33),a=n(5),s=(o=a)&&o.__esModule?o:{default:o},l=n(21),u=n(43),c=n(13),h=n(14),d=new WeakMap,f=new WeakMap,p="htBadValue";function g(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}t.default=function(e,t,n,o,a,v,y){for(var m=arguments.length,w=Array(m>7?m-7:0),C=7;C<m;C++)w[C-7]=arguments[C];(0,h.getRenderer)("base").apply(this,[e,t,n,o,a,v,y].concat(w)),function(e){var t=f.get(e);t||((t=new s.default(e)).addEventListener(e.rootElement,"click",(function(t){return function(e,t){if(!g(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),o=parseInt(e.target.getAttribute("data-col"),10);t.getCellMeta(n,o).readOnly&&e.preventDefault()}(t,e)})),t.addEventListener(e.rootElement,"mouseup",(function(t){return function(e,t){g(e.target)&&setTimeout(t.listen,10)}(t,e)})),t.addEventListener(e.rootElement,"change",(function(t){return function(e,t){if(!g(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),o=parseInt(e.target.getAttribute("data-col"),10),r=t.getCellMeta(n,o);if(!r.readOnly){var i=null;i=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(n,o,i)}}(t,e)})),f.set(e,t))}(e);var b=function(){var e=document.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("autocomplete","off"),e.setAttribute("tabindex","-1"),e.cloneNode(!1)}(),E=y.label,S=!1;if(void 0===y.checkedTemplate&&(y.checkedTemplate=!0),void 0===y.uncheckedTemplate&&(y.uncheckedTemplate=!1),(0,r.empty)(t),v===y.checkedTemplate||(0,i.equalsIgnoreCase)(v,y.checkedTemplate)?b.checked=!0:v===y.uncheckedTemplate||(0,i.equalsIgnoreCase)(v,y.uncheckedTemplate)?b.checked=!1:null===v?(0,r.addClass)(b,"noValue"):(b.style.display="none",(0,r.addClass)(b,p),S=!0),b.setAttribute("data-row",n),b.setAttribute("data-col",o),!S&&E){var O="";E.value?O="function"==typeof E.value?E.value.call(this,n,o,a,v):E.value:E.property&&(O=e.getDataAtRowProp(n,E.property));var T=function(e){var t=document.createElement("label");return t.className="htCheckboxRendererLabel",t.appendChild(document.createTextNode(e)),t.cloneNode(!0)}(O);"before"===E.position?T.appendChild(b):T.insertBefore(b,T.firstChild),b=T}function _(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.getSelectedRangeLast();if(n){for(var o=n.getTopLeftCorner(),r=o.row,i=o.col,a=n.getBottomRightCorner(),s=a.row,l=a.col,u=[],c=r;c<=s;c+=1)for(var h=i;h<=l;h+=1){var d=e.getCellMeta(c,h);if("checkbox"!==d.type)return;if(!0!==d.readOnly){void 0===d.checkedTemplate&&(d.checkedTemplate=!0),void 0===d.uncheckedTemplate&&(d.uncheckedTemplate=!1);var f=e.getDataAtCell(c,h);!1===t?[d.checkedTemplate,d.checkedTemplate.toString()].includes(f)?u.push([c,h,d.uncheckedTemplate]):[d.uncheckedTemplate,d.uncheckedTemplate.toString(),null,void 0].includes(f)&&u.push([c,h,d.checkedTemplate]):u.push([c,h,d.uncheckedTemplate])}}u.length>0&&e.setDataAtCell(u)}}t.appendChild(b),S&&t.appendChild(document.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),e.addHook("beforeKeyDown",(function(t){var n=(0,u.partial)(l.isKey,t.keyCode);n("SPACE|ENTER|DELETE|BACKSPACE")&&!(0,c.isImmediatePropagationStopped)(t)&&function(t){var n=e.getSelectedRangeLast();if(n)for(var o=n.getTopLeftCorner(),r=n.getBottomRightCorner(),i=o.row;i<=r.row;i++)for(var a=o.col;a<=r.col;a++){var s=e.getCellMeta(i,a);if("checkbox"!==s.type)return;var l=e.getCell(i,a);if(null==l)t(i,a,s);else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!s.readOnly&&t(u)}}}((function(){(0,c.stopImmediatePropagation)(t),t.preventDefault()})),n("SPACE|ENTER")&&_(),n("DELETE|BACKSPACE")&&_(!0)})))}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=n(14);t.default=function(e,t,n,i,a,s){for(var l=arguments.length,u=Array(l>6?l-6:0),c=6;c<l;c++)u[c-6]=arguments[c];(0,r.getRenderer)("base").apply(this,[e,t,n,i,a,s].concat(u)),(0,o.fastInnerHTML)(t,null==s?"":s)}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(248),i=(o=r)&&o.__esModule?o:{default:o},a=n(14),s=n(6);t.default=function(e,t,n,o,r,l,u){var c=l;if((0,s.isNumeric)(c)){var h=u.numericFormat,d=h&&h.culture||"-",f=h&&h.pattern,p=u.className||"",g=p.length?p.split(" "):[];if(void 0!==d&&!i.default.languages()[d]){var v=d.replace("-",""),y=i.default.allLanguages?i.default.allLanguages[d]:i.default[v];y&&i.default.registerLanguage(y)}i.default.setLanguage(d),c=(0,i.default)(c).format(f||"0"),g.indexOf("htLeft")<0&&g.indexOf("htCenter")<0&&g.indexOf("htRight")<0&&g.indexOf("htJustify")<0&&g.push("htRight"),g.indexOf("htNumeric")<0&&g.push("htNumeric"),u.className=g.join(" ")}(0,a.getRenderer)("text")(e,t,n,o,r,c,u)}},function(e,t){e.exports=n},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=n(14),i=n(6);t.default=function(e,t,n,a,s,l,u){for(var c=arguments.length,h=Array(c>7?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];(0,r.getRenderer)("text").apply(this,[e,t,n,a,s,l,u].concat(h));var f=u.hashLength||t.innerHTML.length,p=u.hashSymbol||"*",g="";(0,i.rangeEach)(f-1,(function(){g+=p})),(0,o.fastInnerHTML)(t,g)}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(0),r=n(11),i=n(14);t.default=function(e,t,n,a,s,l,u){for(var c=arguments.length,h=Array(c>7?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];(0,i.getRenderer)("base").apply(this,[e,t,n,a,s,l,u].concat(h));var f=l;if(!f&&u.placeholder&&(f=u.placeholder),f=(0,r.stringify)(f),e.getSettings().trimWhitespace||(f=f.replace(/ /g,String.fromCharCode(160))),u.rendererTemplate){(0,o.empty)(t);var p=document.createElement("TEMPLATE");p.setAttribute("bind","{{}}"),p.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(p),p.model=e.getSourceDataAtRow(n),t.appendChild(p)}else(0,o.fastInnerText)(t,f)}},function(e,t,n){"use strict";function o(e,t){var n=e;return function(e){for(var o=!1,r=0,i=e.length;r<i;r++)if(n===e[r]){o=!0;break}t(o)}}t.__esModule=!0,t.default=function(e,t){var n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(n,o(n,t)):o(n,t)(this.source):t(!0)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=(0,s.getEditorInstance)("date",this.instance),o=e,r=!0;null==o&&(o="");var a=(0,i.default)(new Date(o)).isValid()||(0,i.default)(o,n.defaultDateFormat).isValid(),u=(0,i.default)(o,this.dateFormat||n.defaultDateFormat,!0).isValid();if(this.allowEmpty&&""===o&&(a=!0,u=!0),a||(r=!1),!a&&u&&(r=!0),a&&!u)if(!0===this.correctFormat){var c=l(o,this.dateFormat),h=this.instance.runHooks("unmodifyRow",this.row),d=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(h,d,c,"dateValidator"),r=!0}else r=!1;t(r)},t.correctFormat=l;var o,r=n(57),i=(o=r)&&o.__esModule?o:{default:o},a=n(192),s=n(17);function l(e,t){var n=(0,i.default)((0,a.getNormalizedDate)(e)),o=(0,i.default)(e,t),r=e.search(/[A-z]/g)>-1;return(n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||r?n:o).format(t)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&/^-?\d*(\.|,)?\d*$/.test(n))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=this.timeFormat||"h:mm:ss a",o=!0,r=e;null===r&&(r=""),r=/^\d{3,}$/.test(r)?parseInt(r,10):r;var s=/^\d{1,2}$/.test(r);s&&(r+=":00");var l=(0,i.default)(r,a,!0).isValid()?(0,i.default)(r):(0,i.default)(r,n),u=l.isValid(),c=(0,i.default)(r,n,!0).isValid()&&!s;if(this.allowEmpty&&""===r&&(u=!0,c=!0),u||(o=!1),!u&&c&&(o=!0),u&&!c)if(!0===this.correctFormat){var h=l.format(n),d=this.instance.runHooks("unmodifyRow",this.row),f=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(d,f,h,"timeValidator"),o=!0}else o=!1;t(o)};var o,r=n(57),i=(o=r)&&o.__esModule?o:{default:o},a=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"]},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("autocomplete"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14);t.default={editor:(0,o.getEditor)("checkbox"),renderer:(0,r.getRenderer)("checkbox")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("date"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("date")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("dropdown"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14);t.default={editor:(0,o.getEditor)("handsontable"),renderer:(0,r.getRenderer)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("numeric"),renderer:(0,r.getRenderer)("numeric"),validator:(0,i.getValidator)("numeric"),dataType:"number"}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14);t.default={editor:(0,o.getEditor)("password"),renderer:(0,r.getRenderer)("password"),copyable:!1}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14);t.default={editor:(0,o.getEditor)("text"),renderer:(0,r.getRenderer)("text")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(14),i=n(34);t.default={editor:(0,o.getEditor)("text"),renderer:(0,r.getRenderer)("text"),validator:(0,i.getValidator)("time")}},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=d(n(193)),i=n(92),a=n(91),s=n(1),l=n(2),u=d(n(265)),c=n(6),h=d(n(266));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){var o=this;this.instance=e,this.priv=t,this.GridSettings=n,this.dataSource=this.instance.getSettings().data,this.cachedLength=null,this.skipCache=!1,this.latestSourceRowsCount=0,this.dataSource&&this.dataSource[0]?this.duckSchema=this.recursiveDuckSchema(this.dataSource[0]):this.duckSchema={},this.createMap(),this.interval=u.default.create((function(){return o.clearLengthCache()}),"15fps"),this.instance.addHook("skipLengthCache",(function(e){return o.onSkipLengthCache(e)})),this.onSkipLengthCache(500)}f.prototype.DESTINATION_RENDERER=1,f.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,f.prototype.recursiveDuckSchema=function(e){return(0,s.duckSchema)(e)},f.prototype.recursiveDuckColumns=function(e,t,n){var r=this,i=t,a=n,l=void 0;return void 0===i&&(i=0,a=""),"object"!==(void 0===e?"undefined":o(e))||Array.isArray(e)||(0,s.objectEach)(e,(function(e,t){null===e?(l=a+t,r.colToPropCache.push(l),r.propToColCache.set(l,i),i+=1):i=r.recursiveDuckColumns(e,i,t+".")})),i},f.prototype.createMap=function(){var e=void 0,t=this.getSchema();if(void 0===t)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new h.default;var n=this.instance.getSettings().columns;if(n){var o=this.instance.getSettings().maxCols,r=Math.min(o,n.length),i=0,a=!1,l=(0,s.deepObjectSize)(t);for("function"==typeof n&&(r=l>0?l:this.instance.countSourceCols(),a=!0),e=0;e<r;e++){var u=a?n(e):n[e];if((0,s.isObject)(u)){if(void 0!==u.data){var c=a?i:e;this.colToPropCache[c]=u.data,this.propToColCache.set(u.data,c)}i+=1}}}else this.recursiveDuckColumns(t)},f.prototype.colToProp=function(e){var t=this.instance.runHooks("modifyCol",e);return!isNaN(t)&&this.colToPropCache&&void 0!==this.colToPropCache[t]?this.colToPropCache[t]:t},f.prototype.propToCol=function(e){var t=void 0;return t=void 0===this.propToColCache.get(e)?e:this.propToColCache.get(e),t=this.instance.runHooks("unmodifyCol",t)},f.prototype.getSchema=function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema},f.prototype.createRow=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments[2],r=0,i=e;("number"!=typeof i||i>=this.instance.countSourceRows())&&(i=this.instance.countSourceRows());var a=this.instance.runHooks("beforeCreateRow",i,n,o);if(!1===a)return 0;for(var l=this.instance.getSettings().maxRows,u=this.instance.countCols(),h=function(){var e=null;"array"===t.instance.dataType?t.instance.getSettings().dataSchema?e=(0,s.deepClone)(t.getSchema()):(e=[],(0,c.rangeEach)(u-1,(function(){return e.push(null)}))):"function"===t.instance.dataType?e=t.instance.getSettings().dataSchema(i):(e={},(0,s.deepExtend)(e,t.getSchema())),i===t.instance.countSourceRows()?t.dataSource.push(e):t.spliceData(i,0,e),r+=1};r<n&&this.instance.countSourceRows()<l;)h();return this.instance.runHooks("afterCreateRow",i,r,o),this.instance.forceFullRender=!0,r},f.prototype.createCol=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2];if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");var o=this.instance.countSourceRows(),r=this.dataSource,i=this.instance.countCols(),s="number"!=typeof e||e>=i?i:e,l=void 0,u=0,c=void 0;this.instance.runHooks("beforeCreateCol",s,t,n),c=s;for(var h=this.instance.getSettings().maxCols;u<t&&this.instance.countCols()<h;){if(l=(0,a.columnFactory)(this.GridSettings,this.priv.columnsSettingConflicts),"number"!=typeof s||s>=this.instance.countCols()){if(o>0)for(var d=0;d<o;d++)void 0===r[d]&&(r[d]=[]),r[d].push(null);else r.push([null]);this.priv.columnSettings.push(l)}else{for(var f=0;f<o;f++)r[f].splice(c,0,null);this.priv.columnSettings.splice(c,0,l)}u+=1,c+=1}return this.instance.runHooks("afterCreateCol",s,u,n),this.instance.forceFullRender=!0,u},f.prototype.removeRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2],o="number"!=typeof e?-t:e,r=this.instance.runHooks("modifyRemovedAmount",t,o);o=(this.instance.countSourceRows()+o)%this.instance.countSourceRows();var i=this.visualRowsToPhysical(o,r),a=this.instance.runHooks("beforeRemoveRow",o,r,i,n);if(!1!==a){var s=this.dataSource,l=this.filterData(o,r);l&&(s.length=0,Array.prototype.push.apply(s,l)),this.instance.runHooks("afterRemoveRow",o,r,i,n),this.instance.forceFullRender=!0}},f.prototype.removeCol=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2];if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");var o="number"!=typeof e?-t:e;o=(this.instance.countCols()+o)%this.instance.countCols();var r=this.visualColumnsToPhysical(o,t),i=r.slice(0).sort((function(e,t){return t-e})),a=this.instance.runHooks("beforeRemoveCol",o,t,r,n);if(!1!==a){for(var s=!0,l=i.length,u=this.dataSource,c=0;c<l;c++)s&&r[0]!==r[c]-c&&(s=!1);if(s)for(var h=0,d=this.instance.countSourceRows();h<d;h++)u[h].splice(r[0],t);else{for(var f=0,p=this.instance.countSourceRows();f<p;f++)for(var g=0;g<l;g++)u[f].splice(i[g],1);for(var v=0;v<l;v++)this.priv.columnSettings.splice(r[v],1)}this.instance.runHooks("afterRemoveCol",o,t,r,n),this.instance.forceFullRender=!0}},f.prototype.spliceCol=function(e,t,n){for(var o=this.instance.getDataAtCol(e),r=o.slice(t,t+n),i=o.slice(t+n),a=arguments.length,s=Array(a>3?a-3:0),u=3;u<a;u++)s[u-3]=arguments[u];(0,l.extendArray)(s,i);for(var c=0;c<n;)s.push(null),c+=1;return(0,l.to2dArray)(s),this.instance.populateFromArray(t,e,s,null,null,"spliceCol"),r},f.prototype.spliceRow=function(e,t,n){for(var o=this.instance.getSourceDataAtRow(e),r=o.slice(t,t+n),i=o.slice(t+n),a=arguments.length,s=Array(a>3?a-3:0),u=3;u<a;u++)s[u-3]=arguments[u];(0,l.extendArray)(s,i);for(var c=0;c<n;)s.push(null),c+=1;return this.instance.populateFromArray(e,t,[s],null,null,"spliceRow"),r},f.prototype.spliceData=function(e,t,n){!1!==this.instance.runHooks("beforeDataSplice",e,t,n)&&this.dataSource.splice(e,t,n)},f.prototype.filterData=function(e,t){var n=this.visualRowsToPhysical(e,t);if(!1!==this.instance.runHooks("beforeDataFilter",e,t,n))return this.dataSource.filter((function(e,t){return-1===n.indexOf(t)}))},f.prototype.get=function(e,t){var n=this.instance.runHooks("modifyRow",e),o=this.dataSource[n],r=this.instance.runHooks("modifyRowData",n),i=null;if((o=isNaN(r)?r:o)&&o.hasOwnProperty&&(0,s.hasOwnProperty)(o,t))i=o[t];else if("string"==typeof t&&t.indexOf(".")>-1){var a=t.split("."),l=o;if(!l)return null;for(var u=0,c=a.length;u<c;u++)if(void 0===(l=l[a[u]]))return null;i=l}else"function"==typeof t&&(i=t(this.dataSource.slice(n,n+1)[0]));if(this.instance.hasHook("modifyData")){var h=(0,s.createObjectPropListener)(i);this.instance.runHooks("modifyData",n,this.propToCol(t),h,"get"),h.isTouched()&&(i=h.value)}return i};var p=(0,i.cellMethodLookupFactory)("copyable",!1);f.prototype.getCopyable=function(e,t){return p.call(this.instance,e,this.propToCol(t))?this.get(e,t):""},f.prototype.set=function(e,t,n,o){var r=this.instance.runHooks("modifyRow",e,o||"datamapGet"),i=n,a=this.dataSource[r],l=this.instance.runHooks("modifyRowData",r);if(a=isNaN(l)?l:a,this.instance.hasHook("modifyData")){var u=(0,s.createObjectPropListener)(i);this.instance.runHooks("modifyData",r,this.propToCol(t),u,"set"),u.isTouched()&&(i=u.value)}if(a&&a.hasOwnProperty&&(0,s.hasOwnProperty)(a,t))a[t]=i;else if("string"==typeof t&&t.indexOf(".")>-1){var c,h=t.split("."),d=a,f=0;for(f=0,c=h.length-1;f<c;f++)void 0===d[h[f]]&&(d[h[f]]={}),d=d[h[f]];d[h[f]]=i}else"function"==typeof t?t(this.dataSource.slice(r,r+1)[0],i):a[t]=i},f.prototype.visualRowsToPhysical=function(e,t){for(var n=this.instance.countSourceRows(),o=[],r=(n+e)%n,i=t,a=void 0;r<n&&i;)a=this.instance.runHooks("modifyRow",r),o.push(a),i-=1,r+=1;return o},f.prototype.visualColumnsToPhysical=function(e,t){for(var n=this.instance.countCols(),o=(n+e)%n,r=[],i=t;o<n&&i;){var a=this.instance.runHooks("modifyCol",o);r.push(a),i-=1,o+=1}return r},f.prototype.clear=function(){for(var e=0;e<this.instance.countSourceRows();e++)for(var t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")},f.prototype.clearLengthCache=function(){this.cachedLength=null},f.prototype.getLength=function(){var e=this,t=this.instance.getSettings().maxRows,n=void 0;n=t<0||0===t?0:t||1/0;var o=this.instance.countSourceRows();if(this.instance.hasHook("modifyRow")){var r=this.skipCache;this.interval.start(),o!==this.latestSourceRowsCount&&(r=!0),this.latestSourceRowsCount=o,null===this.cachedLength||r?((0,c.rangeEach)(o-1,(function(t){null===e.instance.runHooks("modifyRow",t)&&(o-=1)})),this.cachedLength=o):o=this.cachedLength}else this.interval.stop();return Math.min(o,n)},f.prototype.getAll=function(){var e={row:0,col:0},t={row:Math.max(this.instance.countSourceRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,f.prototype.DESTINATION_RENDERER):[]},f.prototype.getRange=function(e,t,n){var o=[],r=void 0,i=void 0,a=void 0,s=this.instance.getSettings().maxRows,l=this.instance.getSettings().maxCols;if(0===s||0===l)return[];var u=n===this.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(s-1,0),Math.max(e.row,t.row)),h=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(r=Math.min(e.row,t.row);r<=c;r++){a=[];var d=this.instance.runHooks("modifyRow",r);for(i=Math.min(e.col,t.col);i<=h&&null!==d;i++)a.push(u.call(this,r,this.colToProp(i)));null!==d&&o.push(a)}return o},f.prototype.getText=function(e,t){return r.default.stringify(this.getRange(e,t,this.DESTINATION_RENDERER))},f.prototype.getCopyableText=function(e,t){return r.default.stringify(this.getRange(e,t,this.DESTINATION_CLIPBOARD_GENERATOR))},f.prototype.onSkipLengthCache=function(e){var t=this;this.skipCache=!0,setTimeout((function(){t.skipCache=!1}),e)},f.prototype.destroy=function(){this.interval.stop(),this.interval=null,this.instance=null,this.priv=null,this.GridSettings=null,this.dataSource=null,this.cachedLength=null,this.duckSchema=null},t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.parseDelay=a;var r=n(40),i=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.timer=null,this.func=t,this.delay=a(n),this.stopped=!0,this._then=null,this._callback=function(){return o.__callback()}}return o(e,null,[{key:"create",value:function(t,n){return new e(t,n)}}]),o(e,[{key:"start",value:function(){return this.stopped&&(this._then=Date.now(),this.stopped=!1,this.timer=(0,r.requestAnimationFrame)(this._callback)),this}},{key:"stop",value:function(){return this.stopped||(this.stopped=!0,(0,r.cancelAnimationFrame)(this.timer),this.timer=null),this}},{key:"__callback",value:function(){if(this.timer=(0,r.requestAnimationFrame)(this._callback),this.delay){var e=Date.now(),t=e-this._then;t>this.delay&&(this._then=e-t%this.delay,this.func())}else this.func()}}]),e}();function a(e){var t=e;return"string"==typeof t&&/fps$/.test(t)&&(t=1e3/parseInt(t.replace("fps","")||0,10)),t}t.default=i},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(){var e={arrayMap:[],weakMap:new WeakMap};return{get:function(o){return t(o)?e.arrayMap[o]:n(o)?e.weakMap.get(o):void 0},set:function(o,r){if(t(o))e.arrayMap[o]=r;else{if(!n(o))throw new Error("Invalid key type");e.weakMap.set(o,r)}},delete:function(o){t(o)?delete e.arrayMap[o]:n(o)&&e.weakMap.delete(o)}};function t(e){return null!==e&&!function(e){return e!=e}(e)&&("string"==typeof e||"number"==typeof e)}function n(e){return null!==e&&("object"===(void 0===e?"undefined":o(e))||"function"==typeof e)}}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(4),i=n(21),a=n(13),s=n(17),l=n(5),u=(o=l)&&o.__esModule?o:{default:o},c=n(55);function h(e,t,n){var o=this,l=new u.default(e),h=!1,d=!1,f=void 0;function p(e){var o="function"==typeof t.settings.enterMoves?t.settings.enterMoves(event):t.settings.enterMoves;e?n.transformStart(-o.row,-o.col):n.transformStart(o.row,o.col,!0)}function g(s){if(e.isListening()&&(e.runHooks("beforeKeyDown",s),!h&&229!==s.keyCode&&!(0,a.isImmediatePropagationStopped)(s)&&(t.lastKeyCode=s.keyCode,n.isSelected()))){var l=(s.ctrlKey||s.metaKey)&&!s.altKey;if(!f||f.isWaiting()||(0,i.isMetaKey)(s.keyCode)||(0,i.isCtrlMetaKey)(s.keyCode)||l||o.isEditorOpened()){var u=s.shiftKey?n.setRangeEnd:n.setRangeStart,d=void 0;switch(s.keyCode){case i.KEY_CODES.A:!o.isEditorOpened()&&l&&(e.selectAll(),s.preventDefault(),(0,a.stopPropagation)(s));break;case i.KEY_CODES.ARROW_UP:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),s.shiftKey?n.transformEnd(-1,0):n.transformStart(-1,0),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.ARROW_DOWN:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),function(e){e?n.transformEnd(1,0):n.transformStart(1,0)}(s.shiftKey),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.ARROW_RIGHT:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),function(e){e?n.transformEnd(0,1):n.transformStart(0,1)}(s.shiftKey),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.ARROW_LEFT:o.isEditorOpened()&&!f.isWaiting()&&o.closeEditorAndSaveChanges(l),function(e){e?n.transformEnd(0,-1):n.transformStart(0,-1)}(s.shiftKey),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.TAB:d="function"==typeof t.settings.tabMoves?t.settings.tabMoves(s):t.settings.tabMoves,s.shiftKey?n.transformStart(-d.row,-d.col):n.transformStart(d.row,d.col,!0),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.BACKSPACE:case i.KEY_CODES.DELETE:e.emptySelectedCells(),o.prepareEditor(),s.preventDefault();break;case i.KEY_CODES.F2:f&&f.enableFullEditMode(),o.openEditor(null,s),s.preventDefault();break;case i.KEY_CODES.ENTER:o.isEditorOpened()?(f&&f.state!==c.EditorState.WAITING&&o.closeEditorAndSaveChanges(l),p(s.shiftKey)):e.getSettings().enterBeginsEditing?(f&&f.enableFullEditMode(),o.openEditor(null,s)):p(s.shiftKey),s.preventDefault(),(0,a.stopImmediatePropagation)(s);break;case i.KEY_CODES.ESCAPE:o.isEditorOpened()&&(o.closeEditorAndRestoreOriginalValue(l),f.focus()),s.preventDefault();break;case i.KEY_CODES.HOME:s.ctrlKey||s.metaKey?u.call(n,new r.CellCoords(0,n.selectedRange.current().from.col)):u.call(n,new r.CellCoords(n.selectedRange.current().from.row,0)),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.END:s.ctrlKey||s.metaKey?u.call(n,new r.CellCoords(e.countRows()-1,n.selectedRange.current().from.col)):u.call(n,new r.CellCoords(n.selectedRange.current().from.row,e.countCols()-1)),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.PAGE_UP:n.transformStart(-e.countVisibleRows(),0),s.preventDefault(),(0,a.stopPropagation)(s);break;case i.KEY_CODES.PAGE_DOWN:n.transformStart(e.countVisibleRows(),0),s.preventDefault(),(0,a.stopPropagation)(s)}}else o.openEditor("",s)}}this.lockEditor=function(){d=!0},this.unlockEditor=function(){d=!1},this.destroyEditor=function(e){d||this.closeEditor(e)},this.getActiveEditor=function(){return f},this.prepareEditor=function(){if(!d)if(f&&f.isWaiting())this.closeEditor(!1,!1,(function(e){e&&o.prepareEditor()}));else{var t=e.selection.selectedRange.current().highlight.row,n=e.selection.selectedRange.current().highlight.col,r=e.colToProp(n),i=e.getCell(t,n),a=e.getSourceDataAtCell(e.runHooks("modifyRow",t),n),l=e.getCellMeta(t,n),u=e.getCellEditor(l);u?(f=(0,s.getEditorInstance)(u,e)).prepare(t,n,r,i,a,l):f=void 0}},this.isEditorOpened=function(){return f&&f.isOpened()},this.openEditor=function(e,t){f&&(f.cellProperties.readOnly?t&&t.keyCode===i.KEY_CODES.ENTER&&p():f.beginEditing(e,t))},this.closeEditor=function(e,t,n){f?f.finishEditing(e,t,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(e){return this.closeEditor(!1,e)},this.closeEditorAndRestoreOriginalValue=function(e){return this.closeEditor(!0,e)},this.destroy=function(){h=!0},e.addHook("afterDocumentKeyDown",g),l.addEventListener(document.documentElement,"keydown",(function(t){h||e.runHooks("afterDocumentKeyDown",t)})),l.addEventListener(document.documentElement,"compositionstart",(function(t){!h&&f&&!f.isOpened()&&e.isListening()&&o.openEditor("",t)})),e.view.wt.update("onCellDblClick",(function(e,t,n){"TD"===n.nodeName&&(f&&f.enableFullEditMode(),o.openEditor(null,e))}))}var d=new WeakMap;h.getInstance=function(e,t,n,o){var r=d.get(e);return r||(r=new h(e,t,n,o),d.set(e,r)),r},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(0),i=u(n(5)),a=n(13),s=u(n(4)),l=n(194);function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()};function h(e){var t=this,n=this;this.eventManager=new i.default(e),this.instance=e,this.settings=e.getSettings(),this.selectionMouseDown=!1;var o=e.rootElement.getAttribute("style");o&&e.rootElement.setAttribute("data-originalstyle",o),(0,r.addClass)(e.rootElement,"handsontable");var u=document.createElement("TABLE");(0,r.addClass)(u,"htCore"),e.getSettings().tableClassName&&(0,r.addClass)(u,e.getSettings().tableClassName),this.THEAD=document.createElement("THEAD"),u.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),u.appendChild(this.TBODY),e.table=u,e.container.insertBefore(u,e.container.firstChild),this.eventManager.addEventListener(e.rootElement,"mousedown",(function(e){t.selectionMouseDown=!0,n.isTextSelectionAllowed(e.target)||(c(),e.preventDefault(),window.focus())})),this.eventManager.addEventListener(e.rootElement,"mouseup",(function(){t.selectionMouseDown=!1})),this.eventManager.addEventListener(e.rootElement,"mousemove",(function(e){t.selectionMouseDown&&!n.isTextSelectionAllowed(e.target)&&(t.settings.fragmentSelection&&c(),e.preventDefault())})),this.eventManager.addEventListener(document.documentElement,"keyup",(function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()}));var h=void 0;this.isMouseDown=function(){return h},this.eventManager.addEventListener(document.documentElement,"mouseup",(function(t){e.selection.isInProgress()&&(0,a.isLeftClick)(t)&&e.selection.finish(),h=!1,((0,r.isOutsideInput)(document.activeElement)||!e.selection.isSelected()&&!(0,a.isRightClick)(t))&&e.unlisten()})),this.eventManager.addEventListener(document.documentElement,"contextmenu",(function(t){e.selection.isInProgress()&&(0,a.isRightClick)(t)&&(e.selection.finish(),h=!1)})),this.eventManager.addEventListener(document.documentElement,"touchend",(function(){e.selection.isInProgress()&&e.selection.finish()})),this.eventManager.addEventListener(document.documentElement,"mousedown",(function(t){var o=t.target,i=t.x||t.clientX,a=t.y||t.clientY,s=t.target;if(!h&&e.rootElement){if(s===e.view.wt.wtTable.holder){var l=(0,r.getScrollbarWidth)();if(document.elementFromPoint(i+l,a)!==e.view.wt.wtTable.holder||document.elementFromPoint(i,a+l)!==e.view.wt.wtTable.holder)return}else for(;s!==document.documentElement;){if(null===s){if(t.isTargetWebComponent)break;return}if(s===e.rootElement)return;s=s.parentNode}("function"==typeof n.settings.outsideClickDeselects?n.settings.outsideClickDeselects(o):n.settings.outsideClickDeselects)?e.deselectCell():e.destroyEditor(!1,!1)}})),this.eventManager.addEventListener(u,"selectstart",(function(e){n.settings.fragmentSelection||(0,r.isInput)(e.target)||e.preventDefault()}));var d={debug:function(){return n.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:u,preventOverflow:function(){return t.settings.preventOverflow},stretchH:function(){return n.settings.stretchH},data:e.getDataAtCell,totalRows:function(){return e.countRows()},totalColumns:function(){return e.countCols()},fixedColumnsLeft:function(){return n.settings.fixedColumnsLeft},fixedRowsTop:function(){return n.settings.fixedRowsTop},fixedRowsBottom:function(){return n.settings.fixedRowsBottom},minSpareRows:function(){return n.settings.minSpareRows},renderAllRows:n.settings.renderAllRows,rowHeaders:function(){var t=[];return e.hasRowHeaders()&&t.push((function(e,t){return n.appendRowHeader(e,t)})),e.runHooks("afterGetRowHeaderRenderers",t),t},columnHeaders:function(){var t=[];return e.hasColHeaders()&&t.push((function(e,t){n.appendColHeader(e,t)})),e.runHooks("afterGetColumnHeaderRenderers",t),t},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(e,t,o){var r=n.instance.getCellMeta(e,t),i=n.instance.colToProp(t),a=n.instance.getDataAtRowProp(e,i);n.instance.hasHook("beforeValueRender")&&(a=n.instance.runHooks("beforeValueRender",a,r)),n.instance.runHooks("beforeRenderer",o,e,t,i,a,r),n.instance.getCellRenderer(r)(n.instance,o,e,t,i,a,r),n.instance.runHooks("afterRenderer",o,e,t,i,a,r)},selections:n.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return n.settings.fragmentSelection},onCellMouseDown:function(t,o,r,i){var s={row:!1,column:!1,cell:!1};e.listen(),n.activeWt=i,h=!0,e.runHooks("beforeOnCellMouseDown",t,o,r,s),(0,a.isImmediatePropagationStopped)(t)||((0,l.handleMouseEvent)(t,{coords:o,selection:e.selection,controller:s}),e.runHooks("afterOnCellMouseDown",t,o,r),n.activeWt=n.wt)},onCellContextMenu:function(t,o,r,i){n.activeWt=i,h=!1,e.selection.isInProgress()&&e.selection.finish(),e.runHooks("beforeOnCellContextMenu",t,o,r),(0,a.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellContextMenu",t,o,r),n.activeWt=n.wt)},onCellMouseOut:function(t,o,r,i){n.activeWt=i,e.runHooks("beforeOnCellMouseOut",t,o,r),(0,a.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellMouseOut",t,o,r),n.activeWt=n.wt)},onCellMouseOver:function(t,o,r,i){var s={row:!1,column:!1,cell:!1};n.activeWt=i,e.runHooks("beforeOnCellMouseOver",t,o,r,s),(0,a.isImmediatePropagationStopped)(t)||(h&&(0,l.handleMouseEvent)(t,{coords:o,selection:e.selection,controller:s}),e.runHooks("afterOnCellMouseOver",t,o,r),n.activeWt=n.wt)},onCellMouseUp:function(t,o,r,i){n.activeWt=i,e.runHooks("beforeOnCellMouseUp",t,o,r),e.runHooks("afterOnCellMouseUp",t,o,r),n.activeWt=n.wt},onCellCornerMouseDown:function(t){t.preventDefault(),e.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:function(t){t.preventDefault(),e.runHooks("afterOnCellCornerDblClick",t)},beforeDraw:function(e,t){n.beforeRender(e,t)},onDraw:function(e){n.onDraw(e)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return e.runHooks("beforeRemoveCellClassNames")},onAfterDrawSelection:function(t,n,o,r){return e.runHooks("afterDrawSelection",t,n,o,r)},onBeforeDrawBorders:function(t,n){e.runHooks("beforeDrawBorders",t,n)},onBeforeTouchScroll:function(){e.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){e.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(t,n){return e.runHooks("beforeStretchingColumnWidth",t,n)},onModifyRowHeaderWidth:function(t){return e.runHooks("modifyRowHeaderWidth",t)},onModifyGetCellCoords:function(t,n,o){return e.runHooks("modifyGetCellCoords",t,n,o)},viewportRowCalculatorOverride:function(t){var o=e.countRows(),r=n.settings.viewportRowRenderingOffset;if("auto"===r&&n.settings.fixedRowsTop&&(r=10),"number"==typeof r&&(t.startRow=Math.max(t.startRow-r,0),t.endRow=Math.min(t.endRow+r,o-1)),"auto"===r){var i=t.startRow+t.endRow-t.startRow,a=Math.ceil(i/o*12);t.startRow=Math.max(t.startRow-a,0),t.endRow=Math.min(t.endRow+a,o-1)}e.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var o=e.countCols(),r=n.settings.viewportColumnRenderingOffset;if("auto"===r&&n.settings.fixedColumnsLeft&&(r=10),"number"==typeof r&&(t.startColumn=Math.max(t.startColumn-r,0),t.endColumn=Math.min(t.endColumn+r,o-1)),"auto"===r){var i=t.startColumn+t.endColumn-t.startColumn,a=Math.ceil(i/o*12);t.startRow=Math.max(t.startColumn-a,0),t.endColumn=Math.min(t.endColumn+a,o-1)}e.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:function(){return n.settings.rowHeaderWidth},columnHeaderHeight:function(){var t=e.runHooks("modifyColumnHeaderHeight");return n.settings.columnHeaderHeight||t}};e.runHooks("beforeInitWalkontable",d),this.wt=new s.default(d),this.activeWt=this.wt,this.eventManager.addEventListener(n.wt.wtTable.spreader,"mousedown",(function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,a.stopPropagation)(e)})),this.eventManager.addEventListener(n.wt.wtTable.spreader,"contextmenu",(function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,a.stopPropagation)(e)})),this.eventManager.addEventListener(document.documentElement,"click",(function(){n.settings.observeDOMVisibility&&n.wt.drawInterrupted&&(n.instance.forceFullRender=!0,n.render())}))}h.prototype.isTextSelectionAllowed=function(e){if((0,r.isInput)(e))return!0;var t=(0,r.isChildOf)(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell())},h.prototype.isSelectedOnlyCell=function(){var e=this.instance.getSelectedLast()||[],t=o(e,4),n=t[0],r=t[1],i=t[2],a=t[3];return void 0!==n&&n===i&&r===a},h.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},h.prototype.beforeRender=function(e,t){e&&this.instance.runHooks("beforeRender",this.instance.forceFullRender,t)},h.prototype.onDraw=function(e){e&&this.instance.runHooks("afterRender",this.instance.forceFullRender)},h.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},h.prototype.getCellAtCoords=function(e,t){var n=this.wt.getCell(e,t);return n<0?null:n},h.prototype.scrollViewport=function(e,t,n,o,r){return this.wt.scrollViewport(e,t,n,o,r)},h.prototype.scrollViewportHorizontally=function(e,t,n){return this.wt.scrollViewportHorizontally(e,t,n)},h.prototype.scrollViewportVertically=function(e,t,n){return this.wt.scrollViewportVertically(e,t,n)},h.prototype.appendRowHeader=function(e,t){if(t.firstChild){var n=t.firstChild;if(!(0,r.hasClass)(n,"relative"))return(0,r.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{var o=document.createElement("div"),i=document.createElement("span");o.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,this.instance.getRowHeader),o.appendChild(i),t.appendChild(o)}this.instance.runHooks("afterGetRowHeader",e,t)},h.prototype.appendColHeader=function(e,t){if(t.firstChild){var n=t.firstChild;(0,r.hasClass)(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,this.instance.getColHeader):((0,r.empty)(t),this.appendColHeader(e,t))}else{var o=document.createElement("div"),i=document.createElement("span");o.className="relative",i.className="colHeader",this
27
  * Version: 5.0.2
28
  * Release date: 12/09/2018 (built at 11/09/2018 09:55:19)
29
  */