Plugin Directory

Changeset 2325036


Ignore:
Timestamp:
06/16/2020 10:39:43 AM (5 years ago)
Author:
codeinwp
Message:

Release v3.4.4

Location:
visualizer
Files:
1051 added
46 edited

Legend:

Unmodified
Added
Removed
  • visualizer/trunk/CHANGELOG.md

    r2297689 r2325036  
    11
     2 ### v3.4.4 - 2020-06-16
     3 **Changes:**
     4 * [Feat] Option to download charts as .png images
     5* [Fix] Make UI more intuitive when a chart is missing in the editor
     6* [Fix] Clicking Copy chart shows the Copied message multiple times
     7* [Fix] Conflict with Modern Events Calendar plugin
     8* [Fix] Chart size ( width and height ) options not working for ChartJS charts
     9* [Fix] Resizing the window causes annotation-based charts to throw an error
     10* [Fix] Remove Inside the Chart option as legend position for Google Pie charts
     11* [Fix] Clicking Advanced Options panel breaks Bubble chart
     12* [Fix] Missing posts revisions on chart update
     13 
    214 ### v3.4.3 - 2020-05-04
    315 **Changes:**
  • visualizer/trunk/classes/Visualizer/Gutenberg/Block.php

    r2297689 r2325036  
    521521
    522522        if ( $data['id'] && ! is_wp_error( $data['id'] ) ) {
    523 
     523            if ( get_post_type( $data['id'] ) !== Visualizer_Plugin::CPT_VISUALIZER ) {
     524                return new WP_Error( 'invalid_post_type', 'Invalid post type.' );
     525            }
    524526            $chart_type = sanitize_text_field( $data['visualizer-chart-type'] );
    525527            $source_type = sanitize_text_field( $data['visualizer-source'] );
  • visualizer/trunk/classes/Visualizer/Gutenberg/build/block.js

    r2297689 r2325036  
    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 j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(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 z(e){var t,n,r={};for(n in e)d(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var A={};function N(e,t){A[e]=t}function F(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 R=/(\[[^\[]*\])|(\\)?([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,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function J(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 F(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=q(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(R);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+=j(a[r])?a[r].call(t,e):a[r];return i}}(t),I[t](e)):e.localeData().invalidDate()}function q(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var V=/\d/,G=/\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]=j(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}J("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),J(0,["YY",2],0,(function(){return this.year()%100})),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),H("year","y"),N("year",1),ce("Y",ie),ce("YY",Q,G),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=je("FullYear",!0);function je(e,t){return function(n){return null!=n?(Ee(this,e,n),a.updateOffset(this,t),this):xe(this,e)}}function xe(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},J("M",["MM",2],"Mo",(function(){return this.month()+1})),J("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),J("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),N("month",8),ce("M",Q),ce("MM",Q,G),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("_"),ze="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ae(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 Ne(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 Fe(e){return null!=e?(Ne(this,e),a.updateOffset(this,!0),this):xe(this,"Month")}var Re=le,We=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 Je(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ue(e,t,n){var r=7+t-n;return-(7+Je(e,0,r).getUTCDay()-t)%7+r-1}function qe(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+Ue(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 Ve(e,t,n){var r,a,i=Ue(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ge(a=e.year()-1,t,n):o>Ge(e.year(),t,n)?(r=o-Ge(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ge(e,t,n){var r=Ue(e,t,n),a=Ue(e+1,t,n);return(De(e)-r+a)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),N("week",5),N("isoWeek",5),ce("w",Q),ce("ww",Q,G),ce("W",Q),ce("WW",Q,G),_e(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),J("d",0,"do","day"),J("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),J("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),J("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),N("day",11),N("weekday",11),N("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){J(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,rt),J("k",["kk",2],0,(function(){return this.hours()||24})),J("hmm",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)})),J("hmmss",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),J("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),J("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),at("a",!0),at("A",!1),H("hour","h"),N("hour",13),ce("a",it),ce("A",it),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,G),ce("hh",Q,G),ce("kk",Q,G),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=je("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:ze,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(x(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],Ve(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=Ve(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>Ge(n,i,o)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=qe(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=Je(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?Je: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||""),jt(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),ze.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=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function jt(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=q(e._f,e._locale).match(R)||[],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 xt(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],jt(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?jt(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=z(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(xt(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 zt(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 At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Nt(e){var t=z(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(At,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<At.length;++r)if(e[At[r]]){if(n)return!1;parseFloat(e[At[r]])!==k(e[At[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 Ft(e){return e instanceof Nt}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,t){J(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Wt("Z",":"),Wt("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 Jt(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 Ut(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function qt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Vt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?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 Ft(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Vt.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(Rt(1e3*c[ke]))*n}):(c=Gt.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=Jt(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 Nt(u),Ft(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=Rt(t._days),s=Rt(t._months);e.isValid()&&(r=null==r||r,s&&Ne(e,xe(e,"Month")+s*n),o&&Ee(e,"Date",xe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,o||s))}$t.fn=Nt.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){J(0,[e,e.length],0,t)}function ln(e,t,n,r,a){var i;return null==e?Ve(this,r,a).year:(t>(i=Ge(e,r,a))&&(t=i),un.call(this,e,t,n,r,a))}function un(e,t,n,r,a){var i=qe(e,t,n,r,a),o=Je(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}J(0,["gg",2],0,(function(){return this.weekYear()%100})),J(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"),N("weekYear",1),N("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,G),ce("gg",Q,G),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)})),J("Q",0,"Qo","quarter"),H("quarter","Q"),N("quarter",7),ce("Q",V),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),J("D",["DD",2],"Do","date"),H("date","D"),N("date",9),ce("D",Q),ce("DD",Q,G),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=je("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),N("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),J("m",["mm",2],0,"minute"),H("minute","m"),N("minute",14),ce("m",Q),ce("mm",Q,G),he(["m","mm"],Me);var dn=je("Minutes",!1);J("s",["ss",2],0,"second"),H("second","s"),N("second",15),ce("s",Q),ce("ss",Q,G),he(["s","ss"],we);var mn,pn=je("Seconds",!1);for(J("S",0,0,(function(){return~~(this.millisecond()/100)})),J(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),J(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),J(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),J(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),J(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),J(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),N("millisecond",16),ce("S",te,V),ce("SS",te,G),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=je("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("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=Jt(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(j(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=Jt(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=U(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 j(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:A[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=z(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(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?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",U(n,"Z")):U(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=Fe,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=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Ge(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=Ut(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:Ut(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(Ut(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=qt,fn.isUTC=qt,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",Fe),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=xt(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 j(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 j(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 j(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)j(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 Ae.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=We),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=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ve(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"),jn=Tn("m"),xn=Tn("h"),En=Tn("d"),Cn=Tn("w"),Hn=Tn("M"),Pn=Tn("y");function zn(e){return function(){return this.isValid()?this._data[e]:NaN}}var An=zn("milliseconds"),Nn=zn("seconds"),Fn=zn("minutes"),Rn=zn("hours"),Wn=zn("days"),In=zn("months"),Bn=zn("years"),Jn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};function qn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Vn=Math.abs;function Gn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),a=Vn(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=Gn(this._months)!==Gn(d)?"-":"",h=Gn(this._days)!==Gn(d)?"-":"",_=Gn(this._milliseconds)!==Gn(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=Nt.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=jn,Kn.asHours=xn,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=An,Kn.seconds=Nn,Kn.minutes=Fn,Kn.hours=Rn,Kn.days=Wn,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=Jn(r.as("s")),i=Jn(r.as("m")),o=Jn(r.as("h")),s=Jn(r.as("d")),l=Jn(r.as("M")),u=Jn(r.as("y")),c=a<=Un.ss&&["s",a]||a<Un.s&&["ss",a]||i<=1&&["m"]||i<Un.m&&["mm",i]||o<=1&&["h"]||o<Un.h&&["hh",o]||s<=1&&["d"]||s<Un.d&&["dd",s]||l<=1&&["M"]||l<Un.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,qn.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,J("X",0,0,"unix"),J("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 zt("isBefore",[].slice.call(arguments,0))},a.max=function(){return zt("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=Ft,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=x(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?Jn:"function"==typeof e&&(Jn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.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";
     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 f(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 _(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 w(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function M(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=M(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 T(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 D,S={};function O(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),S[e]||(Y(t),S[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(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,D=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var C={};function P(e,t){var n=e.toLowerCase();C[n]=C[n+"s"]=C[t]=e}function H(e){return"string"==typeof e?C[e]||C[e.toLowerCase()]:void 0}function z(e){var t,n,r={};for(n in e)d(e,n)&&(t=H(n))&&(r[t]=e[n]);return r}var A={};function N(e,t){A[e]=t}function F(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 R=/(\[[^\[]*\])|(\\)?([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,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function J(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 F(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=q(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(R);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+=j(a[r])?a[r].call(t,e):a[r];return i}}(t),I[t](e)):e.localeData().invalidDate()}function q(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var V=/\d/,G=/\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]=j(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 fe(e,t){he(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function _e(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}var ye=0,ge=1,be=2,ve=3,we=4,Me=5,ke=6,Le=7,Ye=8;function Te(e){return De(e)?366:365}function De(e){return e%4==0&&e%100!=0||e%400==0}J("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),J(0,["YY",2],0,(function(){return this.year()%100})),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),P("year","y"),N("year",1),ce("Y",ie),ce("YY",Q,G),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=je("FullYear",!0);function je(e,t){return function(n){return null!=n?(Ee(this,e,n),a.updateOffset(this,t),this):xe(this,e)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&De(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?De(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},J("M",["MM",2],"Mo",(function(){return this.month()+1})),J("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),J("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),P("month","M"),N("month",8),ce("M",Q),ce("MM",Q,G),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 Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ze="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ae(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 Ne(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 Fe(e){return null!=e?(Ne(this,e),a.updateOffset(this,!0),this):xe(this,"Month")}var Re=le,We=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 Je(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ue(e,t,n){var r=7+t-n;return-(7+Je(e,0,r).getUTCDay()-t)%7+r-1}function qe(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+Ue(e,r,a);return s<=0?o=Te(i=e-1)+s:s>Te(e)?(i=e+1,o=s-Te(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ve(e,t,n){var r,a,i=Ue(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ge(a=e.year()-1,t,n):o>Ge(e.year(),t,n)?(r=o-Ge(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ge(e,t,n){var r=Ue(e,t,n),a=Ue(e+1,t,n);return(Te(e)-r+a)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),N("week",5),N("isoWeek",5),ce("w",Q),ce("ww",Q,G),ce("W",Q),ce("WW",Q,G),fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),J("d",0,"do","day"),J("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),J("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),J("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),N("day",11),N("weekday",11),N("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)})),fe(["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})),fe(["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){J(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,rt),J("k",["kk",2],0,(function(){return this.hours()||24})),J("hmm",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)})),J("hmmss",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),J("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),J("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),at("a",!0),at("A",!1),P("hour","h"),N("hour",13),ce("a",it),ce("A",it),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,G),ce("hh",Q,G),ce("kk",Q,G),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[we]=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[we]=k(e.substr(r,2)),t[Me]=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[we]=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[we]=k(e.substr(r,2)),t[Me]=k(e.substr(a))}));var ot,st=je("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:He,monthsShort:ze,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)?ft(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(x(n,t)),ct[e]&&ct[e].forEach((function(e){ht(e.name,e.config)})),pt(e),ut[e]}return delete ut[e],null}function ft(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 _t(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[we]||0!==n[Me]||0!==n[ke])?ve:n[we]<0||n[we]>59?we:n[Me]<0||n[Me]>59?Me: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],Ve(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=Ve(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>Ge(n,i,o)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=qe(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>Te(o)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Je(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[we]&&0===e._a[Me]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Je: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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,Mt=[["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=Mt.length;t<n;t++)if(Mt[t][1].exec(l[1])){a=Mt[t][0],r=!1!==Mt[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(!wt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),jt(e)}else e._isValid=!1}var Tt=/^(?:(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 Dt(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=Tt.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=[Dt(t),ze.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=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function jt(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=q(e._f,e._locale).match(R)||[],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),_e(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),_t(e)}else Ot(e);else Yt(e)}function xt(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new v(_t(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],jt(t),f(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?jt(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=z(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),f(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(_t(xt(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=T("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 Pt=T("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:_()})),Ht=T("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:_()}));function zt(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 At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Nt(e){var t=z(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(At,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<At.length;++r)if(e[At[r]]){if(n)return!1;parseFloat(e[At[r]])!==k(e[At[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=ft(),this._bubble()}function Ft(e){return e instanceof Nt}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,t){J(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Wt("Z",":"),Wt("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 Jt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(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 Ut(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function qt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Vt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?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 Ft(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Vt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[be])*n,h:k(c[ve])*n,m:k(c[we])*n,s:k(c[Me])*n,ms:k(Rt(1e3*c[ke]))*n}):(c=Gt.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=Jt(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 Nt(u),Ft(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=Rt(t._days),s=Rt(t._months);e.isValid()&&(r=null==r||r,s&&Ne(e,xe(e,"Month")+s*n),o&&Ee(e,"Date",xe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,o||s))}$t.fn=Nt.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=ft(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=T("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){J(0,[e,e.length],0,t)}function ln(e,t,n,r,a){var i;return null==e?Ve(this,r,a).year:(t>(i=Ge(e,r,a))&&(t=i),un.call(this,e,t,n,r,a))}function un(e,t,n,r,a){var i=qe(e,t,n,r,a),o=Je(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}J(0,["gg",2],0,(function(){return this.weekYear()%100})),J(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,G),ce("gg",Q,G),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),fe(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),J("Q",0,"Qo","quarter"),P("quarter","Q"),N("quarter",7),ce("Q",V),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),J("D",["DD",2],"Do","date"),P("date","D"),N("date",9),ce("D",Q),ce("DD",Q,G),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=je("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),N("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),J("m",["mm",2],0,"minute"),P("minute","m"),N("minute",14),ce("m",Q),ce("mm",Q,G),he(["m","mm"],we);var dn=je("Minutes",!1);J("s",["ss",2],0,"second"),P("second","s"),N("second",15),ce("s",Q),ce("ss",Q,G),he(["s","ss"],Me);var mn,pn=je("Seconds",!1);for(J("S",0,0,(function(){return~~(this.millisecond()/100)})),J(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),J(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),J(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),J(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),J(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),J(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),P("millisecond","ms"),N("millisecond",16),ce("S",te,V),ce("SS",te,G),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 fn=je("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var _n=v.prototype;function yn(e){return e}_n.add=en,_n.calendar=function(e,t){var n=e||Ct(),r=Jt(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(j(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Ct(n)))},_n.clone=function(){return new v(this)},_n.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Jt(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=H(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:M(i)},_n.endOf=function(e){return void 0===(e=H(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},_n.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},_n.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ct(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.fromNow=function(e){return this.from(Ct(),e)},_n.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ct(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.toNow=function(e){return this.to(Ct(),e)},_n.get=function(e){return j(this[e=H(e)])?this[e]():this},_n.invalidAt=function(){return h(this).overflow},_n.isAfter=function(e,t){var n=w(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},_n.isBefore=function(e,t){var n=w(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},_n.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))},_n.isSame=function(e,t){var n,r=w(e)?e:Ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=H(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},_n.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},_n.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},_n.isValid=function(){return f(this)},_n.lang=an,_n.locale=rn,_n.localeData=on,_n.max=Ht,_n.min=Pt,_n.parsingFlags=function(){return m({},h(this))},_n.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:A[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=z(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=H(e)]))return this[e](t);return this},_n.startOf=function(e){switch(e=H(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},_n.subtract=tn,_n.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},_n.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()}},_n.toDate=function(){return new Date(this.valueOf())},_n.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?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_n.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)},_n.toJSON=function(){return this.isValid()?this.toISOString():null},_n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_n.unix=function(){return Math.floor(this.valueOf()/1e3)},_n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_n.year=Oe,_n.isLeapYear=function(){return De(this.year())},_n.weekYear=function(e){return ln.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},_n.isoWeekYear=function(e){return ln.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},_n.quarter=_n.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},_n.month=Fe,_n.daysInMonth=function(){return Ce(this.year(),this.month())},_n.week=_n.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},_n.isoWeek=_n.isoWeeks=function(e){var t=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},_n.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},_n.isoWeeksInYear=function(){return Ge(this.year(),1,4)},_n.date=cn,_n.day=_n.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},_n.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")},_n.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},_n.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")},_n.hour=_n.hours=st,_n.minute=_n.minutes=dn,_n.second=_n.seconds=pn,_n.millisecond=_n.milliseconds=fn,_n.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=Ut(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:Ut(this)},_n.utc=function(e){return this.utcOffset(0,e)},_n.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ut(this),"m")),this},_n.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},_n.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},_n.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_n.isLocal=function(){return!!this.isValid()&&!this._isUTC},_n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_n.isUtc=qt,_n.isUTC=qt,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=T("dates accessor is deprecated. Use date instead.",cn),_n.months=T("months accessor is deprecated. Use month instead",Fe),_n.years=T("years accessor is deprecated. Use year instead",Oe),_n.zone=T("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()})),_n.isDSTShifted=T("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=xt(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=ft(),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 wn(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=ft(),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 j(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 j(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 j(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)j(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||Pe).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[Pe.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 Ae.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=We),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=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ve(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=T("moment.lang is deprecated. Use moment.locale instead.",pt),a.langData=T("moment.langData is deprecated. Use moment.localeData instead.",ft);var Mn=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 Tn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Sn=Dn("ms"),On=Dn("s"),jn=Dn("m"),xn=Dn("h"),En=Dn("d"),Cn=Dn("w"),Pn=Dn("M"),Hn=Dn("y");function zn(e){return function(){return this.isValid()?this._data[e]:NaN}}var An=zn("milliseconds"),Nn=zn("seconds"),Fn=zn("minutes"),Rn=zn("hours"),Wn=zn("days"),In=zn("months"),Bn=zn("years"),Jn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};function qn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Vn=Math.abs;function Gn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),a=Vn(this._months);e=M(n/60),t=M(e/60),n%=60,e%=60;var i=M(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=Gn(this._months)!==Gn(d)?"-":"",h=Gn(this._days)!==Gn(d)?"-":"",f=Gn(this._milliseconds)!==Gn(d)?"-":"";return m+"P"+(i?p+i+"Y":"")+(o?p+o+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?f+l+"H":"")+(u?f+u+"M":"")+(c?f+c+"S":"")}var Kn=Nt.prototype;return Kn.isValid=function(){return this._isValid},Kn.abs=function(){var e=this._data;return this._milliseconds=Mn(this._milliseconds),this._days=Mn(this._days),this._months=Mn(this._months),e.milliseconds=Mn(e.milliseconds),e.seconds=Mn(e.seconds),e.minutes=Mn(e.minutes),e.hours=Mn(e.hours),e.months=Mn(e.months),e.years=Mn(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=H(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(Tn(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=jn,Kn.asHours=xn,Kn.asDays=En,Kn.asWeeks=Cn,Kn.asMonths=Pn,Kn.asYears=Hn,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(Tn(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=M(i/1e3),l.seconds=e%60,t=M(e/60),l.minutes=t%60,n=M(t/60),l.hours=n%24,o+=M(n/24),a=M(Yn(o)),s+=a,o-=Ln(Tn(a)),r=M(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=H(e),this.isValid()?this[e+"s"]():NaN},Kn.milliseconds=An,Kn.seconds=Nn,Kn.minutes=Fn,Kn.hours=Rn,Kn.days=Wn,Kn.weeks=function(){return M(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=Jn(r.as("s")),i=Jn(r.as("m")),o=Jn(r.as("h")),s=Jn(r.as("d")),l=Jn(r.as("M")),u=Jn(r.as("y")),c=a<=Un.ss&&["s",a]||a<Un.s&&["ss",a]||i<=1&&["m"]||i<Un.m&&["mm",i]||o<=1&&["h"]||o<Un.h&&["hh",o]||s<=1&&["d"]||s<Un.d&&["dd",s]||l<=1&&["M"]||l<Un.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,qn.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=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Kn.lang=an,J("X",0,0,"unix"),J("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=_n,a.min=function(){return zt("isBefore",[].slice.call(arguments,0))},a.max=function(){return zt("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=_,a.duration=$t,a.isMoment=w,a.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},a.parseZone=function(){return Ct.apply(null,arguments).parseZone()},a.localeData=ft,a.isDuration=Ft,a.monthsShort=function(e,t){return vn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return wn(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=x(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 D(ut)},a.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},a.normalizeUnits=H,a.relativeTimeRounding=function(e){return void 0===e?Jn:"function"==typeof e&&(Jn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.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=_n,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(w(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"===w(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"===w(e)?e:""===e?e:((e=e.split(".")).pop(),e=e.join(".")))).length&&r}}function a(e,t,n=null){if("string"===w(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"===w(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(_(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(_(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(w(e))>-1&&e)}function l(e){return!u(e)}function u(e){return!1===function(e){return y(e)?e:!(["null","undefined"].indexOf(w(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function c(e){return-1===["array","object"].indexOf(w(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)&&_(e,Object.keys(t))){if(g(f(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(w(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)&&_(t,Object.keys(n))){g(f(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)&&_(t,Object.keys(n))){if(g(f(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 f(e,t){const n=w(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 _(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(w(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=w(e);return n===w(t)&&n}function w(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var M={getType:function(e){return w(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 _(e,t)},trim:function(e,t){return f(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(w(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"===w(t)){let r=[];return t.forEach(t=>{d(e,t,n)&&r.push(t)}),r}if("object"===w(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"===w(t)){let r=[];return t.forEach(t=>{d(e,t,n)||r.push(t)}),r}if("object"===w(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"===w(t)){let a=[];return t.forEach(t=>{const i=m(e,t);l(i)&&o(i,n,r)&&a.push(t)}),a}if("object"===w(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"===w(t)){let a=[];return t.forEach(t=>{const o=m(e,t);l(o)&&i(o,n,r)&&a.push(t)}),a}if("object"===w(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"===w(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"===w(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"!==w(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"===w(t)&&"string"===w(n)&&""!==t&&""!==n){var a=!1;return function e(t,n,r,i,o=0){let s;switch(w(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"===w(t)&&"string"===w(n)&&""!==t&&""!==n)return function e(t,n,r,a,i=0){let o;switch(w(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"!==w(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"!==w(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=M},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";
    22/*!
    33 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
     
    4545 * This source code is licensed under the MIT license found in the
    4646 * LICENSE file in the root directory of this source tree.
    47  */var r=n(136),a=n(137),i=n(138),o=n(139),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,u=s?Symbol.for("react.portal"):60106,c=s?Symbol.for("react.fragment"):60107,d=s?Symbol.for("react.strict_mode"):60108,m=s?Symbol.for("react.profiler"):60114,p=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,_=s?Symbol.for("react.async_mode"):60111,f=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);a(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function M(){}function w(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&g("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},M.prototype=v.prototype;var k=w.prototype=new M;k.constructor=w,r(k,v.prototype),k.isPureReactComponent=!0;var L={current:null},Y=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r=void 0,a={},i=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(i=""+t.key),t)Y.call(t,r)&&!D.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:l,type:e,key:i,ref:o,props:a,_owner:L.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var O=/\/+/g,j=[];function x(e,t,n,r){if(j.length){var a=j.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function E(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function C(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case u:i=!0}}if(i)return n(r,e,""===t?"."+H(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var o=0;o<e.length;o++){var s=t+H(a=e[o],o);i+=C(a,s,n,r)}else if(null==e?s=null:s="function"==typeof(s=y&&e[y]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),o=0;!(a=e.next()).done;)i+=C(a=a.value,s=t+H(a,o++),n,r);else"object"===a&&g("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function H(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function P(e,t){e.func.call(e.context,t,e.count++)}function z(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?A(e,r,n,o.thatReturnsArgument):null!=e&&(S(e)&&(t=a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function A(e,t,n,r,a){var i="";null!=n&&(i=(""+n).replace(O,"$&/")+"/"),t=x(t,i,r,a),null==e||C(e,"",z,t),E(t)}var N={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return A(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=x(null,null,t,n),null==e||C(e,"",P,t),E(t)},count:function(e){return null==e?0:C(e,"",o.thatReturnsNull,null)},toArray:function(e){var t=[];return A(e,t,null,o.thatReturnsArgument),t},only:function(e){return S(e)||g("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:p,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:f,render:e}},Fragment:c,StrictMode:d,unstable_AsyncMode:_,unstable_Profiler:m,createElement:T,cloneElement:function(e,t,n){null==e&&g("267",e);var a=void 0,i=r({},e.props),o=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=L.current),void 0!==t.key&&(o=""+t.key);var c=void 0;for(a in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)Y.call(t,a)&&!D.hasOwnProperty(a)&&(i[a]=void 0===t[a]&&void 0!==c?c[a]:t[a])}if(1===(a=arguments.length-2))i.children=n;else if(1<a){c=Array(a);for(var d=0;d<a;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:l,type:e.type,key:o,ref:s,props:i,_owner:u}},createFactory:function(e){var t=T.bind(null,e);return t.type=e,t},isValidElement:S,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:L,assign:r}},F={default:N},R=F&&N||F;e.exports=R.default?R.default:R},function(e,t,n){"use strict";
     47 */var r=n(136),a=n(137),i=n(138),o=n(139),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,u=s?Symbol.for("react.portal"):60106,c=s?Symbol.for("react.fragment"):60107,d=s?Symbol.for("react.strict_mode"):60108,m=s?Symbol.for("react.profiler"):60114,p=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,f=s?Symbol.for("react.async_mode"):60111,_=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);a(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function w(){}function M(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&g("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=v.prototype;var k=M.prototype=new w;k.constructor=M,r(k,v.prototype),k.isPureReactComponent=!0;var L={current:null},Y=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r=void 0,a={},i=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(i=""+t.key),t)Y.call(t,r)&&!T.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:l,type:e,key:i,ref:o,props:a,_owner:L.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var O=/\/+/g,j=[];function x(e,t,n,r){if(j.length){var a=j.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function E(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function C(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case u:i=!0}}if(i)return n(r,e,""===t?"."+P(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var o=0;o<e.length;o++){var s=t+P(a=e[o],o);i+=C(a,s,n,r)}else if(null==e?s=null:s="function"==typeof(s=y&&e[y]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),o=0;!(a=e.next()).done;)i+=C(a=a.value,s=t+P(a,o++),n,r);else"object"===a&&g("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function H(e,t){e.func.call(e.context,t,e.count++)}function z(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?A(e,r,n,o.thatReturnsArgument):null!=e&&(S(e)&&(t=a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function A(e,t,n,r,a){var i="";null!=n&&(i=(""+n).replace(O,"$&/")+"/"),t=x(t,i,r,a),null==e||C(e,"",z,t),E(t)}var N={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return A(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=x(null,null,t,n),null==e||C(e,"",H,t),E(t)},count:function(e){return null==e?0:C(e,"",o.thatReturnsNull,null)},toArray:function(e){var t=[];return A(e,t,null,o.thatReturnsArgument),t},only:function(e){return S(e)||g("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:M,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:p,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:_,render:e}},Fragment:c,StrictMode:d,unstable_AsyncMode:f,unstable_Profiler:m,createElement:D,cloneElement:function(e,t,n){null==e&&g("267",e);var a=void 0,i=r({},e.props),o=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=L.current),void 0!==t.key&&(o=""+t.key);var c=void 0;for(a in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)Y.call(t,a)&&!T.hasOwnProperty(a)&&(i[a]=void 0===t[a]&&void 0!==c?c[a]:t[a])}if(1===(a=arguments.length-2))i.children=n;else if(1<a){c=Array(a);for(var d=0;d<a;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:l,type:e.type,key:o,ref:s,props:i,_owner:u}},createFactory:function(e){var t=D.bind(null,e);return t.type=e,t},isValidElement:S,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:L,assign:r}},F={default:N},R=F&&N||F;e.exports=R.default?R.default:R},function(e,t,n){"use strict";
    4848/*
    4949object-assign
    5050(c) Sindre Sorhus
    5151@license MIT
    52 */var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=o(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))a.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,a,i,o,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,a,i,o,s,l],d=0;(u=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t,n){e.exports=n(141)()},function(e,t,n){"use strict";var r=n(142);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,a,i=n(5),o=n(6),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],d=(e=e||{}).node||r,m=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==m){var p=i();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==m&&(m=a=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),_=void 0!==e.nsecs?e.nsecs:l+1,f=h-s+(_-l)/1e4;if(f<0&&void 0===e.clockseq&&(m=m+1&16383),(f<0||h>s)&&void 0===e.nsecs&&(_=0),_>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,l=_,a=m;var y=(1e4*(268435455&(h+=122192928e5))+_)%4294967296;c[u++]=y>>>24&255,c[u++]=y>>>16&255,c[u++]=y>>>8&255,c[u++]=255&y;var g=h/4294967296*1e4&268435455;c[u++]=g>>>8&255,c[u++]=255&g,c[u++]=g>>>24&15|16,c[u++]=g>>>16&255,c[u++]=m>>>8|128,c[u++]=255&m;for(var b=0;b<6;++b)c[u+b]=d[b];return t||o(c)}},function(e,t,n){var r=n(5),a=n(6);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},function(e,t,n){"use strict";
     52*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=o(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))a.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,a,i,o,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,a,i,o,s,l],d=0;(u=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t,n){e.exports=n(141)()},function(e,t,n){"use strict";var r=n(142);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,a,i=n(5),o=n(6),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],d=(e=e||{}).node||r,m=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==m){var p=i();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==m&&(m=a=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,_=h-s+(f-l)/1e4;if(_<0&&void 0===e.clockseq&&(m=m+1&16383),(_<0||h>s)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,l=f,a=m;var y=(1e4*(268435455&(h+=122192928e5))+f)%4294967296;c[u++]=y>>>24&255,c[u++]=y>>>16&255,c[u++]=y>>>8&255,c[u++]=255&y;var g=h/4294967296*1e4&268435455;c[u++]=g>>>8&255,c[u++]=255&g,c[u++]=g>>>24&15|16,c[u++]=g>>>16&255,c[u++]=m>>>8|128,c[u++]=255&m;for(var b=0;b<6;++b)c[u+b]=d[b];return t||o(c)}},function(e,t,n){var r=n(5),a=n(6);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},function(e,t,n){"use strict";
    5353/*!
    5454 * isobject <https://github.com/jonschlinkert/isobject>
     
    5656 * Copyright (c) 2014-2017, Jon Schlinkert.
    5757 * 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,j=B.prototype={constructor:B,toString:null,valueOf:null},x=new B(1),E=20,C=4,H=-7,P=21,z=-1e7,A=1e7,N=!1,F=1,R=0,W={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 V(_=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(A<(l=l-d-1))_.c=_.e=null;else if(l<z)_.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 J(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=V(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 U(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 q(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)>A?e.c=e.e=null:e.c=n<z?[e.e=0]:(e.e=n,t),e}function V(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>A?e.c=e.e=null:e.e<z&&(e.c=[e.e=0])}return e}function G(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),z=n[0],A=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);z=-(A=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 N=!n,Error(o+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);W=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:[z,A],CRYPTO:N,MODULO_MODE:F,POW_PRECISION:R,FORMAT:W,ALPHABET:I}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return U(arguments,j.lt)},B.minimum=B.min=function(){return U(arguments,j.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(x);if(null==e?e=E:y(e,0,p),s=a(e/u),N)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 N=!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(!N)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=R,R=0,r=r.replace(".",""),p=(f=new B(a)).pow(r.length-y),R=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,j=r.c,x=a.c;if(!(j&&j[0]&&x&&x[0]))return new B(r.s&&a.s&&(j?!x||j[0]!=x[0]:x)?j&&0==j[0]||!x?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;x[p]==(j[p]||0);p++);if(x[p]>(j[p]||0)&&m--,O<0)v.push(1),_=!0;else{for(Y=j.length,T=x.length,O+=2,1<(f=i(c/(x[p=0]+1)))&&(x=e(x,f,c),j=e(j,f,c),T=x.length,Y=j.length),L=T,w=(M=j.slice(0,T)).length;w<T;M[w++]=0);S=x.slice(),S=[0].concat(S),D=x[0],x[1]>=c/2&&D++;do{if(f=0,(d=t(x,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(x,f,c)).length,w=M.length;1==t(y,M,g,w);)f--,n(y,T<g?S:x,g,c),g=y.length,d=1;else 0==f&&(d=f=1),g=(y=x.slice()).length;if(g<w&&(y=[0].concat(y)),n(M,y,w,c),w=M.length,-1==d)for(;t(x,M,T,w)<1;)f++,n(M,T<w?S:x,w,c),w=M.length}else 0===d&&(f++,M=[0]);v[p++]=f,M[0]?M[w++]=j[L]||0:(M=[j[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++);V(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}},j.absoluteValue=j.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},j.comparedTo=function(e,t){return f(this,new B(e,t))},j.decimalPlaces=j.dp=function(e,t){var n,r,a;if(null!=e)return y(e,0,p),null==t?t=C:y(t,0,8),V(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},j.dividedBy=j.div=function(e,t){return n(this,new B(e,t),E,C)},j.dividedToIntegerBy=j.idiv=function(e,t){return n(this,new B(e,t),0,1)},j.exponentiatedBy=j.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: "+G(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(+G(h),c?2-g(e):+G(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);R&&(l=a(R/u+2))}for(m=c?(n=new B(.5),d&&(e.s=1),g(e)):(s=Math.abs(+G(e)))%2,p=new B(x);;){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(V(e=e.times(n),e.e+1,1),14<e.e)m=g(e);else{if(0==(s=+G(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=x.div(p)),t?p.mod(t):l?V(p,R,C,void 0):p)},j.integerValue=function(e){var t=new B(this);return null==e?e=C:y(e,0,8),V(t,t.e+1,e)},j.isEqualTo=j.eq=function(e,t){return 0===f(this,new B(e,t))},j.isFinite=function(){return!!this.c},j.isGreaterThan=j.gt=function(e,t){return 0<f(this,new B(e,t))},j.isGreaterThanOrEqualTo=j.gte=function(e,t){return 1===(t=f(this,new B(e,t)))||0===t},j.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},j.isLessThan=j.lt=function(e,t){return f(this,new B(e,t))<0},j.isLessThanOrEqualTo=j.lte=function(e,t){return-1===(t=f(this,new B(e,t)))||0===t},j.isNaN=function(){return!this.s},j.isNegative=function(){return this.s<0},j.isPositive=function(){return 0<this.s},j.isZero=function(){return!!this.c&&0==this.c[0]},j.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]?q(e,m,d):(e.s=3==C?-1:1,e.c=[e.e=0],e)},j.modulo=j.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==F?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,F),(e=i.minus(r.times(e))).c[0]||1!=F||(e.s=i.s),e)},j.multipliedBy=j.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),q(e,g,r)},j.negated=function(){var e=new B(this);return e.s=-e.s||null,e},j.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),q(e,s,o)},j.precision=j.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),V(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},j.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},j.squareRoot=j.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(+G(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))||(V(r,r.e+E+2,1),e=!r.times(r).eq(o));break}if(!a&&(V(i,i.e+E+2,0),i.times(i).eq(o))){r=i;break}c+=4,l+=4,a=1}return V(r,r.e+E+1,C,e)},j.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),J(this,e,t,1)},j.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),J(this,e,t)},j.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=W;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||"")},j.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(x)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!b)return new B(g);for(t=new B(x),p=r=new B(x),a=m=new B(x),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=A,A=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],A=l,f},j.toNumber=function(){return+G(this)},j.toPrecision=function(e,t){return null!=e&&y(e,1,p),J(this,e,t,2)},j.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=V(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},j.valueOf=j.toJSON=function(){return G(this)},j._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(j[Symbol.toStringTag]="BigNumber",j[Symbol.for("nodejs.util.inspect.custom")]=j.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()}),j=w.currentAbbreviations(),"".concat(O).concat(j.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,j}(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,j=M.thousandSeparated,x=M.spaceSeparated,E=M.negative,C=M.forceSign,H=M.exponential,P="";if(D){var z=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:x,totalLength:w});d=z.value,P+=z.abbreviation,w&&(T=z.mantissaPrecision)}if(H){var A=(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=A.value,P=A.abbreviation+P}var N,F,R,W=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 W=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}(W=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()}(W,0,L,k),d,j,o,s),(D||H)&&(W+=P),(C||d<0)&&(N=W,R=E,W=0===(F=d)?N:0==+N?N.replace("-",""):0<F?"+".concat(N):"sign"===R?N:"(".concat(N.replace("-",""),")")),W}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){
     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 f(){}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=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.prependListener=f,a.prependOnceListener=f,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 f(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 _(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,w,M,k,L,Y,T,D,S,O,j=B.prototype={constructor:B,toString:null,valueOf:null},x=new B(1),E=20,C=4,P=-7,H=21,z=-1e7,A=1e7,N=!1,F=1,R=0,W={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,f=this;if(!(f instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return f.s=e.s,f.e=e.e,void(f.c=(e=e.c)?e.slice():e);if((m="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;10<=d;d/=10,l++);return f.e=l,void(f.c=[e])}h=String(e)}else{if(h=String(e),!r.test(h))return M(f,h,m);f.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 V(f=new B(e instanceof B?e:h),E+f.e+1,C);if(m="number"==typeof e){if(0*e!=0)return M(f,h,m,t);if(f.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 f.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 M(f,String(e),m,t)}-1<(l=(h=w(h,t,10,f.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+f.s*e);if(A<(l=l-d-1))f.c=f.e=null;else if(l<z)f.c=[f.e=0];else{if(f.e=l,f.c=[],d=(l+1)%u,l<0&&(d+=u),d<p){for(d&&f.c.push(+h.slice(0,d)),p-=u;d<p;)f.c.push(+h.slice(d,d+=u));h=h.slice(d),d=u-h.length}else d-=p;for(;d--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function J(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=f(e.c),l=1==r||2==r&&(o<=P||H<=o)?b(l,o):v(l,o,"0");else if(i=(e=V(new B(e),t,n)).e,s=(l=f(e.c)).length,1==r||2==r&&(t<=i||i<=P)){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 U(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 q(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)>A?e.c=e.e=null:e.c=n<z?[e.e=0]:(e.e=n,t),e}function V(e,t,n,r){var o,s,c,m,p,h,f,_=e.c,y=d;if(_){e:{for(o=1,m=_[0];10<=m;m/=10,o++);if((s=t-o)<0)s+=u,c=t,f=(p=_[h=0])/y[o-c-1]%10|0;else if((h=a((s+1)/u))>=_.length){if(!r)break e;for(;_.length<=h;_.push(0));p=f=0,c=(s%=u)-u+(o=1)}else{for(p=m=_[h],o=1;10<=m;m/=10,o++);f=(c=(s%=u)-u+o)<0?0:p/y[o-c-1]%10|0}if(r=r||t<0||null!=_[h+1]||(c<0?p:p%y[o-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):5<f||5==f&&(4==n||r||6==n&&(0<s?0<c?p/y[o-c]:0:_[h-1])%10&1||n==(e.s<0?8:7)),t<1||!_[0])return _.length=0,r?(t-=e.e+1,_[0]=y[(u-t%u)%u],e.e=-t||0):_[0]=e.e=0,e;if(0==s?(_.length=h,m=1,h--):(_.length=h+1,m=y[u-s],_[h]=0<c?i(p/y[o-c]%y[c])*m:0),r)for(;;){if(0==h){for(s=1,c=_[0];10<=c;c/=10,s++);for(c=_[0]+=m,m=1;10<=c;c/=10,m++);s!=m&&(e.e++,_[0]==l&&(_[0]=1));break}if(_[h]+=m,_[h]!=l)break;_[h--]=0,m=1}for(s=_.length;0===_[--s];_.pop());}e.e>A?e.c=e.e=null:e.e<z&&(e.c=[e.e=0])}return e}function G(e){var t,n=e.e;return null===n?e.toString():(t=f(e.c),t=n<=P||H<=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),P=n[0],H=n[1]):(y(n,-p,p,t),P=-(H=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),z=n[0],A=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);z=-(A=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 N=!n,Error(o+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);W=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:[P,H],RANGE:[z,A],CRYPTO:N,MODULO_MODE:F,POW_PRECISION:R,FORMAT:W,ALPHABET:I}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return U(arguments,j.lt)},B.minimum=B.min=function(){return U(arguments,j.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(x);if(null==e?e=E:y(e,0,p),s=a(e/u),N)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 N=!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(!N)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},w=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,_,y=r.indexOf("."),g=E,b=C;for(0<=y&&(d=R,R=0,r=r.replace(".",""),p=(_=new B(a)).pow(r.length-y),R=d,_.c=t(v(f(p.c),p.e,"0"),10,i,e),_.e=_.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,_,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,w,M,k,L,Y,T,D,S,O=r.s==a.s?1:-1,j=r.c,x=a.c;if(!(j&&j[0]&&x&&x[0]))return new B(r.s&&a.s&&(j?!x||j[0]!=x[0]:x)?j&&0==j[0]||!x?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;x[p]==(j[p]||0);p++);if(x[p]>(j[p]||0)&&m--,O<0)v.push(1),f=!0;else{for(Y=j.length,D=x.length,O+=2,1<(_=i(c/(x[p=0]+1)))&&(x=e(x,_,c),j=e(j,_,c),D=x.length,Y=j.length),L=D,M=(w=j.slice(0,D)).length;M<D;w[M++]=0);S=x.slice(),S=[0].concat(S),T=x[0],x[1]>=c/2&&T++;do{if(_=0,(d=t(x,w,D,M))<0){if(k=w[0],D!=M&&(k=k*c+(w[1]||0)),1<(_=i(k/T)))for(c<=_&&(_=c-1),g=(y=e(x,_,c)).length,M=w.length;1==t(y,w,g,M);)_--,n(y,D<g?S:x,g,c),g=y.length,d=1;else 0==_&&(d=_=1),g=(y=x.slice()).length;if(g<M&&(y=[0].concat(y)),n(w,y,M,c),M=w.length,-1==d)for(;t(x,w,D,M)<1;)_++,n(w,D<M?S:x,M,c),M=w.length}else 0===d&&(_++,w=[0]);v[p++]=_,w[0]?w[M++]=j[L]||0:(w=[j[L]],M=1)}while((L++<Y||null!=w[0])&&O--);f=null!=w[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,O=v[0];10<=O;O/=10,p++);V(b,o+(b.e=p+m*u-1)+1,s,f)}else b.e=m,b.r=+f;return b}}(),Y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,D=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,M=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(T,"$1").replace(D,"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}},j.absoluteValue=j.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},j.comparedTo=function(e,t){return _(this,new B(e,t))},j.decimalPlaces=j.dp=function(e,t){var n,r,a;if(null!=e)return y(e,0,p),null==t?t=C:y(t,0,8),V(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},j.dividedBy=j.div=function(e,t){return n(this,new B(e,t),E,C)},j.dividedToIntegerBy=j.idiv=function(e,t){return n(this,new B(e,t),0,1)},j.exponentiatedBy=j.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: "+G(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(+G(h),c?2-g(e):+G(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);R&&(l=a(R/u+2))}for(m=c?(n=new B(.5),d&&(e.s=1),g(e)):(s=Math.abs(+G(e)))%2,p=new B(x);;){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(V(e=e.times(n),e.e+1,1),14<e.e)m=g(e);else{if(0==(s=+G(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=x.div(p)),t?p.mod(t):l?V(p,R,C,void 0):p)},j.integerValue=function(e){var t=new B(this);return null==e?e=C:y(e,0,8),V(t,t.e+1,e)},j.isEqualTo=j.eq=function(e,t){return 0===_(this,new B(e,t))},j.isFinite=function(){return!!this.c},j.isGreaterThan=j.gt=function(e,t){return 0<_(this,new B(e,t))},j.isGreaterThanOrEqualTo=j.gte=function(e,t){return 1===(t=_(this,new B(e,t)))||0===t},j.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},j.isLessThan=j.lt=function(e,t){return _(this,new B(e,t))<0},j.isLessThanOrEqualTo=j.lte=function(e,t){return-1===(t=_(this,new B(e,t)))||0===t},j.isNaN=function(){return!this.s},j.isNegative=function(){return this.s<0},j.isPositive=function(){return 0<this.s},j.isZero=function(){return!!this.c&&0==this.c[0]},j.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]?q(e,m,d):(e.s=3==C?-1:1,e.c=[e.e=0],e)},j.modulo=j.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==F?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,F),(e=i.minus(r.times(e))).c[0]||1!=F||(e.s=i.s),e)},j.multipliedBy=j.times=function(e,t){var n,r,a,i,o,s,c,d,p,f,_,y,g,b,v,w=this,M=w.c,k=(e=new B(e,t)).c;if(!(M&&k&&M[0]&&k[0]))return!w.s||!e.s||M&&!M[0]&&!k||k&&!k[0]&&!M?e.c=e.e=e.s=null:(e.s*=w.s,M&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=h(w.e/u)+h(e.e/u),e.s*=w.s,(c=M.length)<(f=k.length)&&(g=M,M=k,k=g,a=c,c=f,f=a),a=c+f,g=[];a--;g.push(0));for(b=l,v=m,a=f;0<=--a;){for(n=0,_=k[a]%v,y=k[a]/v|0,i=a+(o=c);a<i;)n=((d=_*(d=M[--o]%v)+(s=y*d+(p=M[o]/v|0)*_)%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),q(e,g,r)},j.negated=function(){var e=new B(this);return e.s=-e.s||null,e},j.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),q(e,s,o)},j.precision=j.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),V(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},j.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},j.squareRoot=j.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(+G(o)))||l==1/0?(((t=f(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))),f(i.c).slice(0,l)===(t=f(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))||(V(r,r.e+E+2,1),e=!r.times(r).eq(o));break}if(!a&&(V(i,i.e+E+2,0),i.times(i).eq(o))){r=i;break}c+=4,l+=4,a=1}return V(r,r.e+E+1,C,e)},j.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),J(this,e,t,1)},j.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),J(this,e,t)},j.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=W;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||"")},j.toFraction=function(e){var t,r,a,i,s,l,c,m,p,h,_,y,g=this,b=g.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(x)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!b)return new B(g);for(t=new B(x),p=r=new B(x),a=m=new B(x),y=f(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=A,A=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,_=n(p,a,s*=2,C).minus(g).abs().comparedTo(n(m,r,s,C).minus(g).abs())<1?[p,a]:[m,r],A=l,_},j.toNumber=function(){return+G(this)},j.toPrecision=function(e,t){return null!=e&&y(e,1,p),J(this,e,t,2)},j.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<=P||H<=a?b(f(n.c),a):v(f(n.c),a,"0"):10===e?v(f((n=V(new B(n),E+a+1,C)).c),n.e,"0"):(y(e,2,I.length,"Base"),w(v(f(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},j.valueOf=j.toJSON=function(){return G(this)},j._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(j[Symbol.toStringTag]="BigNumber",j[Symbol.for("nodejs.util.inspect.custom")]=j.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=f(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=f(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return t=f(t,a.currentByteDefaultFormat()),v=e,M=a,k=n,L=(w=t).base||"binary",Y=l[L],D=(T=d(v._value,Y.suffixes,Y.scale)).value,S=T.suffix,O=h({instance:k(D),providedFormat:w,state:M,defaults:M.currentByteDefaultFormat()}),j=M.currentAbbreviations(),"".concat(O).concat(j.spaced?" ":"").concat(S);case"time":return t=f(t,a.currentTimeDefaultFormat()),_=e,y=Math.floor(_._value/60/60),g=Math.floor((_._value-60*y*60)/60),b=Math.round(_._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=f(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,_,y,g,b,v,w,M,k,L,Y,T,D,S,O,j}(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,w=Object.assign({},u,c,n),M=w.totalLength,k=M?0:w.characteristic,L=w.optionalCharacteristic,Y=w.forceAverage,T=!!M||!!Y||w.average,D=M?-1:T&&void 0===n.mantissa?0:w.mantissa,S=!M&&(void 0===n.optionalMantissa?-1===D:w.optionalMantissa),O=w.trimMantissa,j=w.thousandSeparated,x=w.spaceSeparated,E=w.negative,C=w.forceSign,P=w.exponential,H="";if(T){var z=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:x,totalLength:M});d=z.value,H+=z.abbreviation,M&&(D=z.mantissaPrecision)}if(P){var A=(h=(m={value:d,characteristicPrecision:k}).value,_=void 0===(f=m.characteristicPrecision)?0:f,g=(y=r(h.toExponential().split("e"),2))[0],b=y[1],v=+g,_&&1<_&&(v*=Math.pow(10,_-1),b=0<=(b=+b-(_-1))?"+".concat(b):b),{value:v,abbreviation:"e".concat(b)});d=A.value,H=A.abbreviation+H}var N,F,R,W=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,D,O);return W=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}(W=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()}(W,0,L,k),d,j,o,s),(T||P)&&(W+=H),(C||d<0)&&(N=W,R=E,W=0===(F=d)?N:0==+N?N.replace("-",""):0<F?"+".concat(N):"sign"===R?N:"(".concat(N.replace("-",""),")")),W}function f(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:f}}},{"./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,w=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=w,i=w,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,w),s=w,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=w,(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,w),d=w,-1!==e.indexOf("a")&&(d.average=!0),p=w,-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,w),f=w,(h=e).match(/\[\.]/)?f.optionalMantissa=!0:h.match(/\./)&&(f.optionalMantissa=!1),_=w,-1!==e.indexOf(",")&&(_.thousandSeparated=!0),y=w,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=w,(g=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),g.match(/^\+?-/)&&(b.negative="sign"),v=w,e.match(/^\+/)&&(v.forceSign=!0),w)}}},{}],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 f=o(h);if(f&&"."!==f&&(c=t.replace(new RegExp("".concat(a(f),"$")),""))!==t)return e(c,n,i,o,s,l,u);var _={};Object.keys(l).forEach((function(e){_[l[e]]=e}));for(var y=Object.keys(_).sort().reverse(),g=y.length,b=0;b<g;b++){var v=y[b],w=_[v];if((c=t.replace(v,""))!==t){var M=void 0;switch(w){case"thousand":M=Math.pow(10,3);break;case"million":M=Math.pow(10,6);break;case"billion":M=Math.pow(10,9);break;case"trillion":M=Math.pow(10,12)}return e(c,n,i,o,s,l,u)*M}}}}(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){
    5959/*!
    6060 * Pikaday
     
    6262 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
    6363 */
    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 j=new Date(e,t,S-o+1),x=!!c(this._d)&&_(j,this._d),E=_(j,a),C=S<o||S>=i+o,H=S-o+1,P=t,z=e,A=r.startRange&&_(r.startRange,j),N=r.endRange&&_(r.endRange,j),F=r.startRange&&r.endRange&&r.startRange<j&&j<r.endRange;C&&(S<o?(H=Y+H,P=g,z=k):(H-=i,P=w,z=L));var R={day:H,month:P,year:z,isSelected:x,isToday:E,isDisabled:r.minDate&&j<r.minDate||r.maxDate&&j>r.maxDate||r.disableWeekends&&d(j)||r.disableDayFn&&r.disableDayFn(j),isEmpty:C,isStartRange:A,isEndRange:N,isInRange:F,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(R)),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),j=n(130),x=n.n(j);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 z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=wp.element,N=A.Component,F=A.Fragment,R=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=x()(),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&&z(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){var a=e[r];void 0===a&&(a=e[n.data]),t[n.data]=a})),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,a=this.props.options;if(void 0===a.series[n])return e;switch(t){case"date":case"datetime":case"timeofday":return a.series[n].format&&a.series[n].format.from&&a.series[n].format.to?jQuery.fn.dataTable.render.moment(a.series[n].format.from,a.series[n].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");case"num":var i=["","","","",""];return a.series[n].format.thousands&&(i[0]=a.series[n].format.thousands),a.series[n].format.decimal&&(i[1]=a.series[n].format.decimal),a.series[n].format.precision&&(i[2]=a.series[n].format.precision),a.series[n].format.prefix&&(i[3]=a.series[n].format.prefix),a.series[n].format.suffix&&(i[4]=a.series[n].format.suffix),(r=jQuery.fn.dataTable.render).number.apply(r,i);case"boolean":return jQuery.fn.dataTable.render.extra=function(e,t,r){return!0!==e&&"true"!==e||void 0===a.series[n].format||""===a.series[n].format.truthy?!1!==e&&"false"!==e||void 0===a.series[n].format||""===a.series[n].format.falsy?e:a.series[n].format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""):a.series[n].format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},jQuery.fn.dataTable.render.extra}return e}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(F,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}(N),W=n(4),I=n.n(W),B=n(131),J=n.n(B),U=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},q=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},V=function(e){return J()(e,q)},G=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},V(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,perPage:visualizerLocalize.chartsPerPage},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,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=visualizerLocalize.chartsPerPage,e.next=3,ie({path:"wp/v2/visualizer/?per_page="+t+"&meta_key=visualizer-chart-library&meta_value=ChartJS"});case 3:n=e.sent,this.setState({charts:n});case 5: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,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.charts.length,n=this.state.chartsLoaded,r=this.state.perPage,this.setState({isBusy:!0}),e.next=6,ie({path:"wp/v2/visualizer/?per_page=".concat(r,"&meta_key=visualizer-chart-library&meta_value=ChartJS&offset=").concat(t)});case 6:a=e.sent,r>a.length&&(n=!0),this.setState({charts:this.state.charts.concat(a),isBusy:!1,chartsLoaded:n});case 9: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,i=t.perPage;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,o=U(n[t].chart_data);if(r=o["visualizer-settings"].title?o["visualizer-settings"].title:"#".concat(n[t].id),a=0<=["gauge","table","timeline","dataTable"].indexOf(o["visualizer-chart-type"])?"dataTable"===o["visualizer-chart-type"]?o["visualizer-chart-type"]:re(o["visualizer-chart-type"]):"".concat(re(o["visualizer-chart-type"]),"Chart"),!o["visualizer-chart-library"]||"ChartJS"!==o["visualizer-chart-library"])return o["visualizer-data-exploded"]&&(i=ae("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:"visualizer-settings__charts-single",key:"chart-".concat(n[t].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},r),"dataTable"===a?wp.element.createElement(R,{id:n[t].id,rows:o["visualizer-data"],columns:o["visualizer-series"],chartsScreen:!0,options:G(o["visualizer-settings"])}):(o["visualizer-data-exploded"],wp.element.createElement(O,{chartType:a,rows:o["visualizer-data"],columns:o["visualizer-series"],options:G(o["visualizer-settings"])})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,i)),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&&i-1<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,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 je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(n,!0).forEach((function(t){xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){return(Ee="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 Ce(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 He(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Ce(i,r,a,o,s,"next",e)}function s(e){Ce(i,r,a,o,s,"throw",e)}o(void 0)}))}}function Pe(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 ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(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 Fe=wp.i18n.__,Re=wp,We=(Re.apiFetch,Re.apiRequest),Ie=wp.element.Component,Be=wp.components,Je=Be.Button,Ue=Be.ExternalLink,qe=Be.IconButton,Ve=Be.Modal,Ge=Be.PanelBody,$e=Be.SelectControl,Ke=Be.TextControl,Ze=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"!==Ee(t)&&"function"!=typeof t?Ae(e):t}(this,ze(t).apply(this,arguments))).openModal=e.openModal.bind(Ae(e)),e.initTable=e.initTable.bind(Ae(e)),e.onToggle=e.onToggle.bind(Ae(e)),e.toggleHeaders=e.toggleHeaders.bind(Ae(e)),e.getJSONRoot=e.getJSONRoot.bind(Ae(e)),e.getJSONData=e.getJSONData.bind(Ae(e)),e.getTableData=e.getTableData.bind(Ae(e)),e.state={isOpen:!1,isLoading:!1,isFirstStepOpen:!0,isSecondStepOpen:!1,isThirdStepOpen:!1,isFourthStepOpen:!1,isHeaderPanelOpen:!1,endpointRoots:[],endpointPaging:[],table:null,requestHeaders:{method:"GET",username:"",password:"",auth:""}},e}var n,r,a,i,o,s,l,u;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:"openModal",value:(u=He(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isOpen:!0});case 2:t=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&null!==this.state.table&&(t.innerHTML=this.state.table,this.initTable());case 4:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"initTable",value:function(){jQuery("#visualizer-json-query-table table").DataTable({paging:!1,searching:!1,ordering:!1,select:!1,scrollX:"600px",scrollY:"400px",info:!1,colReorder:{fixedColumnsLeft:1},dom:"Bt",buttons:[{extend:"colvis",columns:":gt(0)",collectionLayout:"four-column"}]})}},{key:"onToggle",value:(l=He(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this.state.table&&this.state.endpointRoots&&0<this.state.endpointRoots.length&&("isFirstStepOpen"===t||"isSecondStepOpen"===t)&&this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:!1,isFourthStepOpen:!1}),null===this.state.table){e.next=5;break}return e.next=4,this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:"isThirdStepOpen"===t,isFourthStepOpen:"isFourthStepOpen"===t});case 4:"isFourthStepOpen"===t&&(n=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&(n.innerHTML=this.state.table,this.initTable()));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"toggleHeaders",value:function(){this.setState({isHeaderPanelOpen:!this.state.isHeaderPanelOpen})}},{key:"getJSONRoot",value:(s=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0,endpointRoots:[],endpointPaging:[],table:null}),e.next=3,We({path:"/visualizer/v1/get-json-root?url=".concat(this.props.chart["visualizer-json-url"]),data:{method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=Object.keys(t.data.roots).map((function(e){return{label:t.data.roots[e].replace(/>/g," ➤ "),value:t.data.roots[e]}})),this.setState({isLoading:!1,isFirstStepOpen:!1,isSecondStepOpen:!0,endpointRoots:n})):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getJSONData",value:(o=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,We({path:"/visualizer/v1/get-json-data?url=".concat(this.props.chart["visualizer-json-url"],"&chart=").concat(this.props.id),data:{root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=[{label:Fe("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:Fe("Get first 5 pages using root ➤ next"),value:"root>next"}),this.setState({isLoading:!1,isSecondStepOpen:!1,isFourthStepOpen:!0,endpointPaging:n,table:t.data.table}),document.querySelector("#visualizer-json-query-table").innerHTML=t.data.table,this.initTable()):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getTableData",value:(i=He(regeneratorRuntime.mark((function e(){var t,n,r,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),t=document.querySelectorAll("#visualizer-json-query-table input"),n=document.querySelectorAll("#visualizer-json-query-table select"),r=[],a={},t.forEach((function(e){return r.push(e.value)})),n.forEach((function(e){return a[e.name]=e.value})),e.next=9,We({path:"/visualizer/v1/set-json-data",data:je({url:this.props.chart["visualizer-json-url"],method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,paging:this.props.chart["visualizer-json-paging"]||0,header:r},a),method:"GET"});case 9:(i=e.sent).success?(this.props.JSONImportData(i.data.name,JSON.parse(i.data.series),JSON.parse(i.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(i.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(Ge,{title:Fe("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Fe("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(Ue,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},Fe("For more info check this tutorial."))),wp.element.createElement($e,{label:Fe("How often do you want to check the url?"),value:this.props.chart["visualizer-json-schedule"]?this.props.chart["visualizer-json-schedule"]:1,options:[{label:Fe("One-time"),value:"-1"},{label:Fe("Live"),value:"0"},{label:Fe("Each hour"),value:"1"},{label:Fe("Each 12 hours"),value:"12"},{label:Fe("Each day"),value:"24"},{label:Fe("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,onClick:this.openModal},Fe("Modify Parameters")),this.state.isOpen&&wp.element.createElement(Ve,{title:Fe("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement(Ge,{title:Fe("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,Fe("If you want to add authentication, add headers to the endpoint or change the request in any way, please refer to our document here:")),wp.element.createElement("p",null,wp.element.createElement(Ue,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},Fe("How to extend REST endpoints with JSON response"))),wp.element.createElement(Ke,{placeholder:Fe("Please enter the URL of your JSON file"),value:this.props.chart["visualizer-json-url"]?this.props.chart["visualizer-json-url"]:"",onChange:this.props.editJSONURL}),wp.element.createElement(qe,{icon:"arrow-right-alt2",label:Fe("Add Headers"),onClick:this.toggleHeaders},Fe("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement($e,{label:Fe("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:Fe("GET")},{value:"POST",label:Fe("POST")}],onChange:function(t){var n=je({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=je({},r,{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Fe("Credentials")),wp.element.createElement(Ke,{label:Fe("Username"),placeholder:Fe("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ee(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=je({},r,{username:t,password:n.password}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("span",{className:"visualizer-json-query-modal-field-separator"},Fe("&")),wp.element.createElement(Ke,{label:Fe("Password"),placeholder:Fe("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ee(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=je({},r,{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Fe("OR")),wp.element.createElement(Ke,{label:Fe("Authorization"),placeholder:Fe("e.g. SharedKey <AccountName>:<Signature>"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ee(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=je({},r,{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},Fe("Fetch Endpoint"))),wp.element.createElement(Ge,{title:Fe("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,Fe("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement($e,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},Fe("Parse Endpoint"))),wp.element.createElement(Ge,{title:Fe("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement($e,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,Fe("Enable this feature in PRO version!"))),wp.element.createElement(Ge,{title:Fe("Step 4: Select the data to display in the chart"),initialOpen:!1,opened:this.state.isFourthStepOpen,onToggle:function(){return e.onToggle("isFourthStepOpen")}},wp.element.createElement("ul",null,wp.element.createElement("li",null,Fe("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,Fe("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,Fe("You can use drag/drop to reorder the columns but this column position is not saved. So when you reload the table, you may have to reorder again.")),wp.element.createElement("li",null,Fe("You can select any number of columns but the chart type selected will determine how many will display in the chart."))),wp.element.createElement("div",{id:"visualizer-json-query-table"}),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},Fe("Save & Show Chart")))))}}])&&Pe(n.prototype,r),a&&Pe(n,a),t}(Ie);function Qe(e){return(Qe="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 et(e,t){return!t||"object"!==Qe(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 tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rt=wp.i18n.__,at=wp.element.Component,it=wp.components,ot=it.Button,st=it.ExternalLink,lt=it.PanelBody,ut=it.SelectControl,ct=it.TextControl,dt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),et(this,tt(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&&nt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return wp.element.createElement(lt,{title:rt("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(lt,{title:rt("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("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,rt("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(st,{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,rt("You can also import data from Google Spreadsheet.")),wp.element.createElement(ct,{placeholder:rt("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(ot,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},rt("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(lt,{title:rt("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,rt("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,rt("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(ct,{placeholder:rt("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(ut,{label:rt("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:rt("Each hour"),value:"1"},{label:rt("Each 12 hours"),value:"12"},{label:rt("Each day"),value:"24"},{label:rt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(ot,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},rt("Save Schedule"))):wp.element.createElement(lt,{title:rt("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(ot,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},rt("Buy Now"))),wp.element.createElement(Ze,{id:this.props.id,chart:this.props.chart,editSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}))}}])&&Xe(n.prototype,r),a&&Xe(n,a),t}(at);function mt(e){return(mt="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,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 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 _t(e,t){return!t||"object"!==mt(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 ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yt(e,t){return(yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gt=wp.i18n.__,bt=wp.apiFetch,vt=wp.element,Mt=vt.Component,wt=vt.Fragment,kt=wp.components,Lt=kt.Button,Yt=kt.PanelBody,Dt=kt.Placeholder,Tt=kt.SelectControl,St=kt.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=_t(this,ft(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&&yt(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,bt({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){pt(a,n,r,o,s,"next",e)}function s(e){pt(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(Yt,{title:gt("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(wt,null,wp.element.createElement(Tt,{label:gt("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(Lt,{isPrimary:!0,isLarge:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},gt("Import Chart"))):wp.element.createElement(Dt,null,wp.element.createElement(St,null))):wp.element.createElement(Yt,{title:gt("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,gt("Enable this feature in PRO version!")),wp.element.createElement(Lt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},gt("Buy Now")))}}])&&ht(n.prototype,r),a&&ht(n,a),t}(Mt);function jt(e){return(jt="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 xt(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 Et(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){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ht(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pt(e,t){return(Pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zt=wp.i18n.__,At=wp.apiRequest,Nt=wp.components,Ft=Nt.Button,Rt=Nt.ExternalLink,Wt=wp.element,It=Wt.Component,Bt=Wt.Fragment,Jt=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"!==jt(t)&&"function"!=typeof t?Ht(e):t}(this,Ct(t).apply(this,arguments))).onSave=e.onSave.bind(Ht(e)),e.state={isLoading:!1,success:!1,query:"",name:"",series:{},data:[]},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&&Pt(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=wp.CodeMirror||CodeMirror,t=document.querySelector(".visualizer-db-query"),n=e.fromTextArea(t,{autofocus:!0,mode:"text/x-mysql",lineWrapping:!0,dragDrop:!1,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-Space":"autocomplete"},hintOptions:{tables:visualizerLocalize.sqlTable}});n.on("inputRead",(function(){n.save()}))}},{key:"onSave",value:(i=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=document.querySelector(".visualizer-db-query").value,(n=document.querySelector("#visualizer-db-query-table")).innerHTML="",e.next=5,this.setState({isLoading:!0});case 5:return e.next=7,At({path:"/visualizer/v1/get-query-data",data:{query:t},method:"GET"});case 7:return r=e.sent,e.next=10,this.setState({isLoading:!1,success:r.success,query:t,name:r.data.name||"",series:r.data.series||{},data:r.data.data||[]});case 10:n.innerHTML=r.data.table||r.data.msg,this.state.success&&jQuery("#results").DataTable({paging:!1});case 12: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){xt(a,n,r,o,s,"next",e)}function s(e){xt(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(Bt,null,wp.element.createElement("textarea",{className:"visualizer-db-query",placeholder:zt("Your query goes here…")},this.props.chart["visualizer-db-query"]),wp.element.createElement("div",{className:"visualizer-db-query-actions"},wp.element.createElement(Ft,{isLarge:!0,isDefault:!0,isBusy:this.state.isLoading,onClick:this.onSave},zt("Show Results")),wp.element.createElement(Ft,{isLarge:!0,isPrimary:!0,disabled:!this.state.success,onClick:function(){return e.props.save(e.state.query,e.state.name,e.state.series,e.state.data)}},zt("Save"))),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement(Rt,{href:"https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts"},zt("Examples of queries and links to resources that you can use with this feature."))),wp.element.createElement("li",null,zt("Use Control+Space for autocompleting keywords or table names."))),wp.element.createElement("div",{id:"visualizer-db-query-table",className:!this.state.success&&"db-wizard-error"}))}}])&&Et(n.prototype,r),a&&Et(n,a),t}(It);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 qt(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 Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Kt=wp.i18n.__,Zt=wp.element.Component,Qt=wp.components,Xt=Qt.Button,en=Qt.Modal,tn=Qt.PanelBody,nn=Qt.SelectControl,rn=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"!==Ut(t)&&"function"!=typeof t?Gt(e):t}(this,Vt(t).apply(this,arguments))).save=e.save.bind(Gt(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&&$t(e,t)}(t,e),n=t,(r=[{key:"save",value:function(e,t,n,r){this.props.databaseImportData(e,t,n,r),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return"business"!==visualizerLocalize.isPro?wp.element.createElement(tn,{title:Kt("Import data from database"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Kt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Xt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Kt("Buy Now"))):wp.element.createElement(tn,{title:Kt("Import data from database"),initialOpen:!1},wp.element.createElement("p",null,Kt("You can import data from the database here.")),wp.element.createElement("p",null,Kt("How often do you want to refresh the data from the database.")),wp.element.createElement(nn,{label:Kt("How often do you want to check the url?"),value:this.props.chart["visualizer-db-schedule"]?this.props.chart["visualizer-db-schedule"]:0,options:[{label:Kt("Live"),value:"0"},{label:Kt("Each hour"),value:"1"},{label:Kt("Each 12 hours"),value:"12"},{label:Kt("Each day"),value:"24"},{label:Kt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Xt,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({isOpen:!0})}},Kt("Create Query")),this.state.isOpen&&wp.element.createElement(en,{title:Kt("Import from database"),onRequestClose:function(){return e.setState({isOpen:!1})},className:"visualizer-db-query-modal",shouldCloseOnClickOutside:!1},wp.element.createElement(Jt,{chart:this.props.chart,changeQuery:this.props.changeQuery,save:this.save})))}}])&&qt(n.prototype,r),a&&qt(n,a),t}(Zt),an=n(132);n(152);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 sn(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 ln(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 un(e){return(un=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 dn=wp.i18n.__,mn=wp.element.Component,pn=wp.components,hn=pn.Button,_n=pn.ButtonGroup,fn=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=ln(this,un(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&&cn(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(an.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(_n,null,wp.element.createElement(hn,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},dn("Close")),wp.element.createElement(hn,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},dn("Save"))))}}])&&sn(n.prototype,r),a&&sn(n,a),t}(mn);function yn(e){return(yn="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 bn(e){return(bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mn(e,t){return(Mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wn=wp.i18n.__,kn=wp.element,Ln=kn.Component,Yn=kn.Fragment,Dn=wp.components,Tn=Dn.Button,Sn=Dn.Modal,On=Dn.PanelBody,jn=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"!==yn(t)&&"function"!=typeof t?vn(e):t}(this,bn(t).apply(this,arguments))).toggleModal=e.toggleModal.bind(vn(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&&Mn(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(Yn,null,wp.element.createElement(On,{title:wn("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,wn("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(Tn,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},wn("View Editor"))),this.state.isOpen&&wp.element.createElement(Sn,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(fn,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(On,{title:wn("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,wn("Enable this feature in PRO version!")),wp.element.createElement(Tn,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},wn("Buy Now")))}}])&&gn(n.prototype,r),a&&gn(n,a),t}(Ln);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 En(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 Cn(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 Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pn(e,t){return(Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zn=wp.i18n.__,An=wp.element.Component,Nn=(wp.blockEditor||wp.editor).ColorPalette,Fn=wp.components,Rn=Fn.BaseControl,Wn=Fn.CheckboxControl,In=Fn.PanelBody,Bn=Fn.SelectControl,Jn=Fn.TextControl,Un=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cn(this,Hn(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&&Pn(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:zn("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];return-1>=["timeline"].indexOf(t)&&(r[1]={label:zn("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:zn("The tooltip will not be displayed"),value:"none"},wp.element.createElement(In,{title:zn("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(In,{title:zn("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:zn("Chart Title"),help:zn("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(Bn,{label:zn("Chart Title Position"),help:zn("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:zn("Inside the chart"),value:"in"},{label:zn("Outside the chart"),value:"out"},{label:zn("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Rn,{label:zn("Chart Title Color")},wp.element.createElement(Nn,{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(Bn,{label:zn("Axes Titles Position"),help:zn("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:zn("Inside the chart"),value:"in"},{label:zn("Outside the chart"),value:"out"},{label:zn("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(In,{title:zn("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bn,{label:zn("Font Family"),help:zn("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:zn("Arial"),value:"Arial"},{label:zn("Sans Serif"),value:"Sans Serif"},{label:zn("Serif"),value:"serif"},{label:zn("Arial"),value:"Arial"},{label:zn("Wide"),value:"Arial black"},{label:zn("Narrow"),value:"Arial Narrow"},{label:zn("Comic Sans MS"),value:"Comic Sans MS"},{label:zn("Courier New"),value:"Courier New"},{label:zn("Garamond"),value:"Garamond"},{label:zn("Georgia"),value:"Georgia"},{label:zn("Tahoma"),value:"Tahoma"},{label:zn("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Bn,{label:zn("Font Size"),help:zn("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(In,{title:zn("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bn,{label:zn("Position"),help:zn("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:[{label:zn("Left of the chart"),value:"left"},{label:zn("Right of the chart"),value:"right"},{label:zn("Above the chart"),value:"top"},{label:zn("Below the chart"),value:"bottom"},{label:zn("Inside the chart"),value:"in"},{label:zn("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(Bn,{label:zn("Alignment"),help:zn("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:zn("Aligned to the start of the allocated area"),value:"start"},{label:zn("Centered in the allocated area"),value:"center"},{label:zn("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(Rn,{label:zn("Font Color")},wp.element.createElement(Nn,{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(In,{title:zn("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bn,{label:zn("Trigger"),help:zn("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(Bn,{label:zn("Show Color Code"),help:zn("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:zn("Yes"),value:"1"},{label:zn("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Bn,{label:zn("Text"),help:zn("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:zn("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:zn("Display only the absolute value of the slice"),value:"value"},{label:zn("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(In,{title:zn("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Wn,{label:zn("Animate on startup?"),help:zn("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(Jn,{label:zn("Duration"),help:zn("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(Bn,{label:zn("Easing"),help:zn("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:zn("Constant speed"),value:"linear"},{label:zn("Start slow and speed up"),value:"in"},{label:zn("Start fast and slow down"),value:"out"},{label:zn("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&En(n.prototype,r),a&&En(n,a),t}(An);function qn(e){return(qn="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 Vn(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 Gn(e,t){return!t||"object"!==qn(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,Xn=Qn.Component,er=Qn.Fragment,tr=(wp.blockEditor||wp.editor).ColorPalette,nr=wp.components,rr=nr.BaseControl,ar=nr.ExternalLink,ir=nr.PanelBody,or=nr.SelectControl,sr=nr.TextControl,lr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gn(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-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ir,{title:Zn("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ir,{title:Zn("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Axis Title"),help:Zn("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(or,{label:Zn("Text Position"),help:Zn("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Zn("Inside the chart"),value:"in"},{label:Zn("Outside the chart"),value:"out"},{label:Zn("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(or,{label:Zn("Direction"),help:Zn("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Zn("Identical Direction"),value:"1"},{label:Zn("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(rr,{label:Zn("Base Line Color")},wp.element.createElement(tr,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(rr,{label:Zn("Axis Text Color")},wp.element.createElement(tr,{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(er,null,wp.element.createElement(sr,{label:Zn("Number Format"),help:Zn("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,Zn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ar,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Zn("ICU pattern set.")),Zn(" 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,Zn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ar,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Zn("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(er,null,wp.element.createElement(ir,{title:Zn("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Count"),help:Zn("The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between 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(rr,{label:Zn("Color")},wp.element.createElement(tr,{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(ir,{title:Zn("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Count"),help:Zn("Specify 0 to disable the minor gridlines."),value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.count:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(rr,{label:Zn("Color")},wp.element.createElement(tr,{value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.color:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ir,{title:Zn("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Maximun Value"),help:Zn("The maximum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.max:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(sr,{label:Zn("Minimum Value"),help:Zn("The minimum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.min:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Vn(n.prototype,r),a&&Vn(n,a),t}(Xn);function ur(e){return(ur="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 dr(e,t){return!t||"object"!==ur(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 mr(e){return(mr=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 hr=wp.i18n.__,_r=wp.element,fr=_r.Component,yr=_r.Fragment,gr=(wp.blockEditor||wp.editor).ColorPalette,br=wp.components,vr=br.BaseControl,Mr=br.ExternalLink,wr=br.PanelBody,kr=br.SelectControl,Lr=br.TextControl,Yr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),dr(this,mr(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-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(wr,{title:hr("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(wr,{title:hr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Axis Title"),help:hr("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:hr("Text Position"),help:hr("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:hr("Inside the chart"),value:"in"},{label:hr("Outside the chart"),value:"out"},{label:hr("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:hr("Direction"),help:hr("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:hr("Identical Direction"),value:"1"},{label:hr("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(vr,{label:hr("Base Line Color")},wp.element.createElement(gr,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(vr,{label:hr("Axis Text Color")},wp.element.createElement(gr,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["bar"].indexOf(t)&&wp.element.createElement(yr,null,wp.element.createElement(Lr,{label:hr("Number Format"),help:hr("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,hr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Mr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},hr("ICU pattern set.")),hr(" 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,hr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Mr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},hr("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(yr,null,wp.element.createElement(wr,{title:hr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Count"),help:hr("The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between 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(vr,{label:hr("Color")},wp.element.createElement(gr,{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(wr,{title:hr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Count"),help:hr("Specify 0 to disable the minor gridlines."),value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.count:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(vr,{label:hr("Color")},wp.element.createElement(gr,{value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.color:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(wr,{title:hr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Maximun Value"),help:hr("The maximum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.max:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Lr,{label:hr("Minimum Value"),help:hr("The minimum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.min:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&cr(n.prototype,r),a&&cr(n,a),t}(fr);function Dr(e){return(Dr="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 Tr(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"!==Dr(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 Or(e){return(Or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jr(e,t){return(jr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var xr=wp.i18n.__,Er=wp.element,Cr=Er.Component,Hr=Er.Fragment,Pr=(wp.blockEditor||wp.editor).ColorPalette,zr=wp.components,Ar=zr.BaseControl,Nr=zr.ExternalLink,Fr=zr.PanelBody,Rr=zr.SelectControl,Wr=zr.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),Sr(this,Or(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&&jr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Fr,{title:xr("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Hr,null,wp.element.createElement(Wr,{label:xr("Number Format"),help:xr("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,xr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Nr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},xr("ICU pattern set.")),xr(" 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,xr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Nr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},xr("ICU date and time format.")))),wp.element.createElement(Rr,{label:xr("Is 3D"),help:xr("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:xr("Yes"),value:"1"},{label:xr("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Rr,{label:xr("Reverse Categories"),help:xr("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:xr("Yes"),value:"1"},{label:xr("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Rr,{label:xr("Slice Text"),help:xr("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:xr("The percentage of the slice size out of the total"),value:"percentage"},{label:xr("The quantitative value of the slice"),value:"value"},{label:xr("The name of the slice"),value:"label"},{label:xr("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:xr("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:xr("Pie Hole"),help:xr("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:xr("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:xr("Start Angle"),help:xr("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(Ar,{label:xr("Slice Border Color")},wp.element.createElement(Pr,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&Tr(n.prototype,r),a&&Tr(n,a),t}(Cr);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 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 Ur(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 qr(e){return(qr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vr(e,t){return(Vr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Gr=wp.i18n.__,$r=wp.element.Component,Kr=(wp.blockEditor||wp.editor).ColorPalette,Zr=wp.components,Qr=Zr.BaseControl,Xr=Zr.PanelBody,ea=Zr.TextControl,ta=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ur(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&&Vr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Xr,{title:Gr("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ea,{label:Gr("Visibility Threshold"),help:Gr("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:Gr("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(ea,{label:Gr("Residue Slice Label"),help:Gr("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(Qr,{label:Gr("Residue Slice Color")},wp.element.createElement(Kr,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&Jr(n.prototype,r),a&&Jr(n,a),t}($r);function na(e){return(na="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 ra(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 aa(e,t){return!t||"object"!==na(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 ia(e){return(ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oa(e,t){return(oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var sa=wp.i18n.__,la=wp.element,ua=la.Component,ca=la.Fragment,da=wp.components,ma=da.PanelBody,pa=da.SelectControl,ha=da.TextControl,_a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),aa(this,ia(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&&oa(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(ma,{title:sa("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ha,{label:sa("Line Width"),help:sa("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(ha,{label:sa("Point Size"),help:sa("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(pa,{label:sa("Curve Type"),help:sa("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:sa("Straight line without curve"),value:"none"},{label:sa("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(pa,{label:sa("Focus Target"),help:sa("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:sa("Focus on a single data point."),value:"datum"},{label:sa("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(pa,{label:sa("Selection Mode"),help:sa("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:sa("Single data point"),value:"single"},{label:sa("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(pa,{label:sa("Aggregation Target"),help:sa("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:sa("Group selected data by x-value"),value:"category"},{label:sa("Group selected data by series"),value:"series"},{label:sa("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:sa("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(ha,{label:sa("Point Opacity"),help:sa("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(ca,null,wp.element.createElement(ha,{label:sa("Area Opacity"),help:sa("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(pa,{label:sa("Is Stacked"),help:sa("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:sa("Yes"),value:"1"},{label:sa("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(pa,{label:sa("Interpolate Nulls"),help:sa("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:sa("Yes"),value:"1"},{label:sa("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&ra(n.prototype,r),a&&ra(n,a),t}(ua);function fa(e){return(fa="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 ya(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 ga(e,t){return!t||"object"!==fa(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 ba(e){return(ba=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function va(e,t){return(va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ma=wp.i18n.__,wa=wp.element.Component,ka=wp.components,La=ka.PanelBody,Ya=ka.SelectControl,Da=ka.TextControl,Ta=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ga(this,ba(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&&va(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(La,{title:Ma("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ya,{label:Ma("Focus Target"),help:Ma("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:Ma("Focus on a single data point."),value:"datum"},{label:Ma("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(Ya,{label:Ma("Is Stacked"),help:Ma("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Ma("Yes"),value:"1"},{label:Ma("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(Da,{label:Ma("Bars Opacity"),help:Ma("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)}}))}}])&&ya(n.prototype,r),a&&ya(n,a),t}(wa);function Sa(e){return(Sa="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 ja(e,t){return!t||"object"!==Sa(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 xa(e){return(xa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ea(e,t){return(Ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ca=wp.i18n.__,Ha=wp.element.Component,Pa=(wp.blockEditor||wp.editor).ColorPalette,za=wp.components,Aa=za.BaseControl,Na=za.PanelBody,Fa=za.SelectControl,Ra=za.TextControl,Wa=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,xa(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&&Ea(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:Ca("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Na,{title:Ca("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Fa,{label:Ca("Focus Target"),help:Ca("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:Ca("Focus on a single data point."),value:"datum"},{label:Ca("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(Fa,{label:Ca("Selection Mode"),help:Ca("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Ca("Single data point"),value:"single"},{label:Ca("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Fa,{label:Ca("Aggregation Target"),help:Ca("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:Ca("Group selected data by x-value"),value:"category"},{label:Ca("Group selected data by series"),value:"series"},{label:Ca("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Ca("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Na,{title:Ca("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ra,{label:Ca("Stroke Width"),help:Ca("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(Aa,{label:Ca("Stroke Color")},wp.element.createElement(Pa,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Aa,{label:Ca("Fill Color")},wp.element.createElement(Pa,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Na,{title:Ca("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ra,{label:Ca("Stroke Width"),help:Ca("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(Aa,{label:Ca("Stroke Color")},wp.element.createElement(Pa,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Aa,{label:Ca("Fill Color")},wp.element.createElement(Pa,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&Oa(n.prototype,r),a&&Oa(n,a),t}(Ha);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 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 Ja(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 Ua(e){return(Ua=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 Va=wp.i18n.__,Ga=wp.element.Component,$a=wp.components,Ka=$a.ExternalLink,Za=$a.PanelBody,Qa=$a.SelectControl,Xa=$a.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),Ja(this,Ua(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(Za,{title:Va("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Za,{title:Va("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Xa,{label:Va("API Key"),help:Va("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(Ka,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},Va("Get API Keys"))),wp.element.createElement(Za,{title:Va("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Va("A map of the entire world using 'world'.")),wp.element.createElement("li",null,Va("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(Ka,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},Va("More info here."))),wp.element.createElement("li",null,Va("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(Ka,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},Va("More info here."))),wp.element.createElement("li",null,Va("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(Ka,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},Va("More info here.")))),wp.element.createElement(Xa,{label:Va("Reigion"),help:Va("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(Za,{title:Va("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Va("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,Va("'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,Va("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(Qa,{label:Va("Resolution"),help:Va("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:Va("Countries"),value:"countries"},{label:Va("Provinces"),value:"provinces"},{label:Va("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(Za,{title:Va("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Va("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,Va("'regions' - This is a region map.")),wp.element.createElement("li",null,Va("'markers' - This is a marker map."))),wp.element.createElement(Qa,{label:Va("Display Mode"),help:Va("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:Va("Auto"),value:"auto"},{label:Va("Regions"),value:"regions"},{label:Va("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(Za,{title:Va("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Qa,{label:Va("Trigger"),help:Va("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:Va("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:Va("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&Ba(n.prototype,r),a&&Ba(n,a),t}(Ga);function ti(e){return(ti="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 ni(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 ri(e,t){return!t||"object"!==ti(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 ii(e,t){return(ii=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oi=wp.i18n.__,si=wp.element.Component,li=(wp.blockEditor||wp.editor).ColorPalette,ui=wp.components,ci=ui.BaseControl,di=ui.PanelBody,mi=ui.TextControl,pi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ri(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&&ii(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(di,{title:oi("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(mi,{label:oi("Minimum Values"),help:oi("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(mi,{label:oi("Maximum Values"),help:oi("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(ci,{label:oi("Minimum Value")},wp.element.createElement(li,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(ci,{label:oi("Intermediate Value")},wp.element.createElement(li,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(ci,{label:oi("Maximum Value")},wp.element.createElement(li,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(ci,{label:oi("Dateless Region")},wp.element.createElement(li,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&ni(n.prototype,r),a&&ni(n,a),t}(si);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 _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 fi(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 yi(e){return(yi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gi(e,t){return(gi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var bi=wp.i18n.__,vi=wp.element,Mi=vi.Component,wi=vi.Fragment,ki=wp.components,Li=ki.ExternalLink,Yi=ki.PanelBody,Di=ki.TextControl,Ti=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),fi(this,yi(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&&gi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Yi,{title:bi("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Di,{label:bi("Minimum Values"),help:bi("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(Di,{label:bi("Maximum Values"),help:bi("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(Di,{label:bi("Minimum Marker Radius"),help:bi("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(Di,{label:bi("Maximum Marker Radius"),help:bi("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(Di,{label:bi("Marker Opacity"),help:bi("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(wi,null,wp.element.createElement(Di,{label:bi("Number Format"),help:bi("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,bi("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Li,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},bi("ICU pattern set.")),bi(" 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."))))}}])&&_i(n.prototype,r),a&&_i(n,a),t}(Mi);function Si(e){return(Si="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 ji(e,t){return!t||"object"!==Si(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 xi(e){return(xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ei(e,t){return(Ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ci=wp.i18n.__,Hi=wp.element.Component,Pi=wp.components,zi=Pi.PanelBody,Ai=Pi.SelectControl,Ni=Pi.TextControl,Fi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ji(this,xi(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&&Ei(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(zi,{title:Ci("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ai,{label:Ci("Enabled"),help:Ci("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:Ci("Yes"),value:"1"},{label:Ci("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(Ni,{label:Ci("Zoom Factor"),help:Ci("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)}}))}}])&&Oi(n.prototype,r),a&&Oi(n,a),t}(Hi);function Ri(e){return(Ri="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 Wi(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 Ii(e,t){return!t||"object"!==Ri(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 Bi(e){return(Bi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ji(e,t){return(Ji=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ui=wp.i18n.__,qi=wp.element,Vi=qi.Component,Gi=qi.Fragment,$i=(wp.blockEditor||wp.editor).ColorPalette,Ki=wp.components,Zi=Ki.BaseControl,Qi=Ki.ExternalLink,Xi=Ki.PanelBody,eo=Ki.TextControl,to=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ii(this,Bi(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&&Ji(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Xi,{title:Ui("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Xi,{title:Ui("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Values"),help:Ui("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(eo,{label:Ui("Maximum Values"),help:Ui("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(eo,{label:Ui("Minor Ticks"),help:Ui("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(Gi,null,wp.element.createElement(eo,{label:Ui("Number Format"),help:Ui("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,Ui("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Qi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Ui("ICU pattern set.")),Ui(" 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(Xi,{title:Ui("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Range"),help:Ui("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(eo,{label:Ui("Maximum Range"),help:Ui("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(Zi,{label:Ui("Green Color")},wp.element.createElement($i,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(Xi,{title:Ui("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Range"),help:Ui("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(eo,{label:Ui("Maximum Range"),help:Ui("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(Zi,{label:Ui("Yellow Color")},wp.element.createElement($i,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(Xi,{title:Ui("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Range"),help:Ui("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(eo,{label:Ui("Maximum Range"),help:Ui("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(Zi,{label:Ui("Red Color")},wp.element.createElement($i,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&Wi(n.prototype,r),a&&Wi(n,a),t}(Vi);function no(e){return(no="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 ro(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 ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function io(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oo(e,t){return(oo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var so=wp.i18n.__,lo=wp.element.Component,uo=(wp.blockEditor||wp.editor).ColorPalette,co=wp.components,mo=co.BaseControl,po=co.CheckboxControl,ho=co.PanelBody,_o=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"!==no(t)&&"function"!=typeof t?io(e):t}(this,ao(t).apply(this,arguments))).mapValues=e.mapValues.bind(io(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&&oo(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(ho,{title:so("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(po,{label:so("Show Row Label"),help:so("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(po,{label:so("Group by Row Label"),help:so("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(po,{label:so("Color by Row Label"),help:so("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(mo,{label:so("Single Color")},wp.element.createElement(uo,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&ro(n.prototype,r),a&&ro(n,a),t}(lo);function fo(e){return(fo="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 go(e,t){return!t||"object"!==fo(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 bo(e){return(bo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vo(e,t){return(vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Mo=wp.i18n.__,wo=wp.element,ko=wo.Component,Lo=wo.Fragment,Yo=wp.components,Do=Yo.CheckboxControl,To=Yo.PanelBody,So=Yo.SelectControl,Oo=Yo.TextControl,jo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),go(this,bo(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&&vo(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(To,{title:Mo("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Lo,null,wp.element.createElement(Do,{label:Mo("Enable Pagination"),help:Mo("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(Oo,{label:Mo("Number of rows per page"),help:Mo("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(So,{label:Mo("Pagination type"),help:Mo("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:Mo("Page number buttons only"),value:"numbers"},{label:Mo("'Previous' and 'Next' buttons only"),value:"simple"},{label:Mo("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:Mo("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Do,{label:Mo("Scroll Collapse"),help:Mo("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(Oo,{label:Mo("Vertical Height"),help:Mo("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(Do,{label:Mo("Disable Sort"),help:Mo("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(Do,{label:Mo("Freeze Header/Footer"),help:Mo("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(Do,{label:Mo("Responsive"),help:Mo("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(Lo,null,wp.element.createElement(So,{label:Mo("Enable Pagination"),help:Mo("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(Oo,{label:Mo("Number of rows per page"),help:Mo("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(So,{label:Mo("Disable Sort"),help:Mo("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(Oo,{label:Mo("Freeze Columns"),help:Mo("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(Do,{label:Mo("Allow HTML"),help:Mo("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(Do,{label:Mo("Right to Left table"),help:Mo("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&yo(n.prototype,r),a&&yo(n,a),t}(ko);function xo(e){return(xo="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 Eo(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 Co(e,t){return!t||"object"!==xo(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 Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Po(e,t){return(Po=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zo=wp.i18n.__,Ao=wp.element,No=Ao.Component,Fo=Ao.Fragment,Ro=(wp.blockEditor||wp.editor).ColorPalette,Wo=wp.components,Io=Wo.BaseControl,Bo=Wo.PanelBody,Jo=Wo.TextControl,Uo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Co(this,Ho(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&&Po(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(Bo,{title:zo("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Fo,null,wp.element.createElement(Bo,{title:zo("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(Fo,null,wp.element.createElement(Bo,{title:zo("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&Eo(n.prototype,r),a&&Eo(n,a),t}(No);function qo(e){return(qo="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 Vo(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 Go(e,t){return!t||"object"!==qo(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 $o(e){return($o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ko(e,t){return(Ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zo=wp.i18n.__,Qo=wp.element.Component,Xo=wp.components,es=Xo.PanelBody,ts=Xo.SelectControl,ns=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Go(this,$o(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&&Ko(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(es,{title:Zo("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ts,{label:Zo("Chart Type"),help:Zo("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Zo("Area"),value:"area"},{label:Zo("Bar"),value:"bars"},{label:Zo("Candlesticks"),value:"candlesticks"},{label:Zo("Line"),value:"line"},{label:Zo("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&Vo(n.prototype,r),a&&Vo(n,a),t}(Qo);function rs(e){return(rs="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 as(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 is(e,t){return!t||"object"!==rs(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 os(e){return(os=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ss(e,t){return(ss=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ls=wp.i18n.__,us=wp.element,cs=us.Component,ds=us.Fragment,ms=(wp.blockEditor||wp.editor).ColorPalette,ps=wp.components,hs=ps.BaseControl,_s=ps.ExternalLink,fs=ps.PanelBody,ys=ps.SelectControl,gs=ps.TextControl,bs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),is(this,os(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&&ss(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(fs,{title:ls("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(n.series).map((function(a,i){return a++,wp.element.createElement(fs,{title:r[a].label,className:"visualizer-inner-sections",initialOpen:!1},-1>=["table","pie"].indexOf(t)&&wp.element.createElement(ys,{label:ls("Visible In Legend"),help:ls("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:ls("Yes"),value:"1"},{label:ls("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(ds,null,wp.element.createElement(gs,{label:ls("Line Width"),help:ls("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(gs,{label:ls("Point Size"),help:ls("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(ds,null,wp.element.createElement(gs,{label:ls("Format"),help:ls("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,ls("For number axis labels, this is a subset of the formatting "),wp.element.createElement(_s,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},ls("ICU pattern set.")),ls(" 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(ds,null,wp.element.createElement(gs,{label:ls("Date Format"),help:ls("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,ls("This is a subset of the date formatting "),wp.element.createElement(_s,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},ls("ICU date and time format.")))),0<=["scatter","line"].indexOf(t)&&wp.element.createElement(ys,{label:ls("Curve Type"),help:ls("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:ls("Straight line without curve"),value:"none"},{label:ls("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(gs,{label:ls("Area Opacity"),help:ls("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(ys,{label:ls("Chart Type"),help:ls("Select the type of chart to show for this series."),value:n.series[i].type?n.series[i].type:"area",options:[{label:ls("Area"),value:"area"},{label:ls("Bar"),value:"bars"},{label:ls("Candlesticks"),value:"candlesticks"},{label:ls("Line"),value:"line"},{label:ls("Stepped Area"),value:"steppedArea"}],onChange:function(t){n.series[i].type=t,e.props.edit(n)}}),-1>=["table"].indexOf(t)&&wp.element.createElement(hs,{label:ls("Color")},wp.element.createElement(ms,{value:n.series[i].color,onChange:function(t){n.series[i].color=t,e.props.edit(n)}})))})))}}])&&as(n.prototype,r),a&&as(n,a),t}(cs);function vs(e){return(vs="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 Ms(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 ws(e,t){return!t||"object"!==vs(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 ks(e){return(ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ls(e,t){return(Ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ys=wp.i18n.__,Ds=wp.element.Component,Ts=(wp.blockEditor||wp.editor).ColorPalette,Ss=wp.components,Os=Ss.BaseControl,js=Ss.PanelBody,xs=Ss.TextControl,Es=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ws(this,ks(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&&Ls(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(js,{title:Ys("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(js,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(xs,{label:Ys("Slice Offset"),help:Ys("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(Os,{label:Ys("Format")},wp.element.createElement(Ts,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&Ms(n.prototype,r),a&&Ms(n,a),t}(Ds);function Cs(e){return(Cs="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 Ps(e,t){return!t||"object"!==Cs(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 zs(e){return(zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function As(e,t){return(As=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ns=wp.i18n.__,Fs=wp.element,Rs=Fs.Component,Ws=Fs.Fragment,Is=wp.components,Bs=Is.ExternalLink,Js=Is.PanelBody,Us=Is.TextControl,qs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ps(this,zs(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&&As(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"],r=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Js,{title:Ns("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(a){return wp.element.createElement(Js,{title:n[a].label,className:"visualizer-inner-sections",initialOpen:!1},("date"===n[a].type||"datetime"===n[a].type||"timeofday"===n[a].type)&&wp.element.createElement(Ws,null,wp.element.createElement(Us,{label:Ns("Display Date Format"),help:Ns("Enter custom format pattern to apply to this series value."),value:t.series[a].format?t.series[a].format.to:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.to=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Source Date Format"),help:Ns("What format is the source date in?"),value:t.series[a].format?t.series[a].format.from:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ns("You can find more info on "),wp.element.createElement(Bs,{href:"https://momentjs.com/docs/#/displaying/"},Ns("date and time formats here.")))),"number"===n[a].type&&wp.element.createElement(Ws,null,wp.element.createElement(Us,{label:Ns("Thousands Separator"),value:t.series[a].format?t.series[a].format.thousands:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Decimal Separator"),value:t.series[a].format?t.series[a].format.decimal:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Precision"),help:Ns("Round values to how many decimal places?"),value:t.series[a].format?t.series[a].format.precision:"",type:"number",onChange:function(n){100<n||(t.series[a].format||(t.series[a].format={}),t.series[a].format.precision=n,e.props.edit(t))}}),wp.element.createElement(Us,{label:Ns("Prefix"),value:t.series[a].format?t.series[a].format.prefix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Suffix"),value:t.series[a].format?t.series[a].format.suffix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.suffix=n,e.props.edit(t)}})),"boolean"===n[a].type&&"dataTable"===r&&wp.element.createElement(Ws,null,wp.element.createElement(Us,{label:Ns("Truthy value"),help:Ns("Provide the HTML entity code for the value the table should display when the value of the column is true. e.g. tick mark (Code: &#10004;) instead of true"),value:t.series[a].format?t.series[a].format.truthy:"",onChange:function(n){t.series[a].truthy||(t.series[a].truthy={}),t.series[a].format.truthy=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Falsy value"),help:Ns("Provide the HTML entity code for the value the table should display when the value of the column is false. e.g. cross mark (Code: &#10006;) instead of false"),value:t.series[a].format?t.series[a].format.falsy:"",onChange:function(n){t.series[a].falsy||(t.series[a].falsy={}),t.series[a].format.falsy=n,e.props.edit(t)}})))})))}}])&&Hs(n.prototype,r),a&&Hs(n,a),t}(Rs);function Vs(e){return(Vs="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 Gs(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"!==Vs(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 Ks(e){return(Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zs(e,t){return(Zs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qs=wp.i18n.__,Xs=wp.element,el=Xs.Component,tl=Xs.Fragment,nl=(wp.blockEditor||wp.editor).ColorPalette,rl=wp.components,al=rl.BaseControl,il=rl.CheckboxControl,ol=rl.PanelBody,sl=rl.SelectControl,ll=rl.TextControl,ul=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,Ks(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&&Zs(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(ol,{title:Qs("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ol,{title:Qs("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ll,{label:Qs("Width of Chart"),help:Qs("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(ll,{label:Qs("Height of Chart"),help:Qs("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(sl,{label:Qs("Keep Aspect Ratio"),help:Qs("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:Qs("Yes"),value:"1"},{label:Qs("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge"].indexOf(t)&&wp.element.createElement(tl,null,wp.element.createElement(ll,{label:Qs("Stroke Width"),help:Qs("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(al,{label:Qs("Stroke Color")},wp.element.createElement(nl,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(al,{label:Qs("Background Color")},wp.element.createElement(nl,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(il,{label:Qs("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(ol,{title:Qs("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ll,{label:Qs("Left Margin"),help:Qs("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(ll,{label:Qs("Top Margin"),help:Qs("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(ll,{label:Qs("Width Of Chart Area"),help:Qs("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(ll,{label:Qs("Height Of Chart Area"),help:Qs("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Gs(n.prototype,r),a&&Gs(n,a),t}(el);function cl(e){return(cl="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 dl(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 ml(e,t){return!t||"object"!==cl(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 hl(e,t){return(hl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _l=wp.i18n.__,fl=wp.element,yl=fl.Component,gl=fl.Fragment,bl=wp.components,vl=bl.CheckboxControl,Ml=bl.PanelBody,wl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ml(this,pl(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&&hl(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(Ml,{title:_l("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(gl,null,wp.element.createElement(vl,{label:_l("Print"),help:_l("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(vl,{label:_l("CSV"),help:_l("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(vl,{label:_l("Excel"),help:_l("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(vl,{label:_l("Copy"),help:_l("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)}})))}}])&&dl(n.prototype,r),a&&dl(n,a),t}(yl);function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ll(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){kl(e,t,n[t])}))}return e}var Yl={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"}},Dl=n(2);const Tl={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&&Tl.throwError(Tl.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||Tl.throwError(Tl.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&Tl.throwError(Tl.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&Tl.throwError(Tl.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Dl.getType)(t)!==n.toLowerCase()&&Tl.throwError(Tl.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Dl.getType)(t)===n&&Tl.throwError(Tl.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{Tl.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&Tl.throwError(Tl.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{Tl.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&Tl.throwError(Tl.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Dl.locate)(t,n);r&&Tl.throwError(Tl.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{Tl.isUndefined(e,t),Tl.isNotType(e,t,"string"),Tl.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&Tl.throwError(Tl.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&Tl.throwError(Tl.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{Tl.isUndefined(e,t),Tl.containsUndefined(e,t)}};var Sl=Tl;const Ol=(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 jl={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"};
     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=_(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=_(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)},f=function(e,t){return e.getTime()===t.getTime()},_=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]=_({},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>"},w=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},M=function(e,t,n,r,a,i){var o,s,l,c,d,m=e._o,p=n===m.minYear,h=n===m.maxYear,f='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',_=!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?f+=d+c:f+=c+d,p&&(0===r||m.minMonth>=r)&&(_=!1),h&&(11===r||m.maxMonth<=r)&&(y=!1),0===t&&(f+='<button class="pika-prev'+(_?"":" is-disabled")+'" type="button">'+m.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+m.i18n.nextMonth+"</button>"),f+"</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=_({},g,!0));var t=_(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">'+M(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,_,y,g=0===t?11:t-1,M=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=p(k,g),T=i+o,D=T;D>7;)D-=7;T+=7-D;for(var S=0,O=0;S<T;S++){var j=new Date(e,t,S-o+1),x=!!c(this._d)&&f(j,this._d),E=f(j,a),C=S<o||S>=i+o,P=S-o+1,H=t,z=e,A=r.startRange&&f(r.startRange,j),N=r.endRange&&f(r.endRange,j),F=r.startRange&&r.endRange&&r.startRange<j&&j<r.endRange;C&&(S<o?(P=Y+P,H=g,z=k):(P-=i,H=M,z=L));var R={day:P,month:H,year:z,isSelected:x,isToday:E,isDisabled:r.minDate&&j<r.minDate||r.maxDate&&j>r.maxDate||r.disableWeekends&&d(j)||r.disableDayFn&&r.disableDayFn(j),isEmpty:C,isStartRange:A,isEndRange:N,isInRange:F,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(R)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-o,m=t,_=e,y=void 0,void 0,y=new Date(_,0,1),'<td class="pika-week">'+Math.ceil(((new Date(_,m,u)-y)/864e5+y.getDay()+1)/7)+"</td>")),s.push(w(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,f=function(){return"reactgooglegraph-"+(h+=1)},_=["#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,w=function(e){var t=e.children,n=e.value;return Object(r.createElement)(b,{value:n},t)},M=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,w,M,k,L,Y,T;return d(this,(function(d){switch(d.label){case 0:return e=this.props,t=e.google,c=e.googleChartWrapper,_=null,null!==r&&(g=t.visualization.arrayToDataTable(r.old),b=t.visualization.arrayToDataTable(r.new),_=t.visualization[u].prototype.computeDiff(g,b)),null===n?[3,1]:(f=Array.isArray(n)?t.visualization.arrayToDataTable(n):new t.visualization.DataTable(n),[3,5]);case 1:return null===a||null===i?[3,2]:(f=t.visualization.arrayToDataTable([i].concat(a)),[3,5]);case 2:return null===p?[3,4]:[4,y(t,p,h)];case 3:return f=d.sent(),[3,5];case 4:f=t.visualization.arrayToDataTable([]),d.label=5;case 5:for(v=f.getNumberOfColumns(),w=0;w<v;w+=1)M=this.getColumnID(f,w),this.state.hiddenColumns.includes(M)&&(k=f.getColumnLabel(w),L=f.getColumnId(w),Y=f.getColumnType(w),f.removeColumn(w),f.addColumn({label:k,id:L,type:Y}));return T=c.getChart(),"Timeline"===c.getChartType()&&T&&T.clearChart(),c.setChartType(u),c.setOptions(o),c.setDataTable(f),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(f),null!==_&&(c.setDataTable(_),c.draw()),null!==m&&(this.applyFormatters(f,m),c.setDataTable(f),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]:_[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)(M,{render:function(e){return Object(r.createElement)(L,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),T=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)(M,{render:function(t){return e.listenToEvents({chartEvents:t.chartEvents||null,google:n,googleChartWrapper:a}),null}})},t}(r.Component),D=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?f():t.graphID:null!==r&&null===a?r:null!==a&&null===r?a:r,t.graphID=e,t.graphID},t.getControlID=function(e,t){return D+=1,void 0===e?"googlechart-control-"+t+"-"+D: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)(T,{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)(w,{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),j=n(130),x=n.n(j);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 P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=wp.element,N=A.Component,F=A.Fragment,R=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?H(e):t}(this,P(t).apply(this,arguments))).initDataTable=e.initDataTable.bind(H(e)),e.dataRenderer=e.dataRenderer.bind(H(e)),e.table,e.uniqueId=x()(),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&&z(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){var a=e[r];void 0===a&&(a=e[n.data]),t[n.data]=a})),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,a=this.props.options;if(void 0===a.series[n])return e;switch(t){case"date":case"datetime":case"timeofday":return a.series[n].format&&a.series[n].format.from&&a.series[n].format.to?jQuery.fn.dataTable.render.moment(a.series[n].format.from,a.series[n].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");case"num":var i=["","","","",""];return a.series[n].format.thousands&&(i[0]=a.series[n].format.thousands),a.series[n].format.decimal&&(i[1]=a.series[n].format.decimal),a.series[n].format.precision&&(i[2]=a.series[n].format.precision),a.series[n].format.prefix&&(i[3]=a.series[n].format.prefix),a.series[n].format.suffix&&(i[4]=a.series[n].format.suffix),(r=jQuery.fn.dataTable.render).number.apply(r,i);case"boolean":return jQuery.fn.dataTable.render.extra=function(e,t,r){return!0!==e&&"true"!==e||void 0===a.series[n].format||""===a.series[n].format.truthy?!1!==e&&"false"!==e||void 0===a.series[n].format||""===a.series[n].format.falsy?e:a.series[n].format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""):a.series[n].format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},jQuery.fn.dataTable.render.extra}return e}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(F,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}(N),W=n(4),I=n.n(W),B=n(131),J=n.n(B),U=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},q=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},V=function(e){return J()(e,q)},G=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},V(e)},$=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},K=function(e,t){return!0===e[t]||"true"===e[t]||"1"===e[t]||1===e[t]};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,fe=ce.Placeholder,_e=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,perPage:visualizerLocalize.chartsPerPage},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,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=visualizerLocalize.chartsPerPage,e.next=3,oe({path:"wp/v2/visualizer/?per_page="+t+"&meta_key=visualizer-chart-library&meta_value=ChartJS"});case 3:n=e.sent,this.setState({charts:n});case 5: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,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.charts.length,n=this.state.chartsLoaded,r=this.state.perPage,this.setState({isBusy:!0}),e.next=6,oe({path:"wp/v2/visualizer/?per_page=".concat(r,"&meta_key=visualizer-chart-library&meta_value=ChartJS&offset=").concat(t)});case 6:a=e.sent,r>a.length&&(n=!0),this.setState({charts:this.state.charts.concat(a),isBusy:!1,chartsLoaded:n});case 9: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,i=t.perPage;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,o=U(n[t].chart_data);if(r=o["visualizer-settings"].title?o["visualizer-settings"].title:"#".concat(n[t].id),a=0<=["gauge","table","timeline","dataTable"].indexOf(o["visualizer-chart-type"])?"dataTable"===o["visualizer-chart-type"]?o["visualizer-chart-type"]:ae(o["visualizer-chart-type"]):"".concat(ae(o["visualizer-chart-type"]),"Chart"),!o["visualizer-chart-library"]||"ChartJS"!==o["visualizer-chart-library"])return o["visualizer-data-exploded"]&&(i=ie("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:"visualizer-settings__charts-single",key:"chart-".concat(n[t].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},r),"dataTable"===a?wp.element.createElement(R,{id:n[t].id,rows:o["visualizer-data"],columns:o["visualizer-series"],chartsScreen:!0,options:G(o["visualizer-settings"])}):(o["visualizer-data-exploded"],wp.element.createElement(O,{chartType:a,rows:o["visualizer-data"],columns:o["visualizer-series"],options:G(o["visualizer-settings"])})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,i)),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&&i-1<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(fe,null,wp.element.createElement(_e,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 we(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 ke=wp.i18n.__,Le=wp.element.Component,Ye=wp.components,Te=Ye.Button,De=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?we(e):t}(this,ve(t).apply(this,arguments))).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(we(e)),e.uploadImport=e.uploadImport.bind(we(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&&Me(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(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(Te,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&be(n.prototype,r),a&&be(n,a),t}(Le);function je(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(n,!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){return(Ce="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 Pe(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 He(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Pe(i,r,a,o,s,"next",e)}function s(e){Pe(i,r,a,o,s,"throw",e)}o(void 0)}))}}function ze(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 Ae(e){return(Ae=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 Fe(e,t){return(Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Re=wp.i18n.__,We=wp,Ie=(We.apiFetch,We.apiRequest),Be=wp.element.Component,Je=wp.components,Ue=Je.Button,qe=Je.ExternalLink,Ve=Je.IconButton,Ge=Je.Modal,$e=Je.PanelBody,Ke=Je.SelectControl,Ze=Je.TextControl,Qe=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"!==Ce(t)&&"function"!=typeof t?Ne(e):t}(this,Ae(t).apply(this,arguments))).openModal=e.openModal.bind(Ne(e)),e.initTable=e.initTable.bind(Ne(e)),e.onToggle=e.onToggle.bind(Ne(e)),e.toggleHeaders=e.toggleHeaders.bind(Ne(e)),e.getJSONRoot=e.getJSONRoot.bind(Ne(e)),e.getJSONData=e.getJSONData.bind(Ne(e)),e.getTableData=e.getTableData.bind(Ne(e)),e.state={isOpen:!1,isLoading:!1,isFirstStepOpen:!0,isSecondStepOpen:!1,isThirdStepOpen:!1,isFourthStepOpen:!1,isHeaderPanelOpen:!1,endpointRoots:[],endpointPaging:[],table:null,requestHeaders:{method:"GET",username:"",password:"",auth:""}},e}var n,r,a,i,o,s,l,u;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&&Fe(e,t)}(t,e),n=t,(r=[{key:"openModal",value:(u=He(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isOpen:!0});case 2:t=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&null!==this.state.table&&(t.innerHTML=this.state.table,this.initTable());case 4:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"initTable",value:function(){jQuery("#visualizer-json-query-table table").DataTable({paging:!1,searching:!1,ordering:!1,select:!1,scrollX:"600px",scrollY:"400px",info:!1,colReorder:{fixedColumnsLeft:1},dom:"Bt",buttons:[{extend:"colvis",columns:":gt(0)",collectionLayout:"four-column"}]})}},{key:"onToggle",value:(l=He(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this.state.table&&this.state.endpointRoots&&0<this.state.endpointRoots.length&&("isFirstStepOpen"===t||"isSecondStepOpen"===t)&&this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:!1,isFourthStepOpen:!1}),null===this.state.table){e.next=5;break}return e.next=4,this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:"isThirdStepOpen"===t,isFourthStepOpen:"isFourthStepOpen"===t});case 4:"isFourthStepOpen"===t&&(n=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&(n.innerHTML=this.state.table,this.initTable()));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"toggleHeaders",value:function(){this.setState({isHeaderPanelOpen:!this.state.isHeaderPanelOpen})}},{key:"getJSONRoot",value:(s=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0,endpointRoots:[],endpointPaging:[],table:null}),e.next=3,Ie({path:"/visualizer/v1/get-json-root?url=".concat(this.props.chart["visualizer-json-url"]),data:{method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=Object.keys(t.data.roots).map((function(e){return{label:t.data.roots[e].replace(/>/g," ➤ "),value:t.data.roots[e]}})),this.setState({isLoading:!1,isFirstStepOpen:!1,isSecondStepOpen:!0,endpointRoots:n})):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getJSONData",value:(o=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,Ie({path:"/visualizer/v1/get-json-data?url=".concat(this.props.chart["visualizer-json-url"],"&chart=").concat(this.props.id),data:{root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=[{label:Re("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:Re("Get first 5 pages using root ➤ next"),value:"root>next"}),this.setState({isLoading:!1,isSecondStepOpen:!1,isFourthStepOpen:!0,endpointPaging:n,table:t.data.table}),document.querySelector("#visualizer-json-query-table").innerHTML=t.data.table,this.initTable()):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getTableData",value:(i=He(regeneratorRuntime.mark((function e(){var t,n,r,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),t=document.querySelectorAll("#visualizer-json-query-table input"),n=document.querySelectorAll("#visualizer-json-query-table select"),r=[],a={},t.forEach((function(e){return r.push(e.value)})),n.forEach((function(e){return a[e.name]=e.value})),e.next=9,Ie({path:"/visualizer/v1/set-json-data",data:xe({url:this.props.chart["visualizer-json-url"],method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,paging:this.props.chart["visualizer-json-paging"]||0,header:r},a),method:"GET"});case 9:(i=e.sent).success?(this.props.JSONImportData(i.data.name,JSON.parse(i.data.series),JSON.parse(i.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(i.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement($e,{title:Re("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Re("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(qe,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},Re("For more info check this tutorial."))),wp.element.createElement(Ke,{label:Re("How often do you want to check the url?"),value:this.props.chart["visualizer-json-schedule"]?this.props.chart["visualizer-json-schedule"]:1,options:[{label:Re("One-time"),value:"-1"},{label:Re("Live"),value:"0"},{label:Re("Each hour"),value:"1"},{label:Re("Each 12 hours"),value:"12"},{label:Re("Each day"),value:"24"},{label:Re("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,onClick:this.openModal},Re("Modify Parameters")),this.state.isOpen&&wp.element.createElement(Ge,{title:Re("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement($e,{title:Re("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,Re("If you want to add authentication, add headers to the endpoint or change the request in any way, please refer to our document here:")),wp.element.createElement("p",null,wp.element.createElement(qe,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},Re("How to extend REST endpoints with JSON response"))),wp.element.createElement(Ze,{placeholder:Re("Please enter the URL of your JSON file"),value:this.props.chart["visualizer-json-url"]?this.props.chart["visualizer-json-url"]:"",onChange:this.props.editJSONURL}),wp.element.createElement(Ve,{icon:"arrow-right-alt2",label:Re("Add Headers"),onClick:this.toggleHeaders},Re("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement(Ke,{label:Re("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:Re("GET")},{value:"POST",label:Re("POST")}],onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=xe({},r,{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Re("Credentials")),wp.element.createElement(Ze,{label:Re("Username"),placeholder:Re("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ce(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=xe({},r,{username:t,password:n.password}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("span",{className:"visualizer-json-query-modal-field-separator"},Re("&")),wp.element.createElement(Ze,{label:Re("Password"),placeholder:Re("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ce(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=xe({},r,{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Re("OR")),wp.element.createElement(Ze,{label:Re("Authorization"),placeholder:Re("e.g. SharedKey <AccountName>:<Signature>"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=xe({},r,{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},Re("Fetch Endpoint"))),wp.element.createElement($e,{title:Re("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,Re("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement(Ke,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},Re("Parse Endpoint"))),wp.element.createElement($e,{title:Re("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement(Ke,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,Re("Enable this feature in PRO version!"))),wp.element.createElement($e,{title:Re("Step 4: Select the data to display in the chart"),initialOpen:!1,opened:this.state.isFourthStepOpen,onToggle:function(){return e.onToggle("isFourthStepOpen")}},wp.element.createElement("ul",null,wp.element.createElement("li",null,Re("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,Re("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,Re("You can use drag/drop to reorder the columns but this column position is not saved. So when you reload the table, you may have to reorder again.")),wp.element.createElement("li",null,Re("You can select any number of columns but the chart type selected will determine how many will display in the chart."))),wp.element.createElement("div",{id:"visualizer-json-query-table"}),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},Re("Save & Show Chart")))))}}])&&ze(n.prototype,r),a&&ze(n,a),t}(Be);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 et(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 tt(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 nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rt(e,t){return(rt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var at=wp.i18n.__,it=wp.element.Component,ot=wp.components,st=ot.Button,lt=ot.ExternalLink,ut=ot.PanelBody,ct=ot.SelectControl,dt=ot.TextControl,mt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),tt(this,nt(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&&rt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return wp.element.createElement(ut,{title:at("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ut,{title:at("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("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,at("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(lt,{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,at("You can also import data from Google Spreadsheet.")),wp.element.createElement(dt,{placeholder:at("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(st,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},at("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(ut,{title:at("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,at("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,at("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(dt,{placeholder:at("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(ct,{label:at("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:at("Each hour"),value:"1"},{label:at("Each 12 hours"),value:"12"},{label:at("Each day"),value:"24"},{label:at("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(st,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},at("Save Schedule"))):wp.element.createElement(ut,{title:at("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(st,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},at("Buy Now"))),wp.element.createElement(Qe,{id:this.props.id,chart:this.props.chart,editSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}))}}])&&et(n.prototype,r),a&&et(n,a),t}(it);function pt(e){return(pt="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,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 ft(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 _t(e,t){return!t||"object"!==pt(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 yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var bt=wp.i18n.__,vt=wp.apiFetch,wt=wp.element,Mt=wt.Component,kt=wt.Fragment,Lt=wp.components,Yt=Lt.Button,Tt=Lt.PanelBody,Dt=Lt.Placeholder,St=Lt.SelectControl,Ot=Lt.Spinner,jt=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=_t(this,yt(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&&gt(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,vt({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){ht(a,n,r,o,s,"next",e)}function s(e){ht(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(Tt,{title:bt("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(kt,null,wp.element.createElement(St,{label:bt("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(Yt,{isPrimary:!0,isLarge:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},bt("Import Chart"))):wp.element.createElement(Dt,null,wp.element.createElement(Ot,null))):wp.element.createElement(Tt,{title:bt("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,bt("Enable this feature in PRO version!")),wp.element.createElement(Yt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},bt("Buy Now")))}}])&&ft(n.prototype,r),a&&ft(n,a),t}(Mt);function xt(e){return(xt="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 Et(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 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 Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ht(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var At=wp.i18n.__,Nt=wp.apiRequest,Ft=wp.components,Rt=Ft.Button,Wt=Ft.ExternalLink,It=wp.element,Bt=It.Component,Jt=It.Fragment,Ut=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"!==xt(t)&&"function"!=typeof t?Ht(e):t}(this,Pt(t).apply(this,arguments))).onSave=e.onSave.bind(Ht(e)),e.state={isLoading:!1,success:!1,query:"",name:"",series:{},data:[]},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&&zt(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=wp.CodeMirror||CodeMirror,t=document.querySelector(".visualizer-db-query"),n=e.fromTextArea(t,{autofocus:!0,mode:"text/x-mysql",lineWrapping:!0,dragDrop:!1,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-Space":"autocomplete"},hintOptions:{tables:visualizerLocalize.sqlTable}});n.on("inputRead",(function(){n.save()}))}},{key:"onSave",value:(i=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=document.querySelector(".visualizer-db-query").value,(n=document.querySelector("#visualizer-db-query-table")).innerHTML="",e.next=5,this.setState({isLoading:!0});case 5:return e.next=7,Nt({path:"/visualizer/v1/get-query-data",data:{query:t},method:"GET"});case 7:return r=e.sent,e.next=10,this.setState({isLoading:!1,success:r.success,query:t,name:r.data.name||"",series:r.data.series||{},data:r.data.data||[]});case 10:n.innerHTML=r.data.table||r.data.msg,this.state.success&&jQuery("#results").DataTable({paging:!1});case 12: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){Et(a,n,r,o,s,"next",e)}function s(e){Et(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(Jt,null,wp.element.createElement("textarea",{className:"visualizer-db-query",placeholder:At("Your query goes here…")},this.props.chart["visualizer-db-query"]),wp.element.createElement("div",{className:"visualizer-db-query-actions"},wp.element.createElement(Rt,{isLarge:!0,isDefault:!0,isBusy:this.state.isLoading,onClick:this.onSave},At("Show Results")),wp.element.createElement(Rt,{isLarge:!0,isPrimary:!0,disabled:!this.state.success,onClick:function(){return e.props.save(e.state.query,e.state.name,e.state.series,e.state.data)}},At("Save"))),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement(Wt,{href:"https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts"},At("Examples of queries and links to resources that you can use with this feature."))),wp.element.createElement("li",null,At("Use Control+Space for autocompleting keywords or table names."))),wp.element.createElement("div",{id:"visualizer-db-query-table",className:!this.state.success&&"db-wizard-error"}))}}])&&Ct(n.prototype,r),a&&Ct(n,a),t}(Bt);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 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 Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $t(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 Zt=wp.i18n.__,Qt=wp.element.Component,Xt=wp.components,en=Xt.Button,tn=Xt.Modal,nn=Xt.PanelBody,rn=Xt.SelectControl,an=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"!==qt(t)&&"function"!=typeof t?$t(e):t}(this,Gt(t).apply(this,arguments))).save=e.save.bind($t(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:"save",value:function(e,t,n,r){this.props.databaseImportData(e,t,n,r),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return"business"!==visualizerLocalize.isPro?wp.element.createElement(nn,{title:Zt("Import data from database"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Zt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(en,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Zt("Buy Now"))):wp.element.createElement(nn,{title:Zt("Import data from database"),initialOpen:!1},wp.element.createElement("p",null,Zt("You can import data from the database here.")),wp.element.createElement("p",null,Zt("How often do you want to refresh the data from the database.")),wp.element.createElement(rn,{label:Zt("How often do you want to check the url?"),value:this.props.chart["visualizer-db-schedule"]?this.props.chart["visualizer-db-schedule"]:0,options:[{label:Zt("Live"),value:"0"},{label:Zt("Each hour"),value:"1"},{label:Zt("Each 12 hours"),value:"12"},{label:Zt("Each day"),value:"24"},{label:Zt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(en,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({isOpen:!0})}},Zt("Create Query")),this.state.isOpen&&wp.element.createElement(tn,{title:Zt("Import from database"),onRequestClose:function(){return e.setState({isOpen:!1})},className:"visualizer-db-query-modal",shouldCloseOnClickOutside:!1},wp.element.createElement(Ut,{chart:this.props.chart,changeQuery:this.props.changeQuery,save:this.save})))}}])&&Vt(n.prototype,r),a&&Vt(n,a),t}(Qt),on=n(132);n(152);function sn(e){return(sn="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 ln(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 un(e,t){return!t||"object"!==sn(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 dn(e,t){return(dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var mn=wp.i18n.__,pn=wp.element.Component,hn=wp.components,fn=hn.Button,_n=hn.ButtonGroup,yn=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=un(this,cn(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&&dn(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(on.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(_n,null,wp.element.createElement(fn,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},mn("Close")),wp.element.createElement(fn,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},mn("Save"))))}}])&&ln(n.prototype,r),a&&ln(n,a),t}(pn);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 bn(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 vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mn(e,t){return(Mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var kn=wp.i18n.__,Ln=wp.element,Yn=Ln.Component,Tn=Ln.Fragment,Dn=wp.components,Sn=Dn.Button,On=Dn.Modal,jn=Dn.PanelBody,xn=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"!==gn(t)&&"function"!=typeof t?wn(e):t}(this,vn(t).apply(this,arguments))).toggleModal=e.toggleModal.bind(wn(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&&Mn(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(Tn,null,wp.element.createElement(jn,{title:kn("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,kn("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(Sn,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},kn("View Editor"))),this.state.isOpen&&wp.element.createElement(On,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(yn,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(jn,{title:kn("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,kn("Enable this feature in PRO version!")),wp.element.createElement(Sn,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},kn("Buy Now")))}}])&&bn(n.prototype,r),a&&bn(n,a),t}(Yn);function En(e){return(En="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 Cn(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 Pn(e,t){return!t||"object"!==En(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 Hn(e){return(Hn=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 An=wp.i18n.__,Nn=wp.element.Component,Fn=(wp.blockEditor||wp.editor).ColorPalette,Rn=wp.components,Wn=Rn.BaseControl,In=Rn.CheckboxControl,Bn=Rn.PanelBody,Jn=Rn.SelectControl,Un=Rn.TextControl,qn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Pn(this,Hn(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-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:An("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];return-1>=["timeline"].indexOf(t)&&(r[1]={label:An("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:An("The tooltip will not be displayed"),value:"none"},wp.element.createElement(Bn,{title:An("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Bn,{title:An("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Un,{label:An("Chart Title"),help:An("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(Jn,{label:An("Chart Title Position"),help:An("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:An("Inside the chart"),value:"in"},{label:An("Outside the chart"),value:"out"},{label:An("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Wn,{label:An("Chart Title Color")},wp.element.createElement(Fn,{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(Jn,{label:An("Axes Titles Position"),help:An("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:An("Inside the chart"),value:"in"},{label:An("Outside the chart"),value:"out"},{label:An("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(Bn,{title:An("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:An("Font Family"),help:An("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:An("Arial"),value:"Arial"},{label:An("Sans Serif"),value:"Sans Serif"},{label:An("Serif"),value:"serif"},{label:An("Arial"),value:"Arial"},{label:An("Wide"),value:"Arial black"},{label:An("Narrow"),value:"Arial Narrow"},{label:An("Comic Sans MS"),value:"Comic Sans MS"},{label:An("Courier New"),value:"Courier New"},{label:An("Garamond"),value:"Garamond"},{label:An("Georgia"),value:"Georgia"},{label:An("Tahoma"),value:"Tahoma"},{label:An("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Jn,{label:An("Font Size"),help:An("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(Bn,{title:An("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:An("Position"),help:An("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:[{label:An("Left of the chart"),value:"left"},{label:An("Right of the chart"),value:"right"},{label:An("Above the chart"),value:"top"},{label:An("Below the chart"),value:"bottom"},{label:An("Inside the chart"),value:"in"},{label:An("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(Jn,{label:An("Alignment"),help:An("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:An("Aligned to the start of the allocated area"),value:"start"},{label:An("Centered in the allocated area"),value:"center"},{label:An("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(Wn,{label:An("Font Color")},wp.element.createElement(Fn,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["table","gauge","geo","dataTable","timeline"].indexOf(t)&&wp.element.createElement(Bn,{title:An("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:An("Trigger"),help:An("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(Jn,{label:An("Show Color Code"),help:An("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:An("Yes"),value:"1"},{label:An("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Jn,{label:An("Text"),help:An("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:An("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:An("Display only the absolute value of the slice"),value:"value"},{label:An("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(Bn,{title:An("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(In,{label:An("Animate on startup?"),help:An("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(Un,{label:An("Duration"),help:An("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(Jn,{label:An("Easing"),help:An("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:An("Constant speed"),value:"linear"},{label:An("Start slow and speed up"),value:"in"},{label:An("Start fast and slow down"),value:"out"},{label:An("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&Cn(n.prototype,r),a&&Cn(n,a),t}(Nn);function Vn(e){return(Vn="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 $n(e,t){return!t||"object"!==Vn(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,er=Xn.Component,tr=Xn.Fragment,nr=(wp.blockEditor||wp.editor).ColorPalette,rr=wp.components,ar=rr.BaseControl,ir=rr.ExternalLink,or=rr.PanelBody,sr=rr.SelectControl,lr=rr.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),$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-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(or,{title:Qn("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(or,{title:Qn("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Axis Title"),help:Qn("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(sr,{label:Qn("Text Position"),help:Qn("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Qn("Inside the chart"),value:"in"},{label:Qn("Outside the chart"),value:"out"},{label:Qn("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(sr,{label:Qn("Direction"),help:Qn("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Qn("Identical Direction"),value:"1"},{label:Qn("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(ar,{label:Qn("Base Line Color")},wp.element.createElement(nr,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(ar,{label:Qn("Axis Text Color")},wp.element.createElement(nr,{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(tr,null,wp.element.createElement(lr,{label:Qn("Number Format"),help:Qn("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,Qn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ir,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Qn("ICU pattern set.")),Qn(" 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,Qn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ir,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Qn("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(tr,null,wp.element.createElement(or,{title:Qn("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Count"),help:Qn("The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between 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(ar,{label:Qn("Color")},wp.element.createElement(nr,{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(or,{title:Qn("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Count"),help:Qn("Specify 0 to disable the minor gridlines."),value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.count:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(ar,{label:Qn("Color")},wp.element.createElement(nr,{value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.color:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(or,{title:Qn("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Maximun Value"),help:Qn("The maximum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.max:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(lr,{label:Qn("Minimum Value"),help:Qn("The minimum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.min:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Gn(n.prototype,r),a&&Gn(n,a),t}(er);function cr(e){return(cr="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 dr(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"!==cr(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 hr(e,t){return(hr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var fr=wp.i18n.__,_r=wp.element,yr=_r.Component,gr=_r.Fragment,br=(wp.blockEditor||wp.editor).ColorPalette,vr=wp.components,wr=vr.BaseControl,Mr=vr.ExternalLink,kr=vr.PanelBody,Lr=vr.SelectControl,Yr=vr.TextControl,Tr=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,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&&hr(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(kr,{title:fr("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(kr,{title:fr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Axis Title"),help:fr("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(Lr,{label:fr("Text Position"),help:fr("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:fr("Inside the chart"),value:"in"},{label:fr("Outside the chart"),value:"out"},{label:fr("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(Lr,{label:fr("Direction"),help:fr("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:fr("Identical Direction"),value:"1"},{label:fr("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(wr,{label:fr("Base Line Color")},wp.element.createElement(br,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(wr,{label:fr("Axis Text Color")},wp.element.createElement(br,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["bar"].indexOf(t)&&wp.element.createElement(gr,null,wp.element.createElement(Yr,{label:fr("Number Format"),help:fr("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,fr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Mr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},fr("ICU pattern set.")),fr(" 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,fr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Mr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},fr("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(gr,null,wp.element.createElement(kr,{title:fr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Count"),help:fr("The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between 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(wr,{label:fr("Color")},wp.element.createElement(br,{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(kr,{title:fr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Count"),help:fr("Specify 0 to disable the minor gridlines."),value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.count:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wr,{label:fr("Color")},wp.element.createElement(br,{value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.color:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(kr,{title:fr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Maximun Value"),help:fr("The maximum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.max:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Yr,{label:fr("Minimum Value"),help:fr("The minimum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.min:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&dr(n.prototype,r),a&&dr(n,a),t}(yr);function Dr(e){return(Dr="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 Or(e,t){return!t||"object"!==Dr(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 jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(e,t){return(xr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Er=wp.i18n.__,Cr=wp.element,Pr=Cr.Component,Hr=Cr.Fragment,zr=(wp.blockEditor||wp.editor).ColorPalette,Ar=wp.components,Nr=Ar.BaseControl,Fr=Ar.ExternalLink,Rr=Ar.PanelBody,Wr=Ar.SelectControl,Ir=Ar.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),Or(this,jr(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&&xr(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:Er("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Hr,null,wp.element.createElement(Ir,{label:Er("Number Format"),help:Er("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,Er("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Fr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Er("ICU pattern set.")),Er(" 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,Er("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Fr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Er("ICU date and time format.")))),wp.element.createElement(Wr,{label:Er("Is 3D"),help:Er("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:Er("Yes"),value:"1"},{label:Er("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:Er("Reverse Categories"),help:Er("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:Er("Yes"),value:"1"},{label:Er("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:Er("Slice Text"),help:Er("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:Er("The percentage of the slice size out of the total"),value:"percentage"},{label:Er("The quantitative value of the slice"),value:"value"},{label:Er("The name of the slice"),value:"label"},{label:Er("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:Er("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Ir,{label:Er("Pie Hole"),help:Er("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:Er("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Ir,{label:Er("Start Angle"),help:Er("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(Nr,{label:Er("Slice Border Color")},wp.element.createElement(zr,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&Sr(n.prototype,r),a&&Sr(n,a),t}(Pr);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 Ur(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 Vr(e){return(Vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gr(e,t){return(Gr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $r=wp.i18n.__,Kr=wp.element.Component,Zr=(wp.blockEditor||wp.editor).ColorPalette,Qr=wp.components,Xr=Qr.BaseControl,ea=Qr.PanelBody,ta=Qr.TextControl,na=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,Vr(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&&Gr(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:$r("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ta,{label:$r("Visibility Threshold"),help:$r("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:$r("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(ta,{label:$r("Residue Slice Label"),help:$r("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(Xr,{label:$r("Residue Slice Color")},wp.element.createElement(Zr,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&Ur(n.prototype,r),a&&Ur(n,a),t}(Kr);function ra(e){return(ra="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 aa(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 ia(e,t){return!t||"object"!==ra(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 oa(e){return(oa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sa(e,t){return(sa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var la=wp.i18n.__,ua=wp.element,ca=ua.Component,da=ua.Fragment,ma=wp.components,pa=ma.PanelBody,ha=ma.SelectControl,fa=ma.TextControl,_a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ia(this,oa(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&&sa(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(pa,{title:la("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(fa,{label:la("Line Width"),help:la("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(fa,{label:la("Point Size"),help:la("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(ha,{label:la("Curve Type"),help:la("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:la("Straight line without curve"),value:"none"},{label:la("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(ha,{label:la("Focus Target"),help:la("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:la("Focus on a single data point."),value:"datum"},{label:la("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(ha,{label:la("Selection Mode"),help:la("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:la("Single data point"),value:"single"},{label:la("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(ha,{label:la("Aggregation Target"),help:la("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:la("Group selected data by x-value"),value:"category"},{label:la("Group selected data by series"),value:"series"},{label:la("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:la("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(fa,{label:la("Point Opacity"),help:la("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(da,null,wp.element.createElement(fa,{label:la("Area Opacity"),help:la("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(ha,{label:la("Is Stacked"),help:la("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:la("Yes"),value:"1"},{label:la("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(ha,{label:la("Interpolate Nulls"),help:la("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:la("Yes"),value:"1"},{label:la("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&aa(n.prototype,r),a&&aa(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 wa(e,t){return(wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ma=wp.i18n.__,ka=wp.element.Component,La=wp.components,Ya=La.PanelBody,Ta=La.SelectControl,Da=La.TextControl,Sa=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&&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(Ya,{title:Ma("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ta,{label:Ma("Focus Target"),help:Ma("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:Ma("Focus on a single data point."),value:"datum"},{label:Ma("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(Ta,{label:Ma("Is Stacked"),help:Ma("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Ma("Yes"),value:"1"},{label:Ma("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(Da,{label:Ma("Bars Opacity"),help:Ma("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)}}))}}])&&ga(n.prototype,r),a&&ga(n,a),t}(ka);function Oa(e){return(Oa="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 ja(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 xa(e,t){return!t||"object"!==Oa(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 Ea(e){return(Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ca(e,t){return(Ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pa=wp.i18n.__,Ha=wp.element.Component,za=(wp.blockEditor||wp.editor).ColorPalette,Aa=wp.components,Na=Aa.BaseControl,Fa=Aa.PanelBody,Ra=Aa.SelectControl,Wa=Aa.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),xa(this,Ea(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&&Ca(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Fa,{title:Pa("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Fa,{title:Pa("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ra,{label:Pa("Focus Target"),help:Pa("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:Pa("Focus on a single data point."),value:"datum"},{label:Pa("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(Ra,{label:Pa("Selection Mode"),help:Pa("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Pa("Single data point"),value:"single"},{label:Pa("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Ra,{label:Pa("Aggregation Target"),help:Pa("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:Pa("Group selected data by x-value"),value:"category"},{label:Pa("Group selected data by series"),value:"series"},{label:Pa("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Pa("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Fa,{title:Pa("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Wa,{label:Pa("Stroke Width"),help:Pa("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(Na,{label:Pa("Stroke Color")},wp.element.createElement(za,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Na,{label:Pa("Fill Color")},wp.element.createElement(za,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Fa,{title:Pa("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Wa,{label:Pa("Stroke Width"),help:Pa("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(Na,{label:Pa("Stroke Color")},wp.element.createElement(za,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Na,{label:Pa("Fill Color")},wp.element.createElement(za,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&ja(n.prototype,r),a&&ja(n,a),t}(Ha);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 Ja(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 Ua(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 qa(e){return(qa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Va(e,t){return(Va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ga=wp.i18n.__,$a=wp.element.Component,Ka=wp.components,Za=Ka.ExternalLink,Qa=Ka.PanelBody,Xa=Ka.SelectControl,ei=Ka.TextControl,ti=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ua(this,qa(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&&Va(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Qa,{title:Ga("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Qa,{title:Ga("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ei,{label:Ga("API Key"),help:Ga("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(Za,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},Ga("Get API Keys"))),wp.element.createElement(Qa,{title:Ga("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Ga("A map of the entire world using 'world'.")),wp.element.createElement("li",null,Ga("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(Za,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},Ga("More info here."))),wp.element.createElement("li",null,Ga("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(Za,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},Ga("More info here."))),wp.element.createElement("li",null,Ga("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(Za,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},Ga("More info here.")))),wp.element.createElement(ei,{label:Ga("Reigion"),help:Ga("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(Qa,{title:Ga("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Ga("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,Ga("'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,Ga("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(Xa,{label:Ga("Resolution"),help:Ga("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:Ga("Countries"),value:"countries"},{label:Ga("Provinces"),value:"provinces"},{label:Ga("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(Qa,{title:Ga("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Ga("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,Ga("'regions' - This is a region map.")),wp.element.createElement("li",null,Ga("'markers' - This is a marker map."))),wp.element.createElement(Xa,{label:Ga("Display Mode"),help:Ga("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:Ga("Auto"),value:"auto"},{label:Ga("Regions"),value:"regions"},{label:Ga("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(Qa,{title:Ga("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Xa,{label:Ga("Trigger"),help:Ga("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:Ga("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:Ga("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&Ja(n.prototype,r),a&&Ja(n,a),t}($a);function ni(e){return(ni="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 ri(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"!==ni(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 ii(e){return(ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oi(e,t){return(oi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var si=wp.i18n.__,li=wp.element.Component,ui=(wp.blockEditor||wp.editor).ColorPalette,ci=wp.components,di=ci.BaseControl,mi=ci.PanelBody,pi=ci.TextControl,hi=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,ii(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&&oi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(mi,{title:si("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(pi,{label:si("Minimum Values"),help:si("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(pi,{label:si("Maximum Values"),help:si("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(di,{label:si("Minimum Value")},wp.element.createElement(ui,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(di,{label:si("Intermediate Value")},wp.element.createElement(ui,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(di,{label:si("Maximum Value")},wp.element.createElement(ui,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(di,{label:si("Dateless Region")},wp.element.createElement(ui,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&ri(n.prototype,r),a&&ri(n,a),t}(li);function fi(e){return(fi="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 yi(e,t){return!t||"object"!==fi(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 gi(e){return(gi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bi(e,t){return(bi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var vi=wp.i18n.__,wi=wp.element,Mi=wi.Component,ki=wi.Fragment,Li=wp.components,Yi=Li.ExternalLink,Ti=Li.PanelBody,Di=Li.TextControl,Si=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),yi(this,gi(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&&bi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ti,{title:vi("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Di,{label:vi("Minimum Values"),help:vi("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(Di,{label:vi("Maximum Values"),help:vi("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(Di,{label:vi("Minimum Marker Radius"),help:vi("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(Di,{label:vi("Maximum Marker Radius"),help:vi("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(Di,{label:vi("Marker Opacity"),help:vi("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(ki,null,wp.element.createElement(Di,{label:vi("Number Format"),help:vi("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,vi("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Yi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},vi("ICU pattern set.")),vi(" 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."))))}}])&&_i(n.prototype,r),a&&_i(n,a),t}(Mi);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 ji(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 xi(e,t){return!t||"object"!==Oi(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 Ei(e){return(Ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ci(e,t){return(Ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pi=wp.i18n.__,Hi=wp.element.Component,zi=wp.components,Ai=zi.PanelBody,Ni=zi.SelectControl,Fi=zi.TextControl,Ri=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xi(this,Ei(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&&Ci(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ai,{title:Pi("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ni,{label:Pi("Enabled"),help:Pi("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:Pi("Yes"),value:"1"},{label:Pi("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(Fi,{label:Pi("Zoom Factor"),help:Pi("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)}}))}}])&&ji(n.prototype,r),a&&ji(n,a),t}(Hi);function Wi(e){return(Wi="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 Ii(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 Bi(e,t){return!t||"object"!==Wi(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 Ji(e){return(Ji=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ui(e,t){return(Ui=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qi=wp.i18n.__,Vi=wp.element,Gi=Vi.Component,$i=Vi.Fragment,Ki=(wp.blockEditor||wp.editor).ColorPalette,Zi=wp.components,Qi=Zi.BaseControl,Xi=Zi.ExternalLink,eo=Zi.PanelBody,to=Zi.TextControl,no=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Bi(this,Ji(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&&Ui(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(eo,{title:qi("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(eo,{title:qi("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Values"),help:qi("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(to,{label:qi("Maximum Values"),help:qi("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(to,{label:qi("Minor Ticks"),help:qi("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($i,null,wp.element.createElement(to,{label:qi("Number Format"),help:qi("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,qi("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Xi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},qi("ICU pattern set.")),qi(" 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(eo,{title:qi("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Range"),help:qi("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(to,{label:qi("Maximum Range"),help:qi("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(Qi,{label:qi("Green Color")},wp.element.createElement(Ki,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(eo,{title:qi("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Range"),help:qi("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(to,{label:qi("Maximum Range"),help:qi("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(Qi,{label:qi("Yellow Color")},wp.element.createElement(Ki,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(eo,{title:qi("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Range"),help:qi("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(to,{label:qi("Maximum Range"),help:qi("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(Qi,{label:qi("Red Color")},wp.element.createElement(Ki,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&Ii(n.prototype,r),a&&Ii(n,a),t}(Gi);function ro(e){return(ro="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 ao(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 io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function so(e,t){return(so=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lo=wp.i18n.__,uo=wp.element.Component,co=(wp.blockEditor||wp.editor).ColorPalette,mo=wp.components,po=mo.BaseControl,ho=mo.CheckboxControl,fo=mo.PanelBody,_o=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"!==ro(t)&&"function"!=typeof t?oo(e):t}(this,io(t).apply(this,arguments))).mapValues=e.mapValues.bind(oo(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&&so(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(fo,{title:lo("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ho,{label:lo("Show Row Label"),help:lo("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(ho,{label:lo("Group by Row Label"),help:lo("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(ho,{label:lo("Color by Row Label"),help:lo("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(po,{label:lo("Single Color")},wp.element.createElement(co,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&ao(n.prototype,r),a&&ao(n,a),t}(uo);function yo(e){return(yo="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 go(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 bo(e,t){return!t||"object"!==yo(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 vo(e){return(vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wo(e,t){return(wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Mo=wp.i18n.__,ko=wp.element,Lo=ko.Component,Yo=ko.Fragment,To=wp.components,Do=To.CheckboxControl,So=To.PanelBody,Oo=To.SelectControl,jo=To.TextControl,xo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),bo(this,vo(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&&wo(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(So,{title:Mo("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Yo,null,wp.element.createElement(Do,{label:Mo("Enable Pagination"),help:Mo("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(jo,{label:Mo("Number of rows per page"),help:Mo("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(Oo,{label:Mo("Pagination type"),help:Mo("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:Mo("Page number buttons only"),value:"numbers"},{label:Mo("'Previous' and 'Next' buttons only"),value:"simple"},{label:Mo("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:Mo("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Do,{label:Mo("Scroll Collapse"),help:Mo("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(jo,{label:Mo("Vertical Height"),help:Mo("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(Do,{label:Mo("Disable Sort"),help:Mo("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(Do,{label:Mo("Freeze Header/Footer"),help:Mo("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(Do,{label:Mo("Responsive"),help:Mo("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(Yo,null,wp.element.createElement(Oo,{label:Mo("Enable Pagination"),help:Mo("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(jo,{label:Mo("Number of rows per page"),help:Mo("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(Oo,{label:Mo("Disable Sort"),help:Mo("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(jo,{label:Mo("Freeze Columns"),help:Mo("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(Do,{label:Mo("Allow HTML"),help:Mo("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(Do,{label:Mo("Right to Left table"),help:Mo("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&go(n.prototype,r),a&&go(n,a),t}(Lo);function Eo(e){return(Eo="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 Co(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 Po(e,t){return!t||"object"!==Eo(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 Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zo(e,t){return(zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ao=wp.i18n.__,No=wp.element,Fo=No.Component,Ro=No.Fragment,Wo=(wp.blockEditor||wp.editor).ColorPalette,Io=wp.components,Bo=Io.BaseControl,Jo=Io.PanelBody,Uo=Io.TextControl,qo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Po(this,Ho(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&&zo(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(Jo,{title:Ao("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Ro,null,wp.element.createElement(Jo,{title:Ao("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(Ro,null,wp.element.createElement(Jo,{title:Ao("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&Co(n.prototype,r),a&&Co(n,a),t}(Fo);function Vo(e){return(Vo="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 Go(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 $o(e,t){return!t||"object"!==Vo(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 Ko(e){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qo=wp.i18n.__,Xo=wp.element.Component,es=wp.components,ts=es.PanelBody,ns=es.SelectControl,rs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$o(this,Ko(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&&Zo(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ts,{title:Qo("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ns,{label:Qo("Chart Type"),help:Qo("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Qo("Area"),value:"area"},{label:Qo("Bar"),value:"bars"},{label:Qo("Candlesticks"),value:"candlesticks"},{label:Qo("Line"),value:"line"},{label:Qo("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&Go(n.prototype,r),a&&Go(n,a),t}(Xo);function as(e){return(as="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 is(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 os(e,t){return!t||"object"!==as(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 ss(e){return(ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ls(e,t){return(ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var us=wp.i18n.__,cs=wp.element,ds=cs.Component,ms=cs.Fragment,ps=(wp.blockEditor||wp.editor).ColorPalette,hs=wp.components,fs=hs.BaseControl,_s=hs.ExternalLink,ys=hs.PanelBody,gs=hs.SelectControl,bs=hs.TextControl,vs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),os(this,ss(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&&ls(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(ys,{title:us("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(n.series).map((function(a,i){return a++,wp.element.createElement(ys,{title:r[a].label,className:"visualizer-inner-sections",initialOpen:!1},-1>=["table","pie"].indexOf(t)&&wp.element.createElement(gs,{label:us("Visible In Legend"),help:us("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:us("Yes"),value:"1"},{label:us("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(ms,null,wp.element.createElement(bs,{label:us("Line Width"),help:us("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(bs,{label:us("Point Size"),help:us("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(ms,null,wp.element.createElement(bs,{label:us("Format"),help:us("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,us("For number axis labels, this is a subset of the formatting "),wp.element.createElement(_s,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},us("ICU pattern set.")),us(" 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(ms,null,wp.element.createElement(bs,{label:us("Date Format"),help:us("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,us("This is a subset of the date formatting "),wp.element.createElement(_s,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},us("ICU date and time format.")))),0<=["scatter","line"].indexOf(t)&&wp.element.createElement(gs,{label:us("Curve Type"),help:us("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:us("Straight line without curve"),value:"none"},{label:us("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(bs,{label:us("Area Opacity"),help:us("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(gs,{label:us("Chart Type"),help:us("Select the type of chart to show for this series."),value:n.series[i].type?n.series[i].type:"area",options:[{label:us("Area"),value:"area"},{label:us("Bar"),value:"bars"},{label:us("Candlesticks"),value:"candlesticks"},{label:us("Line"),value:"line"},{label:us("Stepped Area"),value:"steppedArea"}],onChange:function(t){n.series[i].type=t,e.props.edit(n)}}),-1>=["table"].indexOf(t)&&wp.element.createElement(fs,{label:us("Color")},wp.element.createElement(ps,{value:n.series[i].color,onChange:function(t){n.series[i].color=t,e.props.edit(n)}})))})))}}])&&is(n.prototype,r),a&&is(n,a),t}(ds);function ws(e){return(ws="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 Ms(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 ks(e,t){return!t||"object"!==ws(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 Ls(e){return(Ls=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 Ts=wp.i18n.__,Ds=wp.element.Component,Ss=(wp.blockEditor||wp.editor).ColorPalette,Os=wp.components,js=Os.BaseControl,xs=Os.PanelBody,Es=Os.TextControl,Cs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ks(this,Ls(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"];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(xs,{title:Ts("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(xs,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Es,{label:Ts("Slice Offset"),help:Ts("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(js,{label:Ts("Format")},wp.element.createElement(Ss,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&Ms(n.prototype,r),a&&Ms(n,a),t}(Ds);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 zs(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 As(e){return(As=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ns(e,t){return(Ns=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fs=wp.i18n.__,Rs=wp.element.Component,Ws=(wp.blockEditor||wp.editor).ColorPalette,Is=wp.components,Bs=Is.CheckboxControl,Js=Is.BaseControl,Us=Is.PanelBody,qs=Is.TextControl,Vs=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,As(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&&Ns(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Us,{title:Fs("Bubble Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(qs,{label:Fs("Opacity"),help:Fs("The default opacity of the bubbles, where 0.0 is fully transparent and 1.0 is fully opaque."),type:"number",min:"0",max:"1",step:"0.1",value:t.bubble.opacity,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.opacity=n,e.props.edit(t)}}),wp.element.createElement(Js,{label:Fs("Stroke Color")},wp.element.createElement(Ws,{value:t.bubble.stroke,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.stroke=n,e.props.edit(t)}})),wp.element.createElement(Bs,{label:Fs("Sort Bubbles by Size"),help:Fs("If checked, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If unchecked, bubbles are sorted according to their order in the table."),checked:K(t,"sortBubblesBySize"),onChange:function(n){t.sortBubblesBySize=n,e.props.edit(t)}}),wp.element.createElement(qs,{label:Fs("Size (max)"),help:Fs("The size value (as appears in the chart data) to be mapped to sizeAxis.maxSize. Larger values will be cropped to this value."),type:"number",step:"1",value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis||(t.sizeAxis={}),t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(qs,{label:Fs("Size (min)"),help:Fs("The size value (as appears in the chart data) to be mapped to sizeAxis.minSize. Smaller values will be cropped to this value."),type:"number",step:"1",value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis||(t.sizeAxis={}),t.sizeAxis.minValue=n,e.props.edit(t)}}))}}])&&Hs(n.prototype,r),a&&Hs(n,a),t}(Rs);function Gs(e){return(Gs="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 Ks(e,t){return!t||"object"!==Gs(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 Zs(e){return(Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qs(e,t){return(Qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Xs=wp.i18n.__,el=wp.element,tl=el.Component,nl=el.Fragment,rl=wp.components,al=rl.ExternalLink,il=rl.PanelBody,ol=rl.TextControl,sl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ks(this,Zs(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&&Qs(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"],r=this.props.chart["visualizer-chart-type"];return wp.element.createElement(il,{title:Xs("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(a){return wp.element.createElement(il,{title:n[a].label,className:"visualizer-inner-sections",initialOpen:!1},("date"===n[a].type||"datetime"===n[a].type||"timeofday"===n[a].type)&&wp.element.createElement(nl,null,wp.element.createElement(ol,{label:Xs("Display Date Format"),help:Xs("Enter custom format pattern to apply to this series value."),value:t.series[a].format?t.series[a].format.to:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.to=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Source Date Format"),help:Xs("What format is the source date in?"),value:t.series[a].format?t.series[a].format.from:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Xs("You can find more info on "),wp.element.createElement(al,{href:"https://momentjs.com/docs/#/displaying/"},Xs("date and time formats here.")))),"number"===n[a].type&&wp.element.createElement(nl,null,wp.element.createElement(ol,{label:Xs("Thousands Separator"),value:t.series[a].format?t.series[a].format.thousands:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Decimal Separator"),value:t.series[a].format?t.series[a].format.decimal:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Precision"),help:Xs("Round values to how many decimal places?"),value:t.series[a].format?t.series[a].format.precision:"",type:"number",onChange:function(n){100<n||(t.series[a].format||(t.series[a].format={}),t.series[a].format.precision=n,e.props.edit(t))}}),wp.element.createElement(ol,{label:Xs("Prefix"),value:t.series[a].format?t.series[a].format.prefix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Suffix"),value:t.series[a].format?t.series[a].format.suffix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.suffix=n,e.props.edit(t)}})),"boolean"===n[a].type&&"dataTable"===r&&wp.element.createElement(nl,null,wp.element.createElement(ol,{label:Xs("Truthy value"),help:Xs("Provide the HTML entity code for the value the table should display when the value of the column is true. e.g. tick mark (Code: &#10004;) instead of true"),value:t.series[a].format?t.series[a].format.truthy:"",onChange:function(n){t.series[a].truthy||(t.series[a].truthy={}),t.series[a].format.truthy=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Falsy value"),help:Xs("Provide the HTML entity code for the value the table should display when the value of the column is false. e.g. cross mark (Code: &#10006;) instead of false"),value:t.series[a].format?t.series[a].format.falsy:"",onChange:function(n){t.series[a].falsy||(t.series[a].falsy={}),t.series[a].format.falsy=n,e.props.edit(t)}})))})))}}])&&$s(n.prototype,r),a&&$s(n,a),t}(tl);function ll(e){return(ll="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 ul(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 cl(e,t){return!t||"object"!==ll(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 dl(e){return(dl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ml(e,t){return(ml=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pl=wp.i18n.__,hl=wp.element,fl=hl.Component,_l=hl.Fragment,yl=(wp.blockEditor||wp.editor).ColorPalette,gl=wp.components,bl=gl.BaseControl,vl=gl.CheckboxControl,wl=gl.PanelBody,Ml=gl.SelectControl,kl=gl.TextControl,Ll=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cl(this,dl(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&&ml(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(wl,{title:pl("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(wl,{title:pl("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(kl,{label:pl("Width of Chart"),help:pl("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(kl,{label:pl("Height of Chart"),help:pl("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(Ml,{label:pl("Keep Aspect Ratio"),help:pl("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:pl("Yes"),value:"1"},{label:pl("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge"].indexOf(t)&&wp.element.createElement(_l,null,wp.element.createElement(kl,{label:pl("Stroke Width"),help:pl("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(bl,{label:pl("Stroke Color")},wp.element.createElement(yl,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(bl,{label:pl("Background Color")},wp.element.createElement(yl,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(vl,{label:pl("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(wl,{title:pl("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(kl,{label:pl("Left Margin"),help:pl("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(kl,{label:pl("Top Margin"),help:pl("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(kl,{label:pl("Width Of Chart Area"),help:pl("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(kl,{label:pl("Height Of Chart Area"),help:pl("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&ul(n.prototype,r),a&&ul(n,a),t}(fl);function Yl(e){return(Yl="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 Tl(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 Dl(e,t){return!t||"object"!==Yl(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 Sl(e){return(Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ol(e,t){return(Ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var jl=wp.i18n.__,xl=wp.element,El=xl.Component,Cl=xl.Fragment,Pl=wp.components,Hl=Pl.CheckboxControl,zl=Pl.PanelBody,Al=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Dl(this,Sl(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&&Ol(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"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(zl,{title:jl("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(Cl,null,wp.element.createElement(Hl,{label:jl("Print"),help:jl("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(Hl,{label:jl("CSV"),help:jl("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(Hl,{label:jl("Excel"),help:jl("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(Hl,{label:jl("Copy"),help:jl("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)}}),-1>=["dataTable","tabular","gauge","table"].indexOf(n)&&wp.element.createElement(Hl,{label:jl("Download Image"),help:jl("To download the chart as an image."),checked:0<=t.actions.indexOf("image"),onChange:function(n){if(0<=t.actions.indexOf("image")){var r=t.actions.indexOf("image");-1!==r&&t.actions.splice(r,1)}else t.actions.push("image");e.props.edit(t)}})))}}])&&Tl(n.prototype,r),a&&Tl(n,a),t}(El);function Nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fl(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){Nl(e,t,n[t])}))}return e}var Rl={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"}},Wl=n(2);const Il={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&&Il.throwError(Il.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||Il.throwError(Il.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&Il.throwError(Il.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&Il.throwError(Il.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Wl.getType)(t)!==n.toLowerCase()&&Il.throwError(Il.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Wl.getType)(t)===n&&Il.throwError(Il.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{Il.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&Il.throwError(Il.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{Il.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&Il.throwError(Il.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Wl.locate)(t,n);r&&Il.throwError(Il.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{Il.isUndefined(e,t),Il.isNotType(e,t,"string"),Il.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&Il.throwError(Il.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&Il.throwError(Il.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{Il.isUndefined(e,t),Il.containsUndefined(e,t)}};var Bl=Il;const Jl=(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 Ul={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"};
    6565/** @license react-json-editor-ajrm v2.5.9
    6666 *
    6767 * This source code is licensed under the MIT license found in the
    6868 * LICENSE file in the root directory of this source tree.
    69  */class xl 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=Yl.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Yl&&(n=Yl[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:Ll({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:Ll({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:Ll({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:Ll({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:Ll({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:Ll({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||jl,t=this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Ll({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)},Ol(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:Ll({},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(Dl.getType)(e);-1===["object","array"].indexOf(a)&&Sl.throwError("showPlaceholder","placeholder","either an object or an array");let i=!Object(Dl.identical)(e,t);if(i||r&&void 0!==n&&(i=!Object(Dl.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||jl,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,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:L.tokens_merge[i].string,secondToken:n}));break}if("["===n&&r>0&&!m(r,[":","[",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&m(r,["{"])){c(r,Ol(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,Ol(t.brace.curly.missingOpen));break}if("}"===n&&m(r,[","])){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==Y.brackets[Y.brackets.length-1]){c(r,Ol(t.brace.square.missingOpen));break}if("]"===n&&m(r,[":"])){c(r,Ol(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,Ol(t.brace.curly.cannotWrap,{token:","}));break}c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Ol(t.noTrailingOrLeadingComma));break}switch(i=p(r)){case"key":case"colon":c(r,Ol(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,Ol(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,Ol(t.brace.square.cannotWrap,{token:":"}));break}if(i){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==p(r)){c(r,Ol(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Ol(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,Ol(t.string.missingOpen,{quote:e}));break}if(-1===D.indexOf(o)&&-1!==D.indexOf(e)){c(r,Ol(t.string.missingClose,{quote:e}));break}if(D.indexOf(e)>-1&&e!==o){c(r,Ol(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===D.indexOf(e)&&-1===D.indexOf(o)){c(r,Ol(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Ol(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,Ol(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,Ol(t.key.numberAndLetterMissingQuotes));break}c(r,Ol(t.key.spaceMissingQuotes));break}if("key"===a&&!m(r,["{",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!m(r,["[",":",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&Y.isValue){c(r,Ol(t.string.unexpectedKey));break}if("string"===a&&!Y.isValue){c(r,Ol(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,Ol(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,Ol(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,Ol(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,Ol(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Ol(t.invalidToken.unexpected,{token:d.string}))}let j=1,x=0;function y(){for(var e=[],t=0;t<2*x;t++)e.push("&nbsp;");return e.join("")}function g(e=!1){return j++,x>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,x);break;case"key":L.markup+=b()+n(r,e,x);break;case"colon":L.markup+=n(r,e,x)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":L.markup+=(m(r,[":"])?"":b())+n(r,e,x),x++;break;case"]":case"}":x--;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,x);break;case",":L.markup+=n(r,e,x)}}}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}j=1;for(r=0;r<L.tokens_merge.length;r++){const t=L.tokens_merge[r],a=t.type,i=t.string;"linebreak"===a&&j++,L.markup+=n(r,t,x),e+=v(i)}e++,++j<e&&(j=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:j,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 El=xl,Cl=n(133),Hl=n.n(Cl);function Pl(e){return(Pl="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 zl(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 Al(e){return(Al=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fl(e,t){return(Fl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Rl=wp.i18n.__,Wl=wp.element.Component,Il=wp.components,Bl=Il.ExternalLink,Jl=Il.PanelBody,Ul=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"!==Pl(t)&&"function"!=typeof t?Nl(e):t}(this,Al(t).apply(this,arguments))).isValidJSON=e.isValidJSON.bind(Nl(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&&Fl(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(Jl,{title:Rl("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,Rl("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(Bl,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},Rl("Google Visualization API"))),wp.element.createElement(El,{locale:Hl.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))}}))}}])&&zl(n.prototype,r),a&&zl(n,a),t}(Wl);function ql(e){return(ql="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 Gl(e,t){return!t||"object"!==ql(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 $l(e){return($l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kl(e,t){return(Kl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zl=wp.element,Ql=Zl.Component,Xl=Zl.Fragment,eu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gl(this,$l(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&&Kl(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Xl,null,wp.element.createElement(Un,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(lr,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(Yr,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Xl,null,wp.element.createElement(Ir,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ta,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(_a,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(Ta,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Wa,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(Xl,null,wp.element.createElement(ei,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(pi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ti,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Fi,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(to,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(_o,{chart:this.props.chart,edit:this.props.edit}),0<=["table","dataTable"].indexOf(e)&&wp.element.createElement(Xl,null,wp.element.createElement(jo,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Uo,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(ns,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","gauge","geo","pie","dataTable"].indexOf(e)&&wp.element.createElement(bs,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Es,{chart:this.props.chart,edit:this.props.edit}),0<=["dataTable"].indexOf(e)&&wp.element.createElement(qs,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(ul,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(wl,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(Ul,{chart:this.props.chart,edit:this.props.edit}))}}])&&Vl(n.prototype,r),a&&Vl(n,a),t}(Ql);function tu(e){return(tu="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 nu(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 ru(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){nu(i,r,a,o,s,"next",e)}function s(e){nu(i,r,a,o,s,"throw",e)}o(void 0)}))}}function au(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 iu(e){return(iu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ou(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function su(e,t){return(su=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lu=wp.i18n.__,uu=wp.apiFetch,cu=wp.element,du=cu.Component,mu=cu.Fragment,pu=wp.components,hu=pu.Button,_u=pu.PanelBody,fu=pu.SelectControl,yu=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"!==tu(t)&&"function"!=typeof t?ou(e):t}(this,iu(t).apply(this,arguments))).getPermissionData=e.getPermissionData.bind(ou(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&&su(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=ru(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,uu({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,uu({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=ru(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,uu({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,uu({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(mu,null,"business"===visualizerLocalize.isPro?wp.element.createElement(_u,{title:lu("Who can see this chart?"),initialOpen:!1},wp.element.createElement(fu,{label:lu("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(fu,{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(_u,{title:lu("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,lu("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(hu,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},lu("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(_u,{title:lu("Who can edit this chart?"),initialOpen:!1},wp.element.createElement(fu,{label:lu("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(fu,{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(_u,{title:lu("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,lu("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(hu,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},lu("Buy Now"))))}}])&&au(n.prototype,r),a&&au(n,a),t}(du),gu=n(134),bu=n.n(gu),vu=wp.components,Mu=vu.Button,wu=vu.Dashicon,ku=vu.G,Lu=vu.Path,Yu=vu.SVG;var Du=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,i=e.onClick,o=bu()("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(Mu,{className:"components-panel__body-toggle",onClick:i},wp.element.createElement(Yu,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(ku,null,wp.element.createElement(Lu,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(ku,null,wp.element.createElement(Lu,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(wu,{icon:n,className:"components-panel__icon"}),t)))},Tu=n(3),Su=n.n(Tu);function Ou(e){return(Ou="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 ju(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 xu(e,t){return!t||"object"!==Ou(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 Eu(e){return(Eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cu(e,t){return(Cu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Hu=lodash.startCase,Pu=wp.i18n.__,zu=wp.element,Au=zu.Component,Nu=zu.Fragment,Fu=(wp.blockEditor||wp.editor).InspectorControls,Ru=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=xu(this,Eu(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&&Cu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=this,r=U(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===r["visualizer-chart-type"]?r["visualizer-chart-type"]:Hu(this.props.chart["visualizer-chart-type"]):"".concat(Hu(this.props.chart["visualizer-chart-type"]),"Chart"),r["visualizer-data-exploded"]&&(t=Pu("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement(Nu,null,"home"===this.state.route&&wp.element.createElement(Fu,null,wp.element.createElement(Se,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(dt,{id:this.props.id,chart:this.props.chart,editURL:this.props.editURL,isLoading:this.props.isLoading,uploadData:this.props.uploadData,editSchedule:this.props.editSchedule,editJSONSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}),wp.element.createElement(Ot,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(rn,{chart:this.props.chart,editSchedule:this.props.editDatabaseSchedule,databaseImportData:this.props.databaseImportData}),wp.element.createElement(jn,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Du,{label:Pu("Advanced Options"),icon:"admin-tools",onClick:function(){return n.setState({route:"showAdvanced"})}}),wp.element.createElement(Du,{label:Pu("Chart Permissions"),icon:"admin-users",onClick:function(){return n.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(Fu,null,wp.element.createElement(Du,{label:Pu("Chart Settings"),onClick:function(){return n.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(eu,{chart:this.props.chart,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(yu,{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(R,{id:this.props.id,rows:r["visualizer-data"],columns:r["visualizer-series"],options:r["visualizer-settings"]}):(r["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:r["visualizer-data"],columns:r["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Su()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&ju(n.prototype,r),a&&ju(n,a),t}(Au);function Wu(e){return(Wu="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 Iu(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 Bu(e,t){return!t||"object"!==Wu(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 Ju(e){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Uu(e,t){return(Uu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qu=lodash.startCase,Vu=wp.i18n.__,Gu=wp.element,$u=Gu.Component,Ku=Gu.Fragment,Zu=wp.components,Qu=Zu.Button,Xu=Zu.Dashicon,ec=Zu.Toolbar,tc=Zu.Tooltip,nc=(wp.blockEditor||wp.editor).BlockControls,rc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Bu(this,Ju(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&&Uu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=U(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"]:qu(this.props.chart["visualizer-chart-type"]):"".concat(qu(this.props.chart["visualizer-chart-type"]),"Chart"),n["visualizer-data-exploded"]&&(t=Vu("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(Ku,null,wp.element.createElement(nc,{key:"toolbar-controls"},wp.element.createElement(ec,{className:"components-toolbar"},wp.element.createElement(tc,{text:Vu("Edit Chart")},wp.element.createElement(Qu,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(Xu,{icon:"edit"}))))),"dataTable"===e?wp.element.createElement(R,{id:this.props.id,rows:n["visualizer-data"],columns:n["visualizer-series"],options:n["visualizer-settings"]}):(n["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:n["visualizer-data"],columns:n["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Su()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&Iu(n.prototype,r),a&&Iu(n,a),t}($u);function ac(e){return(ac="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 ic(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 oc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ic(n,!0).forEach((function(t){sc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ic(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lc(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 uc(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){lc(i,r,a,o,s,"next",e)}function s(e){lc(i,r,a,o,s,"throw",e)}o(void 0)}))}}function cc(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 dc(e){return(dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pc(e,t){return(pc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var hc=wp.i18n.__,_c=wp,fc=_c.apiFetch,yc=_c.apiRequest,gc=wp.element,bc=gc.Component,vc=gc.Fragment,Mc=wp.components,wc=Mc.Button,kc=Mc.ButtonGroup,Lc=Mc.Dashicon,Yc=Mc.Placeholder,Dc=Mc.Spinner,Tc=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"!==ac(t)&&"function"!=typeof t?mc(e):t}(this,dc(t).apply(this,arguments))).getChart=e.getChart.bind(mc(e)),e.editChart=e.editChart.bind(mc(e)),e.editSettings=e.editSettings.bind(mc(e)),e.editPermissions=e.editPermissions.bind(mc(e)),e.readUploadedFile=e.readUploadedFile.bind(mc(e)),e.editURL=e.editURL.bind(mc(e)),e.editSchedule=e.editSchedule.bind(mc(e)),e.editJSONSchedule=e.editJSONSchedule.bind(mc(e)),e.editJSONURL=e.editJSONURL.bind(mc(e)),e.editJSONHeaders=e.editJSONHeaders.bind(mc(e)),e.editJSONRoot=e.editJSONRoot.bind(mc(e)),e.editJSONPaging=e.editJSONPaging.bind(mc(e)),e.JSONImportData=e.JSONImportData.bind(mc(e)),e.editDatabaseSchedule=e.editDatabaseSchedule.bind(mc(e)),e.databaseImportData=e.databaseImportData.bind(mc(e)),e.uploadData=e.uploadData.bind(mc(e)),e.getChartData=e.getChartData.bind(mc(e)),e.editChartData=e.editChartData.bind(mc(e)),e.updateChart=e.updateChart.bind(mc(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&&pc(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(s=uc(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,fc({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=uc(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,fc({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=oc({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=oc({},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=oc({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=oc({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONSchedule",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONURL",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-url"]=e,this.setState({chart:t})}},{key:"editJSONHeaders",value:function(e){var t=oc({},this.state.chart);delete e.username,delete e.password,t["visualizer-json-headers"]=e,this.setState({chart:t})}},{key:"editJSONRoot",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-root"]=e,this.setState({chart:t})}},{key:"editJSONPaging",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-paging"]=e,this.setState({chart:t})}},{key:"JSONImportData",value:function(e,t,n){var r=oc({},this.state.chart);r["visualizer-source"]=e,r["visualizer-default-data"]=0,r["visualizer-series"]=t,r["visualizer-data"]=n,this.setState({chart:r,isModified:!0})}},{key:"editDatabaseSchedule",value:function(e){var t=oc({},this.state.chart);t["visualizer-db-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"databaseImportData",value:function(e,t,n,r){var a=oc({},this.state.chart);a["visualizer-source"]=t,a["visualizer-default-data"]=0,a["visualizer-series"]=n,a["visualizer-data"]=r,a["visualizer-db-query"]=e,this.setState({chart:a,isModified:!0})}},{key:"uploadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setState({isLoading:"uploadData",isScheduled:t}),yc({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=oc({},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=uc(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,fc({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=oc({},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=oc({},this.state.chart),r=[],a=oc({},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})),yc({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(rc,{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(Lc,{icon:"chart-pie"}),hc("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},hc("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"},hc("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Lc,{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"},hc("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Lc,{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(Yc,null,wp.element.createElement(Dc,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(Ru,{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,editJSONURL:this.editJSONURL,editJSONHeaders:this.editJSONHeaders,editJSONSchedule:this.editJSONSchedule,editJSONRoot:this.editJSONRoot,editJSONPaging:this.editJSONPaging,JSONImportData:this.JSONImportData,editDatabaseSchedule:this.editDatabaseSchedule,databaseImportData:this.databaseImportData,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(kc,null,wp.element.createElement(wc,{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})}},hc("Back")),"chartSelect"===this.state.route&&wp.element.createElement(vc,null,!1===this.state.isModified?wp.element.createElement(wc,{isDefault:!0,isLarge:!0,onClick:function(){e.setState({route:"renderChart"}),e.props.setAttributes({route:"renderChart"})}},hc("Done")):wp.element.createElement(wc,{isPrimary:!0,isLarge:!0,isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},hc("Save"))))))}}])&&cc(n.prototype,r),a&&cc(n,a),t}(bc),Sc=(n(153),wp.i18n.__),Oc=wp.blocks.registerBlockType;t.default=Oc("visualizer/chart",{title:Sc("Visualizer Chart"),description:Sc("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:[Sc("Visualizer"),Sc("Chart"),Sc("Google Charts")],attributes:{id:{type:"number"},route:{type:"string"}},supports:{customClassName:!1},edit:Tc,save:function(){return null}})}]);
     69 */class ql 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=Rl.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Rl&&(n=Rl[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:Fl({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:Fl({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:Fl({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:Fl({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:Fl({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:Fl({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||Ul,t=this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Fl({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)},Jl(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:Fl({},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(Wl.getType)(e);-1===["object","array"].indexOf(a)&&Bl.throwError("showPlaceholder","placeholder","either an object or an array");let i=!Object(Wl.identical)(e,t);if(i||r&&void 0!==n&&(i=!Object(Wl.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||Ul,n=this.newSpan;if("nodeType"in e){const M=e.cloneNode(!0);if(!M.hasChildNodes())return"";const k=M.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 T="'\"",D="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,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:L.tokens_merge[i].string,secondToken:n}));break}if("["===n&&r>0&&!m(r,[":","[",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&m(r,["{"])){c(r,Jl(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,Jl(t.brace.curly.missingOpen));break}if("}"===n&&m(r,[","])){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==Y.brackets[Y.brackets.length-1]){c(r,Jl(t.brace.square.missingOpen));break}if("]"===n&&m(r,[":"])){c(r,Jl(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,Jl(t.brace.curly.cannotWrap,{token:","}));break}c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Jl(t.noTrailingOrLeadingComma));break}switch(i=p(r)){case"key":case"colon":c(r,Jl(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,Jl(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,Jl(t.brace.square.cannotWrap,{token:":"}));break}if(i){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==p(r)){c(r,Jl(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Jl(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);T.indexOf(e);if(-1===T.indexOf(e)&&-1!==T.indexOf(o)){c(r,Jl(t.string.missingOpen,{quote:e}));break}if(-1===T.indexOf(o)&&-1!==T.indexOf(e)){c(r,Jl(t.string.missingClose,{quote:e}));break}if(T.indexOf(e)>-1&&e!==o){c(r,Jl(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===T.indexOf(e)&&-1===T.indexOf(o)){c(r,Jl(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Jl(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===T.indexOf(e)&&-1===T.indexOf(o))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===D.indexOf(e)){c(r,Jl(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,Jl(t.key.numberAndLetterMissingQuotes));break}c(r,Jl(t.key.spaceMissingQuotes));break}if("key"===a&&!m(r,["{",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!m(r,["[",":",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&Y.isValue){c(r,Jl(t.string.unexpectedKey));break}if("string"===a&&!Y.isValue){c(r,Jl(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,Jl(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,Jl(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 f(e){S.splice(e+1,1),S.splice(e,1),r||(r=!0)}for(;S.length>0;){r=!1;for(var _=0;_<S.length-1;_++){const e=S[_].string+S[_+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,Jl(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,Jl(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Jl(t.invalidToken.unexpected,{token:d.string}))}let j=1,x=0;function y(){for(var e=[],t=0;t<2*x;t++)e.push("&nbsp;");return e.join("")}function g(e=!1){return j++,x>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,x);break;case"key":L.markup+=b()+n(r,e,x);break;case"colon":L.markup+=n(r,e,x)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":L.markup+=(m(r,[":"])?"":b())+n(r,e,x),x++;break;case"]":case"}":x--;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,x);break;case",":L.markup+=n(r,e,x)}}}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}j=1;for(r=0;r<L.tokens_merge.length;r++){const t=L.tokens_merge[r],a=t.type,i=t.string;"linebreak"===a&&j++,L.markup+=n(r,t,x),e+=v(i)}e++,++j<e&&(j=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&&((w=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(w)&&(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:j,error:l}}var w;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function M(){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(),T(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(),T(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 T(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=M();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 D(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+D(e.depth):o+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?o+=D(e.depth)+e.string:o+=e.string;break;case":":o+=e.string+" ";break;case",":o+=e.string+D(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 Vl=ql,Gl=n(133),$l=n.n(Gl);function Kl(e){return(Kl="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 Zl(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 Ql(e){return(Ql=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e,t){return(eu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tu=wp.i18n.__,nu=wp.element.Component,ru=wp.components,au=ru.ExternalLink,iu=ru.PanelBody,ou=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"!==Kl(t)&&"function"!=typeof t?Xl(e):t}(this,Ql(t).apply(this,arguments))).isValidJSON=e.isValidJSON.bind(Xl(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&&eu(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(iu,{title:tu("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,tu("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(au,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},tu("Google Visualization API"))),wp.element.createElement(Vl,{locale:$l.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))}}))}}])&&Zl(n.prototype,r),a&&Zl(n,a),t}(nu);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){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 uu(e,t){return!t||"object"!==su(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 cu(e){return(cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function du(e,t){return(du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var mu=wp.element,pu=mu.Component,hu=mu.Fragment,fu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),uu(this,cu(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&&du(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"];return wp.element.createElement(hu,null,wp.element.createElement(qn,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(ur,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(Tr,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(hu,null,wp.element.createElement(Br,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(na,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(_a,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(Sa,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Ia,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(hu,null,wp.element.createElement(ti,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(hi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Si,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ri,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(no,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(_o,{chart:this.props.chart,edit:this.props.edit}),0<=["table","dataTable"].indexOf(e)&&wp.element.createElement(hu,null,wp.element.createElement(xo,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(qo,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(rs,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","bubble","gauge","geo","pie","dataTable"].indexOf(e)&&wp.element.createElement(vs,{chart:this.props.chart,edit:this.props.edit}),0<=["bubble"].indexOf(e)&&wp.element.createElement(Vs,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Cs,{chart:this.props.chart,edit:this.props.edit}),0<=["dataTable"].indexOf(e)&&wp.element.createElement(sl,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(Ll,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Al,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(ou,{chart:this.props.chart,edit:this.props.edit}))}}])&&lu(n.prototype,r),a&&lu(n,a),t}(pu);function _u(e){return(_u="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 yu(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 gu(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){yu(i,r,a,o,s,"next",e)}function s(e){yu(i,r,a,o,s,"throw",e)}o(void 0)}))}}function bu(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 vu(e){return(vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mu(e,t){return(Mu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ku=wp.i18n.__,Lu=wp.apiFetch,Yu=wp.element,Tu=Yu.Component,Du=Yu.Fragment,Su=wp.components,Ou=Su.Button,ju=Su.PanelBody,xu=Su.SelectControl,Eu=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"!==_u(t)&&"function"!=typeof t?wu(e):t}(this,vu(t).apply(this,arguments))).getPermissionData=e.getPermissionData.bind(wu(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&&Mu(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=gu(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,Lu({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,Lu({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=gu(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,Lu({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,Lu({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(Du,null,"business"===visualizerLocalize.isPro?wp.element.createElement(ju,{title:ku("Who can see this chart?"),initialOpen:!1},wp.element.createElement(xu,{label:ku("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(xu,{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(ju,{title:ku("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,ku("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Ou,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},ku("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(ju,{title:ku("Who can edit this chart?"),initialOpen:!1},wp.element.createElement(xu,{label:ku("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(xu,{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(ju,{title:ku("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,ku("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Ou,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},ku("Buy Now"))))}}])&&bu(n.prototype,r),a&&bu(n,a),t}(Tu),Cu=n(134),Pu=n.n(Cu),Hu=wp.components,zu=Hu.Button,Au=Hu.Dashicon,Nu=Hu.G,Fu=Hu.Path,Ru=Hu.SVG;var Wu=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,i=e.onClick,o=Pu()("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(zu,{className:"components-panel__body-toggle",onClick:i},wp.element.createElement(Ru,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Nu,null,wp.element.createElement(Fu,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(Nu,null,wp.element.createElement(Fu,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(Au,{icon:n,className:"components-panel__icon"}),t)))},Iu=n(3),Bu=n.n(Iu);function Ju(e){return(Ju="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 Uu(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 qu(e,t){return!t||"object"!==Ju(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 Vu(e){return(Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gu(e,t){return(Gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $u=lodash.startCase,Ku=wp.i18n.__,Zu=wp.element,Qu=Zu.Component,Xu=Zu.Fragment,ec=(wp.blockEditor||wp.editor).InspectorControls,tc=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=qu(this,Vu(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&&Gu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=this,r=U(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===r["visualizer-chart-type"]?r["visualizer-chart-type"]:$u(this.props.chart["visualizer-chart-type"]):"".concat($u(this.props.chart["visualizer-chart-type"]),"Chart"),r["visualizer-data-exploded"]&&(t=Ku("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement(Xu,null,"home"===this.state.route&&wp.element.createElement(ec,null,wp.element.createElement(Oe,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(mt,{id:this.props.id,chart:this.props.chart,editURL:this.props.editURL,isLoading:this.props.isLoading,uploadData:this.props.uploadData,editSchedule:this.props.editSchedule,editJSONSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}),wp.element.createElement(jt,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(an,{chart:this.props.chart,editSchedule:this.props.editDatabaseSchedule,databaseImportData:this.props.databaseImportData}),wp.element.createElement(xn,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Wu,{label:Ku("Advanced Options"),className:"visualizer-advanced-options",icon:"admin-tools",onClick:function(){return n.setState({route:"showAdvanced"})}}),wp.element.createElement(Wu,{label:Ku("Chart Permissions"),icon:"admin-users",onClick:function(){return n.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(ec,null,wp.element.createElement(Wu,{label:Ku("Chart Settings"),onClick:function(){return n.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(fu,{chart:this.props.chart,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(Eu,{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(R,{id:this.props.id,rows:r["visualizer-data"],columns:r["visualizer-series"],options:r["visualizer-settings"]}):(r["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:r["visualizer-data"],columns:r["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Bu()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&Uu(n.prototype,r),a&&Uu(n,a),t}(Qu);function nc(e){return(nc="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 rc(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 ac(e,t){return!t||"object"!==nc(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 ic(e){return(ic=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oc(e,t){return(oc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var sc=lodash.startCase,lc=wp.i18n.__,uc=wp.element,cc=uc.Component,dc=uc.Fragment,mc=wp.components,pc=mc.Button,hc=mc.Dashicon,fc=mc.Toolbar,_c=mc.Tooltip,yc=(wp.blockEditor||wp.editor).BlockControls,gc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ac(this,ic(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&&oc(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=U(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"]:sc(this.props.chart["visualizer-chart-type"]):"".concat(sc(this.props.chart["visualizer-chart-type"]),"Chart"),n["visualizer-data-exploded"]&&(t=lc("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(dc,null,wp.element.createElement(yc,{key:"toolbar-controls"},wp.element.createElement(fc,{className:"components-toolbar"},wp.element.createElement(_c,{text:lc("Edit Chart")},wp.element.createElement(pc,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(hc,{icon:"edit"}))))),"dataTable"===e?wp.element.createElement(R,{id:this.props.id,rows:n["visualizer-data"],columns:n["visualizer-series"],options:n["visualizer-settings"]}):(n["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:n["visualizer-data"],columns:n["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Bu()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&rc(n.prototype,r),a&&rc(n,a),t}(cc);function bc(e){return(bc="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 vc(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 wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vc(n,!0).forEach((function(t){Mc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vc(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kc(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 Lc(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){kc(i,r,a,o,s,"next",e)}function s(e){kc(i,r,a,o,s,"throw",e)}o(void 0)}))}}function Yc(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 Tc(e){return(Tc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sc(e,t){return(Sc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Oc=wp.i18n.__,jc=wp,xc=jc.apiFetch,Ec=jc.apiRequest,Cc=wp.element,Pc=Cc.Component,Hc=Cc.Fragment,zc=wp.components,Ac=zc.Button,Nc=zc.ButtonGroup,Fc=zc.Dashicon,Rc=zc.Placeholder,Wc=zc.Notice,Ic=zc.Spinner,Bc=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"!==bc(t)&&"function"!=typeof t?Dc(e):t}(this,Tc(t).apply(this,arguments))).getChart=e.getChart.bind(Dc(e)),e.editChart=e.editChart.bind(Dc(e)),e.editSettings=e.editSettings.bind(Dc(e)),e.editPermissions=e.editPermissions.bind(Dc(e)),e.readUploadedFile=e.readUploadedFile.bind(Dc(e)),e.editURL=e.editURL.bind(Dc(e)),e.editSchedule=e.editSchedule.bind(Dc(e)),e.editJSONSchedule=e.editJSONSchedule.bind(Dc(e)),e.editJSONURL=e.editJSONURL.bind(Dc(e)),e.editJSONHeaders=e.editJSONHeaders.bind(Dc(e)),e.editJSONRoot=e.editJSONRoot.bind(Dc(e)),e.editJSONPaging=e.editJSONPaging.bind(Dc(e)),e.JSONImportData=e.JSONImportData.bind(Dc(e)),e.editDatabaseSchedule=e.editDatabaseSchedule.bind(Dc(e)),e.databaseImportData=e.databaseImportData.bind(Dc(e)),e.uploadData=e.uploadData.bind(Dc(e)),e.getChartData=e.getChartData.bind(Dc(e)),e.editChartData=e.editChartData.bind(Dc(e)),e.updateChart=e.updateChart.bind(Dc(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&&Sc(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(s=Lc(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,xc({path:"wp/v2/visualizer/".concat(this.props.attributes.id)}).catch((function(e){}));case 3:(t=e.sent)?this.setState({chart:t.chart_data}):this.setState({route:"error"});case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getChart",value:(o=Lc(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,xc({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=wc({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=wc({},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=wc({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=wc({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONSchedule",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONURL",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-url"]=e,this.setState({chart:t})}},{key:"editJSONHeaders",value:function(e){var t=wc({},this.state.chart);delete e.username,delete e.password,t["visualizer-json-headers"]=e,this.setState({chart:t})}},{key:"editJSONRoot",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-root"]=e,this.setState({chart:t})}},{key:"editJSONPaging",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-paging"]=e,this.setState({chart:t})}},{key:"JSONImportData",value:function(e,t,n){var r=wc({},this.state.chart);r["visualizer-source"]=e,r["visualizer-default-data"]=0,r["visualizer-series"]=t,r["visualizer-data"]=n,this.setState({chart:r,isModified:!0})}},{key:"editDatabaseSchedule",value:function(e){var t=wc({},this.state.chart);t["visualizer-db-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"databaseImportData",value:function(e,t,n,r){var a=wc({},this.state.chart);a["visualizer-source"]=t,a["visualizer-default-data"]=0,a["visualizer-series"]=n,a["visualizer-data"]=r,a["visualizer-db-query"]=e,this.setState({chart:a,isModified:!0})}},{key:"uploadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setState({isLoading:"uploadData",isScheduled:t}),Ec({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=wc({},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=Lc(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,xc({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=wc({},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=wc({},this.state.chart),r=[],a=wc({},n["visualizer-settings"]),i=n["visualizer-chart-type"];e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var o=r,s="series";"pie"===i&&(o=e,s="slices",e.map((function(e,t){switch(r[1].type){case"number":e[1]=parseFloat(e[1])}}))),o.map((function(e,t){if("pie"===i||0!==t){var n="pie"!==i?t-1:t;void 0===a[s][n]&&(a[s][n]={},a[s][n].temp=1)}})),a[s]=a[s].filter((function(e,t){return t<(-1>=["pie","tabular","dataTable"].indexOf(i)?o.length-1:o.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"),-1>=["bubble","timeline"].indexOf(t["visualizer-chart-type"])&&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})),Ec({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"error"===this.state.route?wp.element.createElement(Wc,{status:"error",isDismissible:!1},wp.element.createElement(Fc,{icon:"chart-pie"}),Oc("This chart is not available; it might have been deleted. Please delete this block and resubmit your chart.")):"renderChart"===this.state.route&&null!==this.state.chart?wp.element.createElement(gc,{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(Fc,{icon:"chart-pie"}),Oc("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},Oc("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"},Oc("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Fc,{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"},Oc("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Fc,{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(Rc,null,wp.element.createElement(Ic,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(tc,{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,editJSONURL:this.editJSONURL,editJSONHeaders:this.editJSONHeaders,editJSONSchedule:this.editJSONSchedule,editJSONRoot:this.editJSONRoot,editJSONPaging:this.editJSONPaging,JSONImportData:this.JSONImportData,editDatabaseSchedule:this.editDatabaseSchedule,databaseImportData:this.databaseImportData,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(Nc,null,wp.element.createElement(Ac,{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})}},Oc("Back")),"chartSelect"===this.state.route&&wp.element.createElement(Hc,null,!1===this.state.isModified?wp.element.createElement(Ac,{isDefault:!0,isLarge:!0,className:"visualizer-bttn-done",onClick:function(){e.setState({route:"renderChart"}),e.props.setAttributes({route:"renderChart"})}},Oc("Done")):wp.element.createElement(Ac,{isPrimary:!0,isLarge:!0,className:"visualizer-bttn-save",isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},Oc("Save"))))))}}])&&Yc(n.prototype,r),a&&Yc(n,a),t}(Pc),Jc=(n(153),wp.i18n.__),Uc=wp.blocks.registerBlockType;t.default=Uc("visualizer/chart",{title:Jc("Visualizer Chart"),description:Jc("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:[Jc("Visualizer"),Jc("Chart"),Jc("Google Charts")],attributes:{id:{type:"number"},route:{type:"string"}},supports:{customClassName:!1},edit:Bc,save:function(){return null}})}]);
  • visualizer/trunk/classes/Visualizer/Gutenberg/src/Components/ChartSelect.js

    r2243902 r2325036  
    113113                        <PanelButton
    114114                            label={ __( 'Advanced Options' ) }
     115                            className="visualizer-advanced-options"
    115116                            icon="admin-tools"
    116117                            onClick={ () => this.setState({ route: 'showAdvanced' }) }
  • visualizer/trunk/classes/Visualizer/Gutenberg/src/Components/Sidebar.js

    r2139358 r2325036  
    2121import SeriesSettings from './Sidebar/SeriesSettings.js';
    2222import SlicesSettings from './Sidebar/SlicesSettings.js';
     23import BubbleSettings from './Sidebar/BubbleSettings.js';
    2324import ColumnSettings from './Sidebar/ColumnSettings.js';
    2425import LayoutAndChartArea from './Sidebar/LayoutAndChartArea.js';
     
    114115                ) }
    115116
    116                 { ( -1 >= [ 'timeline', 'gauge', 'geo', 'pie', 'dataTable' ].indexOf( type ) ) && (
     117                { ( -1 >= [ 'timeline', 'bubble', 'gauge', 'geo', 'pie', 'dataTable' ].indexOf( type ) ) && (
    117118                    <SeriesSettings chart={ this.props.chart } edit={ this.props.edit } />
    118119                ) }
     120
     121                { ( 0 <= [ 'bubble' ].indexOf( type ) ) && (
     122                    <BubbleSettings chart={ this.props.chart } edit={ this.props.edit } />
     123                ) }
     124
    119125
    120126                { ( 0 <= [ 'pie' ].indexOf( type ) ) && (
  • visualizer/trunk/classes/Visualizer/Gutenberg/src/Components/Sidebar/FrontendActions.js

    r1984269 r2325036  
    3232
    3333        const settings = this.props.chart['visualizer-settings'];
     34        const type = this.props.chart['visualizer-chart-type'];
    3435
    3536        return (
     
    112113                        />
    113114
     115                    { ( -1 >= [ 'dataTable', 'tabular', 'gauge', 'table' ].indexOf( type ) ) && (
     116                        <CheckboxControl
     117                            label={ __( 'Download Image' ) }
     118                            help={ __( 'To download the chart as an image.' ) }
     119                            checked={ ( 0 <= settings.actions.indexOf( 'image' ) ) }
     120                            onChange={ e => {
     121                                if ( 0 <= settings.actions.indexOf( 'image' ) ) {
     122                                    const index = settings.actions.indexOf( 'image' );
     123                                    if ( -1 !== index ) {
     124                                        settings.actions.splice( index, 1 );
     125                                    }
     126                                } else {
     127                                    settings.actions.push( 'image' );
     128                                }
     129                                this.props.edit( settings );
     130                            } }
     131                        />
     132                        ) }
     133
    114134                    </Fragment>
    115135
  • visualizer/trunk/classes/Visualizer/Gutenberg/src/Components/Sidebar/GeneralSettings.js

    r2243902 r2325036  
    231231                ) }
    232232
    233                 { ( -1 >= [ 'table', 'gauge', 'geo', 'dataTable' ].indexOf( type ) ) && (
     233                { ( -1 >= [ 'table', 'gauge', 'geo', 'dataTable', 'timeline' ].indexOf( type ) ) && (
    234234                    <PanelBody
    235235                        title={ __( 'Tooltip' ) }
  • visualizer/trunk/classes/Visualizer/Gutenberg/src/Editor.js

    r2243902 r2325036  
    3030    Dashicon,
    3131    Placeholder,
     32    Notice,
    3233    Spinner
    3334} = wp.components;
     
    7980        // Fetch review again if block loaded after saving.
    8081        if ( this.props.attributes.id ) {
    81             let result = await apiFetch({ path: `wp/v2/visualizer/${this.props.attributes.id}` });
    82 
    83             this.setState({
    84                 chart: result['chart_data']
    85             });
     82            let result = await apiFetch({ path: `wp/v2/visualizer/${this.props.attributes.id}` }).catch( function( error ) {
     83            });
     84
     85            if ( result ) {
     86                this.setState({
     87                    chart: result['chart_data']
     88                });
     89            } else {
     90
     91                // if the chart is not found.
     92                this.setState({
     93                    route: 'error'
     94                });
     95            }
    8696        }
    8797    }
     
    312322    }
    313323
    314     editChartData( chartData, type ) {
     324    editChartData( chartData, source ) {
    315325        let chart = { ...this.state.chart };
    316326        let series = [];
    317327        let settings = { ...chart['visualizer-settings'] };
     328        let type = chart['visualizer-chart-type'];
    318329        chartData[0].map( ( i, index ) => {
    319330            series[index] = {
     
    328339        let fieldName = 'series';
    329340
    330         if ( 'pie' === chart['visualizer-chart-type']) {
     341        if ( 'pie' === type ) {
    331342            map = chartData;
    332343            fieldName = 'slices';
    333         }
     344
     345            // pie charts are finicky about a number being a number
     346            // and editing a number makes it a string
     347            // so let's convert it back into a number.
     348            chartData.map( ( i, index ) => {
     349                switch ( series[1].type ) {
     350                    case 'number':
     351                        i[1] = parseFloat( i[1]);
     352                        break;
     353                }
     354            });
     355        }
    334356
    335357        map.map( ( i, index ) => {
    336             if ( 'pie' !== chart['visualizer-chart-type'] && 0 === index ) {
    337                 return;
     358            if ( 'pie' !== type && 0 === index ) {
     359                return;
    338360            }
    339361
    340             const seriesIndex = 'pie' !== chart['visualizer-chart-type'] ? index - 1 : index;
     362            const seriesIndex = 'pie' !== type ? index - 1 : index;
    341363
    342364            if ( settings[fieldName][seriesIndex] === undefined ) {
    343                 settings[fieldName][seriesIndex] = {};
     365                settings[fieldName][seriesIndex] = {};
    344366                settings[fieldName][seriesIndex].temp = 1;
    345             }
     367            }
    346368        });
    347369
    348370        settings[fieldName] = settings[fieldName].filter( ( i, index ) => {
    349             const length = 'pie' !== chart['visualizer-chart-type'] ? map.length - 1 : map.length;
     371            const length = -1 >= [ 'pie', 'tabular', 'dataTable' ].indexOf( type ) ? map.length - 1 : map.length;
    350372            return index < length;
    351373        });
    352374
    353         chart['visualizer-source'] = type;
     375        chart['visualizer-source'] = source;
    354376        chart['visualizer-default-data'] = 0;
    355377        chart['visualizer-data'] = chartData;
     
    380402        }
    381403
    382         Object.keys( data['visualizer-settings'][fieldName])
    383             .map( i => {
    384                 if ( data['visualizer-settings'][fieldName][i] !== undefined ) {
    385                     if ( data['visualizer-settings'][fieldName][i].temp !== undefined ) {
    386                         delete data['visualizer-settings'][fieldName][i].temp;
    387                     }
    388                 }
    389             }
    390             );
     404        // no series for bubble and timeline charts.
     405        if ( -1 >= [ 'bubble', 'timeline' ].indexOf( data['visualizer-chart-type']) ) {
     406            Object.keys( data['visualizer-settings'][fieldName])
     407                .map( i => {
     408                    if ( data['visualizer-settings'][fieldName][i] !== undefined ) {
     409                        if ( data['visualizer-settings'][fieldName][i].temp !== undefined ) {
     410                            delete data['visualizer-settings'][fieldName][i].temp;
     411                        }
     412                    }
     413                }
     414            );
     415        }
    391416
    392417        apiRequest({ path: `/visualizer/v1/update-chart?id=${ this.props.attributes.id }`, method: 'POST', data: data }).then(
     
    407432
    408433    render() {
     434        if ( 'error' === this.state.route ) {
     435            return (
     436                <Notice
     437                    status="error"
     438                    isDismissible={ false }
     439                >
     440                        <Dashicon icon="chart-pie" />
     441                        { __( 'This chart is not available; it might have been deleted. Please delete this block and resubmit your chart.' ) }
     442                </Notice>
     443            );
     444        }
     445
    409446        if ( 'renderChart' === this.state.route && null !== this.state.chart ) {
    410447            return (
     
    535572                                            isDefault
    536573                                            isLarge
     574                                            className="visualizer-bttn-done"
    537575                                            onClick={ () => {
    538576                                                this.setState({ route: 'renderChart' });
     
    545583                                            isPrimary
    546584                                            isLarge
     585                                            className="visualizer-bttn-save"
    547586                                            isBusy={ 'updateChart' === this.state.isLoading }
    548587                                            disabled={ 'updateChart' === this.state.isLoading }
  • visualizer/trunk/classes/Visualizer/Gutenberg/src/utils.js

    r1984269 r2325036  
    9393    return ( arrData );
    9494};
     95
     96
     97export const isChecked = ( settings, param ) => {
     98    return true === settings[param] || 'true' === settings[param] || '1' === settings[param] || 1 === settings[param];
     99};
  • visualizer/trunk/classes/Visualizer/Module.php

    r2297689 r2325036  
    397397
    398398    /**
     399     * Disable revisions temporarily for visualizer post type.
     400     */
     401    protected final function disableRevisionsTemporarily() {
     402        add_filter(
     403            'wp_revisions_to_keep', function( $num, $post ) {
     404                if ( $post->post_type === Visualizer_Plugin::CPT_VISUALIZER ) {
     405                    return 0;
     406                }
     407                return $num;
     408            }, 10, 2
     409        );
     410    }
     411
     412    /**
    399413     * Undo revisions for the chart, and if necessary, restore the earliest version.
    400414     *
     
    403417    public final function undoRevisions( $chart_id, $restore = false ) {
    404418        do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'undoRevisions for %d with%s restore', $chart_id, ( $restore ? '' : 'out' ) ), 'debug', __FILE__, __LINE__ );
    405 
     419        if ( get_post_type( $chart_id ) !== Visualizer_Plugin::CPT_VISUALIZER ) {
     420            return false;
     421        }
    406422        $revisions = wp_get_post_revisions( $chart_id, array( 'order' => 'ASC' ) );
    407423        if ( count( $revisions ) > 1 ) {
     
    411427
    412428            // when we restore, a new revision is likely to be created. so, let's disable revisions for the time being.
    413             add_filter( 'wp_revisions_to_keep', '__return_false' );
     429            $this->disableRevisionsTemporarily();
    414430
    415431            if ( $restore ) {
     
    432448     */
    433449    public final function handleExistingRevisions( $chart_id, $chart ) {
     450
    434451        do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'handleExistingRevisions for %d', $chart_id ), 'debug', __FILE__, __LINE__ );
    435 
     452        if ( get_post_type( $chart_id ) !== Visualizer_Plugin::CPT_VISUALIZER ) {
     453            return $chart_id;
     454        }
    436455        // undo revisions.
    437456        $revisions_found    = $this->undoRevisions( $chart_id, true );
  • visualizer/trunk/classes/Visualizer/Module/Admin.php

    r2297689 r2325036  
    979979                'page_type' => 'library',
    980980                'is_front'  => false,
     981                'i10n' => array(
     982                    'conflict' => __( 'We have detected a potential conflict with another component that prevents Visualizer from functioning properly. Please disable any of the following components if they are activated on your instance: Modern Events Calendar plugin, Acronix plugin. In case the aforementioned components are not activated or you continue to see this error message, please disable all other plugins and enable them one by one to find out the component that is causing the conflict.', 'visualizer' ),
     983                ),
    981984            )
    982985        );
  • visualizer/trunk/classes/Visualizer/Module/Chart.php

    r2297689 r2325036  
    685685                // ensure that a revision is not created. If a revision is created it will have the proper data and the parent of the revision will have default data.
    686686                // we do not want any difference in data so disable revisions temporarily.
    687                 add_filter( 'wp_revisions_to_keep', '__return_false' );
     687                $this->disableRevisionsTemporarily();
     688
    688689                wp_update_post( $this->_chart->to_array() );
    689690            }
  • visualizer/trunk/classes/Visualizer/Module/Frontend.php

    r2297689 r2325036  
    121121     */
    122122    private function get_actions() {
    123         return apply_filters(
     123        $actions = apply_filters(
    124124            'visualizer_action_buttons',
    125125            array(
    126                 'print'     => __( 'Print', 'visualizer' ),
    127                 'csv'       => __( 'CSV', 'visualizer' ),
    128                 'xls'       => __( 'Excel', 'visualizer' ),
    129                 'copy'      => __( 'Copy', 'visualizer' ),
     126                'print'     => array(
     127                    'label' => esc_html__( 'Print', 'visualizer' ),
     128                    'title' => esc_html__( 'Print Chart', 'visualizer' ),
     129                ),
     130                'csv'       => array(
     131                    'label' => esc_html__( 'CSV', 'visualizer' ),
     132                    'title' => esc_html__( 'Download as a CSV', 'visualizer' ),
     133                ),
     134                'xls'       => array(
     135                    'label' => esc_html__( 'Excel', 'visualizer' ),
     136                    'title' => esc_html__( 'Download as a spreadsheet', 'visualizer' ),
     137                ),
     138                'copy'      => array(
     139                    'label' => esc_html__( 'Copy', 'visualizer' ),
     140                    'title' => esc_html__( 'Copy data', 'visualizer' ),
     141                ),
     142                'image'      => array(
     143                    'label' => esc_html__( 'Download', 'visualizer' ),
     144                    'title' => esc_html__( 'Download as an image', 'visualizer' ),
     145                ),
    130146            )
    131147        );
     148
     149        // backward compatibility before label and title attributes were introduced.
     150        if ( isset( $actions['edit'] ) && is_string( $actions['edit'] ) ) {
     151            $actions['edit'] = array(
     152                'label' => esc_html__( 'Edit', 'visualizer' ),
     153                'title' => esc_html__( 'Edit data', 'visualizer' ),
     154            );
     155        }
     156        return $actions;
    132157    }
    133158
     
    161186            case 'xls':
    162187                $data   = $this->_getDataAs( $chart_id, 'xls' );
     188                break;
     189            case 'image':
     190                $settings = get_post_meta( $chart_id, Visualizer_Plugin::CF_SETTINGS, true );
     191                $title       = 'visualizer#' . $chart_id;
     192                if ( ! empty( $settings['title'] ) ) {
     193                    $title  = $settings['title'];
     194                }
     195                // for ChartJS, title is an array.
     196                if ( is_array( $title ) && isset( $title['text'] ) ) {
     197                    $title = $title['text'];
     198                }
     199                if ( empty( $title ) ) {
     200                    $title  = 'visualizer#' . $chart_id;
     201                }
     202                $data   = array( 'name' => $title );
    163203                break;
    164204            default:
     
    297337                    $mime       = end( $array );
    298338                }
    299                 $label          = $actions[ $key ];
    300                 $actions_div    .= '<a href="#" class="visualizer-action visualizer-action-' . $key . '" data-visualizer-type="' . $key . '" data-visualizer-chart-id="' . $atts['id'] . '" data-visualizer-container-id="' . $id . '" data-visualizer-mime="' . $mime . '" title="' . $label . '" ';
     339                $label          = $actions[ $key ]['label'];
     340                $title          = $actions[ $key ]['title'];
     341                $actions_div    .= sprintf( '<a href="#" class="visualizer-action visualizer-action-%s" data-visualizer-type="%s" data-visualizer-chart-id="%s" data-visualizer-container-id="%s" data-visualizer-mime="%s" title="%s"', $key, $key, $atts['id'], $id, $mime, $title );
    301342
    302343                if ( 'copy' === $key ) {
     
    335376                    'rest_url'      => version_compare( $wp_version, '4.7.0', '>=' ) ? rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ) : '',
    336377                    'i10n'          => array(
    337                         'copied'        => __( 'Copied!', 'visualizer' ),
     378                        'copied'        => __( 'The data has been copied to your clipboard. Hit Ctrl-V/Cmd-V in your spreadsheet editor to paste the data.', 'visualizer' ),
    338379                    ),
    339380                    'page_type' => 'frontend',
  • visualizer/trunk/classes/Visualizer/Module/Setup.php

    r2297689 r2325036  
    299299        $error      = $source->get_error();
    300300        if ( empty( $error ) ) {
    301             add_filter( 'wp_revisions_to_keep', '__return_false' );
     301            $this->disableRevisionsTemporarily();
    302302            if ( $load_series ) {
    303303                update_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
  • visualizer/trunk/classes/Visualizer/Plugin.php

    r2297689 r2325036  
    2929
    3030    const NAME = 'visualizer';
    31     const VERSION = '3.4.3';
     31    const VERSION = '3.4.4';
    3232
    3333    // custom post types
  • visualizer/trunk/classes/Visualizer/Render.php

    r2297689 r2325036  
    172172    }
    173173
     174    /**
     175     * Gets the type of chart that is being rendered.
     176     *
     177     * This is useful if some type-specific functionality needs to be added.
     178     *
     179     * @since ?
     180     *
     181     * @access protected
     182     * @return string
     183     */
     184    protected function get_chart_type( $with_library = false ) {
     185        $lib_type = str_replace( 'Visualizer_Render_Sidebar_Type_', '', get_class( $this ) );
     186        if ( $with_library ) {
     187            return $lib_type;
     188        }
     189
     190        $array = explode( '_', $lib_type );
     191        return end( $array );
     192    }
     193
     194    /**
     195     * Determines if the type of chart can have a particular action.
     196     *
     197     * @since ?
     198     *
     199     * @access protected
     200     * @return bool
     201     */
     202    protected function can_chart_have_action( $action, $chart_id = null ) {
     203        $type = null;
     204        if ( ! $chart_id ) {
     205            $type = $this->get_chart_type( false );
     206        } else {
     207            $type = get_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, true );
     208            $type = ucwords( $type );
     209        }
     210
     211        switch ( $action ) {
     212            case 'image':
     213                return ! in_array( $type, array( 'Gauge', 'Tabular', 'DataTable', 'Table' ), true );
     214        }
     215
     216        return true;
     217    }
     218
     219
    174220}
  • visualizer/trunk/classes/Visualizer/Render/Library.php

    r2297689 r2325036  
    337337        echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" title="', esc_attr__( 'Edit', 'visualizer' ), '" data-chart="', $chart_id, '"></a>';
    338338        echo '<a class="visualizer-chart-action visualizer-chart-export" href="javascript:;" title="', esc_attr__( 'Export', 'visualizer' ), '" data-chart="', $export_link, '"></a>';
     339        if ( $this->can_chart_have_action( 'image', $chart_id ) ) {
     340            echo '<a class="visualizer-chart-action visualizer-chart-image" href="javascript:;" title="', esc_attr__( 'Download as image', 'visualizer' ), '" data-chart="visualizer-', $chart_id, '" data-chart-title="', $title, '"></a>';
     341        }
    339342        echo '<span class="visualizer-chart-shortcode" title="', esc_attr__( 'Click to select', 'visualizer' ), '">';
    340343        echo '&nbsp;[visualizer id=&quot;', $chart_id, '&quot;]&nbsp;';
  • visualizer/trunk/classes/Visualizer/Render/Sidebar.php

    r2297689 r2325036  
    6565
    6666    /**
    67      * The array of available legend positions.
    68      *
    69      * @since 1.0.0
    70      *
    71      * @access protected
    72      * @var array
    73      */
    74     protected $_legendPositions;
    75 
    76     /**
    77      * The array of available alignments.
    78      *
    79      * @since 1.0.0
    80      *
    81      * @access protected
    82      * @var array
    83      */
    84     protected $_alignments;
    85 
    86     /**
    8767     * Whether this chart supports animation or not.
    8868     *
     
    11090    public function __construct( $data = array() ) {
    11191        parent::__construct( $data );
    112 
    113         $this->_legendPositions = array(
    114             ''       => '',
    115             'left'  => esc_html__( 'Left of the chart', 'visualizer' ),
    116             'right'  => esc_html__( 'Right of the chart', 'visualizer' ),
    117             'top'    => esc_html__( 'Above the chart', 'visualizer' ),
    118             'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
    119             'in'     => esc_html__( 'Inside the chart', 'visualizer' ),
    120             'none'   => esc_html__( 'Omit the legend', 'visualizer' ),
    121         );
    122 
    123         $this->_alignments = array(
    124             ''       => '',
    125             'start'  => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),
    126             'center' => esc_html__( 'Centered in the allocated area', 'visualizer' ),
    127             'end'    => esc_html__( 'Aligned to the end of the allocated area', 'visualizer' ),
    128         );
    12992
    13093        $this->_yesno = array(
     
    261224                $disable_actions
    262225            );
     226
     227            // not all charts support downloading as an image.
     228            $disabled   = ! $this->can_chart_have_action( 'image' );
     229            self::_renderCheckboxItem(
     230                esc_html__( 'Download Image', 'visualizer' ),
     231                'actions[]',
     232                isset( $this->actions ) && in_array( 'image', $this->actions, true ) ? true : false,
     233                'image',
     234                $disable_actions ? '<span class="viz-section-error">' . esc_html__( 'Upgrade to at least WordPress 4.7 to use this.', 'visualizer' ) . '</span>' : ( $disabled ? '<span class="viz-section-error">' . esc_html__( 'Not supported for this chart type.', 'visualizer' ) . '</span>' : esc_html__( 'To download the chart as an image.', 'visualizer' ) ),
     235                $disable_actions || $disabled
     236            );
    263237        self::_renderSectionEnd();
    264238    }
     
    279253
    280254        return class_exists( 'PhpOffice\PhpSpreadsheet\Spreadsheet' ) && extension_loaded( 'zip' ) && extension_loaded( 'xml' ) && extension_loaded( 'fileinfo' );
    281     }
    282 
    283     /**
    284      * Renders chart general settings group.
    285      *
    286      * @since 1.0.0
    287      *
    288      * @access protected
    289      */
    290     protected function _renderGeneralSettings() {
    291         self::_renderGroupStart( esc_html__( 'General Settings', 'visualizer' ) );
    292             self::_renderSectionStart();
    293                 self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', 'visualizer' ) );
    294             self::_renderSectionEnd();
    295 
    296             self::_renderSectionStart( esc_html__( 'Title', 'visualizer' ), false );
    297                 $this->_renderChartTitleSettings();
    298             self::_renderSectionEnd();
    299 
    300             self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
    301                 echo '<div class="viz-section-item">';
    302                     echo '<a class="more-info" href="javascript:;">[?]</a>';
    303                     echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
    304 
    305                     echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
    306                         echo '<tr>';
    307                             echo '<td class="viz-section-table-column">';
    308                                 echo '<select name="fontName" class="control-select">';
    309                                     echo '<option></option>';
    310         foreach ( self::$_fontFamilies as $font => $label ) {
    311             echo '<option value="', $font, '"', selected( $font, $this->fontName, false ), '>';
    312             echo $label;
    313             echo '</option>';
    314         }
    315                                 echo '</select>';
    316                             echo '</td>';
    317                             echo '<td class="viz-section-table-column">';
    318                                 echo '<select name="fontSize" class="control-select">';
    319                                     echo '<option></option>';
    320         for ( $i = 7; $i <= 20; $i++ ) {
    321             echo '<option value="', $i, '"', selected( $i, $this->fontSize, false ), '>', $i, '</option>';
    322         }
    323                                 echo '</select>';
    324                             echo '</td>';
    325                         echo '</tr>';
    326                     echo '</table>';
    327 
    328                     echo '<p class="viz-section-description">';
    329                         esc_html_e( 'The default font family and size for all text in the chart.', 'visualizer' );
    330                     echo '</p>';
    331                 echo '</div>';
    332             self::_renderSectionEnd();
    333 
    334             self::_renderSectionStart( esc_html__( 'Legend', 'visualizer' ), false );
    335                 self::_renderSelectItem(
    336                     esc_html__( 'Position', 'visualizer' ),
    337                     'legend[position]',
    338                     $this->legend['position'],
    339                     $this->_legendPositions,
    340                     esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
    341                 );
    342 
    343                 self::_renderSelectItem(
    344                     esc_html__( 'Alignment', 'visualizer' ),
    345                     'legend[alignment]',
    346                     $this->legend['alignment'],
    347                     $this->_alignments,
    348                     esc_html__( 'Determines the alignment of the legend.', 'visualizer' )
    349                 );
    350 
    351                 self::_renderColorPickerItem(
    352                     esc_html__( 'Font Color', 'visualizer' ),
    353                     'legend[textStyle][color]',
    354                     isset( $this->legend['textStyle']['color'] ) ? $this->legend['textStyle']['color'] : null,
    355                     '#000'
    356                 );
    357             self::_renderSectionEnd();
    358 
    359             self::_renderSectionStart( esc_html__( 'Tooltip', 'visualizer' ), false );
    360                 $this->_renderTooltipSettigns();
    361             self::_renderSectionEnd();
    362 
    363             $this->_renderAnimationSettings();
    364 
    365             do_action( 'visualizer_chart_settings', get_class( $this ), $this->_data, 'general', array( 'generic' => true ) );
    366 
    367         self::_renderGroupEnd();
    368     }
    369 
    370     /**
    371      * Renders animation settings section.
    372      *
    373      * @access protected
    374      */
    375     protected function _renderAnimationSettings() {
    376         if ( ! $this->_supportsAnimation ) {
    377             return;
    378         }
    379 
    380         self::_renderSectionStart( esc_html__( 'Animation', 'visualizer' ), false );
    381 
    382         self::_renderCheckboxItem(
    383             esc_html__( 'Animate on startup', 'visualizer' ),
    384             'animation[startup]',
    385             isset( $this->animation['startup'] ) ? $this->animation['startup'] : 0,
    386             true,
    387             esc_html__( 'Determines if the chart will animate on the initial draw.', 'visualizer' )
    388         );
    389 
    390         self::_renderTextItem(
    391             esc_html__( 'Duration', 'visualizer' ),
    392             'animation[duration]',
    393             isset( $this->animation['duration'] ) ? $this->animation['duration'] : 0,
    394             esc_html__( 'The duration of the animation, in milliseconds', 'visualizer' ),
    395             0,
    396             'number'
    397         );
    398 
    399         self::_renderSelectItem(
    400             esc_html__( 'Easing', 'visualizer' ),
    401             'animation[easing]',
    402             isset( $this->animation['easing'] ) ? $this->animation['easing'] : null,
    403             array(
    404                 'linear'    => esc_html__( 'Constant speed', 'visualizer' ),
    405                 'in'    => esc_html__( 'Start slow and speed up', 'visualizer' ),
    406                 'out'   => esc_html__( 'Start fast and slow down', 'visualizer' ),
    407                 'inAndOut'  => esc_html__( 'Start slow, speed up, then slow down', 'visualizer' ),
    408             ),
    409             esc_html__( 'The easing function applied to the animation.', 'visualizer' )
    410         );
    411 
    412         self::_renderSectionEnd();
    413 
    414     }
    415 
    416     /**
    417      * Renders tooltip settings section.
    418      *
    419      * @since 1.4.0
    420      *
    421      * @access protected
    422      */
    423     protected function _renderTooltipSettigns() {
    424         self::_renderSelectItem(
    425             esc_html__( 'Trigger', 'visualizer' ),
    426             'tooltip[trigger]',
    427             isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
    428             array(
    429                 ''          => '',
    430                 'focus'     => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
    431                 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
    432                 'none'      => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
    433             ),
    434             esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' )
    435         );
    436 
    437         self::_renderSelectItem(
    438             esc_html__( 'Show Color Code', 'visualizer' ),
    439             'tooltip[showColorCode]',
    440             isset( $this->tooltip['showColorCode'] ) ? $this->tooltip['showColorCode'] : null,
    441             $this->_yesno,
    442             esc_html__( 'If set to yes, will show colored squares next to the slice information in the tooltip.', 'visualizer' )
    443         );
    444     }
    445 
    446     /**
    447      * Renders chart view settings group.
    448      *
    449      * @since 1.0.0
    450      *
    451      * @access protected
    452      */
    453     protected function _renderViewSettings() {
    454         self::_renderGroupStart( esc_html__( 'Chart Size & Placement', 'visualizer' ) );
    455             self::_renderSectionStart( esc_html__( 'Chart Size/Layout', 'visualizer' ), false );
    456                 self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
    457 
    458                 echo '<div class="viz-section-item">';
    459                     echo '<a class="more-info" href="javascript:;">[?]</a>';
    460                     echo '<b>', esc_html__( 'Width And Height Of Chart', 'visualizer' ), '</b>';
    461 
    462                     echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
    463                         echo '<tr>';
    464                             echo '<td class="viz-section-table-column">';
    465                                 echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
    466                             echo '</td>';
    467                             echo '<td class="viz-section-table-column">';
    468                                 echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
    469                             echo '</td>';
    470                         echo '</tr>';
    471                     echo '</table>';
    472 
    473                     echo '<p class="viz-section-description">';
    474                         esc_html_e( 'Determines the total width and height of the chart. This will only show in the front-end.', 'visualizer' );
    475                     echo '</p>';
    476                 echo '</div>';
    477 
    478                 echo '<div class="viz-section-delimiter"></div>';
    479 
    480                 self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) );
    481 
    482                 self::_renderTextItem(
    483                     esc_html__( 'Stroke Width', 'visualizer' ),
    484                     'backgroundColor[strokeWidth]',
    485                     isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
    486                     esc_html__( 'The chart border width in pixels.', 'visualizer' ),
    487                     '0'
    488                 );
    489 
    490                 self::_renderColorPickerItem(
    491                     esc_html__( 'Stroke Color', 'visualizer' ),
    492                     'backgroundColor[stroke]',
    493                     ! empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
    494                     '#666'
    495                 );
    496 
    497                 $background_color = ! empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null;
    498                 self::_renderColorPickerItem(
    499                     esc_html__( 'Background Color', 'visualizer' ),
    500                     'backgroundColor[fill]',
    501                     $background_color,
    502                     '#fff'
    503                 );
    504 
    505                 echo '<div class="viz-section-item">';
    506                     echo '<label>';
    507                         echo '<input type="checkbox" class="control-checkbox" name="backgroundColor[fill]" value="transparent"', checked( $background_color, 'transparent', false ), '> ';
    508                         esc_html_e( 'Transparent background', 'visualizer' );
    509                     echo '</label>';
    510                 echo '</div>';
    511             self::_renderSectionEnd();
    512 
    513             self::_renderSectionStart( esc_html__( 'Placement', 'visualizer' ), false );
    514                 self::_renderSectionDescription( esc_html__( 'Configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends). Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
    515 
    516                 echo '<div class="viz-section-item">';
    517                     echo '<a class="more-info" href="javascript:;">[?]</a>';
    518                     echo '<b>', esc_html__( 'Left And Top Margins', 'visualizer' ), '</b>';
    519 
    520                     echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
    521                         echo '<tr>';
    522                             echo '<td class="viz-section-table-column">';
    523                                 echo '<input type="text" name="chartArea[left]" class="control-text" value="', $this->chartArea['left'] || $this->chartArea['left'] === '0' ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
    524                             echo '</td>';
    525                             echo '<td class="viz-section-table-column">';
    526                                 echo '<input type="text" name="chartArea[top]" class="control-text" value="', $this->chartArea['top'] || $this->chartArea['top'] === '0' ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
    527                             echo '</td>';
    528                         echo '</tr>';
    529                     echo '</table>';
    530 
    531                     echo '<p class="viz-section-description">';
    532                         esc_html_e( 'Determines how far to draw the chart from the left and top borders.', 'visualizer' );
    533                     echo '</p>';
    534                 echo '</div>';
    535 
    536                 echo '<div class="viz-section-item">';
    537                     echo '<a class="more-info" href="javascript:;">[?]</a>';
    538                     echo '<b>', esc_html__( 'Width And Height Of Chart Area', 'visualizer' ), '</b>';
    539 
    540                     echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
    541                         echo '<tr>';
    542                             echo '<td class="viz-section-table-column">';
    543                                 echo '<input type="text" name="chartArea[width]" class="control-text" value="', ! empty( $this->chartArea['width'] ) ? esc_attr( $this->chartArea['width'] ) : '', '" placeholder="60%">';
    544                             echo '</td>';
    545                             echo '<td class="viz-section-table-column">';
    546                                 echo '<input type="text" name="chartArea[height]" class="control-text" value="', ! empty( $this->chartArea['height'] ) ? esc_attr( $this->chartArea['height'] ) : '', '" placeholder="60%">';
    547                             echo '</td>';
    548                         echo '</tr>';
    549                     echo '</table>';
    550 
    551                     echo '<p class="viz-section-description">';
    552                         esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' );
    553                     echo '</p>';
    554                 echo '</div>';
    555             self::_renderSectionEnd();
    556         self::_renderGroupEnd();
    557255    }
    558256
  • visualizer/trunk/classes/Visualizer/Render/Sidebar/ChartJS.php

    r2167740 r2325036  
    1212 */
    1313abstract class Visualizer_Render_Sidebar_ChartJS extends Visualizer_Render_Sidebar {
     14
     15    /**
     16     * The array of available legend positions.
     17     *
     18     * @since 1.0.0
     19     *
     20     * @access protected
     21     * @var array
     22     */
     23    protected $_legendPositions;
     24
    1425
    1526    /**
  • visualizer/trunk/classes/Visualizer/Render/Sidebar/Google.php

    r2243902 r2325036  
    3333
    3434    /**
     35     * The array of available legend positions.
     36     *
     37     * @since 1.0.0
     38     *
     39     * @access protected
     40     * @var array
     41     */
     42    protected $_legendPositions;
     43
     44    /**
     45     * The array of available alignments.
     46     *
     47     * @since 1.0.0
     48     *
     49     * @access protected
     50     * @var array
     51     */
     52    protected $_alignments;
     53
     54    /**
    3555     * The constructor.
    3656     */
     
    3858        $this->_library = 'google';
    3959        parent::__construct( $data );
     60
     61        $this->_legendPositions = array(
     62            ''       => '',
     63            'left'  => esc_html__( 'Left of the chart', 'visualizer' ),
     64            'right'  => esc_html__( 'Right of the chart', 'visualizer' ),
     65            'top'    => esc_html__( 'Above the chart', 'visualizer' ),
     66            'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
     67            'none'   => esc_html__( 'Omit the legend', 'visualizer' ),
     68        );
     69
     70        if ( ! in_array( $this->get_chart_type( false ), array( 'Pie' ), true ) ) {
     71            $this->_legendPositions['in']  = esc_html__( 'Inside the chart', 'visualizer' );
     72        }
     73
     74        $this->_alignments = array(
     75            ''       => '',
     76            'start'  => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),
     77            'center' => esc_html__( 'Centered in the allocated area', 'visualizer' ),
     78            'end'    => esc_html__( 'Aligned to the end of the allocated area', 'visualizer' ),
     79        );
     80
    4081    }
    4182
     
    109150        );
    110151    }
     152
     153    /**
     154     * Renders chart general settings group.
     155     *
     156     * @since 1.0.0
     157     *
     158     * @access protected
     159     */
     160    protected function _renderGeneralSettings() {
     161        self::_renderGroupStart( esc_html__( 'General Settings', 'visualizer' ) );
     162            self::_renderSectionStart();
     163                self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', 'visualizer' ) );
     164            self::_renderSectionEnd();
     165
     166            self::_renderSectionStart( esc_html__( 'Title', 'visualizer' ), false );
     167                $this->_renderChartTitleSettings();
     168            self::_renderSectionEnd();
     169
     170            self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
     171                echo '<div class="viz-section-item">';
     172                    echo '<a class="more-info" href="javascript:;">[?]</a>';
     173                    echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
     174
     175                    echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
     176                        echo '<tr>';
     177                            echo '<td class="viz-section-table-column">';
     178                                echo '<select name="fontName" class="control-select">';
     179                                    echo '<option></option>';
     180        foreach ( self::$_fontFamilies as $font => $label ) {
     181            echo '<option value="', $font, '"', selected( $font, $this->fontName, false ), '>';
     182            echo $label;
     183            echo '</option>';
     184        }
     185                                echo '</select>';
     186                            echo '</td>';
     187                            echo '<td class="viz-section-table-column">';
     188                                echo '<select name="fontSize" class="control-select">';
     189                                    echo '<option></option>';
     190        for ( $i = 7; $i <= 20; $i++ ) {
     191            echo '<option value="', $i, '"', selected( $i, $this->fontSize, false ), '>', $i, '</option>';
     192        }
     193                                echo '</select>';
     194                            echo '</td>';
     195                        echo '</tr>';
     196                    echo '</table>';
     197
     198                    echo '<p class="viz-section-description">';
     199                        esc_html_e( 'The default font family and size for all text in the chart.', 'visualizer' );
     200                    echo '</p>';
     201                echo '</div>';
     202            self::_renderSectionEnd();
     203
     204            self::_renderSectionStart( esc_html__( 'Legend', 'visualizer' ), false );
     205                self::_renderSelectItem(
     206                    esc_html__( 'Position', 'visualizer' ),
     207                    'legend[position]',
     208                    $this->legend['position'],
     209                    $this->_legendPositions,
     210                    esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
     211                );
     212
     213                self::_renderSelectItem(
     214                    esc_html__( 'Alignment', 'visualizer' ),
     215                    'legend[alignment]',
     216                    $this->legend['alignment'],
     217                    $this->_alignments,
     218                    esc_html__( 'Determines the alignment of the legend.', 'visualizer' )
     219                );
     220
     221                self::_renderColorPickerItem(
     222                    esc_html__( 'Font Color', 'visualizer' ),
     223                    'legend[textStyle][color]',
     224                    isset( $this->legend['textStyle']['color'] ) ? $this->legend['textStyle']['color'] : null,
     225                    '#000'
     226                );
     227            self::_renderSectionEnd();
     228
     229            self::_renderSectionStart( esc_html__( 'Tooltip', 'visualizer' ), false );
     230                $this->_renderTooltipSettigns();
     231            self::_renderSectionEnd();
     232
     233            $this->_renderAnimationSettings();
     234
     235            do_action( 'visualizer_chart_settings', get_class( $this ), $this->_data, 'general', array( 'generic' => true ) );
     236
     237        self::_renderGroupEnd();
     238    }
     239
     240    /**
     241     * Renders animation settings section.
     242     *
     243     * @access protected
     244     */
     245    protected function _renderAnimationSettings() {
     246        if ( ! $this->_supportsAnimation ) {
     247            return;
     248        }
     249
     250        self::_renderSectionStart( esc_html__( 'Animation', 'visualizer' ), false );
     251
     252        self::_renderCheckboxItem(
     253            esc_html__( 'Animate on startup', 'visualizer' ),
     254            'animation[startup]',
     255            isset( $this->animation['startup'] ) ? $this->animation['startup'] : 0,
     256            true,
     257            esc_html__( 'Determines if the chart will animate on the initial draw.', 'visualizer' )
     258        );
     259
     260        self::_renderTextItem(
     261            esc_html__( 'Duration', 'visualizer' ),
     262            'animation[duration]',
     263            isset( $this->animation['duration'] ) ? $this->animation['duration'] : 0,
     264            esc_html__( 'The duration of the animation, in milliseconds', 'visualizer' ),
     265            0,
     266            'number'
     267        );
     268
     269        self::_renderSelectItem(
     270            esc_html__( 'Easing', 'visualizer' ),
     271            'animation[easing]',
     272            isset( $this->animation['easing'] ) ? $this->animation['easing'] : null,
     273            array(
     274                'linear'    => esc_html__( 'Constant speed', 'visualizer' ),
     275                'in'    => esc_html__( 'Start slow and speed up', 'visualizer' ),
     276                'out'   => esc_html__( 'Start fast and slow down', 'visualizer' ),
     277                'inAndOut'  => esc_html__( 'Start slow, speed up, then slow down', 'visualizer' ),
     278            ),
     279            esc_html__( 'The easing function applied to the animation.', 'visualizer' )
     280        );
     281
     282        self::_renderSectionEnd();
     283
     284    }
     285
     286    /**
     287     * Renders tooltip settings section.
     288     *
     289     * @since 1.4.0
     290     *
     291     * @access protected
     292     */
     293    protected function _renderTooltipSettigns() {
     294        self::_renderSelectItem(
     295            esc_html__( 'Trigger', 'visualizer' ),
     296            'tooltip[trigger]',
     297            isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
     298            array(
     299                ''          => '',
     300                'focus'     => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
     301                'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
     302                'none'      => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
     303            ),
     304            esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' )
     305        );
     306
     307        self::_renderSelectItem(
     308            esc_html__( 'Show Color Code', 'visualizer' ),
     309            'tooltip[showColorCode]',
     310            isset( $this->tooltip['showColorCode'] ) ? $this->tooltip['showColorCode'] : null,
     311            $this->_yesno,
     312            esc_html__( 'If set to yes, will show colored squares next to the slice information in the tooltip.', 'visualizer' )
     313        );
     314    }
     315
     316    /**
     317     * Renders chart view settings group.
     318     *
     319     * @since 1.0.0
     320     *
     321     * @access protected
     322     */
     323    protected function _renderViewSettings() {
     324        self::_renderGroupStart( esc_html__( 'Chart Size & Placement', 'visualizer' ) );
     325            self::_renderSectionStart( esc_html__( 'Chart Size/Layout', 'visualizer' ), false );
     326                self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
     327
     328                echo '<div class="viz-section-item">';
     329                    echo '<a class="more-info" href="javascript:;">[?]</a>';
     330                    echo '<b>', esc_html__( 'Width And Height Of Chart', 'visualizer' ), '</b>';
     331
     332                    echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
     333                        echo '<tr>';
     334                            echo '<td class="viz-section-table-column">';
     335                                echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
     336                            echo '</td>';
     337                            echo '<td class="viz-section-table-column">';
     338                                echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
     339                            echo '</td>';
     340                        echo '</tr>';
     341                    echo '</table>';
     342
     343                    echo '<p class="viz-section-description">';
     344                        esc_html_e( 'Determines the total width and height of the chart. This will only show in the front-end.', 'visualizer' );
     345                    echo '</p>';
     346                echo '</div>';
     347
     348                echo '<div class="viz-section-delimiter"></div>';
     349
     350                self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) );
     351
     352                self::_renderTextItem(
     353                    esc_html__( 'Stroke Width', 'visualizer' ),
     354                    'backgroundColor[strokeWidth]',
     355                    isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
     356                    esc_html__( 'The chart border width in pixels.', 'visualizer' ),
     357                    '0'
     358                );
     359
     360                self::_renderColorPickerItem(
     361                    esc_html__( 'Stroke Color', 'visualizer' ),
     362                    'backgroundColor[stroke]',
     363                    ! empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
     364                    '#666'
     365                );
     366
     367                $background_color = ! empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null;
     368                self::_renderColorPickerItem(
     369                    esc_html__( 'Background Color', 'visualizer' ),
     370                    'backgroundColor[fill]',
     371                    $background_color,
     372                    '#fff'
     373                );
     374
     375                echo '<div class="viz-section-item">';
     376                    echo '<label>';
     377                        echo '<input type="checkbox" class="control-checkbox" name="backgroundColor[fill]" value="transparent"', checked( $background_color, 'transparent', false ), '> ';
     378                        esc_html_e( 'Transparent background', 'visualizer' );
     379                    echo '</label>';
     380                echo '</div>';
     381            self::_renderSectionEnd();
     382
     383            self::_renderSectionStart( esc_html__( 'Placement', 'visualizer' ), false );
     384                self::_renderSectionDescription( esc_html__( 'Configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends). Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
     385
     386                echo '<div class="viz-section-item">';
     387                    echo '<a class="more-info" href="javascript:;">[?]</a>';
     388                    echo '<b>', esc_html__( 'Left And Top Margins', 'visualizer' ), '</b>';
     389
     390                    echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
     391                        echo '<tr>';
     392                            echo '<td class="viz-section-table-column">';
     393                                echo '<input type="text" name="chartArea[left]" class="control-text" value="', $this->chartArea['left'] || $this->chartArea['left'] === '0' ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
     394                            echo '</td>';
     395                            echo '<td class="viz-section-table-column">';
     396                                echo '<input type="text" name="chartArea[top]" class="control-text" value="', $this->chartArea['top'] || $this->chartArea['top'] === '0' ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
     397                            echo '</td>';
     398                        echo '</tr>';
     399                    echo '</table>';
     400
     401                    echo '<p class="viz-section-description">';
     402                        esc_html_e( 'Determines how far to draw the chart from the left and top borders.', 'visualizer' );
     403                    echo '</p>';
     404                echo '</div>';
     405
     406                echo '<div class="viz-section-item">';
     407                    echo '<a class="more-info" href="javascript:;">[?]</a>';
     408                    echo '<b>', esc_html__( 'Width And Height Of Chart Area', 'visualizer' ), '</b>';
     409
     410                    echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
     411                        echo '<tr>';
     412                            echo '<td class="viz-section-table-column">';
     413                                echo '<input type="text" name="chartArea[width]" class="control-text" value="', ! empty( $this->chartArea['width'] ) ? esc_attr( $this->chartArea['width'] ) : '', '" placeholder="60%">';
     414                            echo '</td>';
     415                            echo '<td class="viz-section-table-column">';
     416                                echo '<input type="text" name="chartArea[height]" class="control-text" value="', ! empty( $this->chartArea['height'] ) ? esc_attr( $this->chartArea['height'] ) : '', '" placeholder="60%">';
     417                            echo '</td>';
     418                        echo '</tr>';
     419                    echo '</table>';
     420
     421                    echo '<p class="viz-section-description">';
     422                        esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' );
     423                    echo '</p>';
     424                echo '</div>';
     425            self::_renderSectionEnd();
     426        self::_renderGroupEnd();
     427    }
    111428}
  • visualizer/trunk/classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Bubble.php

    r2243902 r2325036  
    8282                    esc_html__( 'Stroke Color', 'visualizer' ),
    8383                    'bubble[stroke]',
    84                     isset( $this->bubble[ $index ]['stroke'] ) ? $this->bubble[ $index ]['stroke'] : null,
     84                    isset( $this->bubble['stroke'] ) ? $this->bubble['stroke'] : null,
    8585                    null
    8686                );
     
    9191                    $this->sortBubblesBySize ? 1 : 0,
    9292                    1,
    93                     esc_html__( 'If true, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If false, bubbles are sorted according to their order in the DataTable.', 'visualizer' )
     93                    esc_html__( 'If checked, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If unchecked, bubbles are sorted according to their order in the table.', 'visualizer' )
    9494                );
    9595
  • visualizer/trunk/css/library.css

    r2297689 r2325036  
    106106.visualizer-chart-export {
    107107    background-position: -46px -64px;
     108}
     109
     110.visualizer-chart-image {
     111    background-position: -206px -129px;
    108112}
    109113
  • visualizer/trunk/css/media.css

    r2297689 r2325036  
    11/*
    2     Version: 3.4.3
     2    Version: 3.4.4
    33*/
    44#visualizer-library-view {
  • visualizer/trunk/css/upsell.css

    r2139358 r2325036  
    1010    padding: 0 0 0 70px;
    1111    color: #3c3c3c;
    12     background: url(../img/wppr-logo.png) no-repeat left center;
     12    background: url(../images/icon.png) no-repeat left center;
    1313    font-family: "Open Sans", sans-serif;
    1414    font-size: 2em;
  • visualizer/trunk/index.php

    r2297689 r2325036  
    55    Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
    66    Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
    7     Version: 3.4.3
     7    Version: 3.4.4
    88    Author: Themeisle
    99    Author URI: http://themeisle.com
  • visualizer/trunk/js/library.js

    r2297689 r2325036  
    2424
    2525        open: function () {
    26             wpmv.MediaFrame.prototype.open.apply(this, arguments);
     26            try{
     27                wpmv.MediaFrame.prototype.open.apply(this, arguments);
     28            }catch(error){
     29                alert(visualizer.i10n.conflict);
     30            }
    2731            this.$el.addClass('hide-menu');
    2832        }
     
    140144        });
    141145
     146        $(".visualizer-chart-image").on("click", function () {
     147            $('body').trigger('visualizer:action:specificchart', {action: 'image', id: $(this).attr("data-chart"), data: null, dataObj: {name: $(this).attr("data-chart-title")}});
     148            return false;
     149        });
     150
    142151        // if vaction=addnew is found as a GET request parameter, show the modal.
    143152        if(location.href.indexOf('vaction=addnew') !== -1){
    144             $('.add-new-chart').trigger('click');
     153            $('.add-new-chart').first().trigger('click');
    145154        }
    146155
  • visualizer/trunk/js/render-chartjs.js

    r2243902 r2325036  
    128128        if(v.is_front == true){ // jshint ignore:line
    129129            $('#' + id).css('position', 'relative');
    130             chartjs.canvas.parentNode.style.height = settings.height;
    131             chartjs.canvas.parentNode.style.width = settings.width;
     130            var height = settings.height.indexOf('%') === -1 ? ( settings.height + 'px' ) : settings.height;
     131            var width = settings.width.indexOf('%') === -1 ? ( settings.width + 'px' ) : settings.width;
     132            if(settings.height){
     133                chartjs.canvas.parentNode.style.height = height;
     134                $('#' + id + ' canvas').css('height', height);
     135            }
     136            if(settings.width){
     137                chartjs.canvas.parentNode.style.width = width;
     138                $('#' + id + ' canvas').css('width', width);
     139            }
    132140        }
    133141
     
    407415
    408416    // front end actions
     417    // 'image' is also called from the library
    409418    $('body').on('visualizer:action:specificchart', function(event, v){
     419        var id = v.id;
     420        if(typeof rendered_charts[id] === 'undefined'){
     421            return;
     422        }
     423        var canvas = $('#' + id + ' canvas');
    410424        switch(v.action){
    411425            case 'print':
    412                 var id = v.id;
    413                 if(typeof rendered_charts[id] === 'undefined'){
    414                     return;
    415                 }
    416                 var canvas = $('#' + id + ' canvas');
    417426                var win = window.open();
    418427                win.document.write("<br><img src='" + canvas[0].toDataURL() + "'/>");
     
    420429                win.onload = function () { win.print(); setTimeout(win.close, 500); };
    421430                break;
     431            case 'image':
     432                var img = canvas[0].toDataURL();
     433                if(img !== ''){
     434                    var $a = $("<a>"); // jshint ignore:line
     435                    $a.attr("href", img);
     436                    $("body").append($a);
     437                    $a.attr("download", v.dataObj.name);
     438                    $a[0].click();
     439                    $a.remove();
     440                }else{
     441                    console.warn("No image generated");
     442                }
     443                break;
    422444        }
    423445    });
  • visualizer/trunk/js/render-facade.js

    r2297689 r2325036  
    77    function initActionsButtons(v) {
    88        if($('a.visualizer-action[data-visualizer-type=copy]').length > 0) {
     9            $('a.visualizer-action[data-visualizer-type=copy]').on('click', function(e) {
     10                e.preventDefault();
     11            });
    912            var clipboard = new Clipboard('a.visualizer-action[data-visualizer-type=copy]'); // jshint ignore:line
    1013            clipboard.on('success', function(e) {
     
    1821            var lock    = $('.visualizer-front.visualizer-front-' + chart);
    1922            var mime    = $(this).attr( 'data-visualizer-mime' );
    20             console.log(mime);
    2123            lock.lock();
    2224            e.preventDefault();
     
    5759                                break;
    5860                            case 'print':
    59                                 $('body').trigger('visualizer:action:specificchart', {action: 'print', id: container, data: data.data.csv});
     61                            case 'image':
     62                                $('body').trigger('visualizer:action:specificchart', {action: type, id: container, data: data.data.csv, dataObj: data.data});
    6063                                break;
    6164                            default:
     
    8992        };
    9093
    91         // facade loads N times in the library (where N = the number of different chart libraries supported)
     94        // facade loads N times in the library and front end (where N = the number of different chart libraries supported)
    9295        // so all charts are also loaded N times
    9396        // this will ensure that no matter how many times facade is loaded, it initializes all charts only once.
    9497        // fixed as part of the issue to add annotations.
    95         if(visualizer.page_type === 'library'){
    96             if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){
    97                 // prevent library from hanging.
    98                 setTimeout( function(){
    99                     localStorage.removeItem( 'viz-facade-loaded' );
    100                 }, 2000);
    101                 return;
    102             }
    103             localStorage.setItem( 'viz-facade-loaded', '1');
    104             // remove the flag so that repeated loading of the library does not cause problems.
     98        if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){
     99            // prevent library from hanging.
    105100            setTimeout( function(){
    106101                localStorage.removeItem( 'viz-facade-loaded' );
    107102            }, 2000);
     103            return;
    108104        }
     105        localStorage.setItem( 'viz-facade-loaded', '1');
     106        // remove the flag so that repeated loading of the library does not cause problems.
     107        setTimeout( function(){
     108            localStorage.removeItem( 'viz-facade-loaded' );
     109        }, 2000);
     110       
    109111        $('body').trigger('visualizer:render:chart:start', visualizer);
    110112        initActionsButtons(visualizer);
  • visualizer/trunk/js/render-google.js

    r2243902 r2325036  
    1313
    1414    function renderChart(id) {
     15        var chart = all_charts[id];
     16        var hasAnnotation = false;
     17        if(id !== 'canvas' && typeof chart.series !== 'undefined' && typeof chart.settings.series !== 'undefined'){
     18            hasAnnotation = chart.series.length - chart.settings.series.length > 1;
     19        }
     20        // re-render the chart only if it doesn't have annotations and it is on the front-end
     21        // this is to prevent the chart from showing "All series on a given axis must be of the same data type" during resize.
     22        if(hasAnnotation){
     23            return;
     24        }
    1525        renderSpecificChart(id, all_charts[id]);
    1626    }
     
    433443
    434444    // front end actions
     445    // 'image' is also called from the library
    435446    $('body').on('visualizer:action:specificchart', function(event, v){
     447        var id = v.id;
     448        if(typeof rendered_charts[id] === 'undefined'){
     449            return;
     450        }
     451        var arr = id.split('-');
     452        var img = __visualizer_chart_images[ arr[0] + '-' + arr[1] ];
    436453        switch(v.action){
    437454            case 'print':
    438                 var id = v.id;
    439                 if(typeof rendered_charts[id] === 'undefined'){
    440                     return;
    441                 }
    442                 var arr = id.split('-');
    443                 var img = __visualizer_chart_images[ arr[0] + '-' + arr[1] ];
    444455                // for charts that have no rendered image defined, we print the data instead.
    445456                var html = v.data;
     
    449460                $('body').trigger('visualizer:action:specificchart:defaultprint', {data: html});
    450461                break;
     462            case 'image':
     463                if(img !== ''){
     464                    var $a = $("<a>"); // jshint ignore:line
     465                    $a.attr("href", img);
     466                    $("body").append($a);
     467                    $a.attr("download", v.dataObj.name);
     468                    $a[0].click();
     469                    $a.remove();
     470                }else{
     471                    console.warn("No image generated");
     472                }
     473                break;
    451474        }
    452475    });
  • visualizer/trunk/languages/visualizer.pot

    r2297689 r2325036  
    55"Project-Id-Version: Visualizer: Tables and Charts for WordPress 3.4.3\n"
    66"Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
    7 "POT-Creation-Date: 2020-04-13 05:24:19+00:00\n"
     7"POT-Creation-Date: 2020-05-14 10:10:00+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    3131msgstr ""
    3232
    33 #: classes/Visualizer/Module/Admin.php:116
     33#: classes/Visualizer/Module/Admin.php:115
    3434msgid "PRO"
    3535msgstr ""
    3636
    37 #: classes/Visualizer/Module/Admin.php:120
     37#: classes/Visualizer/Module/Admin.php:119
    3838msgid "Developer"
    3939msgstr ""
    4040
     41#: classes/Visualizer/Module/Admin.php:125
     42msgid "Live"
     43msgstr ""
     44
    4145#: classes/Visualizer/Module/Admin.php:126
    42 msgid "Live"
     46msgid "Each hour"
    4347msgstr ""
    4448
    4549#: classes/Visualizer/Module/Admin.php:127
    46 msgid "Each hour"
     50msgid "Each 12 hours"
    4751msgstr ""
    4852
    4953#: classes/Visualizer/Module/Admin.php:128
    50 msgid "Each 12 hours"
     54msgid "Each day"
    5155msgstr ""
    5256
    5357#: classes/Visualizer/Module/Admin.php:129
    54 msgid "Each day"
    55 msgstr ""
    56 
    57 #: classes/Visualizer/Module/Admin.php:130
    5858msgid "Each 3 days"
    5959msgstr ""
    6060
    61 #: classes/Visualizer/Module/Admin.php:149
     61#: classes/Visualizer/Module/Admin.php:148
    6262msgid "More in the %s version"
    6363msgstr ""
    6464
    65 #: classes/Visualizer/Module/Admin.php:330
     65#: classes/Visualizer/Module/Admin.php:329
    6666msgid "Insert"
    6767msgstr ""
    6868
    69 #: classes/Visualizer/Module/Admin.php:358
     69#: classes/Visualizer/Module/Admin.php:357
    7070msgid "Visualizations"
    7171msgstr ""
    7272
     73#: classes/Visualizer/Module/Admin.php:360
     74msgid "From Library"
     75msgstr ""
     76
    7377#: classes/Visualizer/Module/Admin.php:361
    74 msgid "From Library"
    75 msgstr ""
    76 
    77 #: classes/Visualizer/Module/Admin.php:362
    7878msgid "Create New"
    7979msgstr ""
    8080
    81 #: classes/Visualizer/Module/Admin.php:388
     81#: classes/Visualizer/Module/Admin.php:387
    8282msgid "All"
    8383msgstr ""
    8484
    85 #: classes/Visualizer/Module/Admin.php:397
    86 #: classes/Visualizer/Module/Admin.php:533
    87 #: classes/Visualizer/Module/Admin.php:535
    88 #: classes/Visualizer/Module/Admin.php:563
    89 #: classes/Visualizer/Module/Admin.php:565
     85#: classes/Visualizer/Module/Admin.php:396
     86#: classes/Visualizer/Module/Admin.php:532
     87#: classes/Visualizer/Module/Admin.php:534
     88#: classes/Visualizer/Module/Admin.php:562
     89#: classes/Visualizer/Module/Admin.php:564
    9090msgid "Table"
    9191msgstr ""
    9292
    93 #: classes/Visualizer/Module/Admin.php:402
     93#: classes/Visualizer/Module/Admin.php:401
    9494msgid "Pie/Donut"
    9595msgstr ""
    9696
    97 #: classes/Visualizer/Module/Admin.php:407
     97#: classes/Visualizer/Module/Admin.php:406
    9898#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Line.php:24
    9999msgid "Line"
    100100msgstr ""
    101101
    102 #: classes/Visualizer/Module/Admin.php:412
     102#: classes/Visualizer/Module/Admin.php:411
    103103msgid "Area"
    104104msgstr ""
    105105
    106 #: classes/Visualizer/Module/Admin.php:418
     106#: classes/Visualizer/Module/Admin.php:417
    107107msgid "Geo"
    108108msgstr ""
    109109
    110 #: classes/Visualizer/Module/Admin.php:423
     110#: classes/Visualizer/Module/Admin.php:422
    111111msgid "Bar"
    112112msgstr ""
    113113
    114 #: classes/Visualizer/Module/Admin.php:428
     114#: classes/Visualizer/Module/Admin.php:427
    115115msgid "Column"
    116116msgstr ""
    117117
    118 #: classes/Visualizer/Module/Admin.php:433
     118#: classes/Visualizer/Module/Admin.php:432
    119119msgid "Bubble"
    120120msgstr ""
    121121
    122 #: classes/Visualizer/Module/Admin.php:439
     122#: classes/Visualizer/Module/Admin.php:438
    123123msgid "Scatter"
    124124msgstr ""
    125125
    126 #: classes/Visualizer/Module/Admin.php:444
     126#: classes/Visualizer/Module/Admin.php:443
    127127msgid "Gauge"
    128128msgstr ""
    129129
    130 #: classes/Visualizer/Module/Admin.php:449
     130#: classes/Visualizer/Module/Admin.php:448
    131131msgid "Candlestick"
    132132msgstr ""
    133133
    134 #: classes/Visualizer/Module/Admin.php:455
     134#: classes/Visualizer/Module/Admin.php:454
    135135msgid "Table (Deprecated)"
    136136msgstr ""
    137137
    138 #: classes/Visualizer/Module/Admin.php:460
     138#: classes/Visualizer/Module/Admin.php:459
    139139msgid "Timeline"
    140140msgstr ""
    141141
    142 #: classes/Visualizer/Module/Admin.php:465
     142#: classes/Visualizer/Module/Admin.php:464
    143143msgid "Combo"
    144144msgstr ""
    145145
    146 #: classes/Visualizer/Module/Admin.php:470
     146#: classes/Visualizer/Module/Admin.php:469
    147147msgid "Polar Area"
    148148msgstr ""
    149149
    150 #: classes/Visualizer/Module/Admin.php:475
     150#: classes/Visualizer/Module/Admin.php:474
    151151msgid "Radar/Spider"
    152152msgstr ""
    153153
    154 #: classes/Visualizer/Module/Admin.php:688
     154#: classes/Visualizer/Module/Admin.php:687
    155155msgid "Visualizer"
    156156msgstr ""
    157157
     158#: classes/Visualizer/Module/Admin.php:691
    158159#: classes/Visualizer/Module/Admin.php:692
    159 #: classes/Visualizer/Module/Admin.php:693
    160160msgid "Chart Library"
    161161msgstr ""
    162162
     163#: classes/Visualizer/Module/Admin.php:698
    163164#: classes/Visualizer/Module/Admin.php:699
    164 #: classes/Visualizer/Module/Admin.php:700
    165165msgid "Add New Chart"
    166166msgstr ""
    167167
    168 #: classes/Visualizer/Module/Admin.php:706
    169 #: classes/Visualizer/Module/Admin.php:707 templates/support.php:24
     168#: classes/Visualizer/Module/Admin.php:705
     169#: classes/Visualizer/Module/Admin.php:706 templates/support.php:24
    170170msgid "Support"
    171171msgstr ""
    172172
    173 #: classes/Visualizer/Module/Admin.php:729
     173#: classes/Visualizer/Module/Admin.php:728
    174174msgid "Number of charts per page:"
    175175msgstr ""
    176176
    177 #: classes/Visualizer/Module/Admin.php:1021
     177#: classes/Visualizer/Module/Admin.php:1020
    178178msgid "Library"
    179179msgstr ""
    180180
    181 #: classes/Visualizer/Module/Admin.php:1046
     181#: classes/Visualizer/Module/Admin.php:1045
    182182msgid "Docs"
    183183msgstr ""
    184184
    185 #: classes/Visualizer/Module/Admin.php:1051
     185#: classes/Visualizer/Module/Admin.php:1050
    186186msgid "Pro Addon"
    187187msgstr ""
     
    240240msgstr ""
    241241
    242 #: classes/Visualizer/Module/Frontend.php:126
     242#: classes/Visualizer/Module/Frontend.php:127
    243243#: classes/Visualizer/Render/Sidebar.php:230
    244244msgid "Print"
    245245msgstr ""
    246246
    247 #: classes/Visualizer/Module/Frontend.php:127
     247#: classes/Visualizer/Module/Frontend.php:128
     248msgid "Print Chart"
     249msgstr ""
     250
     251#: classes/Visualizer/Module/Frontend.php:131
    248252#: classes/Visualizer/Render/Sidebar.php:238
    249253msgid "CSV"
    250254msgstr ""
    251255
    252 #: classes/Visualizer/Module/Frontend.php:128
     256#: classes/Visualizer/Module/Frontend.php:132
     257msgid "Download as a CSV"
     258msgstr ""
     259
     260#: classes/Visualizer/Module/Frontend.php:135
    253261#: classes/Visualizer/Render/Sidebar.php:248
    254262msgid "Excel"
    255263msgstr ""
    256264
    257 #: classes/Visualizer/Module/Frontend.php:129
     265#: classes/Visualizer/Module/Frontend.php:136
     266msgid "Download as a spreadsheet"
     267msgstr ""
     268
     269#: classes/Visualizer/Module/Frontend.php:139
    258270#: classes/Visualizer/Render/Sidebar.php:256
    259271msgid "Copy"
    260272msgstr ""
    261273
    262 #: classes/Visualizer/Module/Frontend.php:147
     274#: classes/Visualizer/Module/Frontend.php:140
     275msgid "Copy data"
     276msgstr ""
     277
     278#: classes/Visualizer/Module/Frontend.php:143
     279msgid "Download"
     280msgstr ""
     281
     282#: classes/Visualizer/Module/Frontend.php:144
     283msgid "Download as an image"
     284msgstr ""
     285
     286#: classes/Visualizer/Module/Frontend.php:152
     287#: classes/Visualizer/Render/Library.php:337
     288msgid "Edit"
     289msgstr ""
     290
     291#: classes/Visualizer/Module/Frontend.php:153
     292msgid "Edit data"
     293msgstr ""
     294
     295#: classes/Visualizer/Module/Frontend.php:172
    263296msgid "Invalid chart ID"
    264297msgstr ""
    265298
    266 #: classes/Visualizer/Module/Frontend.php:151
     299#: classes/Visualizer/Module/Frontend.php:176
    267300msgid "Invalid action"
    268301msgstr ""
    269302
    270 #: classes/Visualizer/Module/Frontend.php:337
    271 msgid "Copied!"
     303#: classes/Visualizer/Module/Frontend.php:378
     304msgid ""
     305"The data has been copied to your clipboard. Hit Ctrl-V/Cmd-V in your "
     306"spreadsheet editor to paste the data."
    272307msgstr ""
    273308
     
    322357msgstr ""
    323358
    324 #: classes/Visualizer/Render/Layout.php:154
     359#: classes/Visualizer/Render/Layout.php:157
    325360msgid "STEP 1: Specify the JSON endpoint/URL"
    326361msgstr ""
    327362
    328 #: classes/Visualizer/Render/Layout.php:159
     363#: classes/Visualizer/Render/Layout.php:162
    329364msgid ""
    330365"If you want to add authentication or headers to the endpoint or change the "
     
    332367msgstr ""
    333368
    334 #: classes/Visualizer/Render/Layout.php:168
     369#: classes/Visualizer/Render/Layout.php:171
    335370msgid "Please enter the URL"
    336371msgstr ""
    337372
    338 #: classes/Visualizer/Render/Layout.php:170
     373#: classes/Visualizer/Render/Layout.php:173
    339374msgid "Fetch Endpoint"
    340375msgstr ""
    341376
    342 #: classes/Visualizer/Render/Layout.php:173
     377#: classes/Visualizer/Render/Layout.php:176
    343378msgid "Headers"
    344379msgstr ""
    345380
    346 #: classes/Visualizer/Render/Layout.php:176
     381#: classes/Visualizer/Render/Layout.php:179
    347382msgid "Request Type"
    348383msgstr ""
    349384
    350 #: classes/Visualizer/Render/Layout.php:186
     385#: classes/Visualizer/Render/Layout.php:189
    351386msgid "Credentials"
    352387msgstr ""
    353388
    354 #: classes/Visualizer/Render/Layout.php:193
     389#: classes/Visualizer/Render/Layout.php:196
    355390msgid "Username/Access Key"
    356391msgstr ""
    357392
    358 #: classes/Visualizer/Render/Layout.php:201
     393#: classes/Visualizer/Render/Layout.php:204
    359394msgid "Password/Secret Key"
    360395msgstr ""
    361396
    362 #: classes/Visualizer/Render/Layout.php:207
    363 #: classes/Visualizer/Render/Layout.php:421
     397#: classes/Visualizer/Render/Layout.php:210
     398#: classes/Visualizer/Render/Layout.php:424
    364399msgid "OR"
    365400msgstr ""
    366401
    367 #: classes/Visualizer/Render/Layout.php:210
     402#: classes/Visualizer/Render/Layout.php:213
    368403msgid "Authorization"
    369404msgstr ""
    370405
    371 #: classes/Visualizer/Render/Layout.php:217
     406#: classes/Visualizer/Render/Layout.php:220
    372407msgid "e.g. SharedKey <AccountName>:<Signature>"
    373408msgstr ""
    374409
    375 #: classes/Visualizer/Render/Layout.php:225
     410#: classes/Visualizer/Render/Layout.php:228
    376411msgid "STEP 2: Choose the JSON root"
    377412msgstr ""
    378413
    379 #: classes/Visualizer/Render/Layout.php:238
     414#: classes/Visualizer/Render/Layout.php:241
    380415msgid "Parse Endpoint"
    381416msgstr ""
    382417
    383 #: classes/Visualizer/Render/Layout.php:241
     418#: classes/Visualizer/Render/Layout.php:244
    384419msgid "STEP 3: Specify miscellaneous parameters"
    385420msgstr ""
    386421
    387 #: classes/Visualizer/Render/Layout.php:247
     422#: classes/Visualizer/Render/Layout.php:250
    388423msgid "Get results from the first page only"
    389424msgstr ""
    390425
    391 #: classes/Visualizer/Render/Layout.php:271
     426#: classes/Visualizer/Render/Layout.php:274
    392427msgid "STEP 4: Select the data to display in the chart"
    393428msgstr ""
    394429
    395 #: classes/Visualizer/Render/Layout.php:276
     430#: classes/Visualizer/Render/Layout.php:279
    396431msgid ""
    397432"If you see Invalid Data in the table, you may have selected the wrong root "
     
    400435msgstr ""
    401436
    402 #: classes/Visualizer/Render/Layout.php:277
    403 #: classes/Visualizer/Render/Layout.php:314
     437#: classes/Visualizer/Render/Layout.php:280
     438#: classes/Visualizer/Render/Layout.php:317
    404439msgid ""
    405440"Select whether to include the data in the chart. Each column selected will "
     
    407442msgstr ""
    408443
    409 #: classes/Visualizer/Render/Layout.php:278
    410 #: classes/Visualizer/Render/Layout.php:315
     444#: classes/Visualizer/Render/Layout.php:281
     445#: classes/Visualizer/Render/Layout.php:318
    411446msgid "If a column is selected to be included, specify its data type."
    412447msgstr ""
    413448
    414 #: classes/Visualizer/Render/Layout.php:279
    415 #: classes/Visualizer/Render/Layout.php:316
     449#: classes/Visualizer/Render/Layout.php:282
     450#: classes/Visualizer/Render/Layout.php:319
    416451msgid ""
    417452"You can use drag/drop to reorder the columns but this column position is "
     
    419454msgstr ""
    420455
    421 #: classes/Visualizer/Render/Layout.php:280
    422 #: classes/Visualizer/Render/Layout.php:317
     456#: classes/Visualizer/Render/Layout.php:283
     457#: classes/Visualizer/Render/Layout.php:320
    423458msgid ""
    424459"You can select any number of columns but the chart type selected will "
     
    426461msgstr ""
    427462
    428 #: classes/Visualizer/Render/Layout.php:281
     463#: classes/Visualizer/Render/Layout.php:284
    429464msgid ""
    430465"Once you have made your selection, click 'Show Chart' on the right to view "
     
    432467msgstr ""
    433468
    434 #: classes/Visualizer/Render/Layout.php:395
     469#: classes/Visualizer/Render/Layout.php:398
    435470msgid "Label"
    436471msgstr ""
    437472
    438 #: classes/Visualizer/Render/Layout.php:409
     473#: classes/Visualizer/Render/Layout.php:412
    439474msgid "Data Type"
    440475msgstr ""
    441476
    442 #: classes/Visualizer/Render/Layout.php:420
     477#: classes/Visualizer/Render/Layout.php:423
    443478msgid "Exclude from chart"
    444479msgstr ""
    445480
    446 #: classes/Visualizer/Render/Layout.php:420
     481#: classes/Visualizer/Render/Layout.php:423
    447482msgid "Exclude"
    448483msgstr ""
    449484
    450 #: classes/Visualizer/Render/Layout.php:421
     485#: classes/Visualizer/Render/Layout.php:424
    451486msgid "Include in chart and select data type"
    452487msgstr ""
    453488
    454 #: classes/Visualizer/Render/Layout.php:440
     489#: classes/Visualizer/Render/Layout.php:443
    455490msgid "Value"
    456491msgstr ""
    457492
    458 #: classes/Visualizer/Render/Layout.php:450
     493#: classes/Visualizer/Render/Layout.php:453
    459494msgid "Invalid Data"
    460495msgstr ""
    461496
    462 #: classes/Visualizer/Render/Layout.php:492
     497#: classes/Visualizer/Render/Layout.php:495
    463498msgid "Permissions"
    464499msgstr ""
    465500
    466 #: classes/Visualizer/Render/Layout.php:495
     501#: classes/Visualizer/Render/Layout.php:498
    467502msgid "Configure permissions for the chart."
    468503msgstr ""
    469504
    470 #: classes/Visualizer/Render/Layout.php:498
     505#: classes/Visualizer/Render/Layout.php:501
    471506msgid "Who can see this chart?"
    472507msgstr ""
    473508
    474 #: classes/Visualizer/Render/Layout.php:504
    475 #: classes/Visualizer/Render/Layout.php:535
     509#: classes/Visualizer/Render/Layout.php:507
     510#: classes/Visualizer/Render/Layout.php:538
    476511msgid "All Users"
    477512msgstr ""
    478513
    479 #: classes/Visualizer/Render/Layout.php:505
    480 #: classes/Visualizer/Render/Layout.php:536
     514#: classes/Visualizer/Render/Layout.php:508
     515#: classes/Visualizer/Render/Layout.php:539
    481516msgid "Select Users"
    482517msgstr ""
    483518
    484 #: classes/Visualizer/Render/Layout.php:506
    485 #: classes/Visualizer/Render/Layout.php:537
     519#: classes/Visualizer/Render/Layout.php:509
     520#: classes/Visualizer/Render/Layout.php:540
    486521msgid "Select Roles"
    487522msgstr ""
    488523
    489 #: classes/Visualizer/Render/Layout.php:529
     524#: classes/Visualizer/Render/Layout.php:532
    490525msgid "Who can edit this chart?"
    491526msgstr ""
    492527
    493 #: classes/Visualizer/Render/Layout.php:617
     528#: classes/Visualizer/Render/Layout.php:620
    494529msgid "Documentation"
    495530msgstr ""
    496531
    497 #: classes/Visualizer/Render/Layout.php:618
     532#: classes/Visualizer/Render/Layout.php:621
    498533#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Bar.php:73
    499534#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Pie.php:102
     
    501536msgstr ""
    502537
    503 #: classes/Visualizer/Render/Layout.php:620
     538#: classes/Visualizer/Render/Layout.php:623
    504539msgid "Main documentation page"
    505540msgstr ""
    506541
    507 #: classes/Visualizer/Render/Layout.php:621
     542#: classes/Visualizer/Render/Layout.php:624
    508543msgid "Custom code snippets"
    509544msgstr ""
    510545
    511 #: classes/Visualizer/Render/Layout.php:624
     546#: classes/Visualizer/Render/Layout.php:627
    512547msgid "%s chart"
    513548msgstr ""
    514549
    515 #: classes/Visualizer/Render/Layout.php:626
     550#: classes/Visualizer/Render/Layout.php:629
    516551msgid "View demo"
    517552msgstr ""
    518553
    519 #: classes/Visualizer/Render/Layout.php:627
     554#: classes/Visualizer/Render/Layout.php:630
    520555msgid "Articles containing \"%s\""
    521556msgstr ""
    522557
    523 #: classes/Visualizer/Render/Layout.php:678
     558#: classes/Visualizer/Render/Layout.php:681
    524559msgid "Import data from file"
    525560msgstr ""
    526561
    527 #: classes/Visualizer/Render/Layout.php:680
     562#: classes/Visualizer/Render/Layout.php:683
    528563msgid ""
    529564"Select and upload your data CSV file here. The first row of the CSV file "
     
    532567msgstr ""
    533568
    534 #: classes/Visualizer/Render/Layout.php:681
    535 #: classes/Visualizer/Render/Layout.php:702
     569#: classes/Visualizer/Render/Layout.php:684
     570#: classes/Visualizer/Render/Layout.php:705
    536571msgid ""
    537572"If you are unsure about how to format your data CSV then please take a look "
     
    540575msgstr ""
    541576
    542 #: classes/Visualizer/Render/Layout.php:689
    543 #: classes/Visualizer/Render/Layout.php:732
     577#: classes/Visualizer/Render/Layout.php:692
     578#: classes/Visualizer/Render/Layout.php:735
    544579msgid "Import"
    545580msgstr ""
    546581
    547 #: classes/Visualizer/Render/Layout.php:695
     582#: classes/Visualizer/Render/Layout.php:698
    548583msgid "Import data from URL"
    549584msgstr ""
    550585
    551 #: classes/Visualizer/Render/Layout.php:699
     586#: classes/Visualizer/Render/Layout.php:702
    552587msgid "Import from CSV"
    553588msgstr ""
    554589
    555 #: classes/Visualizer/Render/Layout.php:701
     590#: classes/Visualizer/Render/Layout.php:704
    556591msgid ""
    557592"You can use this to import data from a remote CSV file or %1$sGoogle "
     
    559594msgstr ""
    560595
    561 #: classes/Visualizer/Render/Layout.php:706
     596#: classes/Visualizer/Render/Layout.php:709
    562597msgid "Please enter the URL of CSV file"
    563598msgstr ""
    564599
    565 #: classes/Visualizer/Render/Layout.php:713
    566 #: classes/Visualizer/Render/Layout.php:760
    567 #: classes/Visualizer/Render/Layout.php:878
    568 #: classes/Visualizer/Render/Layout.php:927
     600#: classes/Visualizer/Render/Layout.php:716
     601#: classes/Visualizer/Render/Layout.php:763
     602#: classes/Visualizer/Render/Layout.php:881
     603#: classes/Visualizer/Render/Layout.php:930
    569604msgid "One-time"
    570605msgstr ""
    571606
    572 #: classes/Visualizer/Render/Layout.php:736
     607#: classes/Visualizer/Render/Layout.php:739
    573608msgid "Import & Save schedule"
    574609msgstr ""
    575610
    576 #: classes/Visualizer/Render/Layout.php:745
     611#: classes/Visualizer/Render/Layout.php:748
    577612msgid "Import from JSON"
    578613msgstr ""
    579614
    580 #: classes/Visualizer/Render/Layout.php:747
     615#: classes/Visualizer/Render/Layout.php:750
    581616msgid ""
    582617"You can choose here to import/synchronize your chart data with a remote "
     
    586621msgstr ""
    587622
    588 #: classes/Visualizer/Render/Layout.php:751
     623#: classes/Visualizer/Render/Layout.php:754
    589624msgid "Modify Parameters"
    590625msgstr ""
    591626
    592 #: classes/Visualizer/Render/Layout.php:751
     627#: classes/Visualizer/Render/Layout.php:754
    593628msgid "Create Parameters"
    594629msgstr ""
    595630
    596 #: classes/Visualizer/Render/Layout.php:754
     631#: classes/Visualizer/Render/Layout.php:757
    597632msgid "How often do you want to check the URL"
    598633msgstr ""
    599634
    600 #: classes/Visualizer/Render/Layout.php:782
    601 #: classes/Visualizer/Render/Layout.php:894
    602 #: classes/Visualizer/Render/Layout.php:944
     635#: classes/Visualizer/Render/Layout.php:785
     636#: classes/Visualizer/Render/Layout.php:897
     637#: classes/Visualizer/Render/Layout.php:947
     638#: classes/Visualizer/Render/Layout.php:984
     639#: classes/Visualizer/Render/Layout.php:993
     640msgid "Show Chart"
     641msgstr ""
     642
     643#: classes/Visualizer/Render/Layout.php:791
     644#: classes/Visualizer/Render/Layout.php:898
     645#: classes/Visualizer/Render/Layout.php:948
     646msgid "Save Schedule"
     647msgstr ""
     648
     649#: classes/Visualizer/Render/Layout.php:803
     650msgid "Import from other chart"
     651msgstr ""
     652
     653#: classes/Visualizer/Render/Layout.php:807
     654msgid "You can import here data from your previously created charts"
     655msgstr ""
     656
     657#: classes/Visualizer/Render/Layout.php:850
     658msgid "Import Chart"
     659msgstr ""
     660
     661#: classes/Visualizer/Render/Layout.php:868
     662msgid "Import from WordPress"
     663msgstr ""
     664
     665#: classes/Visualizer/Render/Layout.php:872
     666msgid "You can import data from WordPress here."
     667msgstr ""
     668
     669#: classes/Visualizer/Render/Layout.php:874
     670msgid "How often do you want to refresh the data from WordPress."
     671msgstr ""
     672
     673#: classes/Visualizer/Render/Layout.php:877
     674msgid "Modify Filter"
     675msgstr ""
     676
     677#: classes/Visualizer/Render/Layout.php:877
     678msgid "Create Filter"
     679msgstr ""
     680
     681#: classes/Visualizer/Render/Layout.php:917
     682msgid "Import from database"
     683msgstr ""
     684
     685#: classes/Visualizer/Render/Layout.php:921
     686msgid "You can import data from the database here."
     687msgstr ""
     688
     689#: classes/Visualizer/Render/Layout.php:923
     690msgid "How often do you want to refresh the data from the database."
     691msgstr ""
     692
     693#: classes/Visualizer/Render/Layout.php:926
     694msgid "Modify Query"
     695msgstr ""
     696
     697#: classes/Visualizer/Render/Layout.php:926
     698msgid "Create Query"
     699msgstr ""
     700
     701#: classes/Visualizer/Render/Layout.php:957
     702msgid "Manual Data"
     703msgstr ""
     704
     705#: classes/Visualizer/Render/Layout.php:968
     706msgid "Use the"
     707msgstr ""
     708
     709#: classes/Visualizer/Render/Layout.php:974
     710#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:216
     711msgid "Text"
     712msgstr ""
     713
     714#: classes/Visualizer/Render/Layout.php:974
     715msgid "Simple"
     716msgstr ""
     717
     718#: classes/Visualizer/Render/Layout.php:979
     719msgid "editor to manually edit the chart data."
     720msgstr ""
     721
    603722#: classes/Visualizer/Render/Layout.php:981
    604723#: classes/Visualizer/Render/Layout.php:990
    605 msgid "Show Chart"
    606 msgstr ""
    607 
    608 #: classes/Visualizer/Render/Layout.php:788
    609 #: classes/Visualizer/Render/Layout.php:895
    610 #: classes/Visualizer/Render/Layout.php:945
    611 msgid "Save Schedule"
    612 msgstr ""
    613 
    614 #: classes/Visualizer/Render/Layout.php:800
    615 msgid "Import from other chart"
    616 msgstr ""
    617 
    618 #: classes/Visualizer/Render/Layout.php:804
    619 msgid "You can import here data from your previously created charts"
    620 msgstr ""
    621 
    622 #: classes/Visualizer/Render/Layout.php:847
    623 msgid "Import Chart"
    624 msgstr ""
    625 
    626 #: classes/Visualizer/Render/Layout.php:865
    627 msgid "Import from WordPress"
    628 msgstr ""
    629 
    630 #: classes/Visualizer/Render/Layout.php:869
    631 msgid "You can import data from WordPress here."
    632 msgstr ""
    633 
    634 #: classes/Visualizer/Render/Layout.php:871
    635 msgid "How often do you want to refresh the data from WordPress."
    636 msgstr ""
    637 
    638 #: classes/Visualizer/Render/Layout.php:874
    639 msgid "Modify Filter"
    640 msgstr ""
    641 
    642 #: classes/Visualizer/Render/Layout.php:874
    643 msgid "Create Filter"
    644 msgstr ""
    645 
    646 #: classes/Visualizer/Render/Layout.php:914
    647 msgid "Import from database"
    648 msgstr ""
    649 
    650 #: classes/Visualizer/Render/Layout.php:918
    651 msgid "You can import data from the database here."
    652 msgstr ""
    653 
    654 #: classes/Visualizer/Render/Layout.php:920
    655 msgid "How often do you want to refresh the data from the database."
    656 msgstr ""
    657 
    658 #: classes/Visualizer/Render/Layout.php:923
    659 msgid "Modify Query"
    660 msgstr ""
    661 
    662 #: classes/Visualizer/Render/Layout.php:923
    663 msgid "Create Query"
    664 msgstr ""
    665 
    666 #: classes/Visualizer/Render/Layout.php:954
    667 msgid "Manual Data"
    668 msgstr ""
    669 
    670 #: classes/Visualizer/Render/Layout.php:965
    671 msgid "Use the"
    672 msgstr ""
    673 
    674 #: classes/Visualizer/Render/Layout.php:971
    675 #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:216
    676 msgid "Text"
    677 msgstr ""
    678 
    679 #: classes/Visualizer/Render/Layout.php:971
    680 msgid "Simple"
    681 msgstr ""
    682 
    683 #: classes/Visualizer/Render/Layout.php:976
    684 msgid "editor to manually edit the chart data."
    685 msgstr ""
    686 
    687 #: classes/Visualizer/Render/Layout.php:978
     724msgid "Undo Changes"
     725msgstr ""
     726
     727#: classes/Visualizer/Render/Layout.php:983
     728#: classes/Visualizer/Render/Layout.php:985
     729msgid "Edit Data"
     730msgstr ""
     731
    688732#: classes/Visualizer/Render/Layout.php:987
    689 msgid "Undo Changes"
    690 msgstr ""
    691 
    692 #: classes/Visualizer/Render/Layout.php:980
    693 #: classes/Visualizer/Render/Layout.php:982
    694 msgid "Edit Data"
    695 msgstr ""
    696 
    697 #: classes/Visualizer/Render/Layout.php:984
    698 #: classes/Visualizer/Render/Layout.php:993
     733#: classes/Visualizer/Render/Layout.php:996
    699734msgid "Please make sure you click 'Show Chart' before you save the chart."
    700735msgstr ""
    701736
    702 #: classes/Visualizer/Render/Layout.php:989
    703 #: classes/Visualizer/Render/Layout.php:991
     737#: classes/Visualizer/Render/Layout.php:992
     738#: classes/Visualizer/Render/Layout.php:994
    704739msgid "View Editor"
    705740msgstr ""
     
    774809#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:74
    775810#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:60
    776 #: classes/Visualizer/Render/Sidebar.php:296
     811#: classes/Visualizer/Render/Sidebar.php:307
    777812msgid "Title"
    778813msgstr ""
     
    815850msgstr ""
    816851
    817 #: classes/Visualizer/Render/Library.php:337
    818 msgid "Edit"
    819 msgstr ""
    820 
    821852#: classes/Visualizer/Render/Library.php:338
    822853msgid "Export"
    823854msgstr ""
    824855
    825 #: classes/Visualizer/Render/Library.php:339
     856#: classes/Visualizer/Render/Library.php:340
     857msgid "Download as image"
     858msgstr ""
     859
     860#: classes/Visualizer/Render/Library.php:342
    826861#: classes/Visualizer/Render/Templates.php:68
    827862msgid "Click to select"
    828863msgstr ""
    829864
    830 #: classes/Visualizer/Render/Library.php:342
     865#: classes/Visualizer/Render/Library.php:345
    831866msgid "Last Updated"
    832867msgstr ""
    833868
    834 #: classes/Visualizer/Render/Library.php:354
     869#: classes/Visualizer/Render/Library.php:357
    835870msgid "Discover the power of PRO!"
    836871msgstr ""
    837872
    838 #: classes/Visualizer/Render/Library.php:355
     873#: classes/Visualizer/Render/Library.php:358
    839874msgid "Spreadsheet like editor"
    840875msgstr ""
    841876
    842 #: classes/Visualizer/Render/Library.php:356
     877#: classes/Visualizer/Render/Library.php:359
    843878msgid "Import from other charts"
    844879msgstr ""
    845880
    846 #: classes/Visualizer/Render/Library.php:357
     881#: classes/Visualizer/Render/Library.php:360
    847882msgid "Use database query to create charts"
    848883msgstr ""
    849884
    850 #: classes/Visualizer/Render/Library.php:358
     885#: classes/Visualizer/Render/Library.php:361
    851886msgid "Create charts from WordPress tables"
    852887msgstr ""
    853888
    854 #: classes/Visualizer/Render/Library.php:359
     889#: classes/Visualizer/Render/Library.php:362
    855890msgid "Frontend editor"
    856891msgstr ""
    857892
    858 #: classes/Visualizer/Render/Library.php:360
     893#: classes/Visualizer/Render/Library.php:363
    859894msgid "Private charts"
    860895msgstr ""
    861896
    862 #: classes/Visualizer/Render/Library.php:361
     897#: classes/Visualizer/Render/Library.php:364
    863898msgid "Auto-sync with online files"
    864899msgstr ""
    865900
    866 #: classes/Visualizer/Render/Library.php:362
     901#: classes/Visualizer/Render/Library.php:365
    867902msgid "6 more chart types"
    868903msgstr ""
    869904
    870 #: classes/Visualizer/Render/Library.php:363
     905#: classes/Visualizer/Render/Library.php:366
    871906msgid "View more features"
    872907msgstr ""
    873908
    874 #: classes/Visualizer/Render/Library.php:364
     909#: classes/Visualizer/Render/Library.php:367
    875910msgid "We offer a 30-day no-questions-asked money back guarantee!"
    876911msgstr ""
    877912
    878 #: classes/Visualizer/Render/Library.php:365
     913#: classes/Visualizer/Render/Library.php:368
    879914msgid "Don't see the features you need? Help us improve!"
    880915msgstr ""
     
    9851020#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:72
    9861021#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:59
    987 #: classes/Visualizer/Render/Sidebar.php:291
     1022#: classes/Visualizer/Render/Sidebar.php:302
    9881023msgid "General Settings"
    9891024msgstr ""
    9901025
    9911026#: classes/Visualizer/Render/Sidebar/ChartJS.php:185
    992 #: classes/Visualizer/Render/Sidebar.php:293
     1027#: classes/Visualizer/Render/Sidebar.php:304
    9931028msgid ""
    9941029"Configure title, font styles, tooltip, legend and else settings for the "
     
    9991034#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:149
    10001035#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:251
    1001 #: classes/Visualizer/Render/Sidebar.php:300
     1036#: classes/Visualizer/Render/Sidebar.php:311
    10021037msgid "Font Styles"
    10031038msgstr ""
     
    10071042#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:160
    10081043#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:262
    1009 #: classes/Visualizer/Render/Sidebar.php:303
     1044#: classes/Visualizer/Render/Sidebar.php:314
    10101045msgid "Family And Size"
    10111046msgstr ""
    10121047
    10131048#: classes/Visualizer/Render/Sidebar/ChartJS.php:221
    1014 #: classes/Visualizer/Render/Sidebar.php:329
     1049#: classes/Visualizer/Render/Sidebar.php:340
    10151050msgid "The default font family and size for all text in the chart."
    10161051msgstr ""
    10171052
    10181053#: classes/Visualizer/Render/Sidebar/ChartJS.php:226
    1019 #: classes/Visualizer/Render/Sidebar.php:334
     1054#: classes/Visualizer/Render/Sidebar.php:345
    10201055msgid "Legend"
    10211056msgstr ""
    10221057
    10231058#: classes/Visualizer/Render/Sidebar/ChartJS.php:228
    1024 #: classes/Visualizer/Render/Sidebar.php:336
     1059#: classes/Visualizer/Render/Sidebar.php:347
    10251060msgid "Position"
    10261061msgstr ""
    10271062
    10281063#: classes/Visualizer/Render/Sidebar/ChartJS.php:233
    1029 #: classes/Visualizer/Render/Sidebar.php:340
     1064#: classes/Visualizer/Render/Sidebar.php:351
    10301065msgid "Determines where to place the legend, compared to the chart area."
    10311066msgstr ""
     
    10421077#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:152
    10431078#: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:254
    1044 #: classes/Visualizer/Render/Sidebar.php:352
     1079#: classes/Visualizer/Render/Sidebar.php:363
    10451080msgid "Font Color"
    10461081msgstr ""
     
    10491084#: classes/Visualizer/Render/Sidebar/Google.php:106
    10501085#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:165
    1051 #: classes/Visualizer/Render/Sidebar.php:359
     1086#: classes/Visualizer/Render/Sidebar.php:370
    10521087msgid "Tooltip"
    10531088msgstr ""
    10541089
    10551090#: classes/Visualizer/Render/Sidebar/ChartJS.php:301
    1056 #: classes/Visualizer/Render/Sidebar.php:380
     1091#: classes/Visualizer/Render/Sidebar.php:391
    10571092msgid "Animation"
    10581093msgstr ""
    10591094
    10601095#: classes/Visualizer/Render/Sidebar/ChartJS.php:304
    1061 #: classes/Visualizer/Render/Sidebar.php:391
     1096#: classes/Visualizer/Render/Sidebar.php:402
    10621097msgid "Duration"
    10631098msgstr ""
    10641099
    10651100#: classes/Visualizer/Render/Sidebar/ChartJS.php:307
    1066 #: classes/Visualizer/Render/Sidebar.php:394
     1101#: classes/Visualizer/Render/Sidebar.php:405
    10671102msgid "The duration of the animation, in milliseconds"
    10681103msgstr ""
    10691104
    10701105#: classes/Visualizer/Render/Sidebar/ChartJS.php:314
    1071 #: classes/Visualizer/Render/Sidebar.php:400
     1106#: classes/Visualizer/Render/Sidebar.php:411
    10721107msgid "Easing"
    10731108msgstr ""
    10741109
    10751110#: classes/Visualizer/Render/Sidebar/ChartJS.php:318
    1076 #: classes/Visualizer/Render/Sidebar.php:404
     1111#: classes/Visualizer/Render/Sidebar.php:415
    10771112msgid "Constant speed"
    10781113msgstr ""
     
    11231158
    11241159#: classes/Visualizer/Render/Sidebar/ChartJS.php:331
    1125 #: classes/Visualizer/Render/Sidebar.php:409
     1160#: classes/Visualizer/Render/Sidebar.php:420
    11261161msgid "The easing function applied to the animation."
    11271162msgstr ""
     
    11291164#: classes/Visualizer/Render/Sidebar/ChartJS.php:347
    11301165#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:180
    1131 #: classes/Visualizer/Render/Sidebar.php:425
     1166#: classes/Visualizer/Render/Sidebar.php:436
    11321167msgid "Trigger"
    11331168msgstr ""
     
    11541189#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:259
    11551190#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:363
    1156 #: classes/Visualizer/Render/Sidebar.php:456
     1191#: classes/Visualizer/Render/Sidebar.php:467
    11571192msgid ""
    11581193"Configure the total size of the chart. Two formats are supported: a number, "
     
    11641199#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:263
    11651200#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:367
    1166 #: classes/Visualizer/Render/Sidebar.php:460
     1201#: classes/Visualizer/Render/Sidebar.php:471
    11671202msgid "Width And Height Of Chart"
    11681203msgstr ""
     
    11711206#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:277
    11721207#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:381
    1173 #: classes/Visualizer/Render/Sidebar.php:474
     1208#: classes/Visualizer/Render/Sidebar.php:485
    11741209msgid ""
    11751210"Determines the total width and height of the chart. This will only show in "
     
    14741509#: classes/Visualizer/Render/Sidebar/Graph.php:476
    14751510#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:62
    1476 #: classes/Visualizer/Render/Sidebar.php:743
     1511#: classes/Visualizer/Render/Sidebar.php:754
    14771512msgid "Number Format"
    14781513msgstr ""
     
    19341969#: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:363
    19351970#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:414
    1936 #: classes/Visualizer/Render/Sidebar.php:499
     1971#: classes/Visualizer/Render/Sidebar.php:510
    19371972msgid "Background Color"
    19381973msgstr ""
     
    20122047msgstr ""
    20132048
     2049#: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:482
     2050msgid "Truthy value"
     2051msgstr ""
     2052
     2053#: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:485
     2054msgid ""
     2055"Provide the HTML entity code for the value the table should display when "
     2056"the value of the column is true. e.g. %1$s (Code: %2$s) instead of true"
     2057msgstr ""
     2058
     2059#: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:489
     2060msgid "Falsy value"
     2061msgstr ""
     2062
     2063#: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:492
     2064msgid ""
     2065"Provide the HTML entity code for the value the table should display when "
     2066"the value of the column is false. e.g. %1$s (Code: %2$s) instead of false"
     2067msgstr ""
     2068
    20142069#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Area.php:73
    20152070#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Area.php:137
     
    20482103#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:134
    20492104#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:407
    2050 #: classes/Visualizer/Render/Sidebar.php:491
     2105#: classes/Visualizer/Render/Sidebar.php:502
    20512106msgid "Stroke Color"
    20522107msgstr ""
     
    20942149#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:126
    20952150#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:399
    2096 #: classes/Visualizer/Render/Sidebar.php:483
     2151#: classes/Visualizer/Render/Sidebar.php:494
    20972152msgid "Stroke Width"
    20982153msgstr ""
     
    22982353
    22992354#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:185
    2300 #: classes/Visualizer/Render/Sidebar.php:430
     2355#: classes/Visualizer/Render/Sidebar.php:441
    23012356msgid "The tooltip will be displayed when the user hovers over an element"
    23022357msgstr ""
    23032358
    23042359#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:186
    2305 #: classes/Visualizer/Render/Sidebar.php:432
     2360#: classes/Visualizer/Render/Sidebar.php:443
    23062361msgid "The tooltip will not be displayed"
    23072362msgstr ""
    23082363
    23092364#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:188
    2310 #: classes/Visualizer/Render/Sidebar.php:434
     2365#: classes/Visualizer/Render/Sidebar.php:445
    23112366msgid "Determines the user interaction that causes the tooltip to be displayed."
    23122367msgstr ""
     
    24212476
    24222477#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:396
    2423 #: classes/Visualizer/Render/Sidebar.php:480
     2478#: classes/Visualizer/Render/Sidebar.php:491
    24242479msgid ""
    24252480"Configure the background color for the main area of the chart and the chart "
     
    24282483
    24292484#: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:402
    2430 #: classes/Visualizer/Render/Sidebar.php:486
     2485#: classes/Visualizer/Render/Sidebar.php:497
    24312486msgid "The chart border width in pixels."
    24322487msgstr ""
     
    26212676#: classes/Visualizer/Render/Sidebar.php:252
    26222677#: classes/Visualizer/Render/Sidebar.php:260
     2678#: classes/Visualizer/Render/Sidebar.php:271
    26232679msgid "Upgrade to at least WordPress 4.7 to use this."
    26242680msgstr ""
     
    26442700msgstr ""
    26452701
    2646 #: classes/Visualizer/Render/Sidebar.php:344
     2702#: classes/Visualizer/Render/Sidebar.php:267
     2703msgid "Download Image"
     2704msgstr ""
     2705
     2706#: classes/Visualizer/Render/Sidebar.php:271
     2707msgid "Not supported for this chart type."
     2708msgstr ""
     2709
     2710#: classes/Visualizer/Render/Sidebar.php:271
     2711msgid "To download the chart as an image."
     2712msgstr ""
     2713
     2714#: classes/Visualizer/Render/Sidebar.php:355
    26472715msgid "Alignment"
    26482716msgstr ""
    26492717
    2650 #: classes/Visualizer/Render/Sidebar.php:348
     2718#: classes/Visualizer/Render/Sidebar.php:359
    26512719msgid "Determines the alignment of the legend."
    26522720msgstr ""
    26532721
    2654 #: classes/Visualizer/Render/Sidebar.php:383
     2722#: classes/Visualizer/Render/Sidebar.php:394
    26552723msgid "Animate on startup"
    26562724msgstr ""
    26572725
    2658 #: classes/Visualizer/Render/Sidebar.php:387
     2726#: classes/Visualizer/Render/Sidebar.php:398
    26592727msgid "Determines if the chart will animate on the initial draw."
    26602728msgstr ""
    26612729
    2662 #: classes/Visualizer/Render/Sidebar.php:405
     2730#: classes/Visualizer/Render/Sidebar.php:416
    26632731msgid "Start slow and speed up"
    26642732msgstr ""
    26652733
    2666 #: classes/Visualizer/Render/Sidebar.php:406
     2734#: classes/Visualizer/Render/Sidebar.php:417
    26672735msgid "Start fast and slow down"
    26682736msgstr ""
    26692737
    2670 #: classes/Visualizer/Render/Sidebar.php:407
     2738#: classes/Visualizer/Render/Sidebar.php:418
    26712739msgid "Start slow, speed up, then slow down"
    26722740msgstr ""
    26732741
    2674 #: classes/Visualizer/Render/Sidebar.php:431
     2742#: classes/Visualizer/Render/Sidebar.php:442
    26752743msgid "The tooltip will be displayed when the user selects an element"
    26762744msgstr ""
    26772745
    2678 #: classes/Visualizer/Render/Sidebar.php:438
     2746#: classes/Visualizer/Render/Sidebar.php:449
    26792747msgid "Show Color Code"
    26802748msgstr ""
    26812749
    2682 #: classes/Visualizer/Render/Sidebar.php:442
     2750#: classes/Visualizer/Render/Sidebar.php:453
    26832751msgid ""
    26842752"If set to yes, will show colored squares next to the slice information in "
     
    26862754msgstr ""
    26872755
    2688 #: classes/Visualizer/Render/Sidebar.php:454
     2756#: classes/Visualizer/Render/Sidebar.php:465
    26892757msgid "Chart Size & Placement"
    26902758msgstr ""
    26912759
    2692 #: classes/Visualizer/Render/Sidebar.php:455
     2760#: classes/Visualizer/Render/Sidebar.php:466
    26932761msgid "Chart Size/Layout"
    26942762msgstr ""
    26952763
    2696 #: classes/Visualizer/Render/Sidebar.php:508
     2764#: classes/Visualizer/Render/Sidebar.php:519
    26972765msgid "Transparent background"
    26982766msgstr ""
    26992767
    2700 #: classes/Visualizer/Render/Sidebar.php:513
     2768#: classes/Visualizer/Render/Sidebar.php:524
    27012769msgid "Placement"
    27022770msgstr ""
    27032771
    2704 #: classes/Visualizer/Render/Sidebar.php:514
     2772#: classes/Visualizer/Render/Sidebar.php:525
    27052773msgid ""
    27062774"Configure the placement and size of the chart area (where the chart itself "
     
    27102778msgstr ""
    27112779
    2712 #: classes/Visualizer/Render/Sidebar.php:518
     2780#: classes/Visualizer/Render/Sidebar.php:529
    27132781msgid "Left And Top Margins"
    27142782msgstr ""
    27152783
    2716 #: classes/Visualizer/Render/Sidebar.php:532
     2784#: classes/Visualizer/Render/Sidebar.php:543
    27172785msgid "Determines how far to draw the chart from the left and top borders."
    27182786msgstr ""
    27192787
    2720 #: classes/Visualizer/Render/Sidebar.php:538
     2788#: classes/Visualizer/Render/Sidebar.php:549
    27212789msgid "Width And Height Of Chart Area"
    27222790msgstr ""
    27232791
    2724 #: classes/Visualizer/Render/Sidebar.php:552
     2792#: classes/Visualizer/Render/Sidebar.php:563
    27252793msgid "Determines the width and hight of the chart area."
    27262794msgstr ""
    27272795
    2728 #: classes/Visualizer/Render/Sidebar.php:614
     2796#: classes/Visualizer/Render/Sidebar.php:625
    27292797msgid "Hex Value"
    27302798msgstr ""
    27312799
    2732 #: classes/Visualizer/Render/Sidebar.php:746
     2800#: classes/Visualizer/Render/Sidebar.php:757
    27332801msgid ""
    27342802"Enter custom format pattern to apply to this series value, similar to the "
     
    27382806msgstr ""
    27392807
    2740 #: classes/Visualizer/Render/Sidebar.php:754
     2808#: classes/Visualizer/Render/Sidebar.php:765
    27412809msgid "Date Format"
    27422810msgstr ""
    27432811
    2744 #: classes/Visualizer/Render/Sidebar.php:757
     2812#: classes/Visualizer/Render/Sidebar.php:768
    27452813msgid ""
    27462814"Enter custom format pattern to apply to this series value, similar to the "
  • visualizer/trunk/readme.md

    r2297689 r2325036  
    11# Visualizer: Tables and Charts Manager for WordPress # #
    2 **Contributors:** [codeinwp](https://profiles.wordpress.org/codeinwp), [marius2012](https://profiles.wordpress.org/marius2012), [marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [themeisle](https://profiles.wordpress.org/themeisle), [Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle), [contactashish13](https://profiles.wordpress.org/contactashish13
     2**Contributors:** [codeinwp](https://profiles.wordpress.org/codeinwp), [themeisle](https://profiles.wordpress.org/themeisle), [marius2012](https://profiles.wordpress.org/marius2012), [marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [rozroz](https://profiles.wordpress.org/rozroz), [Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle
    33**Tags:** tables, charts, pie, visualization, graphs 
    44**Requires at least:** 3.5 
     
    163163
    164164## Changelog ##
     165### 3.4.4 - 2020-06-16  ###
     166
     167* [Feat] Option to download charts as .png images
     168* [Fix] Make UI more intuitive when a chart is missing in the editor
     169* [Fix] Clicking Copy chart shows the Copied message multiple times
     170* [Fix] Conflict with Modern Events Calendar plugin
     171* [Fix] Chart size ( width and height ) options not working for ChartJS charts
     172* [Fix] Resizing the window causes annotation-based charts to throw an error
     173* [Fix] Remove Inside the Chart option as legend position for Google Pie charts
     174* [Fix] Clicking Advanced Options panel breaks Bubble chart
     175* [Fix] Missing posts revisions on chart update
     176
     177
    165178### 3.4.3 - 2020-05-04  ###
    166179
  • visualizer/trunk/readme.txt

    r2297689 r2325036  
    11=== Visualizer: Tables and Charts Manager for WordPress # ===
    2 Contributors:  codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle,contactashish13
     2Contributors: codeinwp,themeisle,marius2012,marius_codeinwp,hardeepasrani,rozroz,Madalin_ThemeIsle
    33Tags: tables, charts, pie, visualization, graphs
    44Requires at least: 3.5
     
    163163
    164164== Changelog ==
     165= 3.4.4 - 2020-06-16  =
     166
     167* [Feat] Option to download charts as .png images
     168* [Fix] Make UI more intuitive when a chart is missing in the editor
     169* [Fix] Clicking Copy chart shows the Copied message multiple times
     170* [Fix] Conflict with Modern Events Calendar plugin
     171* [Fix] Chart size ( width and height ) options not working for ChartJS charts
     172* [Fix] Resizing the window causes annotation-based charts to throw an error
     173* [Fix] Remove Inside the Chart option as legend position for Google Pie charts
     174* [Fix] Clicking Advanced Options panel breaks Bubble chart
     175* [Fix] Missing posts revisions on chart update
     176
     177
    165178= 3.4.3 - 2020-05-04  =
    166179
  • visualizer/trunk/templates/support.php

    r2139358 r2325036  
    3737    <div class="viz-features-content">
    3838        <div class="viz-feature">
    39             <div id="feedzy_import_feeds" class="viz-feature-features">
     39            <div class="viz-feature-features">
    4040                    <?php
    4141                    switch ( $active_tab ) {
  • visualizer/trunk/themeisle-hash.json

    r2297689 r2325036  
    1 {"index.php":"2701e13e479319c5fdcf252bd9f44f77"}
     1{"index.php":"4f756be0ba6c520ec5cd9546fe643ba8"}
  • visualizer/trunk/vendor/autoload.php

    r2297689 r2325036  
    55require_once __DIR__ . '/composer' . '/autoload_real.php';
    66
    7 return ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9::getLoader();
     7return ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca::getLoader();
  • visualizer/trunk/vendor/autoload_52.php

    r2297689 r2325036  
    55require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
    66
    7 return ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be::getLoader();
     7return ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06::getLoader();
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/CHANGELOG.md

    r2297689 r2325036  
     1##### [Version 3.2.14](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.13...v3.2.14) (2020-06-10)
     2
     3> Things are getting better every day. 🚀
     4
     5##### [Version 3.2.13](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.12...v3.2.13) (2020-06-10)
     6
     7Adds plan logic and expiration
     8
     9##### [Version 3.2.12](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.11...v3.2.12) (2020-06-10)
     10
     11Adds key filter
     12
     13##### [Version 3.2.11](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.10...v3.2.11) (2020-06-04)
     14
     15* remove non-printable chars
     16
     17##### [Version 3.2.10](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.9...v3.2.10) (2020-05-28)
     18
     19* Remove extra files on export
     20
     21##### [Version 3.2.9](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.8...v3.2.9) (2020-05-18)
     22
     23adds new endpoints
     24
    125##### [Version 3.2.8](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.7...v3.2.8) (2020-03-24)
    226
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/load.php

    r2297689 r2325036  
    1515}
    1616// Current SDK version and path.
    17 $themeisle_sdk_version = '3.2.8';
     17$themeisle_sdk_version = '3.2.14';
    1818$themeisle_sdk_path    = dirname( __FILE__ );
    1919
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php

    r2297689 r2325036  
    191191     * Return the license status.
    192192     *
     193     * @param bool $check_expiration Should check if license is valid, but expired.
     194     *
    193195     * @return string The License status.
    194196     */
    195     public function get_license_status() {
     197    public function get_license_status( $check_expiration = false ) {
    196198
    197199        $license_data = get_option( $this->product->get_key() . '_license_data', '' );
     
    200202            return get_option( $this->product->get_key() . '_license_status', 'not_active' );
    201203        }
    202 
    203         return isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
    204 
     204        $status = isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
     205        if ( false === $check_expiration ) {
     206            return $status;
     207        }
     208
     209        return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
     210    }
     211
     212    /**
     213     * License price id.
     214     *
     215     * @return int License plan.
     216     */
     217    public function get_plan() {
     218        $license_data = get_option( $this->product->get_key() . '_license_data', '' );
     219        if ( ! isset( $license_data->price_id ) ) {
     220            return -1;
     221        }
     222
     223        return (int) $license_data->price_id;
    205224    }
    206225
     
    245264        }
    246265
    247         $status                = $this->get_license_status();
    248         $no_activations_string = apply_filters( $this->product->get_key() . '_lc_no_activations_string', 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.' );
    249         $no_valid_string       = apply_filters( $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add your license code from your  <a href="%s" target="_blank">purchase history</a> and validate it <a href="%s">here</a>. ' );
    250 
     266        $status                 = $this->get_license_status( true );
     267        $no_activations_string  = apply_filters( $this->product->get_key() . '_lc_no_activations_string', 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.' );
     268        $no_valid_string        = apply_filters( $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add your license code from your  <a href="%s" target="_blank">purchase history</a> and validate it <a href="%s">here</a>. ' );
     269        $expired_license_string = apply_filters( $this->product->get_key() . '_lc_expired_string', 'Your %s License Key has expired. In order to continue receiving support and software updates you must  <a href="%s" target="_blank">renew</a> your license key.' );
    251270        // No activations left for this license.
    252271        if ( 'valid' != $status && $this->check_activation() ) {
     
    266285            </div>
    267286            <?php
     287            return false;
     288        }
     289
     290        // Invalid license key.
     291        if ( 'active_expired' === $status ) {
     292            ?>
     293            <div class="error">
     294                <p>
     295                    <strong><?php echo sprintf( $expired_license_string, $this->product->get_name() . ' ' . $this->product->get_type(), $this->get_api_url() . '?license=' . $this->license_key ); ?> </strong>
     296                </p>
     297            </div>
     298            <?php
     299
    268300            return false;
    269301        }
     
    668700            $update_data->banners = (array) $update_data->banners;
    669701        }
     702
    670703        return $update_data;
    671704    }
     
    697730            }
    698731        }
     732
    699733        return $_transient_data;
    700734    }
     
    797831        if ( false !== $namespace ) {
    798832            add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 );
     833            add_filter( 'product_' . $namespace . '_license_status', [ $this, 'get_license_status' ], PHP_INT_MAX );
     834            add_filter( 'product_' . $namespace . '_license_key', [ $this->product, 'get_license' ] );
     835            add_filter( 'product_' . $namespace . '_license_plan', [ $this, 'get_plan' ], PHP_INT_MAX );
    799836            if ( defined( 'WP_CLI' ) && WP_CLI ) {
    800837                \WP_CLI::add_command( $namespace . ' activate', [ $this, 'cli_activate' ] );
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php

    r2080096 r2325036  
    2828     * Endpoint where to collect logs.
    2929     */
    30     const TRACKING_ENDPOINT = 'http://log.themeisle.com/wp-json/v1/logs/';
     30    const TRACKING_ENDPOINT = 'https://api.themeisle.com/tracking/log';
    3131
    3232
     
    9191     */
    9292    private function is_logger_active() {
     93        $default = 'no';
     94
    9395        if ( ! $this->product->is_wordpress_available() ) {
    94             return true;
    95         }
    96         $pro_slug = $this->product->get_pro_slug();
     96            $default = 'yes';
     97        } else {
     98            $pro_slug = $this->product->get_pro_slug();
    9799
    98         if ( ! empty( $pro_slug ) ) {
    99             $all_products = Loader::get_products();
    100             if ( isset( $all_products[ $pro_slug ] ) ) {
    101                 return true;
     100            if ( ! empty( $pro_slug ) ) {
     101                $all_products = Loader::get_products();
     102                if ( isset( $all_products[ $pro_slug ] ) ) {
     103                    $default = 'yes';
     104                }
    102105            }
    103106        }
    104107
    105         return ( get_option( $this->product->get_key() . '_logger_flag', 'no' ) === 'yes' );
     108        return ( get_option( $this->product->get_key() . '_logger_flag', $default ) === 'yes' );
    106109    }
    107110
     
    152155        $environment['theme']['name']   = $theme->get( 'Name' );
    153156        $environment['theme']['author'] = $theme->get( 'Author' );
     157        $environment['theme']['parent'] = $theme->parent() !== false ? $theme->parent()->get( 'Name' ) : $theme->get( 'Name' );
    154158        $environment['plugins']         = get_option( 'active_plugins' );
    155159        global $wp_version;
     
    160164                'timeout'     => 3,
    161165                'redirection' => 5,
    162                 'headers'     => array(
    163                     'X-ThemeIsle-Event' => 'log_site',
    164                 ),
    165166                'body'        => array(
    166167                    'site'        => get_site_url(),
     
    168169                    'version'     => $this->product->get_version(),
    169170                    'wp_version'  => $wp_version,
     171                    'locale'      => get_locale(),
    170172                    'data'        => apply_filters( $this->product->get_key() . '_logger_data', array() ),
    171173                    'environment' => $environment,
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/src/Modules/Review.php

    r2243902 r2325036  
    6868        $link = 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
    6969
    70         $message = apply_filters( $this->product->get_key() . '_feedback_review_message', '<p>Hey, its great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}</p>' );
     70        $message = apply_filters( $this->product->get_key() . '_feedback_review_message', '<p>Hey, it\'s great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}</p>' );
    7171
    7272        $button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', 'Ok, I will gladly help.' );
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php

    r2038059 r2325036  
    296296        'gn'             => array(
    297297            'slug' => 'gn',
    298             'name' => 'Guaraní',
     298            'name' => 'Guarani',
    299299        ),
    300300        'gsw'            => array(
     
    472472        'nb_NO'          => array(
    473473            'slug' => 'nb',
    474             'name' => 'Norwegian (Bokmål)',
     474            'name' => 'Norwegian (Bokmal)',
    475475        ),
    476476        'nl_NL'          => array(
  • visualizer/trunk/vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php

    r2164787 r2325036  
    4141     * @var string Endpoint url.
    4242     */
    43     const FEEDBACK_ENDPOINT = 'http://feedback.themeisle.com/wordpress/wp-json/__pirate_feedback_/v1/feedback';
     43    const FEEDBACK_ENDPOINT = 'https://api.themeisle.com/tracking/uninstall';
    4444
    4545    /**
     
    110110     * @var string $heading_plugin The heading of the modal
    111111     */
    112     private $heading_plugin = 'Whats wrong?';
     112    private $heading_plugin = 'What\'s wrong?';
    113113    /**
    114114     * Default heading for theme.
     
    699699                'items' => [
    700700                    sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
     701                    sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
    701702                    sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
    702703                ],
     
    783784        $attributes['slug']    = $slug;
    784785        $attributes['version'] = $version;
     786        $attributes['url']     = get_site_url();
    785787
    786788        $response = wp_remote_post(
  • visualizer/trunk/vendor/composer/autoload_real.php

    r2297689 r2325036  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9
     5class ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca', 'loadClassLoader'));
    2525
    2626        $map = require __DIR__ . '/autoload_namespaces.php';
     
    4343        $includeFiles = require __DIR__ . '/autoload_files.php';
    4444        foreach ($includeFiles as $fileIdentifier => $file) {
    45             composerRequire5997c37a3e43a00915b960174c6e29d9($fileIdentifier, $file);
     45            composerRequireb11c4727328a8692ebac41e48739fbca($fileIdentifier, $file);
    4646        }
    4747
     
    5050}
    5151
    52 function composerRequire5997c37a3e43a00915b960174c6e29d9($fileIdentifier, $file)
     52function composerRequireb11c4727328a8692ebac41e48739fbca($fileIdentifier, $file)
    5353{
    5454    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • visualizer/trunk/vendor/composer/autoload_real_52.php

    r2297689 r2325036  
    33// autoload_real_52.php generated by xrstf/composer-php52
    44
    5 class ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be {
     5class ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06 {
    66    private static $loader;
    77
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be', 'loadClassLoader'), true /*, true */);
     22        spl_autoload_register(array('ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06', 'loadClassLoader'), true /*, true */);
    2323        self::$loader = $loader = new xrstf_Composer52_ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06', 'loadClassLoader'));
    2525
    2626        $vendorDir = dirname(dirname(__FILE__));
  • visualizer/trunk/vendor/composer/installed.json

    r2297689 r2325036  
    77            "type": "git",
    88            "url": "https://github.com/Codeinwp/themeisle-sdk.git",
    9             "reference": "ce152edef1634d7c3ce75ed292efcc7a5f73806e"
    10         },
    11         "dist": {
    12             "type": "zip",
    13             "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/ce152edef1634d7c3ce75ed292efcc7a5f73806e",
    14             "reference": "ce152edef1634d7c3ce75ed292efcc7a5f73806e",
     9            "reference": "992f5e8347836e325ffc50760da1d550b79831c4"
     10        },
     11        "dist": {
     12            "type": "zip",
     13            "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/992f5e8347836e325ffc50760da1d550b79831c4",
     14            "reference": "992f5e8347836e325ffc50760da1d550b79831c4",
    1515            "shasum": ""
    1616        },
     
    2020            "wp-coding-standards/wpcs": "^1.0.0"
    2121        },
    22         "time": "2020-03-24 16:54:54",
     22        "time": "2020-06-10 16:25:09",
    2323        "type": "library",
    2424        "installation-source": "source",
Note: See TracChangeset for help on using the changeset viewer.