File Editor
Directories:
.. (Back)
chartjs
datepicker
jqvmap
select2
Files:
admin.min.js
mini-chart.js
mini-chart.min.js
tinymce.min.js
tracker.js
tracker.min.js
Create New File
Create
Edit File: admin.min.js
"use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var n;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(n="Object"===(n={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,o,i,r,s=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(s.push(a.value),s.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(l)throw o}}return s}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function ownKeys(e,t){var n,a=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)),a}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _callSuper(t,e,n){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,n||[],_getPrototypeOf(t).constructor):e.apply(t,n))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var a=_superPropBase(t,e);if(a)return(a=Object.getOwnPropertyDescriptor(a,e)).get?a.get.call(arguments.length<3?t:n):a.value}).apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}jQuery(document).ready(function(e){C=function(c){function n(t){return l.hasOwnProperty(t)&&0<l[t].length||d.hasOwnProperty(t)}var l={},d={};c.ajaxq=function(e,n){if(void 0===n)throw"AjaxQ: queue name is not provided";var a=c.Deferred(),t=a.promise(),o=(t.success=t.done,t.error=t.fail,t.complete=t.always,"function"==typeof n),i=o?null:c.extend(!0,{},n),r=function(){var t;return(t=c.ajax.apply(window,[o?n():i])).done(function(){a.resolve.apply(this,arguments)}),t.fail(function(){a.reject.apply(this,arguments)}),t.always(s),t};return l[e]?l[e].push(r):(l[e]=[],r=r(),d[e]=r),t;function s(){var t;l[e]&&((t=l[e].shift())?(t=t(),d[e]=t):(delete l[e],delete d[e]))}},c.each(["getq","postq"],function(t,i){c[i]=function(t,e,n,a,o){return c.isFunction(n)&&(o=o||a,a=n,n=void 0),c.ajaxq(t,{type:"postq"===i?"post":"get",url:e,data:n,success:a,dataType:o})}}),c.ajaxq.isRunning=function(t){if(t)return n(t);for(var e in l)if(n(e))return!0;return!1},c.ajaxq.getActiveRequest=function(t){if(t)return d[t];throw"AjaxQ: queue name is required"},c.ajaxq.abort=function(t){if(!t)throw"AjaxQ: queue name is required";var e=c.ajaxq.getActiveRequest(t);delete l[t],delete d[t],e&&e.abort()},c.ajaxq.clear=function(t){if(t)l[t]&&(l[t]=[]);else for(var e in l)l.hasOwnProperty(e)&&(l[e]=[])}},"function"==typeof define&&define.amd?define(["jquery"],C):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=C(require("jquery")):C(jQuery),C=this,t=function(Y){function D(t){return null===t||!0===t||!1===t?NaN:(t=Number(t),isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t))}function S(t,e){if(e.length<t)throw new TypeError(t+" argument"+(1<t?"s":"")+" required, but only "+e.length+" present")}function M(t){S(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==_typeof(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function a(t,e){return S(2,arguments),t=M(t),e=D(e),isNaN(e)?new Date(NaN):(e&&t.setDate(t.getDate()+e),t)}function o(t,e){S(2,arguments);var n,a,t=M(t),e=D(e);return isNaN(e)?new Date(NaN):e?(n=t.getDate(),(a=new Date(t.getTime())).setMonth(t.getMonth()+e+1,0),a.getDate()<=n?a:(t.setFullYear(a.getFullYear(),a.getMonth(),n),t)):t}function i(t,e){return S(2,arguments),t=M(t).getTime(),e=D(e),new Date(t+e)}function r(t,e){S(1,arguments);var e=e||{},n=null==(n=(n=e.locale)&&n.options&&n.options.weekStartsOn)?0:D(n);if(0<=(n=null==e.weekStartsOn?n:D(e.weekStartsOn))&&n<=6)return t=((t=(e=M(t)).getDay())<n?7:0)+t-n,e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function O(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function s(t){return S(1,arguments),(t=M(t)).setHours(0,0,0,0),t}function c(t,e){return S(2,arguments),t=M(t),e=M(e),(t=t.getTime()-e.getTime())<0?-1:0<t?1:t}function d(t){return S(1,arguments),t=M(t),!isNaN(t)}function l(t,e){return(t=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds())<0?-1:0<t?1:t}function u(t,e){S(2,arguments);var t=M(t),e=M(e),n=l(t,e),a=Math.abs(function(t,e){return S(2,arguments),t=s(t),e=s(e),t=t.getTime()-O(t),e=e.getTime()-O(e),Math.round((t-e)/864e5)}(t,e));return t.setDate(t.getDate()-n*a),0==(a=n*(a-(l(t,e)===-n)))?0:a}function p(t,e){return S(2,arguments),t=M(t),e=M(e),t.getTime()-e.getTime()}function _(t){return S(1,arguments),(t=M(t)).setHours(23,59,59,999),t}function h(t){S(1,arguments);var t=M(t),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function f(t,e){S(2,arguments);var n=M(t),e=M(e),a=c(n,e),o=Math.abs(function(t,e){return S(2,arguments),t=M(t),e=M(e),12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())}(n,e));return 0==(a=o<1?0:(1===n.getMonth()&&27<n.getDate()&&n.setDate(30),n.setMonth(n.getMonth()-a*o),n=c(n,e)===-a,a*(o-(n=(!function(t){return S(1,arguments),_(t=M(t)).getTime()===h(t).getTime()}(M(t))||1!==o||1!==c(t,e))&&n))))?0:a}var m={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function t(e){return function(t){return t=(t=t||{}).width?String(t.width):e.defaultWidth,e.formats[t]||e.formats[e.defaultWidth]}}var A={date:t({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:t({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:t({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},I={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function e(o){return function(t,e){var n,a;return("formatting"===((e=e||{}).context?String(e.context):"standalone")&&o.formattingValues?(a=o.defaultFormattingWidth||o.defaultWidth,n=e.width?String(e.width):a,o.formattingValues[n]||o.formattingValues[a]):(n=o.defaultWidth,a=e.width?String(e.width):o.defaultWidth,o.values[a]||o.values[n]))[o.argumentCallback?o.argumentCallback(t):t]}}function n(i){return function(t,e){var a,t=String(t),n=(e=e||{}).width,o=n&&i.matchPatterns[n]||i.matchPatterns[i.defaultMatchWidth];return(o=t.match(o))?(a=o[0],o=n&&i.parsePatterns[n]||i.parsePatterns[i.defaultParseWidth],n=("[object Array]"===Object.prototype.toString.call(o)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}:function(t){for(var e in t)if(t.hasOwnProperty(e)&&(n=t[e],n.test(a)))return e;var n})(o),n=i.valueCallback?i.valueCallback(n):n,{value:e.valueCallback?e.valueCallback(n):n,rest:t.slice(a.length)}):null}}var g,z={code:"en-US",formatDistance:function(t,e,n){return n=n||{},t="string"==typeof m[t]?m[t]:1===e?m[t].one:m[t].other.replace("{{count}}",e),n.addSuffix?0<n.comparison?"in "+t:t+" ago":t},formatLong:A,formatRelative:function(t,e,n,a){return I[t]},localize:{ordinalNumber:function(t,e){var n=Number(t);if(20<(t=n%100)||t<10)switch(t%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:e({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:e({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:e({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:e({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:e({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(g={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n,e=e||{},a=(t=String(t)).match(g.matchPattern);return a&&(a=a[0],n=t.match(g.parsePattern))?(n=g.valueCallback?g.valueCallback(n[0]):n[0],{value:n=e.valueCallback?e.valueCallback(n):n,rest:t.slice(a.length)}):null}),era:n({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:n({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:n({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:n({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:n({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function $(t,e){return S(2,arguments),i(t,-D(e))}function w(t,e){for(var n=t<0?"-":"",a=Math.abs(t).toString();a.length<e;)a="0"+a;return n+a}function v(t){S(1,arguments);var t=M(t),e=((e=t.getUTCDay())<1?7:0)+e-1;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function B(t){S(1,arguments);var t=M(t),e=t.getUTCFullYear(),n=((n=new Date(0)).setUTCFullYear(e+1,0,4),n.setUTCHours(0,0,0,0),v(n)),a=((a=new Date(0)).setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0),v(a));return t.getTime()>=n.getTime()?e+1:t.getTime()>=a.getTime()?e:e-1}function U(t){return S(1,arguments),t=v(t=M(t)).getTime()-function(t){S(1,arguments);var t=B(t),e=new Date(0);return e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0),v(e)}(t).getTime(),Math.round(t/6048e5)+1}function y(t,e){S(1,arguments);var e=e||{},n=null==(n=(n=e.locale)&&n.options&&n.options.weekStartsOn)?0:D(n);if(0<=(n=null==e.weekStartsOn?n:D(e.weekStartsOn))&&n<=6)return t=((t=(e=M(t)).getUTCDay())<n?7:0)+t-n,e.setUTCDate(e.getUTCDate()-t),e.setUTCHours(0,0,0,0),e;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function b(t,e){S(1,arguments);var n,t=M(t,e),a=t.getUTCFullYear(),o=e||{},i=null==(i=(i=o.locale)&&i.options&&i.options.firstWeekContainsDate)?1:D(i);if(1<=(i=null==o.firstWeekContainsDate?i:D(o.firstWeekContainsDate))&&i<=7)return(o=new Date(0)).setUTCFullYear(a+1,0,i),o.setUTCHours(0,0,0,0),o=y(o,e),(n=new Date(0)).setUTCFullYear(a,0,i),n.setUTCHours(0,0,0,0),i=y(n,e),t.getTime()>=o.getTime()?a+1:t.getTime()>=i.getTime()?a:a-1;throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}function N(t,e){return S(1,arguments),t=y(t=M(t),e).getTime()-function(t,e){S(1,arguments);var n=null==(n=(n=(a=e||{}).locale)&&n.options&&n.options.firstWeekContainsDate)?1:D(n),n=null==a.firstWeekContainsDate?n:D(a.firstWeekContainsDate),a=b(t,e),t=new Date(0);return t.setUTCFullYear(a,0,n),t.setUTCHours(0,0,0,0),y(t,e)}(t,e).getTime(),Math.round(t/6048e5)+1}function R(t,e){var n=0<t?"-":"+",t=Math.abs(t),a=Math.floor(t/60);return 0==(t=t%60)?n+String(a):(e=e||"",n+String(a)+e+w(t,2))}function W(t,e){return t%60==0?(0<t?"-":"+")+w(Math.abs(t)/60,2):x(t,e)}function x(t,e){var e=e||"",n=0<t?"-":"+",t=Math.abs(t);return n+w(Math.floor(t/60),2)+e+w(t%60,2)}var H={G:function(t,e,n){var a=0<t.getUTCFullYear()?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(t,e,n){var a;return"yo"===e?(a=t.getUTCFullYear(),n.ordinalNumber(0<a?a:1-a,{unit:"year"})):(n=e,a=0<(a=(a=t).getUTCFullYear())?a:1-a,w("yy"===n?a%100:a,n.length))},Y:function(t,e,n,a){return a=0<(t=b(t,a))?t:1-t,"YY"===e?w(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):w(a,e.length)},R:function(t,e){return w(B(t),e.length)},u:function(t,e){return w(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return w(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,e,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return w(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,e,n){var a,o,i=t.getUTCMonth();switch(e){case"M":case"MM":return o=e,a=(a=t).getUTCMonth(),"M"===o?String(a+1):w(a+1,2);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){var a=t.getUTCMonth();switch(e){case"L":return String(a+1);case"LL":return w(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,e,n,a){return t=N(t,a),"wo"===e?n.ordinalNumber(t,{unit:"week"}):w(t,e.length)},I:function(t,e,n){return t=U(t),"Io"===e?n.ordinalNumber(t,{unit:"week"}):w(t,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):(n=e,w(t.getUTCDate(),n.length))},D:function(t,e,n){return t=function(t){S(1,arguments);var t=M(t),e=t.getTime(),t=(t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t.getTime());return Math.floor((e-t)/864e5)+1}(t),"Do"===e?n.ordinalNumber(t,{unit:"dayOfYear"}):w(t,e.length)},E:function(t,e,n){var a=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,e,n,a){var o=t.getUTCDay(),i=(o-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return w(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,a){var o=t.getUTCDay(),i=(o-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return w(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){var a=t.getUTCDay(),o=0===a?7:a;switch(e){case"i":return String(o);case"ii":return w(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,e,n){var a=1<=t.getUTCHours()/12?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){var a=12===(t=t.getUTCHours())?"noon":0===t?"midnight":1<=t/12?"pm":"am";switch(e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){var a=17<=(t=t.getUTCHours())?"evening":12<=t?"afternoon":4<=t?"morning":"night";switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){var a;return"ho"===e?(a=t.getUTCHours()%12,n.ordinalNumber(0==a?12:a,{unit:"hour"})):(n=e,w(t.getUTCHours()%12||12,n.length))},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):(n=e,w(t.getUTCHours(),n.length))},K:function(t,e,n){return t=t.getUTCHours()%12,"Ko"===e?n.ordinalNumber(t,{unit:"hour"}):w(t,e.length)},k:function(t,e,n){return 0===(t=t.getUTCHours())&&(t=24),"ko"===e?n.ordinalNumber(t,{unit:"hour"}):w(t,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):(n=e,w(t.getUTCMinutes(),n.length))},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):(n=e,w(t.getUTCSeconds(),n.length))},S:function(t,e){return n=t,a=(e=e).length,n=t.getUTCMilliseconds(),w(Math.floor(n*Math.pow(10,a-3)),e.length);var n,a},X:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return W(o);case"XXXX":case"XX":return x(o);default:return x(o,":")}},x:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();switch(e){case"x":return W(o);case"xxxx":case"xx":return x(o);default:return x(o,":")}},O:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+R(o,":");default:return"GMT"+x(o,":")}},z:function(t,e,n,a){var o=(a._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+R(o,":");default:return"GMT"+x(o,":")}},t:function(t,e,n,a){return a=a._originalDate||t,w(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,n,a){return w((a._originalDate||t).getTime(),e.length)}};function F(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}}function G(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}}var K={p:G,P:function(t,e){var n,a=t.match(/(P+)(p+)?/),o=a[1];if(!(a=a[2]))return F(t,e);switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",F(o,e)).replace("{{time}}",G(a,e))}},X=["D","DD"],V=["YY","YYYY"];function Z(t){return-1!==X.indexOf(t)}function J(t){return-1!==V.indexOf(t)}function P(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var tt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,et=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nt=/^'([^]*?)'?$/,at=/''/g,ot=/[a-zA-Z]/;function k(t,e,n){S(2,arguments);var n=n||{},a=null==(a=(a=n.locale)&&a.options&&a.options.weekStartsOn)?0:D(a);if(0<=(a=null==n.weekStartsOn?a:D(n.weekStartsOn))&&a<=6)return n=M(t),e=((7+(t=D(e))%7)%7<a?7:0)+t-n.getUTCDay(),n.setUTCDate(n.getUTCDate()+e),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var it=/^(1[0-2]|0?\d)/,rt=/^(3[0-1]|[0-2]?\d)/,st=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,ct=/^(5[0-3]|[0-4]?\d)/,lt=/^(2[0-3]|[0-1]?\d)/,dt=/^(2[0-4]|[0-1]?\d)/,ut=/^(1[0-1]|0?\d)/,pt=/^(1[0-2]|0?\d)/,_t=/^[0-5]?\d/,ht=/^[0-5]?\d/,ft=/^\d/,mt=/^\d{1,2}/,gt=/^\d{1,3}/,wt=/^\d{1,4}/,vt=/^-?\d+/,yt=/^-?\d/,bt=/^-?\d{1,2}/,xt=/^-?\d{1,3}/,kt=/^-?\d{1,4}/,Ct=/^([+-])(\d{2})(\d{2})?|Z/,Et=/^([+-])(\d{2})(\d{2})|Z/,jt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Tt=/^([+-])(\d{2}):(\d{2})|Z/,Dt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function C(t,e,n){var a;return(t=e.match(t))?(a=parseInt(t[0],10),{value:n?n(a):a,rest:e.slice(t[0].length)}):null}function E(t,e){return(t=e.match(t))?"Z"===t[0]?{value:0,rest:e.slice(1)}:{value:("+"===t[1]?1:-1)*(36e5*(t[2]?parseInt(t[2],10):0)+6e4*(t[3]?parseInt(t[3],10):0)+1e3*(t[5]?parseInt(t[5],10):0)),rest:e.slice(t[0].length)}:null}function St(t,e){return C(vt,t,e)}function j(t,e,n){switch(t){case 1:return C(ft,e,n);case 2:return C(mt,e,n);case 3:return C(gt,e,n);case 4:return C(wt,e,n);default:return C(new RegExp("^\\d{1,"+t+"}"),e,n)}}function Mt(t,e,n){switch(t){case 1:return C(yt,e,n);case 2:return C(bt,e,n);case 3:return C(xt,e,n);case 4:return C(kt,e,n);default:return C(new RegExp("^-?\\d{1,"+t+"}"),e,n)}}function T(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ot(t,e){var n=0<e;return e=(e=n?e:1-e)<=50?t||100:(e+=50,t+100*Math.floor(e/100)-(e%100<=t?100:0)),n?e:1-e}var Pt=[31,28,31,30,31,30,31,31,30,31,30,31],qt=[31,29,31,30,31,30,31,31,30,31,30,31];function Lt(t){return t%400==0||t%4==0&&t%100!=0}var Qt={G:{priority:140,parse:function(t,e,n,a){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}},set:function(t,e,n,a){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,n,a){function o(t){return{year:t,isTwoDigitYear:"yy"===e}}switch(e){case"y":return j(4,t,o);case"yo":return n.ordinalNumber(t,{unit:"year",valueCallback:o});default:return j(e.length,t,o)}},validate:function(t,e,n){return e.isTwoDigitYear||0<e.year},set:function(t,e,n,a){var o=t.getUTCFullYear();return o=n.isTwoDigitYear?Ot(n.year,o):"era"in e&&1!==e.era?1-n.year:n.year,t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,n,a){function o(t){return{year:t,isTwoDigitYear:"YY"===e}}switch(e){case"Y":return j(4,t,o);case"Yo":return n.ordinalNumber(t,{unit:"year",valueCallback:o});default:return j(e.length,t,o)}},validate:function(t,e,n){return e.isTwoDigitYear||0<e.year},set:function(t,e,n,a){var o=b(t,a);return o=n.isTwoDigitYear?Ot(n.year,o):"era"in e&&1!==e.era?1-n.year:n.year,t.setUTCFullYear(o,0,a.firstWeekContainsDate),t.setUTCHours(0,0,0,0),y(t,a)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,n,a){return Mt("R"===e?4:e.length,t)},set:function(t,e,n,a){var o=new Date(0);return o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0),v(o)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,n,a){return Mt("u"===e?4:e.length,t)},set:function(t,e,n,a){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,n,a){switch(e){case"Q":case"QQ":return j(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 1<=e&&e<=4},set:function(t,e,n,a){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,n,a){switch(e){case"q":case"qq":return j(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return 1<=e&&e<=4},set:function(t,e,n,a){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,n,a){function o(t){return t-1}switch(e){case"M":return C(it,t,o);case"MM":return j(2,t,o);case"Mo":return n.ordinalNumber(t,{unit:"month",valueCallback:o});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 0<=e&&e<=11},set:function(t,e,n,a){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,n,a){function o(t){return t-1}switch(e){case"L":return C(it,t,o);case"LL":return j(2,t,o);case"Lo":return n.ordinalNumber(t,{unit:"month",valueCallback:o});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return 0<=e&&e<=11},set:function(t,e,n,a){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,n,a){switch(e){case"w":return C(ct,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=53},set:function(t,e,n,a){return y(function(t,e,n){return S(2,arguments),t=M(t),e=D(e),n=N(t,n)-e,t.setUTCDate(t.getUTCDate()-7*n),t}(t,n,a),a)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,n,a){switch(e){case"I":return C(ct,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=53},set:function(t,e,n,a){return v(function(t,e){return S(2,arguments),t=M(t),e=D(e),e=U(t)-e,t.setUTCDate(t.getUTCDate()-7*e),t}(t,n,a),a)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,n,a){switch(e){case"d":return C(rt,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return j(e.length,t)}},validate:function(t,e,n){var a=Lt(t.getUTCFullYear()),t=t.getUTCMonth();return a?1<=e&&e<=qt[t]:1<=e&&e<=Pt[t]},set:function(t,e,n,a){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,n,a){switch(e){case"D":case"DD":return C(st,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return j(e.length,t)}},validate:function(t,e,n){return Lt(t.getUTCFullYear())?1<=e&&e<=366:1<=e&&e<=365},set:function(t,e,n,a){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,n,a){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 0<=e&&e<=6},set:function(t,e,n,a){return(t=k(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,n,a){function o(t){var e=7*Math.floor((t-1)/7);return(t+a.weekStartsOn+6)%7+e}switch(e){case"e":case"ee":return j(e.length,t,o);case"eo":return n.ordinalNumber(t,{unit:"day",valueCallback:o});case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return 0<=e&&e<=6},set:function(t,e,n,a){return(t=k(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,n,a){function o(t){var e=7*Math.floor((t-1)/7);return(t+a.weekStartsOn+6)%7+e}switch(e){case"c":case"cc":return j(e.length,t,o);case"co":return n.ordinalNumber(t,{unit:"day",valueCallback:o});case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return 0<=e&&e<=6},set:function(t,e,n,a){return(t=k(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,n,a){function o(t){return 0===t?7:t}switch(e){case"i":case"ii":return j(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiiii":return n.day(t,{width:"narrow",context:"formatting",valueCallback:o});case"iiiiii":return n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o});default:return n.day(t,{width:"wide",context:"formatting",valueCallback:o})||n.day(t,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(t,{width:"short",context:"formatting",valueCallback:o})||n.day(t,{width:"narrow",context:"formatting",valueCallback:o})}},validate:function(t,e,n){return 1<=e&&e<=7},set:function(t,e,n,a){return(t=function(t,e){return S(2,arguments),(e=D(e))%7==0&&(e-=7),e=((e%7+7)%7<1?7:0)+e-(t=M(t)).getUTCDay(),t.setUTCDate(t.getUTCDate()+e),t}(t,n,a)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(t,e,n,a){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,a){return t.setUTCHours(T(n),0,0,0),t},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(t,e,n,a){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,a){return t.setUTCHours(T(n),0,0,0),t},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(t,e,n,a){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,a){return t.setUTCHours(T(n),0,0,0),t},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(t,e,n,a){switch(e){case"h":return C(pt,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=12},set:function(t,e,n,a){var o=12<=t.getUTCHours();return o&&n<12?t.setUTCHours(n+12,0,0,0):o||12!==n?t.setUTCHours(n,0,0,0):t.setUTCHours(0,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,n,a){switch(e){case"H":return C(lt,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=23},set:function(t,e,n,a){return t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,n,a){switch(e){case"K":return C(ut,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=11},set:function(t,e,n,a){return 12<=t.getUTCHours()&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(t,e,n,a){switch(e){case"k":return C(dt,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return j(e.length,t)}},validate:function(t,e,n){return 1<=e&&e<=24},set:function(t,e,n,a){return t.setUTCHours(n<=24?n%24:n,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,n,a){switch(e){case"m":return C(_t,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=59},set:function(t,e,n,a){return t.setUTCMinutes(n,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,n,a){switch(e){case"s":return C(ht,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return j(e.length,t)}},validate:function(t,e,n){return 0<=e&&e<=59},set:function(t,e,n,a){return t.setUTCSeconds(n,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,n,a){return j(e.length,t,function(t){return Math.floor(t*Math.pow(10,3-e.length))})},set:function(t,e,n,a){return t.setUTCMilliseconds(n),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,n,a){switch(e){case"X":return E(Ct,t);case"XX":return E(Et,t);case"XXXX":return E(jt,t);case"XXXXX":return E(Dt,t);default:return E(Tt,t)}},set:function(t,e,n,a){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,n,a){switch(e){case"x":return E(Ct,t);case"xx":return E(Et,t);case"xxxx":return E(jt,t);case"xxxxx":return E(Dt,t);default:return E(Tt,t)}},set:function(t,e,n,a){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,n,a){return St(t)},set:function(t,e,n,a){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,n,a){return St(t)},set:function(t,e,n,a){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},Yt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,At=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,zt=/''/g,$t=/\S/,Bt=/[a-zA-Z]/;function Ut(t,e){return e.timestampIsSet?t:((e=new Date(0)).setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e)}var q={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Rt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Wt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function L(t){return t?parseInt(t):1}function Q(t){return t&&parseFloat(t.replace(",","."))||0}var Ht=[31,null,31,30,31,30,31,31,30,31,30,31];function Ft(t){return t%400==0||t%4==0&&t%100}var Gt={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Y._adapters._date.override({_id:"date-fns",formats:function(){return Gt},parse:function(t,e){var n;return null!=t&&("number"==(n=_typeof(t))||t instanceof Date?t=M(t):"string"==n&&(t="string"==typeof e?function(t,e,n,a){S(3,arguments);var o=String(t),i=String(e),r=a||{},s=r.locale||z;if(!s.match)throw new RangeError("locale must contain match property");if(a=null==(e=s.options&&s.options.firstWeekContainsDate)?1:D(e),!(1<=(e=null==r.firstWeekContainsDate?a:D(r.firstWeekContainsDate))&&e<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");if(a=null==(a=s.options&&s.options.weekStartsOn)?0:D(a),!(0<=(a=null==r.weekStartsOn?a:D(r.weekStartsOn))&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===i)return""===o?M(n):new Date(NaN);for(var c={firstWeekContainsDate:e,weekStartsOn:a,locale:s},l=[{priority:10,subPriority:-1,set:Ut,index:0}],d=i.match(At).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,K[e])(t,s.formatLong,c):t}).join("").match(Yt),u=[],p=0;p<d.length;p++){var _=d[p],h=(!r.useAdditionalWeekYearTokens&&J(_)&&P(_,i,t),!r.useAdditionalDayOfYearTokens&&Z(_)&&P(_,i,t),_[0]),f=Qt[h];if(f){var m=f.incompatibleTokens;if(Array.isArray(m)){for(var g=void 0,w=0;w<u.length;w++){var v=u[w].token;if(-1!==m.indexOf(v)||v===h){g=u[w];break}}if(g)throw new RangeError("The format string mustn't contain `".concat(g.fullToken,"` and `").concat(_,"` at the same time"))}else if("*"===f.incompatibleTokens&&u.length)throw new RangeError("The format string mustn't contain `".concat(_,"` and any other token at the same time"));u.push({token:h,fullToken:_});var y=f.parse(o,_,s.match,c);if(!y)return new Date(NaN);l.push({priority:f.priority,subPriority:f.subPriority||0,set:f.set,validate:f.validate,value:y.value,index:l.length}),o=y.rest}else{if(h.match(Bt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");if("''"===_?_="'":"'"===h&&(_=_.match(It)[1].replace(zt,"'")),0!==o.indexOf(_))return new Date(NaN);o=o.slice(_.length)}}if(0<o.length&&$t.test(o))return new Date(NaN);var b=l.map(function(t){return t.priority}).sort(function(t,e){return e-t}).filter(function(t,e,n){return n.indexOf(t)===e}).map(function(e){return l.filter(function(t){return t.priority===e}).sort(function(t,e){return e.subPriority-t.subPriority})}).map(function(t){return t[0]}),e=M(n);if(isNaN(e))return new Date(NaN);for(var x=$(e,O(e)),k={},p=0;p<b.length;p++){var C=b[p];if(C.validate&&!C.validate(x,C.value,c))return new Date(NaN);if((C=C.set(x,k,C.value,c))[0]){var E,x=C[0],j=void 0,T=void 0,E=void 0,j=k,T=C[1];if(null==j)throw new TypeError("assign requires that input parameter not be null or undefined");for(E in T=T||{})T.hasOwnProperty(E)&&(j[E]=T[E])}else x=C}return x}(t,e,new Date,this.options):function(t,e){S(1,arguments);var n,a,o,i,r,s,c,l,e=e||{},e=null==e.additionalDigits?2:D(e.additionalDigits);if(2!==e&&1!==e&&0!==e)throw new RangeError("additionalDigits must be 0, 1 or 2");return"string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t)||(o={},2<(l=t.split(q.dateTimeDelimiter)).length||(/:/.test(l[0])?(o.date=null,a=l[0]):(o.date=l[0],a=l[1],q.timeZoneDelimiter.test(o.date)&&(o.date=t.split(q.timeZoneDelimiter)[0],a=t.substr(o.date.length,t.length))),a&&((l=q.timezone.exec(a))?(o.time=a.replace(l[1],""),o.timezone=l[1]):o.time=a)),(t=o).date&&(l=t.date,a=e,a=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),e=(o=(a=l.match(a))?(o=a[1]&&parseInt(a[1]),{year:null==(e=a[2]&&parseInt(a[2]))?o:100*e,restDateString:l.slice((a[1]||a[2]).length)}):{year:null}).restDateString,n=null!==(l=o.year)&&(e=e.match(Nt))?(o=!!e[4],r=L(e[1]),i=L(e[2])-1,s=L(e[3]),c=L(e[4]),e=L(e[5])-1,o?1<=c&&c<=53&&0<=e&&e<=6?(o=l,(n=new Date(0)).setUTCFullYear(o,0,4),o=7*(c-1)+e+1-(n.getUTCDay()||7),n.setUTCDate(n.getUTCDate()+o),n):new Date(NaN):(c=new Date(0),0<=i&&i<=11&&1<=s&&s<=(Ht[i]||(Ft(l)?29:28))&&1<=r&&r<=(Ft(l)?366:365)?(c.setUTCFullYear(l,i,Math.max(r,s)),c):new Date(NaN))):null),isNaN(n))||!n||(e=n.getTime(),o=0,t.time&&(o=(l=(l=t.time).match(Rt))?(i=Q(l[1]),r=Q(l[2]),l=Q(l[3]),(24===i?0===r&&0===l:0<=l&&l<60&&0<=r&&r<60&&0<=i&&i<25)?36e5*i+6e4*r+1e3*l:NaN):null,isNaN(o)||null===o))?new Date(NaN):t.timezone?(t="Z"!==(s=t.timezone)&&(s=s.match(Wt))?(c="+"===s[1]?-1:1,l=parseInt(s[2]),0<=(s=s[3]&&parseInt(s[3])||0)&&s<=59?c*(36e5*l+6e4*s):NaN):0,isNaN(t)?new Date(NaN):new Date(e+o+t)):(l=new Date(e+o),(t=new Date(0)).setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),t.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),t)}(t,this.options)),d(t))?t.getTime():null},format:function(t,e){return function(a,o,t){S(2,arguments);var e=String(o),i=t||{},r=i.locale||z,t=r.options&&r.options.firstWeekContainsDate,t=null==t?1:D(t),t=null==i.firstWeekContainsDate?t:D(i.firstWeekContainsDate);if(!(1<=t&&t<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var n=null==(n=r.options&&r.options.weekStartsOn)?0:D(n);if(!(0<=(n=null==i.weekStartsOn?n:D(i.weekStartsOn))&&n<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!r.localize)throw new RangeError("locale must contain localize property");if(!r.formatLong)throw new RangeError("locale must contain formatLong property");var s,c,l=M(a);if(d(l))return s=$(l,O(l)),c={firstWeekContainsDate:t,weekStartsOn:n,locale:r,_originalDate:l},e.match(et).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,K[e])(t,r.formatLong,c):t}).join("").match(tt).map(function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return t.match(nt)[1].replace(at,"'");var n=H[e];if(n)return!i.useAdditionalWeekYearTokens&&J(t)&&P(t,o,a),!i.useAdditionalDayOfYearTokens&&Z(t)&&P(t,o,a),n(s,t,r.localize,c);if(e.match(ot))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t}).join("");throw new RangeError("Invalid time value")}(t,e,this.options)},add:function(t,e,n){switch(n){case"millisecond":return i(t,e);case"second":return function(t,e){return S(2,arguments),i(t,1e3*D(e))}(t,e);case"minute":return function(t,e){return S(2,arguments),i(t,6e4*D(e))}(t,e);case"hour":return function(t,e){return S(2,arguments),i(t,36e5*D(e))}(t,e);case"day":return a(t,e);case"week":return function(t,e){return S(2,arguments),a(t,7*D(e))}(t,e);case"month":return o(t,e);case"quarter":return function(t,e){return S(2,arguments),o(t,3*D(e))}(t,e);case"year":return function(t,e){return S(2,arguments),o(t,12*D(e))}(t,e);default:return t}},diff:function(t,e,n){switch(n){case"millisecond":return p(t,e);case"second":return function(t,e){return S(2,arguments),0<(t=p(t,e)/1e3)?Math.floor(t):Math.ceil(t)}(t,e);case"minute":return function(t,e){return S(2,arguments),0<(t=p(t,e)/6e4)?Math.floor(t):Math.ceil(t)}(t,e);case"hour":return function(t,e){return S(2,arguments),0<(t=p(t,e)/36e5)?Math.floor(t):Math.ceil(t)}(t,e);case"day":return u(t,e);case"week":return function(t,e){return S(2,arguments),0<(t=u(t,e)/7)?Math.floor(t):Math.ceil(t)}(t,e);case"month":return f(t,e);case"quarter":return function(t,e){return S(2,arguments),0<(t=f(t,e)/3)?Math.floor(t):Math.ceil(t)}(t,e);case"year":return function(t,e){S(2,arguments);var t=M(t),e=M(e),n=c(t,e),a=Math.abs(function(t,e){return S(2,arguments),t=M(t),e=M(e),t.getFullYear()-e.getFullYear()}(t,e));return t.setFullYear("1584"),e.setFullYear("1584"),0==(a=n*(a-(c(t,e)===-n)))?0:a}(t,e);default:return 0}},startOf:function(t,e,n){switch(e){case"second":return function(t){return S(1,arguments),(t=M(t)).setMilliseconds(0),t}(t);case"minute":return function(t){return S(1,arguments),(t=M(t)).setSeconds(0,0),t}(t);case"hour":return function(t){return S(1,arguments),(t=M(t)).setMinutes(0,0,0),t}(t);case"day":return s(t);case"week":return r(t);case"isoWeek":return r(t,{weekStartsOn:+n});case"month":return function(t){return S(1,arguments),(t=M(t)).setDate(1),t.setHours(0,0,0,0),t}(t);case"quarter":return function(t){S(1,arguments);var t=M(t),e=t.getMonth();return t.setMonth(e-e%3,1),t.setHours(0,0,0,0),t}(t);case"year":return function(t){S(1,arguments);var t=M(t),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){return S(1,arguments),(t=M(t)).setMilliseconds(999),t}(t);case"minute":return function(t){return S(1,arguments),(t=M(t)).setSeconds(59,999),t}(t);case"hour":return function(t){return S(1,arguments),(t=M(t)).setMinutes(59,59,999),t}(t);case"day":return _(t);case"week":return function(t){S(1,arguments);var e={},n=null==(n=(n=e.locale)&&n.options&&n.options.weekStartsOn)?0:D(n);if(0<=(n=null==e.weekStartsOn?n:D(e.weekStartsOn))&&n<=6)return t=6+((t=(e=M(t)).getDay())<n?-7:0)-(t-n),e.setDate(e.getDate()+t),e.setHours(23,59,59,999),e;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}(t);case"month":return h(t);case"quarter":return function(t){S(1,arguments);var t=M(t),e=t.getMonth();return t.setMonth(e-e%3+3,0),t.setHours(23,59,59,999),t}(t);case"year":return function(t){S(1,arguments);var t=M(t),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}(t);default:return t}}})},"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(require("chart.js")):"function"==typeof define&&define.amd?define(["chart.js"],t):t(("undefined"!=typeof globalThis?globalThis:C||self).Chart),t=this,C=function(t,e,_){var n=function(){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e.DatasetController),_createClass(t,[{key:"initialize",value:function(){this.enableOptionSharing=!0,_get(_getPrototypeOf(t.prototype),"initialize",this).call(this)}},{key:"update",value:function(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}},{key:"updateElements",value:function(t,e,n,a){for(var o=this,i="reset"===a,r=o._cachedMeta,s=r.xScale,c=r.yScale,r=o.resolveDataElementOptions(e,a),r=o.getSharedOptions(a,t[e],r),l=e;l<e+n;l++){var d=!i&&o.getParsed(l),u=i?s.getBasePixel():s.getPixelForValue(d.x),d=i?c.getBasePixel():c.getPixelForValue(d.y),p=o.resolveDataElementOptions(l,a),_=p.width,h=p.height,f=p.anchorX,m=p.anchorY,f={x:"left"===f||"start"===f?u:"right"===f||"end"===f?u-_:u-_/2,y:"top"===m||"start"===m?d:"bottom"===m||"end"===m?d-h:d-h/2,width:_,height:h,options:p};o.updateElement(t[l],l,f,a)}o.updateSharedOptions(r,a)}},{key:"draw",value:function(){for(var t=this.getMeta().data||[],e=0,n=t.length;e<n;++e)t[e].draw(this._ctx)}}])}();function h(t,e){var n=t.getProps(["x","y","width","height"],e);return{left:t=n.x,top:e=n.y,right:t+n.width,bottom:e+n.height}}function f(t,e,n){return Math.max(Math.min(t,n),e)}function a(t,e,n,a){var o=null===e,i=null===n;return(t=!(!t||o&&i)&&h(t,a))&&(o||e>=t.left&&e<=t.right)&&(i||n>=t.top&&n<=t.bottom)}_defineProperty(n,"id","matrix"),_defineProperty(n,"version","2.0.1"),_defineProperty(n,"defaults",{dataElementType:"matrix",animations:{numbers:{type:"number",properties:["x","y","width","height"]}}}),_defineProperty(n,"overrides",{interaction:{mode:"nearest",intersect:!0},scales:{x:{type:"linear",offset:!0},y:{type:"linear",reverse:!0}}});var o=function(){function n(t){var e;return _classCallCheck(this,n),(e=_callSuper(this,n)).options=void 0,e.width=void 0,e.height=void 0,t&&Object.assign(_assertThisInitialized(e),t),e}return _inherits(n,e.Element),_createClass(n,[{key:"draw",value:function(t){var e,n,a,o,i,r,s,c=this.options,l=(u=(d=h(e=this)).right-d.left,p=d.bottom-d.top,n=u/2,a=p/2,l=e.options.borderWidth,_.isObject(l)?(o=+l.top||0,i=+l.right||0,r=+l.bottom||0,s=+l.left||0):o=i=r=s=+l||0,e={t:f(o,0,a),r:f(i,0,n),b:f(r,0,a),l:f(s,0,n)},{outer:{x:d.left,y:d.top,w:u,h:p},inner:{x:d.left+e.l,y:d.top+e.t,w:u-e.l-e.r,h:p-e.t-e.b}}),d=l.inner,u=l.outer,p=_.toTRBLCorners(c.borderRadius);t.save(),u.w!==d.w||u.h!==d.h?(t.beginPath(),_.addRoundedRectPath(t,{x:u.x,y:u.y,w:u.w,h:u.h,radius:p}),_.addRoundedRectPath(t,{x:d.x,y:d.y,w:d.w,h:d.h,radius:p}),t.fillStyle=c.backgroundColor,t.fill(),t.fillStyle=c.borderColor,t.fill("evenodd")):(t.beginPath(),_.addRoundedRectPath(t,{x:d.x,y:d.y,w:d.w,h:d.h,radius:p}),t.fillStyle=c.backgroundColor,t.fill()),t.restore()}},{key:"inRange",value:function(t,e,n){return a(this,t,e,n)}},{key:"inXRange",value:function(t,e){return a(this,t,null,e)}},{key:"inYRange",value:function(t,e){return a(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","width","height"],t),t=e.x,n=e.y;return{x:t+e.width/2,y:n+e.height/2}}},{key:"tooltipPosition",value:function(){return this.getCenterPoint()}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}])}();_defineProperty(o,"id","matrix"),_defineProperty(o,"defaults",{backgroundColor:void 0,borderColor:void 0,borderWidth:void 0,borderRadius:0,anchorX:"center",anchorY:"center",width:20,height:20}),(400<e.Chart.version.replace(/\./g,"")?e.Chart:e.Chart.plugins).register(n,o),t.MatrixController=n,t.MatrixElement=o},"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?C(exports,require("chart.js"),require("chart.js/helpers")):"function"==typeof define&&define.amd?define(["exports","chart.js","chart.js/helpers"],C):C((t="undefined"!=typeof globalThis?globalThis:t||self)["chartjs-chart-matrix"]={},t.Chart,t.Chart.helpers),jQuery(document).ready(function(){var t,e,n,a,o,i,r,s,c,l,d=jQuery(".js-date-range-picker-btn"),u=jQuery(".js-date-range-picker-input"),p=jQuery(".js-date-range-picker-form"),_=jQuery(".wps-js-calendar-field");d.length&&moment.updateLocale("en",{week:{dow:parseInt(k._("start_of_week"))}}),d.length&&u.length&&p.length&&(d.on("click",function(){u.trigger("click")}),r={Today:[moment(),moment()],Yesterday:[moment().subtract(1,"days"),moment().subtract(1,"days")],"This Week":[moment().startOf("week"),moment().endOf("week")],"Last Week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"Last 7 Days":[moment().subtract(6,"days"),moment()],"Last 30 Days":[moment().subtract(29,"days"),moment()],"Last 90 Days":[moment().subtract(89,"days"),moment()],"Last 6 Months":[moment().subtract(6,"month"),moment()],"This Year":[moment().startOf("year"),moment().endOf("year")]},d.hasClass("js-date-range-picker-all-time")&&(r["All Time"]=[moment(0),moment()]),t=d.attr("data-date-format")?d.attr("data-date-format"):"MM/DD/YYYY",l={d:"DD",j:"D",S:"Do",n:"M",m:"MM",F:"MMMM",M:"MMM",y:"YY",Y:"YYYY"},t=t.replace(/([a-zA-Z])/g,function(t){return l[t]||t}),e=k.global.user_date_range.from,n=k.global.user_date_range.to,u.daterangepicker({autoApply:!0,ranges:r,startDate:e,endDate:n}),k.isset(k.global,"request_params","from")&&k.isset(k.global,"request_params","to")?(r=k.global.request_params.from,a=k.global.request_params.to,u.data("daterangepicker").setStartDate(moment(r).format("MM/DD/YYYY")),u.data("daterangepicker").setEndDate(moment(a).format("MM/DD/YYYY")),u.data("daterangepicker").updateCalendars(),s=u.data("daterangepicker").container.find(".ranges li.active").text(),r=moment(r),a=moment(a),o=r.year()===a.year()?(i=t.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),r.format(i)+" - "+a.format(t)):r.format(t)+" - "+a.format(t),"Custom Range"!==s&&("All Time"!==s?(o='<span class="wps-date-range">'.concat(s,"</span>")+o,document.querySelector(".js-date-range-picker-btn").classList.add("custom-range")):o=s),d.find("span").html(o)):(i=moment(e),r=moment(n),u.data("daterangepicker").setStartDate(moment(e).format("MM/DD/YYYY")),u.data("daterangepicker").setEndDate(moment(n).format("MM/DD/YYYY")),u.data("daterangepicker").updateCalendars(),s=i.year()===r.year()?(a=t.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),i.format(a)+" - "+r.format(t)):i.format(t)+" - "+r.format(t),c=u.data("daterangepicker").container.find(".ranges li.active").text(),u.data("daterangepicker").container.find(".ranges li.active").removeClass("active"),u.data("daterangepicker").container.find('.ranges li[data-range-key="'+c+'"]').addClass("active"),"Custom Range"!==c&&"All Time"!==c&&(s='<span class="wps-date-range">'.concat(c,"</span>")+s,document.querySelector(".js-date-range-picker-btn").classList.add("custom-range")),d.find("span").html(s),u.on("show.daterangepicker",function(t,e){u.data("daterangepicker").container.find(".ranges li.active").removeClass("active"),u.data("daterangepicker").container.find('.ranges li[data-range-key="'+c+'"]').addClass("active")})),u.on("show.daterangepicker",function(t,e){e=e.container,jQuery(e).addClass(t.target.className)}),u.on("apply.daterangepicker",function(t,e){var n=p.find(".js-date-range-picker-input-from").first(),a=p.find(".js-date-range-picker-input-to").first(),e=(n.val(e.startDate.format("YYYY-MM-DD")),a.val(e.endDate.format("YYYY-MM-DD")),u.data("daterangepicker").chosenLabel);d.find("span").html(e),"All Time"!==e?jQuery.ajax({url:k.global.ajax_url,method:"POST",data:{wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_store_date_range",date:{from:n.val(),to:a.val()}},beforeSend:function(){d.addClass("wps-disabled")},complete:function(t){p.submit()}}):p.submit()})),_.length&&(_.daterangepicker({singleDatePicker:!0,showDropdowns:!0,minYear:1998,maxYear:parseInt((new Date).getFullYear()+1),locale:{format:"YYYY-MM-DD"}}),_.on("show.daterangepicker",function(t,e){e=e.container,jQuery(e).addClass(t.target.className)}),_.on("apply.daterangepicker",function(t,e){jQuery(".wps-today-datepicker").submit()}))}),C=function(y){function t(){this.__$emitterPrivate=y({}),this.__$emitterPublic=y({}),this.__instancesLatestArr=[],this.__plugins={},this._env=b}var c={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},o="undefined"!=typeof window?window:null,b={hasTouchCapability:!(!o||!("ontouchstart"in o||o.DocumentTouch&&o.document instanceof o.DocumentTouch||o.navigator.maxTouchPoints)),hasTransitions:function(){if(o){var t=(o.document.body||o.document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[n="transition"])return!0;for(var n=n.charAt(0).toUpperCase()+n.substr(1),a=0;a<e.length;a++)if("string"==typeof t[e[a]+n])return!0}return!1}(),IE:!1,semVer:"4.2.8",window:o};function e(t){this.$container,this.constraints=null,this.__$tooltip,this.__init(t)}function i(n,a){var o=!0;return y.each(n,function(t,e){if(void 0===a[t]||n[t]!==a[t])return o=!1}),o}function l(t){var e=t.attr("id");return(e=e?b.window.document.getElementById(e):null)?e===t[0]:y.contains(b.window.document.body,t[0])}t.prototype={__bridge:function(t,n,a){var e,o;return n[a]||((e=function(){}).prototype=t,(o=new e).__init&&o.__init(n),y.each(t,function(t,e){0!=t.indexOf("__")&&(n[t]?c.debug&&console.log("The "+t+" method of the "+a+" plugin conflicts with another plugin or native methods"):(n[t]=function(){return o[t].apply(o,Array.prototype.slice.apply(arguments))},n[t].bridged=o))}),n[a]=o),this},__setWindow:function(t){return b.window=t,this},_getRuler:function(t){return new e(t)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(t){var n,a,e=this;if("string"==typeof t)return a=null,0<(n=t).indexOf(".")?a=e.__plugins[n]:y.each(e.__plugins,function(t,e){if(e.name.substring(e.name.length-n.length-1)=="."+n)return a=e,!1}),a;if(t.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return(e.__plugins[t.name]=t).core&&e.__bridge(t.core,e,t.name),this},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},instances:function(t){var a=[];return y(t||".tooltipstered").each(function(){var n=y(this),t=n.data("tooltipster-ns");t&&y.each(t,function(t,e){a.push(n.data(e))})}),a},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(t){return y((t?t+" ":"")+".tooltipstered").toArray()},setDefaults:function(t){return y.extend(c,t),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},y.tooltipster=new t,y.Tooltipster=function(t,e){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=y({}),this.__$emitterPublic=y({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(t,e)},y.Tooltipster.prototype={__init:function(t,e){var n,a=this;a._$origin=y(t),a.__options=y.extend(!0,{},c,e),a.__optionsFormat(),!b.IE||b.IE>=a.__options.IEmin?(t=null,void 0===a._$origin.data("tooltipster-initialTitle")&&(t=a._$origin.attr("title"),a._$origin.data("tooltipster-initialTitle",t=void 0===t?null:t)),null!==a.__options.content?a.__contentSet(a.__options.content):(n=(e=a._$origin.attr("data-tooltip-content"))?y(e):n)&&n[0]?a.__contentSet(n.first()):a.__contentSet(t),a._$origin.removeAttr("title").addClass("tooltipstered"),a.__prepareOrigin(),a.__prepareGC(),y.each(a.__options.plugins,function(t,e){a._plug(e)}),b.hasTouchCapability&&y(b.window.document.body).on("touchmove."+a.__namespace+"-triggerOpen",function(t){a._touchRecordEvent(t)}),a._on("created",function(){a.__prepareTooltip()})._on("repositioned",function(t){a.__lastPosition=t.position})):a.__options.disabled=!0},__contentInsert:function(){var t=this,e=t._$tooltip.find(".tooltipster-content"),n=t.__Content;return t._trigger({type:"format",content:t.__Content,format:function(t){n=t}}),"string"!=typeof(n=t.__options.functionFormat?t.__options.functionFormat.call(t,t,{origin:t._$origin[0]},t.__Content):n)||t.__options.contentAsHTML?e.empty().append(n):e.text(n),t},__contentSet:function(t){return t instanceof y&&this.__options.contentCloning&&(t=t.clone(!0)),this.__Content=t,this._trigger({type:"updated",content:t}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var t=this,e=t._$origin,n=t._$origin.is("area"),a=(n&&(a=t._$origin.parent().attr("name"),e=y('img[usemap="#'+a+'"]')),e[0].getBoundingClientRect()),o=y(b.window.document),i=y(b.window),r=e,s={available:{document:null,window:null},document:{size:{height:o.height(),width:o.width()}},window:{scroll:{left:b.window.scrollX||b.window.document.documentElement.scrollLeft,top:b.window.scrollY||b.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:a.bottom-a.top,width:a.right-a.left},usemapImage:n?e[0]:null,windowOffset:{bottom:a.bottom,left:a.left,right:a.right,top:a.top}}};if(n){var o=t._$origin.attr("shape"),c=t._$origin.attr("coords");if(c&&(c=c.split(","),y.map(c,function(t,e){c[e]=parseInt(t)})),"default"!=o)switch(o){case"circle":var l=c[0],d=(d=c[1])-(u=c[2]),l=l-u;s.origin.size.height=2*u,s.origin.size.width=s.origin.size.height,s.origin.windowOffset.left+=l,s.origin.windowOffset.top+=d;break;case"rect":var u=c[0],l=c[1],d=c[2],p=c[3];s.origin.size.height=p-l,s.origin.size.width=d-u,s.origin.windowOffset.left+=u,s.origin.windowOffset.top+=l;break;case"poly":for(var _=0,h=0,f=0,m=0,g="even",w=0;w<c.length;w++)var v=c[w],g="even"==g?(v<(_=f<v&&(f=v,0===w)?f:_)&&(_=v),"odd"):(v<(h=m<v&&(m=v,1==w)?m:h)&&(h=v),"even");s.origin.size.height=m-h,s.origin.size.width=f-_,s.origin.windowOffset.left+=_,s.origin.windowOffset.top+=h}}for(t._trigger({type:"geometry",edit:function(t){s.origin.size.height=t.height,s.origin.windowOffset.left=t.left,s.origin.windowOffset.top=t.top,s.origin.size.width=t.width},geometry:{height:s.origin.size.height,left:s.origin.windowOffset.left,top:s.origin.windowOffset.top,width:s.origin.size.width}}),s.origin.windowOffset.right=s.origin.windowOffset.left+s.origin.size.width,s.origin.windowOffset.bottom=s.origin.windowOffset.top+s.origin.size.height,s.origin.offset.left=s.origin.windowOffset.left+s.window.scroll.left,s.origin.offset.top=s.origin.windowOffset.top+s.window.scroll.top,s.origin.offset.bottom=s.origin.offset.top+s.origin.size.height,s.origin.offset.right=s.origin.offset.left+s.origin.size.width,s.available.document={bottom:{height:s.document.size.height-s.origin.offset.bottom,width:s.document.size.width},left:{height:s.document.size.height,width:s.origin.offset.left},right:{height:s.document.size.height,width:s.document.size.width-s.origin.offset.right},top:{height:s.origin.offset.top,width:s.document.size.width}},s.available.window={bottom:{height:Math.max(s.window.size.height-Math.max(s.origin.windowOffset.bottom,0),0),width:s.window.size.width},left:{height:s.window.size.height,width:Math.max(s.origin.windowOffset.left,0)},right:{height:s.window.size.height,width:Math.max(s.window.size.width-Math.max(s.origin.windowOffset.right,0),0)},top:{height:Math.max(s.origin.windowOffset.top,0),width:s.window.size.width}};"html"!=r[0].tagName.toLowerCase();){if("fixed"==r.css("position")){s.origin.fixedLineage=!0;break}r=r.parent()}return s},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=y(b.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=y(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var t=this;return t.__options.selfDestruction?t.__garbageCollector=setInterval(function(){var n=(new Date).getTime();t.__touchEvents=y.grep(t.__touchEvents,function(t,e){return 6e4<n-t.time}),l(t._$origin)||t.close(function(){t.destroy()})},2e4):clearInterval(t.__garbageCollector),t},__prepareOrigin:function(){var t,e=this;return e._$origin.off("."+e.__namespace+"-triggerOpen"),b.hasTouchCapability&&e._$origin.on("touchstart."+e.__namespace+"-triggerOpen touchend."+e.__namespace+"-triggerOpen touchcancel."+e.__namespace+"-triggerOpen",function(t){e._touchRecordEvent(t)}),(e.__options.triggerOpen.click||e.__options.triggerOpen.tap&&b.hasTouchCapability)&&(t="",e.__options.triggerOpen.click&&(t+="click."+e.__namespace+"-triggerOpen "),e.__options.triggerOpen.tap&&b.hasTouchCapability&&(t+="touchend."+e.__namespace+"-triggerOpen"),e._$origin.on(t,function(t){e._touchIsMeaningfulEvent(t)&&e._open(t)})),(e.__options.triggerOpen.mouseenter||e.__options.triggerOpen.touchstart&&b.hasTouchCapability)&&(t="",e.__options.triggerOpen.mouseenter&&(t+="mouseenter."+e.__namespace+"-triggerOpen "),e.__options.triggerOpen.touchstart&&b.hasTouchCapability&&(t+="touchstart."+e.__namespace+"-triggerOpen"),e._$origin.on(t,function(t){!e._touchIsTouchEvent(t)&&e._touchIsEmulatedEvent(t)||(e.__pointerIsOverOrigin=!0,e._openShortly(t))})),(e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&b.hasTouchCapability)&&(t="",e.__options.triggerClose.mouseleave&&(t+="mouseleave."+e.__namespace+"-triggerOpen "),e.__options.triggerClose.touchleave&&b.hasTouchCapability&&(t+="touchend."+e.__namespace+"-triggerOpen touchcancel."+e.__namespace+"-triggerOpen"),e._$origin.on(t,function(t){e._touchIsMeaningfulEvent(t)&&(e.__pointerIsOverOrigin=!1)})),e},__prepareTooltip:function(){var n=this,t=n.__options.interactive?"auto":"";return n._$tooltip.attr("id",n.__namespace).css({"pointer-events":t,zIndex:n.__options.zIndex}),y.each(n.__previousThemes,function(t,e){n._$tooltip.removeClass(e)}),y.each(n.__options.theme,function(t,e){n._$tooltip.addClass(e)}),n.__previousThemes=y.merge([],n.__options.theme),n},__scrollHandler:function(t){var i,r,e,n,a=this;return a.__options.triggerClose.scroll?a._close(t):l(a._$origin)&&l(a._$tooltip)&&(i=null,t.target===b.window.document?a.__Geometry.origin.fixedLineage||a.__options.repositionOnScroll&&a.reposition(t):(i=a.__geometry(),r=!1,"fixed"!=a._$origin.css("position")&&a.__$originParents.each(function(t,e){var n=y(e),a=n.css("overflow-x"),o=n.css("overflow-y");if("visible"!=a||"visible"!=o){if(e=e.getBoundingClientRect(),"visible"!=a&&(i.origin.windowOffset.left<e.left||i.origin.windowOffset.right>e.right))return!(r=!0);if("visible"!=o&&(i.origin.windowOffset.top<e.top||i.origin.windowOffset.bottom>e.bottom))return!(r=!0)}if("fixed"==n.css("position"))return!1}),r?a._$tooltip.css("visibility","hidden"):(a._$tooltip.css("visibility","visible"),a.__options.repositionOnScroll?a.reposition(t):(e=i.origin.offset.left-a.__Geometry.origin.offset.left,n=i.origin.offset.top-a.__Geometry.origin.offset.top,a._$tooltip.css({left:a.__lastPosition.coord.left+e,top:a.__lastPosition.coord.top+n})))),a._trigger({type:"scroll",event:t,geo:i})),a},__stateSet:function(t){return this.__state=t,this._trigger({type:"state",state:t}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,y.each(this.__timeouts.close,function(t,e){clearTimeout(e)}),this.__timeouts.close=[],this},__trackerStart:function(){var n=this,a=n._$tooltip.find(".tooltipster-content");return n.__options.trackTooltip&&(n.__contentBcr=a[0].getBoundingClientRect()),n.__tracker=setInterval(function(){var t,e;l(n._$origin)&&l(n._$tooltip)?(n.__options.trackOrigin&&(t=!1,i((e=n.__geometry()).origin.size,n.__Geometry.origin.size)&&(n.__Geometry.origin.fixedLineage?i(e.origin.windowOffset,n.__Geometry.origin.windowOffset)&&(t=!0):i(e.origin.offset,n.__Geometry.origin.offset)&&(t=!0)),t||(n.__options.triggerClose.mouseleave?n._close():n.reposition())),!n.__options.trackTooltip||(e=a[0].getBoundingClientRect()).height===n.__contentBcr.height&&e.width===n.__contentBcr.width||(n.reposition(),n.__contentBcr=e)):n._close()},n.__options.trackerInterval),n},_close:function(n,t,e){var a,o=this,i=!0;return o._trigger({type:"close",event:n,stop:function(){i=!1}}),(i||e)&&(t&&o.__callbacks.close.push(t),o.__callbacks.open=[],o.__timeoutsClear(),a=function(){y.each(o.__callbacks.close,function(t,e){e.call(o,o,{event:n,origin:o._$origin[0]})}),o.__callbacks.close=[]},"closed"!=o.__state?(e=!0,t=(new Date).getTime()+o.__options.animationDuration[1],(e=!("disappearing"==o.__state&&t>o.__closingTime&&0<o.__options.animationDuration[1])&&e)&&(o.__closingTime=t,"disappearing"!=o.__state&&o.__stateSet("disappearing"),e=function(){clearInterval(o.__tracker),o._trigger({type:"closing",event:n}),o._$tooltip.off("."+o.__namespace+"-triggerClose").removeClass("tooltipster-dying"),y(b.window).off("."+o.__namespace+"-triggerClose"),o.__$originParents.each(function(t,e){y(e).off("scroll."+o.__namespace+"-triggerClose")}),o.__$originParents=null,y(b.window.document.body).off("."+o.__namespace+"-triggerClose"),o._$origin.off("."+o.__namespace+"-triggerClose"),o._off("dismissable"),o.__stateSet("closed"),o._trigger({type:"after",event:n}),o.__options.functionAfter&&o.__options.functionAfter.call(o,o,{event:n,origin:o._$origin[0]}),a()},b.hasTransitions?(o._$tooltip.css({"-moz-animation-duration":o.__options.animationDuration[1]+"ms","-ms-animation-duration":o.__options.animationDuration[1]+"ms","-o-animation-duration":o.__options.animationDuration[1]+"ms","-webkit-animation-duration":o.__options.animationDuration[1]+"ms","animation-duration":o.__options.animationDuration[1]+"ms","transition-duration":o.__options.animationDuration[1]+"ms"}),o._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),0<o.__options.animationDuration[1]&&o._$tooltip.delay(o.__options.animationDuration[1]),o._$tooltip.queue(e)):o._$tooltip.stop().fadeOut(o.__options.animationDuration[1],e))):a()),o},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(t,e){var n,a,o,i,r,s=this;return s.__destroying||l(s._$origin)&&s.__enabled&&!(n=!0)!==(n="closed"==s.__state&&(s._trigger({type:"before",event:t,stop:function(){n=!1}}),n)&&s.__options.functionBefore?s.__options.functionBefore.call(s,s,{event:t,origin:s._$origin[0]}):n)&&null!==s.__Content&&(e&&s.__callbacks.open.push(e),s.__callbacks.close=[],s.__timeoutsClear(),o=function(){"stable"!=s.__state&&s.__stateSet("stable"),y.each(s.__callbacks.open,function(t,e){e.call(s,s,{origin:s._$origin[0],tooltip:s._$tooltip[0]})}),s.__callbacks.open=[]},"closed"!==s.__state?(a=0,"disappearing"===s.__state?(s.__stateSet("appearing"),b.hasTransitions?(s._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),0<s.__options.animationDuration[0]&&s._$tooltip.delay(s.__options.animationDuration[0]),s._$tooltip.queue(o)):s._$tooltip.stop().fadeIn(o)):"stable"==s.__state&&o()):(s.__stateSet("appearing"),a=s.__options.animationDuration[0],s.__contentInsert(),s.reposition(t,!0),b.hasTransitions?(s._$tooltip.addClass("tooltipster-"+s.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":s.__options.animationDuration[0]+"ms","-ms-animation-duration":s.__options.animationDuration[0]+"ms","-o-animation-duration":s.__options.animationDuration[0]+"ms","-webkit-animation-duration":s.__options.animationDuration[0]+"ms","animation-duration":s.__options.animationDuration[0]+"ms","transition-duration":s.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=s.__state&&(s._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),0<s.__options.animationDuration[0]&&s._$tooltip.delay(s.__options.animationDuration[0]),s._$tooltip.queue(o))},0)):s._$tooltip.css("display","none").fadeIn(s.__options.animationDuration[0],o),s.__trackerStart(),y(b.window).on("resize."+s.__namespace+"-triggerClose",function(t){var e=y(document.activeElement);(e.is("input")||e.is("textarea"))&&y.contains(s._$tooltip[0],e[0])||s.reposition(t)}).on("scroll."+s.__namespace+"-triggerClose",function(t){s.__scrollHandler(t)}),s.__$originParents=s._$origin.parents(),s.__$originParents.each(function(t,e){y(e).on("scroll."+s.__namespace+"-triggerClose",function(t){s.__scrollHandler(t)})}),(s.__options.triggerClose.mouseleave||s.__options.triggerClose.touchleave&&b.hasTouchCapability)&&(s._on("dismissable",function(t){t.dismissable?t.delay?(r=setTimeout(function(){s._close(t.event)},t.delay),s.__timeouts.close.push(r)):s._close(t):clearTimeout(r)}),e=s._$origin,i=t="",r=null,s.__options.interactive&&(e=e.add(s._$tooltip)),s.__options.triggerClose.mouseleave&&(t+="mouseenter."+s.__namespace+"-triggerClose ",i+="mouseleave."+s.__namespace+"-triggerClose "),s.__options.triggerClose.touchleave&&b.hasTouchCapability&&(t+="touchstart."+s.__namespace+"-triggerClose",i+="touchend."+s.__namespace+"-triggerClose touchcancel."+s.__namespace+"-triggerClose"),e.on(i,function(t){var e;!s._touchIsTouchEvent(t)&&s._touchIsEmulatedEvent(t)||(e="mouseleave"==t.type?s.__options.delay:s.__options.delayTouch,s._trigger({delay:e[1],dismissable:!0,event:t,type:"dismissable"}))}).on(t,function(t){!s._touchIsTouchEvent(t)&&s._touchIsEmulatedEvent(t)||s._trigger({dismissable:!1,event:t,type:"dismissable"})})),s.__options.triggerClose.originClick&&s._$origin.on("click."+s.__namespace+"-triggerClose",function(t){s._touchIsTouchEvent(t)||s._touchIsEmulatedEvent(t)||s._close(t)}),(s.__options.triggerClose.click||s.__options.triggerClose.tap&&b.hasTouchCapability)&&setTimeout(function(){var t,e;"closed"!=s.__state&&(t="",e=y(b.window.document.body),s.__options.triggerClose.click&&(t+="click."+s.__namespace+"-triggerClose "),s.__options.triggerClose.tap&&b.hasTouchCapability&&(t+="touchend."+s.__namespace+"-triggerClose"),e.on(t,function(t){s._touchIsMeaningfulEvent(t)&&(s._touchRecordEvent(t),s.__options.interactive&&y.contains(s._$tooltip[0],t.target)||s._close(t))}),s.__options.triggerClose.tap)&&b.hasTouchCapability&&e.on("touchstart."+s.__namespace+"-triggerClose",function(t){s._touchRecordEvent(t)})},0),s._trigger("ready"),s.__options.functionReady&&s.__options.functionReady.call(s,s,{origin:s._$origin[0],tooltip:s._$tooltip[0]})),0<s.__options.timer)&&(r=setTimeout(function(){s._close()},s.__options.timer+a),s.__timeouts.close.push(r)),s},_openShortly:function(t){var e,n=this,a=!0;return"stable"==n.__state||"appearing"==n.__state||n.__timeouts.open||(n._trigger({type:"start",event:t,stop:function(){a=!1}}),a&&((e=0==t.type.indexOf("touch")?n.__options.delayTouch:n.__options.delay)[0]?n.__timeouts.open=setTimeout(function(){n.__timeouts.open=null,n.__pointerIsOverOrigin&&n._touchIsMeaningfulEvent(t)?(n._trigger("startend"),n._open(t)):n._trigger("startcancel")},e[0]):(n._trigger("startend"),n._open(t)))),n},_optionsExtract:function(t,e){var a=this,n=y.extend(!0,{},e),o=a.__options[t];return o||(o={},y.each(e,function(t,e){var n=a.__options[t];void 0!==n&&(o[t]=n)})),y.each(n,function(t,e){void 0!==o[t]&&("object"!=_typeof(e)||e instanceof Array||null==e||"object"!=_typeof(o[t])||o[t]instanceof Array||null==o[t]?n[t]=o[t]:y.extend(n[t],o[t]))}),n},_plug:function(t){var e=y.tooltipster._plugin(t);if(e)return e.instance&&y.tooltipster.__bridge(e.instance,this,e.name),this;throw new Error('The "'+t+'" plugin is not defined')},_touchIsEmulatedEvent:function(t){for(var e=!1,n=(new Date).getTime(),a=this.__touchEvents.length-1;0<=a;a--){var o=this.__touchEvents[a];if(!(n-o.time<500))break;o.target===t.target&&(e=!0)}return e},_touchIsMeaningfulEvent:function(t){return this._touchIsTouchEvent(t)&&!this._touchSwiped(t.target)||!this._touchIsTouchEvent(t)&&!this._touchIsEmulatedEvent(t)},_touchIsTouchEvent:function(t){return 0==t.type.indexOf("touch")},_touchRecordEvent:function(t){return this._touchIsTouchEvent(t)&&(t.time=(new Date).getTime(),this.__touchEvents.push(t)),this},_touchSwiped:function(t){for(var e=!1,n=this.__touchEvents.length-1;0<=n;n--){var a=this.__touchEvents[n];if("touchmove"==a.type){e=!0;break}if("touchstart"==a.type&&t===a.target)break}return e},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),t[0].instance=this,t[0].origin=this._$origin?this._$origin[0]:null,t[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),y.tooltipster._trigger.apply(y.tooltipster,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},_unplug:function(n){var t,a=this;return a[n]&&((t=y.tooltipster._plugin(n)).instance&&y.each(t.instance,function(t,e){a[t]&&a[t].bridged===a[n]&&delete a[t]}),a[n].__destroy&&a[n].__destroy(),delete a[n]),a},close:function(t){return this.__destroyed?this.__destroyError():this._close(null,t),this},content:function(t){var e,n=this;return void 0===t?n.__Content:(n.__destroyed?n.__destroyError():(n.__contentSet(t),null!==n.__Content?"closed"!==n.__state&&(n.__contentInsert(),n.reposition(),n.__options.updateAnimation)&&(b.hasTransitions?(e=n.__options.updateAnimation,n._$tooltip.addClass("tooltipster-update-"+e),setTimeout(function(){"closed"!=n.__state&&n._$tooltip.removeClass("tooltipster-update-"+e)},1e3)):n._$tooltip.fadeTo(200,.5,function(){"closed"!=n.__state&&n._$tooltip.fadeTo(200,1)})):n._close()),n)},destroy:function(){var t,e,n=this;return n.__destroyed?n.__destroyError():("closed"!=n.__state?n.option("animationDuration",0)._close(null,null,!0):n.__timeoutsClear(),n._trigger("destroy"),n.__destroyed=!0,n._$origin.removeData(n.__namespace).off("."+n.__namespace+"-triggerOpen"),y(b.window.document.body).off("."+n.__namespace+"-triggerOpen"),(t=n._$origin.data("tooltipster-ns"))&&(1===t.length?(e=null,"previous"==n.__options.restoration?e=n._$origin.data("tooltipster-initialTitle"):"current"==n.__options.restoration&&(e="string"==typeof n.__Content?n.__Content:y("<div></div>").append(n.__Content).html()),e&&n._$origin.attr("title",e),n._$origin.removeClass("tooltipstered"),n._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(t=y.grep(t,function(t,e){return t!==n.__namespace}),n._$origin.data("tooltipster-ns",t))),n._trigger("destroyed"),n._off(),n.off(),n.__Content=null,n.__$emitterPrivate=null,n.__$emitterPublic=null,n.__options.parent=null,n._$origin=null,n._$tooltip=null,y.tooltipster.__instancesLatestArr=y.grep(y.tooltipster.__instancesLatestArr,function(t,e){return n!==t}),clearInterval(n.__garbageCollector)),n},disable:function(){return this.__destroyed?this.__destroyError():(this._close(),this.__enabled=!1),this},elementOrigin:function(){if(!this.__destroyed)return this._$origin[0];this.__destroyError()},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(t){return this.close(t)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(t){return this.__destroyed?this.__destroyError():this._open(null,t),this},option:function(t,e){return void 0===e?this.__options[t]:(this.__destroyed?this.__destroyError():(this.__options[t]=e,this.__optionsFormat(),0<=y.inArray(t,["trigger","triggerClose","triggerOpen"])&&this.__prepareOrigin(),"selfDestruction"===t&&this.__prepareGC()),this)},reposition:function(t,e){var n=this;return n.__destroyed?n.__destroyError():"closed"!=n.__state&&l(n._$origin)&&(e||l(n._$tooltip))&&(e||n._$tooltip.detach(),n.__Geometry=n.__geometry(),n._trigger({type:"reposition",event:t,helper:{geo:n.__Geometry}})),n},show:function(t){return this.open(t)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},y.fn.tooltipster=function(){var n,o,t,e,a,i,r=Array.prototype.slice.apply(arguments),s="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";return 0===this.length?this:"string"==typeof r[0]?(n="#*$~&",this.each(function(){var t=y(this).data("tooltipster-ns");if(!(t=t?y(this).data(t[0]):null))throw new Error("You called Tooltipster's \""+r[0]+'" method on an uninitialized element');if("function"!=typeof t[r[0]])throw new Error('Unknown method "'+r[0]+'"');1<this.length&&"content"==r[0]&&(r[1]instanceof y||"object"==_typeof(r[1])&&null!=r[1]&&r[1].tagName)&&!t.__options.contentCloning&&t.__options.debug&&console.log(s);var e=t[r[0]](r[1],r[2]);if(e!==t||"instance"===r[0])return n=e,!1}),"#*$~&"!==n?n:this):(y.tooltipster.__instancesLatestArr=[],t=r[0]&&void 0!==r[0].multiple,o=t&&r[0].multiple||!t&&c.multiple,t=(t=r[0]&&void 0!==r[0].content)&&r[0].content||!t&&c.content,e=(e=r[0]&&void 0!==r[0].contentCloning)&&r[0].contentCloning||!e&&c.contentCloning,a=r[0]&&void 0!==r[0].debug,i=a&&r[0].debug||!a&&c.debug,1<this.length&&(t instanceof y||"object"==_typeof(t)&&null!=t&&t.tagName)&&!e&&i&&console.log(s),this.each(function(){var t=!1,e=y(this),n=e.data("tooltipster-ns"),a=null;!n||o?t=!0:i&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)),t&&(a=new y.Tooltipster(this,r[0]),(n=n||[]).push(a.__namespace),e.data("tooltipster-ns",n),e.data(a.__namespace,a),a.__options.functionInit&&a.__options.functionInit.call(a,a,{origin:this}),a._trigger("init")),y.tooltipster.__instancesLatestArr.push(a)}),this)},e.prototype={__init:function(t){this.__$tooltip=t,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=y('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(b.window.document.body)},__forceRedraw:function(){var t=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(t)},constrain:function(t,e){return this.constraints={width:t,height:e},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:t}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var t,e,n,a=this.__$tooltip[0].getBoundingClientRect(),o={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};return this.constraints&&(t=this.__$tooltip.find(".tooltipster-content"),n=this.__$tooltip.outerHeight(),e=t[0].getBoundingClientRect(),n={height:n<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=t[0].scrollWidth-1},o.fits=n.height&&n.width),b.IE&&b.IE<=11&&o.size.width!==b.window.document.documentElement.clientWidth&&(o.size.width=Math.ceil(o.size.width)+1),o}};var n=navigator.userAgent.toLowerCase(),a=(-1!=n.indexOf("msie")?b.IE=parseInt(n.split("msie")[1]):-1!==n.toLowerCase().indexOf("trident")&&-1!==n.indexOf(" rv:11")?b.IE=11:-1!=n.toLowerCase().indexOf("edge/")&&(b.IE=parseInt(n.toLowerCase().split("edge/")[1])),"tooltipster.sideTip");return y.tooltipster._plugin({name:a,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(t){var e=this;e.__instance=t,e.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),e.__previousState="closed",e.__options,e.__optionsFormat(),e.__instance._on("state."+e.__namespace,function(t){"closed"==t.state?e.__close():"appearing"==t.state&&"closed"==e.__previousState&&e.__create(),e.__previousState=t.state}),e.__instance._on("options."+e.__namespace,function(){e.__optionsFormat()}),e.__instance._on("reposition."+e.__namespace,function(t){e.__reposition(t.event,t.helper)})},__close:function(){this.__instance.content()instanceof y&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var t=y('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||t.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&t.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&t.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=t,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var t=this;t.__options=t.__instance._optionsExtract(a,t.__defaults()),t.__options.position&&(t.__options.side=t.__options.position),"object"!=_typeof(t.__options.distance)&&(t.__options.distance=[t.__options.distance]),t.__options.distance.length<4&&(void 0===t.__options.distance[1]&&(t.__options.distance[1]=t.__options.distance[0]),void 0===t.__options.distance[2]&&(t.__options.distance[2]=t.__options.distance[0]),void 0===t.__options.distance[3])&&(t.__options.distance[3]=t.__options.distance[1]),t.__options.distance={top:t.__options.distance[0],right:t.__options.distance[1],bottom:t.__options.distance[2],left:t.__options.distance[3]},"string"==typeof t.__options.side&&(t.__options.side=[t.__options.side,{top:"bottom",right:"left",bottom:"top",left:"right"}[t.__options.side]],"left"==t.__options.side[0]||"right"==t.__options.side[0]?t.__options.side.push("top","bottom"):t.__options.side.push("right","left")),6===y.tooltipster._env.IE&&!0!==t.__options.arrow&&(t.__options.arrow=!1)},__reposition:function(c,l){var e,d=this,u=d.__targetFind(l),p=[],n=(d.__instance._$tooltip.detach(),d.__instance._$tooltip.clone()),_=y.tooltipster._getRuler(n),h=!1;switch((a=d.__instance.option("animation"))&&n.removeClass("tooltipster-"+a),y.each(["window","document"],function(t,o){var i=null;if(d.__instance._trigger({container:o,helper:l,satisfied:h,takeTest:function(t){i=t},results:p,type:"positionTest"}),1==i||0!=i&&0==h&&("window"!=o||d.__options.viewportAware))for(t=0;t<d.__options.side.length;t++){var r={horizontal:0,vertical:0},s=d.__options.side[t];"top"==s||"bottom"==s?r.vertical=d.__options.distance[s]:r.horizontal=d.__options.distance[s],d.__sideChange(n,s),y.each(["natural","constrained"],function(t,e){if(i=null,d.__instance._trigger({container:o,event:c,helper:l,mode:e,results:p,satisfied:h,side:s,takeTest:function(t){i=t},type:"positionTest"}),1==i||0!=i&&0==h){var n={container:o,distance:r,fits:null,mode:e,outerSize:null,side:s,size:null,target:u[s],whole:null},a=("natural"==e?_.free():_.constrain(l.geo.available[o][s].width-r.horizontal,l.geo.available[o][s].height-r.vertical)).measure();if(n.size=a.size,n.outerSize={height:a.size.height+r.vertical,width:a.size.width+r.horizontal},"natural"==e?l.geo.available[o][s].width>=n.outerSize.width&&l.geo.available[o][s].height>=n.outerSize.height?n.fits=!0:n.fits=!1:n.fits=a.fits,"window"==o&&(n.whole=!!n.fits&&("top"==s||"bottom"==s?l.geo.origin.windowOffset.right>=d.__options.minIntersection&&l.geo.window.size.width-l.geo.origin.windowOffset.left>=d.__options.minIntersection:l.geo.origin.windowOffset.bottom>=d.__options.minIntersection&&l.geo.window.size.height-l.geo.origin.windowOffset.top>=d.__options.minIntersection)),p.push(n),n.whole)h=!0;else if("natural"==n.mode&&(n.fits||n.size.width<=l.geo.available[o][s].width))return!1}})}}),d.__instance._trigger({edit:function(t){p=t},event:c,helper:l,results:p,type:"positionTested"}),p.sort(function(t,e){var n,a;return t.whole&&!e.whole?-1:!t.whole&&e.whole?1:t.whole&&e.whole?(n=d.__options.side.indexOf(t.side))<(a=d.__options.side.indexOf(e.side))||!(a<n)&&"natural"==t.mode?-1:1:t.fits&&!e.fits?-1:!t.fits&&e.fits?1:t.fits&&e.fits?(n=d.__options.side.indexOf(t.side))<(a=d.__options.side.indexOf(e.side))||!(a<n)&&"natural"==t.mode?-1:1:"document"==t.container&&"bottom"==t.side&&"natural"==t.mode?-1:1}),(e=p[0]).coord={},e.side){case"left":case"right":e.coord.top=Math.floor(e.target-e.size.height/2);break;case"bottom":case"top":e.coord.left=Math.floor(e.target-e.size.width/2)}switch(e.side){case"left":e.coord.left=l.geo.origin.windowOffset.left-e.outerSize.width;break;case"right":e.coord.left=l.geo.origin.windowOffset.right+e.distance.horizontal;break;case"top":e.coord.top=l.geo.origin.windowOffset.top-e.outerSize.height;break;case"bottom":e.coord.top=l.geo.origin.windowOffset.bottom+e.distance.vertical}"window"==e.container?"top"==e.side||"bottom"==e.side?e.coord.left<0?0<=l.geo.origin.windowOffset.right-this.__options.minIntersection?e.coord.left=0:e.coord.left=l.geo.origin.windowOffset.right-this.__options.minIntersection-1:e.coord.left>l.geo.window.size.width-e.size.width&&(l.geo.origin.windowOffset.left+this.__options.minIntersection<=l.geo.window.size.width?e.coord.left=l.geo.window.size.width-e.size.width:e.coord.left=l.geo.origin.windowOffset.left+this.__options.minIntersection+1-e.size.width):e.coord.top<0?0<=l.geo.origin.windowOffset.bottom-this.__options.minIntersection?e.coord.top=0:e.coord.top=l.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:e.coord.top>l.geo.window.size.height-e.size.height&&(l.geo.origin.windowOffset.top+this.__options.minIntersection<=l.geo.window.size.height?e.coord.top=l.geo.window.size.height-e.size.height:e.coord.top=l.geo.origin.windowOffset.top+this.__options.minIntersection+1-e.size.height):(e.coord.left>l.geo.window.size.width-e.size.width&&(e.coord.left=l.geo.window.size.width-e.size.width),e.coord.left<0&&(e.coord.left=0)),d.__sideChange(n,e.side),l.tooltipClone=n[0],l.tooltipParent=d.__instance.option("parent").parent[0],l.mode=e.mode,l.whole=e.whole,l.origin=d.__instance._$origin[0],l.tooltip=d.__instance._$tooltip[0],delete e.container,delete e.fits,delete e.mode,delete e.outerSize,delete e.whole,e.distance=e.distance.horizontal||e.distance.vertical;var t,a=y.extend(!0,{},e);d.__instance._trigger({edit:function(t){e=t},event:c,helper:l,position:a,type:"position"}),d.__options.functionPosition&&(a=d.__options.functionPosition.call(d,d.__instance,l,a))&&(e=a),_.destroy(),a="top"==e.side||"bottom"==e.side?(t={prop:"left",val:e.target-e.coord.left},e.size.width-this.__options.minIntersection):(t={prop:"top",val:e.target-e.coord.top},e.size.height-this.__options.minIntersection),t.val<this.__options.minIntersection?t.val=this.__options.minIntersection:t.val>a&&(t.val=a),a=l.geo.origin.fixedLineage?l.geo.origin.windowOffset:{left:l.geo.origin.windowOffset.left+l.geo.window.scroll.left,top:l.geo.origin.windowOffset.top+l.geo.window.scroll.top},e.coord={left:a.left+(e.coord.left-l.geo.origin.windowOffset.left),top:a.top+(e.coord.top-l.geo.origin.windowOffset.top)},d.__sideChange(d.__instance._$tooltip,e.side),l.geo.origin.fixedLineage?d.__instance._$tooltip.css("position","fixed"):d.__instance._$tooltip.css("position",""),d.__instance._$tooltip.css({left:e.coord.left,top:e.coord.top,height:e.size.height,width:e.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(t.prop,t.val),d.__instance._$tooltip.appendTo(d.__instance.option("parent")),d.__instance._trigger({type:"repositioned",event:c,position:e})},__sideChange:function(t,e){t.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+e)},__targetFind:function(t){var e={},n=this.__instance._$origin[0].getClientRects();return 1<n.length&&1==this.__instance._$origin.css("opacity")&&(this.__instance._$origin.css("opacity",.99),n=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1)),n.length<2?(e.top=Math.floor(t.geo.origin.windowOffset.left+t.geo.origin.size.width/2),e.bottom=e.top,e.left=Math.floor(t.geo.origin.windowOffset.top+t.geo.origin.size.height/2),e.right=e.left):(t=n[0],e.top=Math.floor(t.left+(t.right-t.left)/2),t=2<n.length?n[Math.ceil(n.length/2)-1]:n[0],e.right=Math.floor(t.top+(t.bottom-t.top)/2),t=n[n.length-1],e.bottom=Math.floor(t.left+(t.right-t.left)/2),t=2<n.length?n[Math.ceil((n.length+1)/2)-1]:n[n.length-1],e.left=Math.floor(t.top+(t.bottom-t.top)/2)),e}}}),y},"function"==typeof define&&define.amd?define(["jquery"],C):"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=C(require("jquery")):C(jQuery);var a,k={},o=(k.global="undefined"!=typeof wps_global?wps_global:[],k._=function(t){return t in this.global.i18n?this.global.i18n[t]:""},k.is_active=function(t){return 1===k.global.options[t]},k.ajax_queue={key:"wp-statistics",time:400},k.ajaxQ=function(a,o,e,i){var t=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"GET",r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];!1!==a&&"metabox"!==a||(a=k.global.meta_box_api),o.wps_nonce=k.global.rest_api_nonce,t={url:a,type:t,dataType:"json",crossDomain:!0,cache:!1,data:o,success:function(t){a===k.global.meta_box_api&&!0===r?(t.no_data?jQuery(k.meta_box_inner(o.name)).empty().html(k.no_meta_box_data()):(jQuery(k.meta_box_inner(o.name)).empty().html(k[e].view(t)),k[e].meta_box_init&&setTimeout(function(){k[e].meta_box_init(t)},150)),!k.is_active("overview_page")&&"index.php"!==k.global.page.file||k.meta_box_footer(o.name,t)):k[e](t)},error:function(t,e,n){a===k.global.meta_box_api&&!0===r?jQuery(k.meta_box_inner(o.name)).empty().html(k[i](t.responseText)):k[i](t.responseText)}},a===k.global.meta_box_api&&(t.beforeSend=function(t){t.setRequestHeader("Access-Control-Allow-Origin","*")}),jQuery.ajaxq(k.ajax_queue.key,t)},k.placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return'<div class="wps-ph-item"><div class="wps-ph-col-12">'.concat(k.placeholder_content("picture"),"").concat(k.placeholder_content("line"),"</div>")+(!1!==t?t:"")+"</div>"},k.line_placeholder=function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,e='<div class="wps-ph-item">',n=0;n<t;n++)e+='<div class="wps-ph-col-12"> <div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div></div>';return e+"</div>"},k.circle_placeholder=function(){return'<div class="wps-ph-item"> '.concat(k.placeholder_content("circle"),"</div>")},k.rectangle_placeholder=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return'<div class="wps-ph-item'+(0<t.length?" "+t:"")+'"><div class="wps-ph-col-12">'.concat(k.placeholder_content("picture"),"</div></div>")},k.placeholder_content=function(){var t="";switch(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"line"){case"picture":t='<div class="wps-ph-picture"></div>';break;case"line":t='<div class="wps-ph-row"><div class="wps-ph-col-6 big"></div><div class="wps-ph-col-4 empty big"></div><div class="wps-ph-col-2 big"></div><div class="wps-ph-col-4"></div><div class="wps-ph-col-8 empty"></div><div class="wps-ph-col-6"></div><div class="wps-ph-col-6 empty"></div><div class="wps-ph-col-12"></div> </div>';break;case"circle":t='<div class="wps-ph-col-2"></div><div class="wps-ph-col-8"><div class="wps-ph-avatar"></div></div>'}return t},k.exist_tag=function(t){return jQuery(t).length},k.date_picker=function(){var t=jQuery("input[data-wps-date-picker]");t.length&&(t.daterangepicker({singleDatePicker:!0,showDropdowns:!0,minYear:1998,drops:"up",opens:document.getElementById("TB_window")?"center":"right",maxYear:parseInt((new Date).getFullYear()+1),locale:{format:"YYYY-MM-DD"}}),t.on("show.daterangepicker",function(t,e){e=e.container,jQuery(e).addClass(t.target.className)}))},k.formatNumber=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if(null===t)return null;if(t=parseFloat(t.toString().trim().replace(/[, ]/g,"")),isNaN(t))return null;if(0===t)return"0";e=!e||e<0?0:e;var n=parseInt(t).toPrecision(2).split("e");return((t=(n=1===n.length?0:Math.floor(Math.min(n[1].slice(1),14)/3))<1?t.toFixed(0+e):(t/Math.pow(10,3*n)).toFixed(1+e))<0?t:Math.abs(t))+["","K","M","B","T"][n]},k.select2=function(){jQuery("select[data-type-show=select2]").select2()},jQuery(".wps-select2")),t=jQuery("body"),n=jQuery(".wps-dropdown"),Y=(o.length&&(C=jQuery(".wps-filter-page"),O=jQuery(".wps-filter-visitor"),a=t.hasClass("rtl")?"rtl":"ltr",t=C.length?C:O,j=function(t,n){o.select2({dropdownParent:t,dir:a,dropdownAutoWidth:!0,dropdownCssClass:"wps-select2-filter-dropdown",minimumInputLength:1,ajax:{delay:500,url:k.global.ajax_url,dataType:"json",data:function(t){var e,t={wps_nonce:k.global.rest_api_nonce,search:t.term,action:n,paged:t.page||1};return k.isset(k.global,"request_params")&&((e=k.global.request_params).author_id&&(t.author_id=e.author_id),e.page&&(t.page=e.page),e.pt&&(t.post_type=e.pt),e.pid)&&(t.post_id=e.pid),t},processResults:function(t){return t&&Array.isArray(t.results)?{results:t.results.map(function(t){return{id:t.id,text:t.text}}),pagination:{more:!1}}:(console.error("Expected an array of results but got:",t),{results:[]})},error:function(t,e,n){console.error("AJAX request error:",e,n)}}})},o.select2({dropdownParent:t,dir:a,dropdownAutoWidth:!0,dropdownCssClass:"wps-select2-filter-dropdown"}),o.on("select2:open",function(){return n.addClass("active")}),o.on("select2:close",function(){return n.removeClass("active")}),o.on("change",function(){var t=jQuery(this).find("option:selected").val();t&&(window.location.href=t)}),C.length&&(j(C,"wp_statistics_get_page_filter_items"),C.on("click",function(){return o.select2("open")})),O.length)&&(j(O,"wp_statistics_search_visitors"),O.on("click",function(){return o.select2("open")})),k.tooltip=function(){jQuery(".wps-tooltip").tooltipster({theme:"tooltipster-flat",contentCloning:!0}),jQuery("body").on("mouseenter touchstart",".wps-tooltip:not(.tooltipstered)",function(){e(this).tooltipster({theme:"tooltipster-flat"}).tooltipster("open")})},k.tooltip(),k.redirect=function(t){window.location.replace(t)},k.line_chart=function(t,e,n,a,o){t=document.getElementById(t).getContext("2d"),k.is_active("rtl")&&(Chart.defaults.global={defaultFontFamily:"Tahoma"}),n={type:"line",data:{labels:n,datasets:a},options:{responsive:!0,legend:{position:"bottom"},animation:{duration:1500},title:{display:!0,text:e},tooltips:{mode:"index",intersect:!1},interaction:{intersect:!1,mode:"index"},scales:{y:{ticks:{stepSize:1}}}}},a=Object.assign({},n,o),new Chart(t,a)},k.horizontal_bar=function(t,e,n,a){if(t=document.getElementById(t)){var o=t.parentNode,i=t.nextSibling,r=(o.removeChild(t),n.reduce(function(t,e){return t+e},0)),s=document.createElement("div");s.classList.add("wps-horizontal-bar");for(var c=0;c<n.length;c++){var l=r?n[c]/r*100:0,d=l%1==0?l.toFixed(0):l.toFixed(1),u=(d.endsWith(".0")&&(d=d.slice(0,-2)),document.createElement("div")),p=(u.classList.add("wps-horizontal-bar__item"),document.createElement("div")),_=(p.classList.add("wps-horizontal-bar__label-image-container"),a&&a[c]&&"undefined"!==a[c]&&((_=document.createElement("img")).src=a[c],_.alt=e[c],_.classList.add("wps-horizontal-bar__image"),p.appendChild(_)),document.createElement("div"));_.innerHTML=e[c],_.setAttribute("title",e[c]),_.classList.add("wps-horizontal-bar__label"),p.appendChild(_),u.appendChild(p);(p=document.createElement("div")).classList.add("wps-horizontal-bar__data-percent-container");var h=document.createElement("div");h.innerHTML="<span>".concat(k.formatNumber(n[c]),"</span><span>").concat(d,"%</span>"),h.classList.add("wps-horizontal-bar__data"),p.appendChild(h),u.appendChild(p),(h=document.createElement("div")).classList.add("wps-horizontal-bar__background"),h.style.width=l+"%",u.appendChild(h),s.appendChild(u)}i?o.insertBefore(s,i):o.appendChild(s)}},k.chart_id=function(t){return"wp-statistics-"+t+"-meta-box-chart"},k.random_color=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=[[243,156,18,"#f39c12"],[52,152,219,"#3498db"],[192,57,43,"#c0392b"],[155,89,182,"#9b59b6"],[39,174,96,"#27ae60"],[230,126,34,"#e67e22"],[142,68,173,"#8e44ad"],[46,204,113,"#2ecc71"],[41,128,185,"#2980b9"],[22,160,133,"#16a085"],[211,84,0,"#d35400"],[44,62,80,"#2c3e50"],[241,196,15,"#f1c40f"],[231,76,60,"#e74c3c"],[26,188,156,"#1abc9c"],[46,204,113,"#2ecc71"],[52,152,219,"#3498db"],[155,89,182,"#9b59b6"],[52,73,94,"#34495e"],[22,160,133,"#16a085"],[39,174,96,"#27ae60"],[44,62,80,"#2c3e50"],[241,196,15,"#f1c40f"],[230,126,34,"#e67e22"],[231,76,60,"#e74c3c"],[236,240,241,"#9b9e9f"],[149,165,166,"#a65d20"]];return e[!1===t?Math.floor(Math.random()*e.length):t]},k.wordpress_postbox_ajax=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"enable",e=jQuery(".postbox .hndle, .postbox .handlediv");"enable"===t?e.on("click",window.postboxes.handle_click):e.off("click",window.postboxes.handle_click)},k.isset=function(t){for(var e=Array.prototype.slice.call(arguments,1),n=0;n<e.length;n++){if(!t||!t.hasOwnProperty(e[n]))return!1;t=t[e[n]]}return!0},k.number_format=function(t,e,n,a){var o;if(null!=t&&isFinite(t))return e=e||(1<(o=t.toString().split(".").length)?o:0),n=n||".",a=a||",",(o=(t=(t=parseFloat(t).toFixed(e)).replace(".",n)).split(n))[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,a),o.join(n);throw new TypeError("number is not valid")},k.set_equal_height=function(t,e){var n=jQuery(t).height(),a=jQuery(e).height(),o=n;n<a&&(e=t,o=a),jQuery(e).css("height",o+"px")},k.Create_Half_PostBox=function(t,e){return'<div class="postbox-container wps-postbox-half '.concat(t,'"><div class="metabox-holder"><div class="meta-box-sortables"> <div class="postbox" id="').concat(e,'"> <div class="inside"></div></div></div></div></div>')},k.isIP=function(t){var e="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)";return new RegExp("^".concat(e,"\\.").concat(e,"\\.").concat(e,"\\.").concat(e,"$")).test(t)},k.getLinkParams=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return(e=(e=e||window.location.href).match(new RegExp("(?:[?&]"+t+"=)([^&]+)")))?e[1]:null},k.sum=function(t){return t.reduce(function(t,e){return t+e},0)},k.no_results=function(){return'<div class="o-wrap o-wrap--no-data wps-center">'+k._("no_result")+"</div>"},k.hex_to_rgba=function(t,e){t=(t=4===(t="string"!=typeof t||"#"!==t[0]||7!==t.length&&4!==t.length?"#3288D7":t).length?"#"+t[1].repeat(2)+t[2].repeat(2)+t[3].repeat(2):t).replace("#","");var n=parseInt(t.substring(0,2),16),a=parseInt(t.substring(2,4),16),t=parseInt(t.substring(4,6),16);return k.rgba_to_hex(n,a,t,e)},k.rgba_to_hex=function(t,e,n,a){return"#"+t.toString(16).padStart(2,"0")+e.toString(16).padStart(2,"0")+n.toString(16).padStart(2,"0")+Math.round(255*a).toString(16).padStart(2,"0")},function(t){var e,n=t.canvas.parentNode.querySelector("div");return n||((n=document.createElement("div")).classList.add("wps-chart-tooltip"),n.style.opacity=1,n.style.pointerEvents="none",n.style.position="absolute",n.style.transition="all .1s ease",(e=document.createElement("table")).style.margin="0px",n.appendChild(e),t.canvas.parentNode.appendChild(n)),n}),A={id:"drawVerticalLine",beforeDatasetDraw:function(t){var e=t,t=e.ctx,n=(_objectDestructuringEmpty(e.scales),e.tooltip),e=e.chartArea,a=e.top,e=e.bottom;n&&n._active&&n._active.length&&(n=n._active[0].element.x,t.beginPath(),t.strokeStyle="#A9AAAE",t.lineWidth=1,t.setLineDash([6,6]),t.moveTo(n,a),t.lineTo(n,e),t.stroke(),t.setLineDash([]))}};function i(){var t=window.outerWidth||document.documentElement.clientWidth,e=document.getElementById("feedback-bird-app"),n=document.querySelector(".c-fbb-widget__header__title"),a=document.querySelector(".wps-mobileMenuContent>div:last-child"),o=document.querySelector(".wps-adminHeader__side");e&&document.body.classList.contains("wps_page")&&(t<=1030?(t=e.parentNode.removeChild(e),a.parentNode.insertBefore(t,a)):(t=e.parentNode.removeChild(e),o.appendChild(t)),e.style.display="block",e.setAttribute("title",n.innerHTML))}k.new_line_chart=function(m,t){var e,n,a,o,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"line",s=k.isset(k.global,"options","wp_date_format")?k.global.options.wp_date_format:"MM/DD/YYYY",f=(e={d:"DD",j:"D",S:"Do",n:"M",m:"MM",F:"MMM",M:"MMM",y:"YY",Y:"YYYY"},s.replace(/([a-zA-Z])/g,function(t){return e[t]||t})),g=null!==document.getElementById(t).closest("#dashboard-widgets"),s=function(s,c,l){var t,d=[],u=[],p=c.map(function(){return[]}),_=[],h=null==(t=s[0])?void 0:t.date;return s.forEach(function(t,e){var n,a,o,i,r=moment(t.date);r.isValid()?(r="week"===l&&0===r.day()||"month"===l&&r.date()===r.daysInMonth(),_.push(_objectSpread(_objectSpread({},t),{},{index:e})),!r&&e!==s.length-1||(r=(null==(n=s[e])?void 0:n.date)||h,d.push((n=h,a=r,o=l,i=f.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),"month"===o?moment(n).format("MMM YYYY"):g?moment(n).format(i)+" to "+moment(a).format(i):moment(n).format(i)+" to "+moment(a).format(f))),"month"===l&&u.push((o=h,n=r,i=f.replace(/,?\s?(YYYY|YY)[-/\s]?,?|[-/\s]?(YYYY|YY)[-/\s]?,?/g,""),moment(o).format(i)+" to "+moment(n).format(f))),c.forEach(function(n,t){var e=_.reduce(function(t,e){return e=n.data[e.index],isNaN(e)||null==e?t:t+e},0);p[t].push(e)}),_=[],h=(null==(a=s[e+1])?void 0:a.date)||"")):console.error("Invalid date found at index ".concat(e,":"),t.date)}),{aggregatedLabels:d,aggregatedData:p,monthTooltipTitle:u}},w=m.data.labels.map(function(t){return t.formatted_date}),v=[],c=w.length,l="performance"===r&&2<m.data.datasets.length,y=c<=("performance"===r?30:60)?"day":c<=180?"week":"month",d=("week"!=y&&"month"!=y||(n=s(m.data.labels,m.data.datasets,y),w=n.aggregatedLabels,m.data.datasets.forEach(function(t,e){t.data=n.aggregatedData[e]}),m.previousData&&0<m.previousData.datasets.length&&(a=s(m.data.labels,m.previousData.datasets,y),m.previousData.datasets.forEach(function(t,e){t.data=a.aggregatedData[e]})),v=n.monthTooltipTitle),{Total:"#27A765",Views:"#7362BF",Visitors:"#3288D7",Posts:"#8AC3D0",Other1:"#3288D7",Other2:"#7362BF",Other3:"#8AC3D0"}),u=[.1,.3,.5,.7],r=document.getElementById(t).getContext("2d"),p=[],_=(Object.keys(m.data.datasets).forEach(function(t,e){var n=d[m.data.datasets[t].label]||d["Other"+(e+1)];p.push(l&&2===e?{type:"bar",label:m.data.datasets[t].label,data:m.data.datasets[t].data,backgroundColor:n,hoverBackgroundColor:n,hoverPointBackgroundColor:n,yAxisID:"y1"}:{type:"line",label:m.data.datasets[t].label,data:m.data.datasets[t].data,borderColor:n,backgroundColor:n,fill:!1,yAxisID:"y",borderWidth:2,pointRadius:0,pointBorderColor:"transparent",pointBackgroundColor:n,pointBorderWidth:2,hoverPointRadius:6,hoverPointBorderColor:"#fff",hoverPointBackgroundColor:n,hoverPointBorderWidth:4,tension:u[e%u.length],hitRadius:10})}),null!=m&&m.previousData&&Object.keys(m.previousData.datasets).forEach(function(t,e){var n=d[m.previousData.datasets[t].label]||d["Other"+e],e=u[e%u.length];p.push({type:"line",label:m.previousData.datasets[t].label+" (Previous)",data:m.previousData.datasets[t].data,borderColor:k.hex_to_rgba(n,.7),hoverBorderColor:n,backgroundColor:n,fill:!1,yAxisID:"y",borderWidth:1,borderDash:[5,5],pointRadius:0,pointBorderColor:"transparent",pointBackgroundColor:n,pointBorderWidth:2,hoverPointRadius:6,hoverPointBorderColor:"#fff",hoverPointBackgroundColor:n,hoverPointBorderWidth:4,tension:e,hitRadius:10})}),c={maintainAspectRatio:!1,resizeDelay:200,animation:{duration:0},responsive:!0,interaction:{intersect:!1,mode:"index"},plugins:{legend:!1,tooltip:{enabled:!1,external:function(t){return r=m,a=y,o=w,i=v,f=(h=t=t).chart,h=h.tooltip,t=Y(f),void(0===h.opacity?t.style.opacity=0:h.body&&(e=h.title||[],s=h.dataPoints[0].dataIndex,c=f.data.datasets,l="<div>",e.forEach(function(t){var e=(r.data||r).labels[s],n=e.date,e=e.day;l+="day"===a?'<div class="chart-title">'.concat(n," (").concat(e,")</div>"):'<div class="chart-title">'.concat(("month"===a?i:o)[s]," </div>")}),c.forEach(function(e,n){var t=f.getDatasetMeta(n),a=f.data.datasets.find(function(t,e){return t.label===c[n].label+" (Previous)"&&f.getDatasetMeta(e)}),o=e.data[s],i=e.label.includes("(Previous)");t.hidden||i||(l+='<div class="current-data"><div><span class="current-data__color" style="background-color: '.concat(e.hoverPointBackgroundColor,';"></span>').concat(e.label,'</div><span class="current-data__value">').concat(o.toLocaleString(),"</span></div>")),null!=r&&r.previousData&&a&&!f.getDatasetMeta(f.data.datasets.indexOf(a)).hidden&&void 0!==(t=r.previousData.datasets.find(function(t){return t.label===e.label.replace(" (Previous)","")}))&&""!==t&&t.data&&!i&&(o=t.data[s],a=r.previousData.labels[s].date,l+='<div class="previous-data"><div><span class="previous-data__colors"><span class="previous-data__color" style="background-color: '.concat(e.hoverPointBackgroundColor,';"></span><span class="previous-data__color" style="background-color: ').concat(e.hoverPointBackgroundColor,';"></span></span>').concat(a,'</div><span class="previous-data__value"> ').concat(o.toLocaleString(),"</span></div>"))}),l+="</div>",t.innerHTML=l,e=(d=f.canvas).offsetLeft,n=d.offsetTop,p=d.clientWidth,d=d.clientHeight,u=h.caretX,h=h.caretY,(p=e+p<(p=e+u+16)+(_=t.offsetWidth)+16?e+u-_-16:p)<e+16&&(p=e+16),(_=(_=n+h-(u=t.offsetHeight)/2)<n+16?n+16:_)+u+16>n+d&&(_=n+d-u-16),t.style.opacity=1,t.style.left=p+"px",t.style.top=_+"px"));var r,a,o,i,s,c,l,e,n,d,u,p,_,h,f},callbacks:{title:function(t){return t[0].label},label:function(t){return t.formattedValue}}}},scales:{x:{offset:w.length<=1,grid:{display:!1,drawBorder:!1,tickLength:0,drawTicks:!1},border:{color:"transparent",width:0},ticks:{align:"inner",autoSkip:!0,maxTicksLimit:g?"week"==y?2:4:"week"==y?3:"month"==y?7:9,font:{color:"#898A8E",style:"italic",weight:"lighter",size:g?"week"==y?9:11:"week"==y?11:13},padding:8}},y:{min:0,ticks:{maxTicksLimit:g?4:7,fontColor:"#898A8E",fontSize:13,fontStyle:"italic",fontWeight:"lighter ",padding:8,lineHeight:15,stepSize:1},border:{color:"transparent",width:0},type:"linear",position:"right",grid:{display:!0,tickMarkLength:0,drawBorder:!1,tickColor:"#EEEFF1",color:"#EEEFF1"},gridLines:{drawTicks:!1},title:{display:!1}}}},l&&(c.scales.y1={type:"linear",position:"left",border:{color:"transparent",width:0},grid:{display:!1,drawBorder:!1,tickLength:0},ticks:{maxTicksLimit:7,fontColor:"#898A8E",fontSize:13,fontStyle:"italic",fontFamily:'"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontWeight:"lighter ",padding:8,lineHeight:15,stepSize:1},title:{display:!0,text:k._("published")+" Posts",color:"#898A8E",fontSize:13}},c.scales.y={border:{color:"transparent",width:0},ticks:{maxTicksLimit:9,fontColor:"#898A8E",fontSize:13,fontStyle:"italic",fontFamily:'"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontWeight:"lighter ",padding:8,lineHeight:15,stepSize:1},position:l?"right":"left",grid:{display:!0,borderDash:[5,5],tickColor:"#EEEFF1",color:"#EEEFF1"},title:{display:!0,text:k._("visits"),color:"#898A8E",fontSize:13}}),s=Object.assign({},c,i),new Chart(r,{type:l?"bar":"line",data:{labels:w,datasets:p},plugins:[A],options:s})),h=document.getElementById(t).parentElement.parentElement.querySelector(".wps-postbox-chart--items");h&&(h.innerHTML="",p.sort(function(t,e){return"Total"===t.label?-1:"Total"===e.label?1:"Total (Previous)"===t.label?-1:"Total (Previous)"===e.label?1:0}),0<(c=document.querySelectorAll(".wps-postbox-chart--previousPeriod")).length&&(o=!1,p.forEach(function(t){t.label.includes("(Previous)")&&(o=!0)}),o)&&c.forEach(function(t){t.style.display="flex"}),p.forEach(function(n,a){var t,e,o,i,r,s,c;n.label.includes("(Previous)")||(t=n.data.reduce(function(t,e){return Number(t)+Number(e)},0),0<((o=e=null)==m||null==(r=m.previousData)?void 0:r.datasets.length)&&(i=m.previousData.datasets.find(function(t,e){return t.label===n.label&&(o=e,!0)}))&&i.data&&(e=i.data.reduce(function(t,e){return Number(t)+Number(e)},0)),(i=document.createElement("div")).className="wps-postbox-chart--item",r=null!==e?'<div class="previous-data"><span><span class="wps-postbox-chart--item--color" style="border-color: '.concat(n.borderColor,'"></span><span class="wps-postbox-chart--item--color" style="border-color: ').concat(n.borderColor,'"></span></span>').concat(e.toLocaleString(),"</div>"):"",i.innerHTML="<span>".concat(n.label,'</span><div><div class="current-data"><span class="wps-postbox-chart--item--color" style="border-color: ').concat(n.borderColor,'"></span>').concat(t.toLocaleString(),"</div>").concat(r,"</div>"),(s=i.querySelector(".current-data")).addEventListener("click",function(){var t=_.getDatasetMeta(a);t.hidden=!t.hidden,s.classList.toggle("wps-line-through"),_.update()}),(c=i.querySelector(".previous-data"))&&null!==o&&c.addEventListener("click",function(){var t=_.data.datasets.find(function(t,e){return t.label===p[a].label+" (Previous)"&&_.getDatasetMeta(e)});t&&(t=_.data.datasets.indexOf(t),(t=_.getDatasetMeta(t)).hidden=!t.hidden,c.classList.toggle("wps-line-through"),_.update())}),h.appendChild(i))}))},jQuery(document).ready(function(){var t=document.querySelectorAll(".wps-head-filters__item"),e=(t.forEach(function(n){n.classList.remove("loading"),n.addEventListener("click",function(t){var e=n.querySelector(".dropdown-content");e&&e.classList.toggle("show")})}),jQuery(".wps-search-dropdown"));e.on("click",function(t){t.stopPropagation()}),e.on("input",function(){var t=jQuery(this).val().toLowerCase();jQuery(this).parent().find(".dropdown-item").each(function(){-1<(jQuery(this).text()||jQuery(this).innerText).toLowerCase().indexOf(t)?jQuery(this).show():jQuery(this).hide()})}),window.addEventListener("click",function(n){t.forEach(function(t){var e=t.querySelector(".dropdown-content");e&&!t.contains(n.target)&&e.classList.remove("show")})})}),jQuery(document).ready(function(){var t=document.querySelector(".wp-header-end"),e=document.querySelector(".notice.notice-warning.update-nag");t&&e&&t.parentNode.insertBefore(e,t.nextSibling),jQuery(document).on("click",".wps-privacy-list__item .wps-privacy-list__title",function(t){var e=jQuery(t.currentTarget),n=e.siblings(".wps-privacy-list__content");jQuery(t.target).is(".wps-privacy-list__button")||(e.toggleClass("open"),n.hasClass("show")?n.removeClass("show"):n.addClass("show"))})}),window.addEventListener("resize",i),jQuery(document).ready(function(){i();var t=document.querySelectorAll(".wps-admin-header__link--has-dropdown"),e=(t.forEach(function(e){e.addEventListener("click",function(t){t.preventDefault(),(t=this.nextElementSibling)&&(t.classList.toggle("is-open"),e.classList.toggle("is-open"))})}),document.addEventListener("click",function(n){t.forEach(function(t){var e=t.nextElementSibling;!e||t.contains(n.target)||e.contains(n.target)||e.classList.remove("is-open")})}),document.querySelector(".wp-header-end")),n=document.querySelector(".notice.notice-warning.update-nag");e&&n&&e.parentNode.insertBefore(n,e.nextSibling)});function I(){y&&(y.style.display="none",document.body.style.overflow="")}var r,s,c,l,z,d,$,u,p,_,B,h,f,m,g,w,v,t=document.querySelectorAll(".js-wps-premiumModalClose"),y=document.querySelector(".js-wps-premiumModal"),b=document.querySelector(".js-wps-premiumModalWelcomeContent"),U=document.querySelector(".js-wps-premiumModalSteps"),x=document.querySelectorAll(".js-wps-premiumModalStep"),N=document.querySelectorAll(".js-wps-premiumModal-welcome .js-wps-premiumModalStep"),C=document.querySelector(".js-wps-premiumModalExploreBtn"),E=document.querySelectorAll(".js-wps-premiumStepFeature"),j=document.querySelectorAll(".js-wps-openPremiumModal"),T=document.querySelectorAll(".wps-premium-step__action-container"),D=document.querySelectorAll(".js-wps-premium-steps__title"),R=document.querySelectorAll(".js-wps-premium-first-step__head"),W=document.querySelectorAll(".js-wps-premium-steps__head"),S=1,H=function(){var a;0!==x.length&&(a=0,x.forEach(function(t){var e=t.style.display,n=(t.style.display="block",t.style.minHeight="auto",t.getBoundingClientRect().height);a=Math.max(a,n),t.style.display=e}),x.forEach(function(t){t.style.minHeight=a+"px"}))},F=(window.addEventListener("resize",H),0<j.length&&j.forEach(function(n){n.addEventListener("click",function(t){t.preventDefault();var e,t=n.getAttribute("href"),t=n.getAttribute("data-target");e=t,y&&(y.style.display="block",document.body.style.overflow="hidden"),-1!==(t=Array.from(E).findIndex(function(t){return t.getAttribute("data-modal")===e}))&&(S=t,b&&(b.style.display="none"),F(),M(S+1),U.style.display="block",K())})}),0<t.length&&t.forEach(function(t){t.addEventListener("click",I)}),x.forEach(function(t){t.classList.remove("wps-modal__premium-step--active")}),C&&C.addEventListener("click",function(){S=0,F(),b.style.display="none",U.style.display="block",M(S),G()}),function(){document.querySelectorAll(".wps-premium-step__image").forEach(function(t){t.src=t.dataset.src})}),M=function(t){var e;setTimeout(function(){H()},100),t<0||t>=x.length||(x.forEach(function(t){return t.classList.remove("wps-modal__premium-step--active")}),T&&0<T.length&&(T.forEach(function(t){t&&t.classList.remove("active")}),T[t-1])&&T[t-1].classList.add("active"),D&&0<D.length&&(D.forEach(function(t){t&&t.classList.remove("active")}),D[t-1])&&D[t-1].classList.add("active"),E.forEach(function(t){return t.classList.remove("active")}),x[t].classList.add("wps-modal__premium-step--active"),e=function(t,e){t.forEach(function(t){t.style.display=e})},0<t?(e(R,"none"),e(W,"block"),E[t-1].classList.add("active")):(e(R,"block"),e(W,"none")))},G=function(){r=setInterval(function(){S=(S+1)%N.length,M(S)},5e3)},K=function(){clearInterval(r)},O=(0<E.length&&E.forEach(function(t,e){t.addEventListener("click",function(){K(),M(S=e+1)})}),document.querySelector(".wps-admin-column__unlock")),j=document.querySelector(".wp-list-table"),t=(O&&j&&j.classList.add("wps-admin-mini-chart__unlock"),k.sanitize_meta_box_name=function(t){return t.replace(new RegExp("-","g"),"_")},k.get_meta_box_method=function(t){return this.sanitize_meta_box_name(t)+"_meta_box"},k.getMetaBoxKey=function(t){return"wp-statistics-"+t+"-widget"},k.no_meta_box_data=function(){return'<div class="o-wrap o-wrap--no-data">'+k._("no_data")+"</div>"},k.error_meta_box_data=function(t){if(void 0!==t)try{var e=JSON.parse(t);if(k.isset(e,"message"))return'<div class="o-wrap o-wrap--no-data">'+e.message+"</div>"}catch(e){console.log("An unexpected error occurred: ",t,e)}return'<div class="o-wrap o-wrap--no-data">'+k._("rest_connect")+"</div>"},k.get_meta_box_info=function(t){return t in k.global.meta_boxes?k.global.meta_boxes[t]:[]},k.meta_box_lang=function(t,e){return e in k.global.meta_boxes[t].lang?k.global.meta_boxes[t].lang[e]:""},k.meta_box_inner=function(t){return"#"+k.getMetaBoxKey(t)+" div.inside"},k.meta_box_name_by_id=function(t){return t.split("statistics-").pop().split("-widget")[0]},k.meta_box_button=function(t){var e="#"+k.getMetaBoxKey(t)+" .handle-actions button:first",n=(k.get_meta_box_info(t),"right");k.is_active("rtl")&&(n="left"),jQuery("#"+k.getMetaBoxKey(t)+" button[class*=wps-refresh]").remove(),jQuery('<button class="handlediv wps-refresh"'+(k.is_active("gutenberg")?' style="z-index: 9999;position: absolute;top: 1px;display:none;right: calc(44px + 3.24rem) !important;height: 44px !important;'.concat(n,': 3%;" '):'style="line-height: 28px;"')+' type="button" title="'+k._("reload")+'"></button>').insertBefore(e),k.is_active("gutenberg")&&jQuery("body").addClass("wps-gutenberg"),jQuery("#"+k.getMetaBoxKey(t)+" .hndle, #"+k.getMetaBoxKey(t)+" .handlediv").on("click",function(){jQuery(this).closest(".postbox").addClass("handle")})},k.meta_box_tooltip=function(t){var e,n="#"+k.getMetaBoxKey(t)+" h2.hndle";(t=k.get_meta_box_info(t)).hasOwnProperty("description")&&(jQuery(n).text(),e='<a href="#" class="wps-tooltip" title="'+(t=t.description)+'"><i class="wps-tooltip-icon"></i></a>',t)&&jQuery(n).append(e)},k.run_meta_box=function(t){var e,n,a=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];k.exist_tag("#"+k.getMetaBoxKey(t))&&(k.is_active("gutenberg")||!k.is_active("gutenberg")&&jQuery("#"+k.getMetaBoxKey(t)).is(":visible"))&&(n=jQuery(k.meta_box_inner(t)),e=k.get_meta_box_method(t),k.meta_box_tooltip(t),e in k)&&("placeholder"in k[e]?n.html(k[e].placeholder()):n.html(k.placeholder()),!0===o&&k.meta_box_button(t),!(n={name:t})!==a&&(n=Object.assign(a,n)),"params"in k[e]&&(n=Object.assign(n,k[e].params())),k.ajaxQ("metabox",n,e,"error_meta_box_data"))},k.prepare_date_filter_data=function(t){var e={ago:""};return t.hasOwnProperty("footer_options")&&(t=t.footer_options.default_date_filter).length&&("filter"==(t=t.split("|"))[0]?e.ago=t[1]:(t=t[1].split(":"),e.ago="",e.from=t[1],e.to=t[2])),e},k.run_meta_boxes=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];(t=!1===t?Object.keys(k.global.meta_boxes):t).forEach(function(t){var e=k.global.meta_boxes[t],e=k.prepare_date_filter_data(e);k.run_meta_box(t,e)})},k.meta_box_footer=function(n,t){var e,a={filter_by_date:!1,default_date_filter:"",display_more_link:!1,more_link_title:""},o=k.global.meta_boxes[n],i=(o.hasOwnProperty("footer_options")&&Object.assign(a,o.footer_options),""),r=(t.hasOwnProperty("filter")?i=t.filter:void 0!==a.default_date_filter&&(i=a.default_date_filter),""),s=(t.hasOwnProperty("filter_start_date")&&(r=t.filter_start_date),""),c=(t.hasOwnProperty("filter_end_date")&&(s=t.filter_end_date),""),l=(t.hasOwnProperty("from")&&(c=t.from),"");t.hasOwnProperty("to")&&(l=t.to),(a.filter_by_date||a.display_more_link)&&(e='<div class="c-footer"><div class="c-footer__filter js-widget-filters">',a.filter_by_date&&(e+='<button class="c-footer__filter__btn js-filters-toggle">'+k._("str_"+i)+'</button><div class="c-footer__filters"><div class="c-footer__filters__current-filter"><span class="c-footer__current-filter__title js-filter-title">Last 7 days</span><span class="c-footer__current-filter__date-range hs-filter-range">May 12,2020-May 20, 2020</span></div><div class="c-footer__filters__list"><button data-metabox-key="'.concat(n,'" data-filter="today" class="c-footer__filters__list-item">')+k._("str_today")+'</button><button data-metabox-key="'.concat(n,'" data-filter="yesterday" class="c-footer__filters__list-item">')+k._("str_yesterday")+'</button><button data-metabox-key="'.concat(n,'" data-filter="this_week" class="c-footer__filters__list-item">')+k._("str_this_week")+'</button><button data-metabox-key="'.concat(n,'" data-filter="last_week" class="c-footer__filters__list-item">')+k._("str_last_week")+'</button><button data-metabox-key="'.concat(n,'" data-filter="this_month" class="c-footer__filters__list-item">')+k._("str_this_month")+'</button><button data-metabox-key="'.concat(n,'" data-filter="last_month" class="c-footer__filters__list-item">')+k._("str_last_month")+"</button><button class=\"c-footer__filters__list-item c-footer__filters__list-item--more\" onclick=\"jQuery(this).closest('.c-footer__filters__list').find('.js-more-filters').addClass('is-open')\">"+k._("str_more")+'</button><div class="c-footer__filters__more-filters js-more-filters"><button data-metabox-key="'.concat(n,'" data-filter="7days" class="c-footer__filters__list-item">')+k._("str_7days")+'</button><button data-metabox-key="'.concat(n,'" data-filter="30days" class="c-footer__filters__list-item">')+k._("str_30days")+'</button><button data-metabox-key="'.concat(n,'" data-filter="90days" class="c-footer__filters__list-item">')+k._("str_90days")+'</button><button data-metabox-key="'.concat(n,'" data-filter="6months" class="c-footer__filters__list-item">')+k._("str_6months")+'</button><button data-metabox-key="'.concat(n,'" data-filter="this_year" class="c-footer__filters__list-item">')+k._("str_this_year")+"</button><button class=\"c-footer__filters__close-more-filters\" onclick=\"jQuery(this).closest('.js-more-fi' + 'lters').removeClass('is-open')\">"+k._("str_back")+'</button></div><input type="text" class="c-footer__filters__custom-date-input js-datepicker-input"/><button data-metabox-key="'.concat(n,'" data-filter="custom" class="c-footer__filters__list-item c-footer__filters__list-item--custom js-custom-datepicker">')+k._("str_custom")+"</button></div></div>"),e+='</div><div class="c-footer__more">',a.display_more_link&&(e+='<a class="c-footer__more__link" href="'+o.page_url+'">'.concat(a.more_link_title,'<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.4191 7.98577L7.73705 5.22727L8.44415 4.5L12.3333 8.50003L8.44415 12.5L7.73705 11.7727L10.4191 9.01429H4.33325V7.98577H10.4191Z" fill="#56585A"/></svg></a>')),e+="</div></div>",jQuery(k.meta_box_inner(n)).append(e),(t=jQuery(k.meta_box_inner(n)).find(".js-datepicker-input").first()).daterangepicker({autoApply:!0}),t.on("apply.daterangepicker",function(t,e){k.run_meta_box(n,{from:e.startDate.format("YYYY-MM-DD"),to:e.endDate.format("YYYY-MM-DD")})}),jQuery(".js-filters-toggle:not(.is-ready)").on("click",function(){jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox").removeClass("has-focus"),jQuery(this).closest(".js-widget-filters").toggleClass("is-active"),jQuery(this).closest(".postbox").toggleClass("has-focus"),jQuery(this).hasClass("is-active")||jQuery(this)[0].getBoundingClientRect().top<350&&jQuery(this).closest(".js-widget-filters").addClass("is-down")}),jQuery(".js-filters-toggle:not(.is-ready)").addClass("is-ready"),k.set_date_filter_as_selected(n,i,r,s,c,l))},k.set_date_filter_as_selected=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"30days",n=2<arguments.length?arguments[2]:void 0,a=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,i=5<arguments.length?arguments[5]:void 0,r=jQuery(k.meta_box_inner(t)),s=jQuery(r).find(".c-footer__filter__btn"),c=jQuery(r).find(".c-footer__filters__list"),l=jQuery(r).find(".c-footer__current-filter__title"),r=jQuery(r).find(".c-footer__current-filter__date-range");(e=e||"30days").length&&(c.find("button[data-filter]").removeClass("is-selected"),c.find('button[data-filter="'+e+'"').addClass("is-selected"),s.text(k._("str_"+e)),l.text(k._("str_"+e)),"custom"==e)&&(s.text(n+" - "+a),(c=jQuery(k.meta_box_inner(t)).find(".js-datepicker-input").first()).data("daterangepicker").setStartDate(moment(o).format("MM/DD/YYYY")),c.data("daterangepicker").setEndDate(moment(i).format("MM/DD/YYYY"))),n.length&&a.length&&r.text(n+" - "+a)},jQuery(document).on("click","button[data-filter]:not(.c-footer__filters__list-item--custom)",function(){k.run_meta_box(jQuery(this).attr("data-metabox-key"),{ago:jQuery(this).attr("data-filter")})}),jQuery(document).on("click",'button[data-filter="custom"]',function(){var t=jQuery(this).attr("data-metabox-key");jQuery(k.meta_box_inner(t)).find(".js-datepicker-input").first().data("daterangepicker").show()}),jQuery(document).on("mouseenter mouseleave",".wps-refresh, .wps-more",function(t){"mouseenter"===t.type?k.wordpress_postbox_ajax("disable"):k.wordpress_postbox_ajax("enable")}),jQuery(document).on("click",".wps-refresh",function(t){t.preventDefault();var e,n=jQuery(this).closest(".postbox").attr("id"),t=k.meta_box_name_by_id(n),a=k.global.meta_boxes[t],o=(null!=(e=a.footer_options)&&e.default_date_filter&&("custom"!==(e=null==(e=jQuery("#"+n).find(".c-footer__filters__list .is-selected"))?void 0:e.attr("data-filter"))?a.footer_options.default_date_filter="filter|"+e:(o=(e=jQuery("#"+n).find(".js-datepicker-input").data("daterangepicker")).startDate.format("YYYY-MM-DD"),e=e.endDate.format("YYYY-MM-DD"),a.footer_options.default_date_filter="between|custom:".concat(o,":")+e)),k.prepare_date_filter_data(a));k.run_meta_box(t,o,!1),setTimeout(function(){jQuery("#"+n).find(".wps-refresh").trigger("blur")},1e3)}),jQuery(document).on("click",'input[type=checkbox][id^="wp-statistics-"][id$="-widget-hide"]',function(){var t;jQuery(this).is(":checked")&&(t=jQuery(this).attr("id"),t=k.meta_box_name_by_id(t),k.run_meta_box(t))}),k.btn_group_chart=function(e){var n,t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a={7:k._("str_week"),30:k._("str_month"),365:k._("str_year")},o=("ago"==t.type&&(n=parseInt(t.days)),'<div class="wps-btn-group"><div class="btn-group" role="group">');return Object.keys(a).forEach(function(t){o+='<button type="button" class="btn '+(t==n?"btn-primary":"btn-default")+'" data-chart-time="'.concat(e,'" data-time="').concat(t,'">').concat(a[t],"</button>")}),o=(o=o+('<button type="button" class="btn '+("between"==t.type?"btn-primary":"btn-default")+'" data-custom-date-picker="'.concat(e,'">').concat(k._("custom"),"</button>"))+"</div></div>")+'<div data-chart-date-picker="'.concat(e,'"')+("ago"==t.type?' style="display:none;"':"")+'><input type="text" size="18" name="date-from" data-wps-date-picker="from" value="'.concat(t.from,'" placeholder="YYYY-MM-DD" autocomplete="off">')+k._("to")+'<input type="text" size="18" name="date-to" data-wps-date-picker="to" value="'.concat(t.to,'" placeholder="YYYY-MM-DD" autocomplete="off"><input type="submit" value="')+k._("go")+'" data-between-chart-show="'.concat(e,'" class="button-primary"><input type="hidden" name="" id="date-from" value="').concat(t.from,'"><input type="hidden" name="" id="date-to" value="').concat(t.to,'"></div>')},jQuery(document).on("click",".wps-btn-group button",function(){jQuery(".wps-btn-group button").attr("class","btn btn-default"),jQuery(this).attr("class","btn btn-primary")}),jQuery(document).on("click","button[data-custom-date-picker]",function(){jQuery("div[data-chart-date-picker= "+jQuery(this).attr("data-custom-date-picker")+"]").slideDown()}),jQuery(document).on("click","button[data-chart-time]",function(){k.run_meta_box(jQuery(this).attr("data-chart-time"),{ago:jQuery(this).attr("data-time"),"no-data":"no"})}),jQuery(document).on("click","input[data-between-chart-show]",function(){var t=jQuery(this).attr("data-between-chart-show");k.run_meta_box(t,{from:jQuery("div[data-chart-date-picker="+t+"] input[id=date-from]").val(),to:jQuery("div[data-chart-date-picker="+t+"] input[id=date-to]").val(),"no-data":"no"})}),jQuery(document).on("click",function(t){var e;jQuery(t.target).closest(".js-widget-filters").length?(e=t.target.classList).contains("c-footer__filter__btn")&&e.contains("is-active")?(t.target.classList.remove("is-active"),jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox.has-focus").removeClass("has-focus"),setTimeout(function(){jQuery(".js-widget-filters").removeClass("is-down")},500)):e.contains("c-footer__filter__btn")&&!e.contains("is-active")&&t.target.classList.add("is-active"):(jQuery(".js-widget-filters").removeClass("is-active"),jQuery(".postbox.has-focus").removeClass("has-focus"),jQuery(".c-footer__filter__btn.is-active").removeClass("is-active"),setTimeout(function(){jQuery(".js-widget-filters").removeClass("is-down")},500))}),document.getElementById("wp-statistics-about-widget")),P=(!t||t.querySelector(".js-wps-widget-customization-empty")||t.querySelector(".wps-about-widget__premium")||t.classList.add("wp-statistics-about-widget__customize"),k.browsers_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return""+('<div class="o-wrap"><div class="c-chart c-chart--limited-height"><canvas id="'+k.chart_id("browsers"))+'" height="220"></canvas></div></div>'},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=[{data:t.browsers_value}];if(k.horizontal_bar(k.chart_id("browsers"),t.browsers_name,e[0].data,t.browsers_logos),k.exist_tag("#"+k.getMetaBoxKey("browsers-table"))){["browsers-table","browsers"].forEach(function(t){jQuery("#"+k.getMetaBoxKey(t)+" .inside").removeAttr("style")});for(var n='<div class="title-center">'.concat(t.title,'</div><table width="100%" class="o-table"><tr><td class="wps-text-muted">').concat(k._("browser"),'</td><td class="wps-text-muted">').concat(k._("visitor_count"),'</td><td class="wps-text-muted">').concat(k._("percentage"),"</td></tr>"),a=0;a<t.browsers_name.length;a++)n+=" <tr><td>".concat(t.browsers_name[a],"</td><td>").concat(0<parseInt(t.browsers_value[a])?"".concat("other"!==t.info.agent[a]?'<a href="'+t.info.visitor_page+"&agent="+t.info.agent[a]+"&from="+t.from+"&to="+t.to+'" target="_blank">':""," ").concat(k.number_format(t.browsers_value[a])," ")+("other"!==t.info.agent[a]?"</a>":""):t.browsers_value[a],"</td><td>").concat(k.number_format(t.browsers_value[a]/t.total*100),"%</td> </tr>");n=n+" <tr><td>".concat(k._("total"),"</td><td>").concat(k.number_format(t.total),"</td><td></td></tr>")+"</table>",jQuery("#"+k.getMetaBoxKey("browsers-table")+" .inside").html(n),k.set_equal_height(".postBox-table .inside",".postBox-chart .inside");for(var o="",i=0;i<t.browsers_name.length;i++)0<parseInt(t.browsers_value[i])&&t.info.agent[i]&&(o=(o=(o+='<div class="wps-title-group"><img src="'.concat(t.info.logo[i],'" alt="').concat(t.browsers_name[i],'" style="vertical-align: -3px;" class="wps-flag log-tools"> ').concat(t.browsers_name[i],'</div><div class="wp-clearfix"></div>'))+k.Create_Half_PostBox("postBox-chart-"+t.info.agent[i],"browser-"+t.info.agent[i]+"-chart"))+k.Create_Half_PostBox("postBox-table-"+t.info.agent[i],"browser-"+t.info.agent[i]+"-table")+'<div class="wp-clearfix"></div>');jQuery(o).insertAfter("#browsers-table");for(var r=0;r<t.browsers_name.length;r++)0<parseInt(t.browsers_value[r])&&t.info.agent[r]&&this.run_custom_browser(t.info.agent[r])}},run_custom_browser:function(t){["browser-"+t+"-chart","browser-"+t+"-table"].forEach(function(t){jQuery("#"+t+" .inside").css("height","430px")}),jQuery("#browser-"+t+"-table .inside").html(k.placeholder()),jQuery("#browser-"+t+"-chart .inside").html(k.circle_placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;");var e={name:"browsers",browser:t};["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(e[t]=k.global.request_params[t])}),k.ajaxQ(k.global.meta_box_api,e,"show_custom_agent","error_custom_agent","GET",!1)}},k.show_custom_agent=function(a){var o=a.info.agent[0];jQuery("#browser-"+o+"-chart .inside").html('<canvas id="'+k.chart_id("browser-"+o)+'" height="220"></canvas>'),setTimeout(function(){for(var t=[{data:a.browsers_value}],e=(k.horizontal_bar(k.chart_id("browser-"+o),a.browsers_name,t[0].data,a.browsers_logos),["browser-"+o+"-chart","browser-"+o+"-table"].forEach(function(t){jQuery("#"+t+" .inside").removeAttr("style")}),'<div class="title-center">'.concat(a.title,'</div><table width="100%" class="o-table"><tr><td class="wps-text-muted">').concat(k._("version_list"),'</td><td class="wps-text-muted">').concat(k._("visitor_count"),'</td><td class="wps-text-muted">').concat(k._("percentage"),"</td></tr>")),n=0;n<a.browsers_name.length;n++)e+=" <tr><td>".concat(a.browsers_name[n],"</td><td>").concat(0<parseInt(a.browsers_value[n])?k.number_format(a.browsers_value[n]):a.browsers_value[n],"</td><td>").concat(k.number_format(a.browsers_value[n]/a.total*100),"%</td></tr>");e=e+" <tr><td>".concat(k._("total"),"</td><td>").concat(k.number_format(a.total),"</td><td></td></tr>")+"</table>",t="#browser-"+o+"-table .inside",jQuery(t).html(e),k.set_equal_height(t,"#browser-"+o+"-chart .inside")},500)},k.error_custom_agent=function(t){},k.countries_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e="";return t.countries&&0<t.countries.length?(e+='<div class="o-table-wrapper"><table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l">'.concat(k._("country"),'</th><th class="wps-pd-l"><span class="wps-order">').concat(k._("visitor_count"),"</span></th></tr></thead><tbody>"),t.countries.forEach(function(t){e+='<tr> <td class="wps-pd-l"><img src="'.concat(t.flag,'" title="').concat(t.name,'" alt="').concat(t.name,'" class="wps-flag wps-flag--first"/> ').concat(t.name,'</td><td class="wps-pd-l wps-middle-vertical"><a href="').concat(t.link,'" title="').concat(t.name,'" target="_blank">').concat(k.number_format(t.number),"</a></td></tr>"),0}),e+="</tbody></table></div>"):k.no_meta_box_data()}},k.devices_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return""+('<div class="o-wrap"><div class="c-chart c-chart--limited-height"><canvas id="'+k.chart_id("devices"))+'" height="220"></canvas></div></div>'},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=[{data:t.device_value}];k.horizontal_bar(k.chart_id("devices"),t.device_name,e[0].data,null)}},k.exclusions_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){var t=k.is_active("overview_page")?110:210;return k.isset(k.global,"request_params","page")&&"exclusions"===k.global.request_params.page&&(t=80),""+('<canvas id="'+k.chart_id("exclusions"))+'" height="'+t+'"></canvas>'},meta_box_init:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.show_chart(k.chart_id("exclusions"),e),k.isset(k.global,"request_params","page")&&"exclusions"===k.global.request_params.page&&k.exist_tag(t="span[id='number-total-chart-exclusions']")&&(e=k.sum(Object.values(e.total)),jQuery(t).html(k.number_format(e)))},show_chart:function(t){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i="",r=[],s=0;Object.keys(o.exclusions).forEach(function(t){var e,n,a=k.sum(Object.values(o.value[t]));0<a&&(e=o.exclusions[t],n=k.random_color(s),r.push({label:e,data:o.value[t],backgroundColor:"rgba("+n[0]+","+n[1]+","+n[2]+",0.3)",borderColor:"rgba("+n[0]+","+n[1]+","+n[2]+",1)",borderWidth:1,fill:!0,tension:.4}),i+="<tr><th>".concat(e,'</th> <th class="th-center"><span style="color: #9a9494 !important;">').concat(k.number_format(a),"</span></th></tr>"),s++)}),k.exist_tag("table[data-table=exclusions]")&&jQuery(i).insertAfter("table[data-table=exclusions] tr:first"),k.line_chart(t,o.title,o.date,r)}},k.hits_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){var t=k.is_active("overview_page")?300:210;return k.isset(k.global,"request_params","page")&&"hits"===k.global.request_params.page&&(t=80),""+('<div class="o-wrap"><div class="wps-postbox-chart--data"><div class="wps-postbox-chart--items"></div><div class="wps-postbox-chart--previousPeriod">'+k._("previous_period")+'</div></div><div class="wps-postbox-chart--container"><canvas id="'+k.chart_id("hits"))+'" height="'+t+'"></canvas></div></div>'},meta_box_init:function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.hits_chart(k.chart_id("hits"),n),k.isset(k.global,"request_params","page")&&"hits"===k.global.request_params.page&&["visits","visitors"].forEach(function(t){var e="span[id^='number-total-chart-"+t+"']";k.exist_tag(e)&&jQuery(e).html(n.total[t])})},hits_chart:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];document.getElementById(t)&&(e={data:e.data,previousData:e.previousData},k.new_line_chart(e,t))}},k.hitsmap_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return'<div class="o-wrap"><div id="wp-statistics-visitors-map"></div></div>'},meta_box_init:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],o=Array(),e=(a.hasOwnProperty("country")&&Object.keys(a.country).forEach(function(e){var n="<div class='map-html-marker'><div class=\"map-country-header\"><img src='".concat(a.country[e].flag,"' alt=\"").concat(a.country[e].name,"\" title='").concat(a.country[e].name,"' class='log-tools wps-flag'/> ").concat(a.country[e].name," (").concat(a.total_country[e],")</div>");Object.keys(a.visitor[e]).forEach(function(t){n+="<p><img src='".concat(a.visitor[e][t].browser.logo,"' alt=\"").concat(a.visitor[e][t].browser.name,"\" class='wps-flag log-tools' title='").concat(a.visitor[e][t].browser.name,"'/> ").concat(a.visitor[e][t].ip," ")+(["Unknown","(Unknown)"].includes(a.visitor[e][t].city)?"":"- "+a.visitor[e][t].city)+"</p>"}),n+="</div>",o[e]=n}),jQuery("#wp-statistics-visitors-map").vectorMap({map:"world_en",backgroundColor:"#fff",borderColor:"#7e7e7e",borderOpacity:.6,color:"#e6e5e2",selectedColor:"#9DA3F7",hoverColor:"#404BF2",colors:a.color,onLabelShow:function(t,e,n){void 0!==o[n]?e.html(o[n]):e.html(e.html()+" [0]<hr />")}}),jQuery("#wp-statistics-hitsmap-widget")),n=jQuery("#side-sortables"),i=jQuery("#normal-sortables"),t={attributes:!1,childList:!0,subtree:!1},r=new MutationObserver(function(t){(n.find(e).length||i.find(e).length)&&(window.dispatchEvent(new Event("resize")),r.disconnect())});n.length&&r.observe(document.getElementById("side-sortables"),t),i.length&&r.observe(document.getElementById("normal-sortables"),t)}},k.models_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return""+('<div class="o-wrap"><div class="c-chart c-chart--limited-height"><canvas id="'+k.chart_id("models"))+'" height="220"></canvas></div></div>'},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=[{label:k._("model"),data:t.model_value}];k.horizontal_bar(k.chart_id("models"),t.model_name,e[0].data,null)}},k.pages_chart_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return'<div class="o-wrap"><canvas id="'+k.chart_id("pages-chart")+'" height="80"></canvas></div>'},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.show_chart(k.chart_id("pages-chart"),t),k.exist_tag("span[id=number-total-visits]")&&jQuery("span[id=number-total-visits]").html(t.total),k.exist_tag("span[id=number-total-chart-visits]")&&jQuery("span[id=number-total-chart-visits]").html(t.total_dates)},show_chart:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];k.line_chart(t,e.title,e.date,[{label:k._("visits"),data:e.stat,backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,fill:!0,tension:.4}])}},k.pages_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a="";return t.pages&&0<t.pages.length?(a+='<div class="o-table-wrapper"><table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l">'.concat(k._("title"),'</th><th class="wps-pd-l"><span class="wps-order">').concat(k._("views"),"</span></th><th></th></tr></thead><tbody> "),k.global.admin_url.replace("/wp-admin/",""),t.pages.forEach(function(t){var e=document.getElementById("wp-statistics-pages-widget"),n=k._("view");e&&(n=(e=null!==e.closest("#dashboard-widgets"))||window.innerWidth<=500?k._("view"):k._("view_content")),a+='<tr><td class="wps-pd-l"><div class="wps-ellipsis-parent" title="'.concat(t.title,'"><span class="wps-ellipsis-text">').concat(t.title,'</span></div></td><td class="wps-pd-l"><a href="').concat(t.hits_page,'">').concat(t.number,'</a></td><td class="wps-pd-l"><a target="_blank" class="wps-view-content" href="').concat(t.link,'">').concat(n,"</a></td></tr>"),0}),a+="</tbody></table></div>"):k.no_meta_box_data()}},window.addEventListener("resize",function(){window.addEventListener("resize",function(){var t=document.getElementById("wp-statistics-pages-widget"),e=null;t&&(e=null!==t.closest("#dashboard-widgets")),0<(t=document.querySelectorAll(".wps-view-content")).length&&t.forEach(function(t){t.textContent=e||window.innerWidth<=500?k._("view"):k._("view_content")})})}),k.platforms_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return""+('<div class="o-wrap"><div class="c-chart c-chart--limited-height"><canvas id="'+k.chart_id("platforms"))+'" height="220"></canvas></div></div>'},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=[{label:k._("platform"),data:t.platform_value}];if(k.horizontal_bar(k.chart_id("platforms"),t.platform_name,e[0].data,t.platform_logos),k.exist_tag("#"+k.getMetaBoxKey("platforms-table"))){["platforms-table","platforms"].forEach(function(t){jQuery("#"+k.getMetaBoxKey(t)+" .inside").removeAttr("style")});for(var n='<div class="title-center">'.concat(t.title,'</div><table width="100%" class="o-table"><tr><td class="wps-text-muted">').concat(k._("platform"),'</td><td class="wps-text-muted">').concat(k._("visitor_count"),'</td><td class="wps-text-muted">').concat(k._("percentage"),"</td></tr>"),a=0;a<t.platform_name.length;a++)n+=" <tr><td>".concat(t.platform_name[a],"</td><td>").concat(0<parseInt(t.platform_value[a])?'<a href="'+t.info.visitor_page+"&platform="+t.platform_name[a]+"&from="+t.from+"&to="+t.to+'" target="_blank"> '.concat(k.number_format(t.platform_value[a])," </a>"):k.number_format(t.platform_value[a]),"</td><td>").concat(k.number_format(t.platform_value[a]/t.total*100),"%</td> </tr>");n=n+" <tr><td>".concat(k._("total"),"</td><td>").concat(k.number_format(t.total),"</td><td></td></tr>")+"</table>",jQuery("#"+k.getMetaBoxKey("platforms-table")+" .inside").html(n),k.set_equal_height(".postBox-table .inside",".postBox-chart .inside")}}},k.post_summary_meta_box={params:function(){return{ID:k.global.page.ID}},view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=void 0!==t.summary&&void 0!==t.summary.postChartData&&null!==t.summary.postChartData&&Object.keys(t.summary.postChartData).length?'<div class="c-wps-post-summary-panel-chart"><canvas id="'+k.chart_id("post_summary")+'" height="100"></canvas></div>':"";return t.hasOwnProperty("content")?'<div class="wps-center" style="padding: 15px;"> '+t.content+"</div>":'<p class="wps-wrap wps-meta-box-header">'+t.output+e},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];t.hasOwnProperty("content")?jQuery("#"+k.getMetaBoxKey("post_summary")+" button[onclick]").remove():void 0!==t.summary&&void 0!==t.summary.postChartData&&null!==t.summary.postChartData&&Object.keys(t.summary.postChartData).length&&this.post_summary_chart(k.chart_id("post_summary"),t.summary)},post_summary_chart:function(t){var e,n,a,o,i,r,s;return t=t,a=(e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[]).postChartData,o="Visitors",i="#A5AAEA",void 0!==e.postChartSettings&&null!==e.postChartSettings&&((e=e.postChartSettings).color&&(i=e.color),e.label)&&(o=e.label),e={animation:!1,responsive:!0,maintainAspectRatio:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1,displayColors:!1,position:"nearest",intersect:!1,external:function(t){var n,e,a,o,i,r,s=t,t=s.chart,s=s.tooltip,c=t.canvas.parentNode.querySelector("div");c||((c=document.createElement("div")).classList.add("c-wps-mini-chart-post-summary-tooltip"),t.canvas.parentNode.appendChild(c)),0===s.opacity?c.style.opacity=0:s.body&&(e=s.title||[],i=s.body.map(function(t){return t.lines}),n="<div>",e.forEach(function(t){n+='<div class="chart-title">'.concat(t,"</div>")}),i.forEach(function(t,e){t=t.join(": "),n+="<div>".concat(t,"</div>")}),c.innerHTML=n,e=(o=t.canvas).offsetLeft,t=o.offsetTop,a=o.offsetWidth,o=o.offsetHeight,c.style.opacity=0===i[0].length?0:1,i=c.offsetWidth,r=e+s.caretX-i/2,s=t+o,(r=r<e?e:r)+i>e+a&&(r=e+a-i),c.style.left=r+"px",c.style.top=s+"px")},callbacks:{title:function(t){return a[t[0].label].fullDate},label:function(t){return t=t.formattedValue,'<div class="content-itemss"> <div class="content-item"><span>'.concat(o,"</span> <span>").concat(t,"</span></div>")}}}},scales:{x:{offset:!0,grid:{display:!1},border:{color:"transparent",width:0},ticks:{align:"inner",maxTicksLimit:4,fontColor:"#898A8E",fontSize:12,padding:5}},y:{position:"right",beginAtZero:!0,grid:{display:!1},border:{color:"transparent",width:0},ticks:{align:"inner",maxTicksLimit:5,fontColor:"#898A8E",fontSize:12,padding:8,stepSize:1}}},layout:{padding:{left:0,right:0,top:0,bottom:0}}},t=jQuery("#"+t)[0].getContext("2d"),r=Object.entries(a).map(function(t){return _slicedToArray(t,2)[1].hits}),"line"==(s=r.length<=30?"bar":"line")&&((n=t.createLinearGradient(0,0,0,t.canvas.height-10)).addColorStop(0,k.hex_to_rgba(i,1)),n.addColorStop(.5,k.hex_to_rgba(i,.25)),n.addColorStop(.75,k.hex_to_rgba(i,0)),n.addColorStop(1,k.hex_to_rgba(i,0))),void new Chart(t,{type:s,data:{labels:Object.entries(a).map(function(t){return _slicedToArray(t,1)[0]}),datasets:[{data:r,backgroundColor:"line"==s?n:Object.entries(a).map(function(t){return 0===_slicedToArray(t,2)[1].hits?"#000000b3":k.hex_to_rgba(i,.5)}),hoverBackgroundColor:"line"==s?n:Object.entries(a).map(function(t){return 0===_slicedToArray(t,2)[1].hits?"#000000b3":i}),pointBackgroundColor:i,fill:"line"==s,barPercentage:.9,categoryPercentage:1,tension:.5,minBarLength:1,borderWidth:"line"==s?1:0,pointRadius:"line"==s?0:void 0,pointHoverRadius:"line"==s?5:void 0,borderColor:i}]},options:e})}},k.post_meta_box={params:function(){return{ID:k.global.page.ID}},view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t.hasOwnProperty("content")?' <div class="wps-center" style="padding: 15px;"> '+t.content+"</div>":' <div class="wps-wrap"> '+t.visitors+"</div>"},meta_box_init:function(){(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).hasOwnProperty("content")&&jQuery("#"+k.getMetaBoxKey("post")+" button[onclick]").remove()}},k.quickstats_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=(e=(e=(e="")+k.summary_meta_box.user_online(t)+'<div class="o-table-wrapper"><table width="100%" class="o-table"><tbody>')+k.summary_meta_box.summary_statistics(t)+"</tbody></table></div>")+'<div class="o-wrap"><div class="wps-postbox-chart--data"><div class="wps-postbox-chart--items"></div><div class="wps-postbox-chart--previousPeriod">'.concat(k._("previous_period"),'</div></div><div class="wps-postbox-chart--container"><canvas id="').concat(k.chart_id("quickstats"),'" height="210"></canvas></div></div>');return 0==k.global.stats_report_option&&(e+='<div class="wp-quickstats-widget__enable-email"><div class="wp-quickstats-widget__enable-email__desc"><span class="wp-quickstats-widget__enable-email__icon"></span><div><p>'.concat(k._("receive_weekly_email_reports"),'</p><a href="').concat(k.global.setting_url,'&tab=notifications-settings" title="').concat(k._("enable_now"),'">').concat(k._("enable_now"),'</a></div></div><div class="wp-quickstats-widget__enable-email__close"><span class="wp-close" title="').concat(k._("close"),'" onclick="this.parentElement.parentElement.remove()"></span></div></div>')),e+'<a href="'.concat(k.global.admin_url,'/admin.php?page=wps_overview_page" title="').concat(k._("view_detailed_analytics"),'" class="wp-quickstats-widget__link">').concat(k._("view_detailed_analytics"),"</a>")},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];document.getElementById(k.chart_id("quickstats"))&&k.new_line_chart(t["hits-chart"],k.chart_id("quickstats"))}},k.recent_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n="",n=(n+='<div class="o-table-wrapper">')+('<table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l"><span class="wps-order">'.concat(k._("last_view"),'</span></th><th class="wps-pd-l">').concat(k._("visitor_info"),"</th>")+(k.is_active("geo_ip")?'<th class="wps-pd-l">'.concat(k._("location"),"</th>"):"")+' <th class="wps-pd-l">'.concat(k._("referrer"),'</th><th class="wps-pd-l">').concat(k._("latest_page"),'</th><th class="wps-pd-l">').concat(k._("views"),"</th></tr></thead><tbody>"));return t.forEach(function(t,e){n+='<tr><td class="wps-pd-l">'.concat(t.last_view,'</td><td class="wps-pd-l">').concat(k.visitor_info(t),"</td> </td>")+(k.is_active("geo_ip")?'<td class="wps-pd-l"><div class="wps-country-flag wps-ellipsis-parent"><a href="" class="wps-tooltip" title="'.concat(t.location.country,'"><img src="').concat(t.location.flag,'" alt="" width="15" height="15"></a> <span class="wps-ellipsis-text" title="').concat(t.location.location,'">').concat(t.location.location,"</span></div> </td>"):"-")+' <td class="wps-pd-l">'+(t.referrer&&""!==t.referrer.name?'<a target="_blank" href="'.concat(t.referrer.link,'" title="').concat(t.referrer.name,'" class="wps-link-arrow"><span>').concat(t.referrer.name,"</span></a>"):'<span aria-hidden="true">—</span>')+'</td><td class="wps-pd-l">'+(t.last_page&&""!==t.last_page.title?'<a target="_blank" href="'.concat(t.last_page.link,'" title="').concat(t.last_page.title,'" class="wps-link-arrow"><span>').concat(t.last_page.title,"</span></a>"):'<span aria-hidden="true">—</span><span class="screen-reader-text">-</span>')+'</td><td class="wps-pd-l"><a href="'.concat(t.single_url,'">').concat(t.hits,"</a></td></tr>")}),n+="</tbody></table></div>"}},k.referring_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e='<div class="o-table-wrapper">';return e+='<table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l">'.concat(k._("address"),'</th><th class="wps-pd-l"><span class="wps-order">').concat(k.meta_box_lang("referring","references"),"</span></th></tr></thead><tbody>"),t.referring.forEach(function(t){e+='<tr><td class="wps-pd-l"><a class="wps-link-arrow" href=\'//'.concat(t.domain,"' title='").concat(t.domain,'\' target="_blank"><span>').concat(t.domain,'</span></a></td><td class="wps-pd-l wps-middle-vertical"><a style="justify-content: flex-end;" href="').concat(t.page_link,'">').concat(k.formatNumber(t.number)," </a></td></tr>")}),e+="</tbody></table></div>"}},k.search_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){return""+('<div class="o-wrap"><div class="wps-postbox-chart--data"><div class="wps-postbox-chart--items"></div><div class="wps-postbox-chart--previousPeriod">'+k._("previous_period")+'</div></div><div class="wps-postbox-chart--container"><canvas id="'+k.chart_id("search"))+'"></canvas></div></div>'},meta_box_init:function(){k.new_line_chart(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],k.chart_id("search"))}},k.summary_meta_box={summary_statistics:function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a="<thead>";if(a+='<tr><th width="50%">'+k._("time")+"</th>",["visitors","visits"].forEach(function(t){a+="<th>"+(k.is_active(t)?k._(t):"")+"</th>"}),a+="</tr></thead><tbody>",Object.keys(n).length){for(var o=["today","yesterday","this-week","last-week","this-month","last-month","7days","30days","90days","6months","this-year","total"],t=0;t<o.length;t++)!function(e){a+="<tr><td><b>".concat(k._(o[e]),"</b></td>"),["visitors","visits"].forEach(function(t){void 0===n[t]?a+="<td></td>":a+="<td>"+(k.is_active(t)?'<a href="'.concat(n[t][o[e]].link,'"><span class="quickstats-values">').concat(n[t][o[e]].value,"</span></a>"):"")+"</td>"}),a+="</tr>"}(t);a+="</tbody>"}return a},user_online:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e="";return t.user_online&&(e='<div class="c-live"><div><span class="c-live__status"></span><span class="c-live__title">'.concat(k._("online_users"),'</span></div><div class="c-live__online"><span class="c-live__online--value">').concat(t.user_online.value,'</span><a className="c-live__value" href="').concat(t.user_online.link,'"><span class="c-live__online--arrow"></span></a></div>'),e+="</div>"),e},view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=(e=(e="")+this.user_online(t)+'<div class="o-table-wrapper"><table width="100%" class="o-table o-table--wps-summary-stats">')+this.summary_statistics(t)+"</table></div>";return 0==k.global.stats_report_option&&(e+='<div class="wp-quickstats-widget__enable-email"><div class="wp-quickstats-widget__enable-email__desc"><span class="wp-quickstats-widget__enable-email__icon"></span><div><p>'.concat(k._("receive_weekly_email_reports"),'</p><a href="').concat(k.global.setting_url,'&tab=notifications-settings" title="').concat(k._("enable_now"),'">').concat(k._("enable_now"),'</a></div></div><div class="wp-quickstats-widget__enable-email__close"><span class="wp-close" title="').concat(k._("close"),'" onclick="this.parentElement.parentElement.remove()"></span></div></div>')),e}},k.top_pages_chart_meta_box={placeholder:function(){return k.rectangle_placeholder()},view:function(){var t="";return setTimeout(function(){k.date_picker()},1e3),t+('<div class="o-wrap"><canvas id="'+k.chart_id("top-pages-chart"))+'" height="80"></canvas></div>'},meta_box_init:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.top_pages_chart(k.chart_id("top-pages-chart"),t)},top_pages_chart:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],a=[],o=0;Object.keys(n.stat).forEach(function(t){var e=k.random_color(o);a.push({label:t,data:n.stat[t],backgroundColor:"rgba("+e[0]+","+e[1]+","+e[2]+",0.3)",borderColor:"rgba("+e[0]+","+e[1]+","+e[2]+",1)",borderWidth:1,fill:!0,tension:.4}),o++}),k.line_chart(t,n.title,n.date,a)}},k.top_visitors_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e="";e=(e+='<div class="o-table-wrapper">')+('<table width="100%" class="o-table wps-new-table"><thead><tr><th class="wps-pd-l"><span class="wps-order">'.concat(k._("views"),'</span></th><th class="wps-pd-l">').concat(k._("visitor_info"),"</th>")+(k.is_active("geo_ip")?'<th class="wps-pd-l">'.concat(k._("location"),"</th>"):"")+'<th class="wps-pd-l">'.concat(k._("referrer"),'</th><th class="wps-pd-l">').concat(k._("latest_page"),'</th><th class="wps-pd-l">').concat(k._("last_view"),"</th></tr></thead><tbody>"));return t.data.forEach(function(t){e+='<tr><td class="wps-pd-l"><a href="'.concat(t.single_url,'">').concat(t.hits,'</a></td> <td class="wps-pd-l">').concat(k.visitor_info(t),"</td>")+(k.is_active("geo_ip")?'<td class="wps-pd-l"><div class="wps-country-flag wps-ellipsis-parent"><a href="" class="wps-tooltip" title="'.concat(t.location.country,'"><img src="').concat(t.location.flag,'" alt="" width="15" height="15"></a> <span class="wps-ellipsis-text" title="').concat(t.location.location,'">').concat(t.location.location,"</span></div> </td>"):"-")+'<td class="wps-pd-l">'+(t.referrer&&""!==t.referrer.name?'<a target="_blank" href="'.concat(t.referrer.link,'" title="').concat(t.referrer.name,'" class="wps-link-arrow"><span>').concat(t.referrer.name,"</span></a>"):'<span aria-hidden="true">—</span>')+'</td><td class="wps-pd-l">'+(t.last_page&&""!==t.last_page.title?'<a target="_blank" href="'.concat(t.last_page.link,'" title="').concat(t.last_page.title,'" class="wps-link-arrow"><span>').concat(t.last_page.title,"</span></a>"):'<span aria-hidden="true">—</span><span class="screen-reader-text">-</span>')+'</td> <td class="wps-pd-l">'.concat(t.last_view,"</td></tr>"),0}),e+="</tbody></table></div>"}},k.useronline_meta_box={view:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e='<div class="o-table-wrapper">';return e+='<table class="o-table wps-new-table"> <thead><tr><th class="wps-pd-l"><span class="wps-order">'.concat(k._("last_view"),'</span></th><th class="wps-pd-l">').concat(k._("visitor_info"),"</th>")+(k.is_active("geo_ip")?'<th class="wps-pd-l">'.concat(k._("location"),"</th>"):"")+'<th class="wps-pd-l">'.concat(k._("referrer"),'</th><th class="wps-pd-l">').concat(k._("latest_page"),'</th><th class="wps-pd-l">').concat(k._("online_for"),'</th><th class="wps-pd-l">').concat(k._("views"),"</th> </tr> </thead><tbody>"),t.forEach(function(t){e+='<tr><td class="wps-pd-l">'.concat(t.last_view,'</td><td class="wps-pd-l">').concat(k.visitor_info(t),"</td>")+(k.is_active("geo_ip")?'<td class="wps-pd-l"><div class="wps-country-flag wps-ellipsis-parent"><a href="" class="wps-tooltip" title="'.concat(t.location.country,'"><img src="').concat(t.location.flag,'" alt="" width="15" height="15"></a> <span class="wps-ellipsis-text" title="').concat(t.location.location,'">').concat(t.location.location,"</span></div> </td>"):"-")+'<td class="wps-pd-l">'+(t.referrer&&""!==t.referrer.name?'<a target="_blank" href="'.concat(t.referrer.link,'" title="').concat(t.referrer.name,'" class="wps-link-arrow"><span>').concat(t.referrer.name,"</span></a>"):'<span aria-hidden="true">—</span>')+'</td><td class="wps-pd-l">'+(t.last_page&&""!==t.last_page.title?'<a target="_blank" href="'.concat(t.last_page.link,'" title="').concat(t.last_page.title,'" class="wps-link-arrow"><span>').concat(t.last_page.title,"</span></a>"):'<span aria-hidden="true">—</span><span class="screen-reader-text">-</span>')+'</td><td class="wps-pd-l">'.concat(t.online_time,'</td><td class="wps-pd-l"> <a href="').concat(t.single_url,'">').concat(t.hits,"</a></td> </tr>")}),e+="</tbody></table></div>"}},k.visitor_info=function(t){var e=k.isset(k.global,"options","track_users")?k.global.options.track_users:null,n='<ul class="wps-visitor__information--container">';return 0<Object.keys(t.os).length&&(n+='<li class="wps-visitor__information"><div class="wps-tooltip" title="'.concat(t.os.name,'"><img src="').concat(t.os.logo,'" width="15" height="15"></div></li>')),0<Object.keys(t.browser).length&&(n+='<li class="wps-visitor__information"><div class="wps-tooltip" title="'.concat(t.browser.name,'"><img src="').concat(t.browser.logo,'" width="15" height="15"></div></li>')),n+='<li class="wps-visitor__information"><div>',t.user&&0<Object.keys(t.user).length?n+=e?'<a href="'.concat(t.single_url,'"><span class="wps-visitor__information__user-img"></span></a><a class="wps-visitor__information__user-text wps-tooltip" title="').concat(t.user.email," (").concat(t.user.role,')" href="').concat(t.single_url,'"><span title="').concat(t.user.name,'">').concat(t.user.name,"</span><span>#").concat(t.ID,"</span></a>"):'<div class="wps-tooltip" data-tooltip-content="#tooltip_user_id"><a href="'.concat(t.single_url,'"><span class="wps-visitor__information__user-img"></span></a></div><div class="wps-tooltip_templates"><div id="tooltip_user_id"><div>').concat(k._("id"),": ").concat(t.ID,"</div><div>").concat(k._("name"),": ").concat(t.user.name,"</div><div>").concat(k._("email"),": ").concat(t.user.email," </div><div>").concat(k._("ip"),": ").concat(t.IP,"</div></div></div>"):n+=e?'<a href="'.concat(t.single_url,'"><span class="wps-visitor__information__incognito-img"></span></a><a href="').concat(t.single_url,'" class="wps-visitor__information__incognito-text">').concat(t.IP,"</a>"):'<div class="wps-tooltip" title="'.concat(k._("ip"),": ").concat(t.IP,'"><a href="').concat(t.single_url,'"><span class="wps-visitor__information__incognito-img"></span></a></div>'),n+"</div></li></ul>"},k.isset(k.global,"request_params","page")&&"plugins"===k.global.request_params.page&&jQuery(document).ready(function(){function c(){m&&0<m.length&&f&&f.classList.remove("wps-hide")}function n(){g=[],s.forEach(function(t){t.checked&&g.push(t.getAttribute("data-slug"))})}function r(t,e,n,a,o){var i;n<t.length?(i=t[n],i=_objectSpread(_objectSpread({},v),{},{action:e,plugin_slug:i}),o&&(o.classList.add("loading"),o.classList.add("disabled")),b(i,o,function(){return r(t,e,n+1,a,o)})):a()}function t(t,n,a){0<t.length&&t.forEach(function(e){e.addEventListener("click",function(t){t.stopPropagation(),t=e.getAttribute("data-slug"),t=_objectSpread(_objectSpread({},v),{},_defineProperty({action:n},a,t)),b(t,e)})})}function l(t,e,n){var a,o;"wp_statistics_check_license"===t.action&&(y(e),a=document.createElement("div"),null!=(o=n)&&null!=(o=o.data)&&null!=(o=o.message)&&o.toLowerCase().includes("domain")?(e.parentElement.querySelector("input").classList.add("wps-warning"),a.classList.add("wps-alert","wps-alert--warning")):(e.parentElement.querySelector("input").classList.add("wps-danger"),a.classList.add("wps-alert","wps-alert--danger")),a.innerHTML='<span class="icon"></span><div><p>'.concat(null==(o=n)||null==(o=o.data)?void 0:o.message,"</p></div>"),o=t.tab?document.querySelector(".wps-addon__step__active-license"):e.parentElement)&&o.parentNode.insertBefore(a,o.nextSibling),"wp_statistics_download_plugin"===t.action&&(n=document.querySelector('[data-slug="'.concat(t.plugin_slug,'"]')))&&((e=n.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(a=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--danger"),a.textContent=k._("failed"),n.parentElement.parentElement.insertBefore(a,n.parentElement.parentElement.firstChild),"get-started"===t.tab)&&((e=document.createElement("a")).classList.add("wps-postbox-addon__button","button-retry-addon-download","js-addon-retry-btn"),e.textContent=k._("retry"),e.setAttribute("data-slug",t.plugin_slug),n.parentElement.parentElement.insertBefore(e,a.nextSibling)),"wp_statistics_activate_plugin"===t.action&&(n=document.querySelector('[data-slug="'.concat(t.plugin_slug,'"]')))&&((e=n.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(a=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--danger"),a.textContent=k._("failed"),n.parentElement.parentElement.insertBefore(a,n.parentElement.parentElement.firstChild),n.style.display="flex")}var e,a,o=document.querySelectorAll(".js-addon-show-more"),i=document.querySelectorAll(".js-wps-addon-license-button"),s=document.querySelectorAll(".js-wps-addon-check-box"),d=document.querySelectorAll(".js-addon-retry-btn"),u=document.querySelector(".js-wps-addon-select-all"),p=document.querySelector(".js-addon-active-license"),_=document.querySelector(".js-addon-download-button"),h=document.querySelector(".wps-addon__step__active-license input"),f=document.querySelector(".js-addon_active-all"),m=document.querySelectorAll(".js-addon-active-plugin-btn"),g=[],w=[],v={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_check_license"},y=("plugins"===(v=Object.assign(v,k.global.request_params)).page&&"downloads"===(null==(e=v)?void 0:e.tab)&&_&&0===s.length&&(_.textContent=k._("continue_to_next_step"),_.classList.remove("disabled"),_.href="admin.php?page=wps_plugins_page&tab=get-started&license_key="+v.license_key),c(),function(t){(t=t.parentElement.parentElement.querySelector(".wps-alert"))&&t.remove()}),b=(0<s.length?(u&&(u.addEventListener("click",function(t){t.stopPropagation(),s.forEach(function(t){t.checked=!0,t.parentElement.parentElement.parentElement.classList.add("wps-has-checkbox")}),_.classList.remove("disabled"),n()}),u.click()),a=function(){var e=!1;s.forEach(function(t){t.checked&&(e=!0)}),e?_.classList.remove("disabled"):_.classList.add("disabled"),n()},s.forEach(function(t){t.addEventListener("change",a)})):u&&u.classList.add("wps-hide"),t(d,"wp_statistics_download_plugin","plugin_slug"),t(m,"wp_statistics_activate_plugin","plugin_slug"),document.addEventListener("click",function(t){var e;t.target.classList.contains("js-addon-retry-btn")?(t.stopPropagation(),e=t.target.getAttribute("data-slug"),e=_objectSpread(_objectSpread({},v),{},{action:"wp_statistics_download_plugin",plugin_slug:e}),b(e,t.target)):t.target.classList.contains("js-addon-active-plugin-btn")?(t.stopPropagation(),e=t.target.getAttribute("data-slug"),e=_objectSpread(_objectSpread({},v),{},{action:"wp_statistics_activate_plugin",plugin_slug:e}),b(e,t.target)):t.target.classList.contains("js-addon_active-all")&&(t.stopPropagation(),f.classList.add("wps-hide"),m=document.querySelectorAll(".js-addon-active-plugin-btn"),w=[],m.forEach(function(t){w.push(t.getAttribute("data-slug"))}),m)&&0<m.length&&(m.forEach(function(t,e){0<e&&((e=t.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(e=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--waiting"),e.textContent=k._("waiting"),t.parentElement.parentElement.insertBefore(e,t.parentElement.parentElement.firstChild),t.parentElement.classList.add("wps-hide"))}),r(w,"wp_statistics_activate_plugin",0,function(){m.forEach(function(t,e){t.parentElement.classList.remove("wps-hide")}),m=document.querySelectorAll(".js-addon-active-plugin-btn"),c()}))}),_&&_.addEventListener("click",function(t){_.classList.contains("disable")||(t.stopPropagation(),s.forEach(function(t){t.checked||(t.disabled=!0)}),u.classList.add("wps-hide"),s.forEach(function(t,e){t.checked&&0<e&&((e=t.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(e=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--waiting"),e.textContent=k._("waiting"),t.parentElement.parentElement.insertBefore(e,t.parentElement.parentElement.firstChild),t.parentElement.classList.add("wps-hide"))}),r(g,"wp_statistics_download_plugin",0,function(){_.classList.add("redirecting"),_.textContent=k._("redirecting");var e=new URLSearchParams;g.forEach(function(t){return e.append("addons[]",t)}),window.location.href="admin.php?page=wps_plugins_page&tab=get-started&license_key=".concat(v.license_key,"&")+e.toString()},_))}),0<o.length&&(o.forEach(function(t){t.addEventListener("click",function(t){t.stopPropagation(),t=this.parentElement.classList.contains("active"),document.querySelectorAll(".js-addon-show-more").forEach(function(t){t.parentElement.classList.remove("active")}),t||this.parentElement.classList.add("active")})}),document.body.addEventListener("click",function(){document.querySelectorAll(".js-addon-show-more").forEach(function(t){t.parentElement.classList.remove("active")})})),0<i.length&&i.forEach(function(t){t.addEventListener("click",function(t){var e,n,a;t.stopPropagation(),t=this.classList.contains("active"),document.querySelectorAll(".js-wps-addon-license-button").forEach(function(t){t.classList.remove("active"),t.closest(".wps-postbox-addon__item").classList.remove("active")}),t||(this.classList.add("active"),(t=this.closest(".wps-postbox-addon__item"))&&(e=function(){n.classList.remove("wps-danger","wps-warning"),y(a),""===n.value.trim()?(a.classList.add("disabled"),a.disabled=!0):(a.classList.remove("disabled"),a.disabled=!1)},t.classList.add("active"),n=t.querySelector(".wps-addon__item__update_license input"),a=t.querySelector(".wps-addon__item__update_license button"),n&&a&&(e(),n.addEventListener("input",function(){e()})),a)&&a.addEventListener("click",function(t){t.stopPropagation();var t=n.value.trim(),e=n.dataset.addonSlug;t&&e&&(t=_objectSpread({license_key:t,addon_slug:e},v),b(t,a))}))})}),function(i,r,s){var t,e;r&&r.classList.add("loading"),"wp_statistics_download_plugin"===i.action&&(e=document.querySelector('[data-slug="'.concat(i.plugin_slug,'"]')))&&((t=e.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&t.remove(),(t=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--purple"),t.textContent=k._("downloading"),e)&&e.parentElement.parentElement&&(e.parentElement.parentElement.insertBefore(t,e.parentElement.parentElement.firstChild),e.style.display="none"),"wp_statistics_activate_plugin"===i.action&&(t=document.querySelector('[data-slug="'.concat(i.plugin_slug,'"]')))&&((e=t.parentElement.parentElement.querySelector(".wps-postbox-addon__status"))&&e.remove(),(e=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--purple"),e.textContent=k._("activating"),t)&&t.parentElement.parentElement&&(t.parentElement.parentElement.insertBefore(e,t.parentElement.parentElement.firstChild),t.style.display="none"),jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:i,timeout:3e4,success:function(t){var e,n,a,o;r&&r.classList.remove("loading"),t.success?(r&&r.classList.add("disabled"),"wp_statistics_check_license"===i.action&&(null!=(e=k.global.request_params)&&e.tab?(r.classList.add("redirecting"),r.textContent=k._("redirecting"),window.location.href="admin.php?page=wps_plugins_page&tab=downloads&license_key="+i.license_key):(y(r),r.parentElement.querySelector("input").classList.remove("wps-danger"),(o=r.parentElement.parentElement.parentElement.querySelector(".wps-postbox-addon__status")).classList.contains("wps-postbox-addon__status--danger")&&(o.classList.add("wps-postbox-addon__status--success"),o.classList.remove("wps-postbox-addon__status--danger"),o.textContent=k._("activated")),(o=document.createElement("div")).classList.add("wps-alert","wps-alert--success"),o.innerHTML='<span class="icon"></span><div><p>'.concat(null==t||null==(e=t.data)?void 0:e.message,"</p></div>"),(n=r.parentElement)&&n.parentNode.insertBefore(o,n.nextSibling))),"wp_statistics_download_plugin"===i.action&&(o=document.querySelector('[data-slug="'.concat(i.plugin_slug,'"]')))&&(n=o.parentElement.parentElement.querySelector(".wps-postbox-addon__status--purple"),a=o.parentElement.parentElement.querySelector(".wps-postbox-addon__label--updated"),n&&n.remove(),a&&a.remove(),(n=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--installed"),n.textContent=k._("already_installed"),o&&o.parentElement.parentElement&&o.parentElement.parentElement.insertBefore(n,o.parentElement.parentElement.firstChild),"downloads"===i.tab&&n.parentElement.parentElement.classList.add("wps-addon__download__item--disabled"),"get-started"===i.tab&&((a=document.createElement("a")).classList.add("wps-postbox-addon__button","button-activate-addon","js-addon-active-plugin-btn"),a.textContent=k._("active"),a.setAttribute("data-slug",i.plugin_slug),o.parentElement.insertBefore(a,n.nextSibling),a=document.querySelector(".js-addon-show-more"),m=document.querySelectorAll(".js-addon-active-plugin-btn"),c(),a)&&a.classList.remove("wps-hide"),o.remove()),"wp_statistics_activate_plugin"===i.action&&(n=document.querySelector('[data-slug="'.concat(i.plugin_slug,'"]')))&&((a=n.parentElement.parentElement.querySelector(".wps-postbox-addon__status--purple"))&&a.remove(),(o=document.createElement("span")).classList.add("wps-postbox-addon__status","wps-postbox-addon__status--success"),o.textContent=k._("activated"),n.parentElement.parentElement.insertBefore(o,n.parentElement.parentElement.firstChild),n.remove())):l(i,r,t),s&&s()},error:function(t,e,n){r&&r.classList.remove("loading"),s&&s(),l(i,r,n)}})});function x(){h.classList.remove("wps-danger","wps-warning"),y(p),""===h.value.trim()?(p.classList.add("disabled"),p.disabled=!0):(p.classList.remove("disabled"),p.disabled=!1)}h&&p&&(x(),h.addEventListener("input",function(){x()})),p&&p.addEventListener("click",function(t){t.stopPropagation(),(t=h.value.trim())&&(t=_objectSpread({license_key:t},v),b(t,p))})}),k.isset(k.global,"request_params","page")&&"author-analytics"===k.global.request_params.page&&(s={init:function(){"undefined"==typeof Wp_Statistics_Author_Analytics_Object?console.log("Variable Wp_Statistics_Author_Analytics_Object not found."):this.generateCharts()},generateCharts:function(){this.generatePublishingOverviewChart(),this.generateViewsPerPostsChart(),this.generateOperatingSystemChart(),this.generateBrowsersChartData()},generateBrowsersChartData:function(){var t;k.isset(Wp_Statistics_Author_Analytics_Object,"browser_chart_data")&&((t=Wp_Statistics_Author_Analytics_Object.browser_chart_data).data&&0!=t.data.length?k.horizontal_bar("wps-browsers",t.labels,t.data,t.icons):jQuery("#wps-browsers").parent().html(k.no_results()))},generateOperatingSystemChart:function(){var t;k.isset(Wp_Statistics_Author_Analytics_Object,"os_chart_data")&&((t=Wp_Statistics_Author_Analytics_Object.os_chart_data).data&&0!=t.labels.length&&0!=t.data.length?k.horizontal_bar("wps-operating-systems",t.labels,t.data,t.icons):jQuery("#wps-operating-systems").parent().html(k.no_results()))},generateViewsPerPostsChart:function(){var t,s,e,n;k.isset(Wp_Statistics_Author_Analytics_Object,"views_per_posts_chart_data")&&(t=Wp_Statistics_Author_Analytics_Object.views_per_posts_chart_data,s=t.datasets.map(function(t){return t.img}).map(function(t){var e=new Image;return e.src=t,e}),e={id:"afterRenderPlugin",afterDraw:function(i,t,e){var r=document.getElementById("publishedChart").getContext("2d");i.data.datasets.forEach(function(t,e){t.data.forEach(function(t,e){var e=s[e%s.length],n=i.scales.x.getPixelForValue(t.x),a=n-15,o=(t=i.scales.y.getPixelForValue(t.y))-15;r.beginPath(),r.arc(n,t,17,0,2*Math.PI),r.lineWidth=4,r.strokeStyle="rgba(81,0,253,20%)",r.stroke(),r.closePath(),r.save(),r.beginPath(),r.arc(n,t,15,0,2*Math.PI),r.clip(),r.drawImage(e,a,o,30,30),r.restore()})})}},(400<Chart.version.replace(/\./g,"")?Chart:Chart.plugins).register(e),Chart.Tooltip.positioners.top=function(t,e){var n=this.chart,n=(_objectDestructuringEmpty(n.chartArea),n.scales),a=n.x,n=n.y;return{x:a.getPixelForValue(a.getValueForPixel(e.x)),y:n.getPixelForValue(n.getValueForPixel(e.y))-20,xAlign:"center",yAlign:"bottom"}},n={type:"scatter",data:n={datasets:[{label:t.labels.chartLabel,data:t.datasets,backgroundColor:"#E8EAEE"}]},options:{responsive:!0,pointRadius:16,pointHoverRadius:16,tooltipPosition:{x:10,y:30},layout:{padding:{Right:20,Left:20}},scales:{y:{type:"linear",ticks:{stepSize:4,color:"#56585A",fontSize:13,padding:15},title:{display:!0,text:t.labels.yAxisLabel,fontSize:14,color:"#000"},grid:{drawBorder:!1,tickLength:0}},x:{type:"linear",position:"bottom",title:{display:!0,text:t.labels.xAxisLabel,fontSize:14,color:"#000"},ticks:{stepSize:5e4,autoSkip:!1,maxRotation:90,minRotation:90,color:"#56585A",padding:15,fontSize:13},grid:{drawBorder:!1,tickLength:0}}},plugins:{legend:{display:!1},tooltip:{position:"top",callbacks:{label:function(t){return t=t.raw,["".concat(k._("visits"),"/").concat(k._("published"),": (").concat(t.x,", ").concat(t.y,")"),k._("author")+": "+t.author]}}}}},plugins:[e]},new Chart(document.getElementById("publishedChart"),n))},generatePublishingOverviewChart:function(){var t;k.isset(Wp_Statistics_Author_Analytics_Object,"publish_chart_data")&&(t={type:"matrix",data:{datasets:[{label:"overview",data:Wp_Statistics_Author_Analytics_Object.publish_chart_data.datasets,backgroundColor:function(t){return n=(t=t).dataset.data[t.dataIndex].v,a=Math.min.apply(Math,_toConsumableArray(t.dataset.data.map(function(t){return t.v}))),t=Math.max.apply(Math,_toConsumableArray(t.dataset.data.map(function(t){return t.v}))),0===n?"#e8eaee":(e=["#B28DFF","#5100FD","#4915B9","#250766"],n=Math.floor((n-a)/(t-a)*(e.length-1)),e[Math.min(Math.max(n,0),e.length-1)]);var e,n,a},borderColor:"transparent",borderWidth:4,borderRadius:2,boxShadow:0,width:function(t){return((t=t.chart.chartArea||{}).right-t.left)/53-1-2},height:function(t){return((t=t.chart.chartArea||{}).bottom-t.top)/7-1-1}}]},options:{maintainAspectRatio:!1,scales:{y:{type:"time",offset:!0,time:{unit:"day",round:"day",isoWeek:1,parser:"i",displayFormats:{day:"iiiiii"}},reverse:!0,position:"left",ticks:{maxRotation:0,autoSkip:!0,padding:5,color:"#000",font:{size:12}},grid:{display:!1,drawBorder:!1,tickLength:0},border:{display:!1}},x:{type:"time",offset:!0,position:"top",time:{unit:"month",round:"week",isoWeekday:1,displayFormats:{week:"MMM"}},ticks:{maxRotation:0,autoSkip:!0,padding:5,color:"#000000",font:{size:12},callback:function(t,e,n){var a=(t=new Date(t)).toLocaleString("default",{month:"short"});return 1===(t=t.getDate())?a:a+" "+t}},border:{display:!1},grid:{display:!1,drawBorder:!1,tickLength:0}}},aspectRatio:10,animation:!1,plugins:{chartAreaBorder:{borderWidth:5,borderColor:"#fff"},legend:!1,tooltip:{displayColors:!1,callbacks:{title:function(){return""},label:function(t){return t=t.dataset.data[t.dataIndex],[k._("date")+": "+t.d,k.global.active_post_type+": "+t.v]}}}}}},new Chart(document.getElementById("overviewPublishChart"),t))}},jQuery(document).ready(function(){s.init()})),k.isset(k.global,"request_params","page")&&"browser"===k.global.request_params.page&&(c={},["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(c[t]=k.global.request_params[t])}),["browsers-table","browsers"].forEach(function(t){jQuery("#"+k.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-browsers-table-widget .inside").html(k.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),k.run_meta_box("browsers",c,!1)),k.isset(k.global,"request_params","page")&&"category-analytics"===k.global.request_params.page&&(l={data:[],init:function(){"undefined"==typeof Wp_Statistics_Category_Analytics_Object?console.log("Variable Wp_Statistics_Category_Analytics_Object not found."):(this.data=Wp_Statistics_Category_Analytics_Object,this.generateCharts())},generateCharts:function(){document.getElementById("performance-category-chart")&&this.generatePerformanceChart(),document.getElementById("performance-category-chart-single")&&this.generatePerformanceChartSingle(),document.getElementById("category_operating_systems")&&this.generateOperatingSystemChart(),document.getElementById("category_browsers")&&this.generateBrowsersChartData(),document.getElementById("category_device_models")&&this.generateDeviceModelsChart(),document.getElementById("category_device_usage")&&this.generateDeviceUsageChart(),document.getElementById("category-search-engines-chart")&&this.generateSearchEngineChart()},generatePerformanceChart:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-category-chart",null,"performance")},generatePerformanceChartSingle:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-category-chart-single",null,"performance")},generateOperatingSystemChart:function(){var t=this.data.os_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_operating_systems",t.labels,t.data,t.icons):jQuery("#category_operating_systems").parent().html(k.no_results())},generateBrowsersChartData:function(){var t=this.data.browser_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_browsers",t.labels,t.data,t.icons):jQuery("#category_browsers").parent().html(k.no_results())},generateDeviceModelsChart:function(){var t=this.data.model_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_device_models",t.labels,t.data,null):jQuery("#category_device_models").parent().html(k.no_results())},generateDeviceUsageChart:function(){var t=this.data.device_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("category_device_usage",t.labels,t.data,null):jQuery("#category_device_usage").parent().html(k.no_results())},generateSearchEngineChart:function(){var t=this.data.search_engine_chart_data;t.data.datasets&&0!=t.data.datasets.length?k.new_line_chart(t,"category-search-engines-chart",null):(jQuery("#category-search-engines-chart").parent().html(k.no_results()),jQuery(".wps-postbox-chart--data").remove())}},jQuery(document).ready(function(){l.init()})),k.isset(k.global,"request_params","page")&&"content-analytics"===k.global.request_params.page&&(z={data:[],init:function(){"undefined"==typeof Wp_Statistics_Content_Analytics_Object?console.log("Variable Wp_Statistics_Content_Analytics_Object not found."):(this.data=Wp_Statistics_Content_Analytics_Object,this.generateCharts())},generateCharts:function(){document.getElementById("performance-chart")&&this.generatePerformanceChart(),document.getElementById("performance-chart-single")&&this.generatePerformanceChartSingle(),document.getElementById("content_operating_systems")&&this.generateOperatingSystemChart(),document.getElementById("content_browsers")&&this.generateBrowsersChartData(),document.getElementById("content_device_models")&&this.generateDeviceModelsChart(),document.getElementById("content_device_usage")&&this.generateDeviceUsageChart(),document.getElementById("content-search-engines-chart")&&this.generateSearchEngineChart()},generatePerformanceChart:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-chart",null,"performance")},generateOperatingSystemChart:function(){var t=this.data.os_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_operating_systems",t.labels,t.data,t.icons):jQuery("#content_operating_systems").parent().html(k.no_results())},generateBrowsersChartData:function(){var t=this.data.browser_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_browsers",t.labels,t.data,t.icons):jQuery("#content_browsers").parent().html(k.no_results())},generateDeviceModelsChart:function(){var t=this.data.model_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_device_models",t.labels,t.data,null):jQuery("#content_device_models").parent().html(k.no_results())},generateDeviceUsageChart:function(){var t=this.data.device_chart_data;t.data&&0!=t.data.length?k.horizontal_bar("content_device_usage",t.labels,t.data,null):jQuery("#content_device_usage").parent().html(k.no_results())},generateSearchEngineChart:function(){var t=this.data.search_engine_chart_data;t.data.datasets&&0!=t.data.datasets.length?k.new_line_chart(t,"content-search-engines-chart"):(jQuery("#content-search-engines-chart").parent().html(k.no_results()),jQuery(".wps-postbox-chart--data").remove())},generatePerformanceChartSingle:function(){var t=this.data.performance_chart_data;k.new_line_chart(t,"performance-chart-single",null,"performance")}},jQuery(document).ready(function(){z.init()})),k.isset(k.global,"request_params","page")&&"countries"===k.global.request_params.page&&(d={limit:0},["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(d[t]=k.global.request_params[t])}),k.run_meta_box("countries",d,!1)),k.isset(k.global,"request_params","page")&&"exclusions"===k.global.request_params.page&&(C=k.isset(k.global,"request_params","from")&&k.isset(k.global,"request_params","to")?{from:k.global.request_params.from,to:k.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(k.rectangle_placeholder("wps-text-placeholder")),k.run_meta_box("exclusions",C,!1)),k.isset(k.global,"request_params","page")&&"hits"===k.global.request_params.page&&(O={},O=k.isset(k.global,"request_params","from")&&k.isset(k.global,"request_params","to")?{from:k.global.request_params.from,to:k.global.request_params.to}:{ago:30},jQuery("span[id^='number-total-chart-']").html(k.rectangle_placeholder("wps-text-placeholder")),k.run_meta_box("hits",O,!1)),0),X=document.querySelectorAll(".wps-slider__slide"),q=X.length,L=document.querySelector(".wps-slider__dots");function Q(n){X.forEach(function(t,e){t.style.display=e===n?"block":"none"});var e=n;if(L.innerHTML="",1<q){for(var a,t=function(t){(a=document.createElement("span")).className="wps-slider__dot",a.addEventListener("click",function(){Q(t),clearInterval($),V()}),a.classList.toggle("active",t===e),L.appendChild(a)},o=0;o<q;o++)t(o);L.style.display="block"}else L.style.display="none"}function V(){1<q&&($=setInterval(function(){Q(P=(P+1)%q)},5e3))}function Z(t){var e=jQuery(".wps-privacy-mode__items"),n=jQuery(".wps-adminHeader .wps-adminHeader__side .privacy"),a=jQuery(".wps-privacy-status");e.find(".wps-privacy-mode__item").removeClass("loading"),a.removeClass("loading success warning"),a.find(".wps-privacy-status__bar-passed").css("display","none"),a.find(".wps-privacy-status__bar-need-work").css("display","none"),a.addClass(100==t.percentage_ready?"success":"warning"),a.find(".wps-privacy-status__percent-value").text(t.percentage_ready),a.find(".wps-privacy-status__rules-mapped-value").text(t.rules_mapped),a.find(".wps-privacy-status__passed-value").text(t.summary.passed),a.find(".wps-privacy-status__need-work-value").text(t.summary.action_required),0<t.summary.action_required?(e.find(".wps-privacy-mode__item input:checked").next().find(".wps-privacy-mode__content").text(k._("non_privacy_compliant")),e.find(".wps-privacy-mode__item input:checked").parent().addClass("wps-privacy-mode__item--warning"),a.find(".wps-privacy-status__bar-need-work").css("display","block"),a.find(".wps-privacy-status__bar-need-work").css("width",100-t.percentage_ready+"%"),n.addClass("warning")):(e.find(".wps-privacy-mode__item input:checked").next().find(".wps-privacy-mode__content").text(k._("privacy_compliant")),e.find(".wps-privacy-mode__item input:checked").parent().removeClass("wps-privacy-mode__item--warning"),n.removeClass("warning")),0<t.summary.passed&&(a.find(".wps-privacy-status__bar-passed").css("display","block"),a.find(".wps-privacy-status__bar-passed").css("width",t.percentage_ready+"%"))}function J(t){var i=jQuery(".wps-privacy-list .wps-privacy-list__items");i.html(""),i.removeClass("loading"),t.forEach(function(t){var e,n,a,o;n="",a=(e=t).status,o=e.compliance.value,e.hasOwnProperty("action")&&(n+='data-audit="'.concat(e.name,'" data-action="').concat(e.action.key,'"'),a=e.action.key,o=e.action.value),t='<div id="'.concat(e.name,'" class="wps-privacy-list__item wps-privacy-list__item--').concat(e.status,'"><div class="wps-privacy-list__title"><div><span class="wps-privacy-list__icon wps-privacy-list__icon--').concat(e.status,'"></span><span class="wps-privacy-list__text">').concat(e.title,"</span></div><a ").concat(n,' class="wps-privacy-list__button wps-privacy-list__button--').concat(a,'">').concat(o,'</a></div><div class="wps-privacy-list__content">').concat(e.notes,"</div></div>"),i.append(t)})}function tt(t){var n=jQuery(".wps-privacy-questions .wps-privacy-list__items");n.html(""),n.removeClass("loading"),t.forEach(function(t){var e;e=t,t='<div class="wps-privacy-list__item wps-privacy-list__item--'.concat(e.status,'"><div class="wps-privacy-list__title"><span class="wps-privacy-list__icon wps-privacy-list__icon--').concat(e.status,'"></span><div><span>').concat(e.title,"</span><span>").concat(e.summary,'</span></div></div><div class="wps-privacy-list__content">').concat(e.notes,"</div></div>"),n.append(t)})}function et(t){jQuery(".wp-statistics-settings .wps-optionsMenu .wps-optionsMenuItem").removeClass("current"),jQuery(".wp-statistics-settings .tab-content").removeClass("current"),jQuery("[data-tab="+t+"]").addClass("current"),jQuery("#"+t).addClass("current"),jQuery("#wp-statistics-settings-form").length&&(t=jQuery(location).attr("href")+"&tab="+t,jQuery("#wp-statistics-settings-form").attr("action",t).submit())}0<q&&(Q(P),V()),k.isset(k.global,"request_params","page")&&k.global.request_params.page,k.isset(k.global,"request_params","page")&&"platform"===k.global.request_params.page&&(u={},["from","to"].forEach(function(t){k.isset(k.global,"request_params",t)&&(u[t]=k.global.request_params[t])}),["platforms-table","platforms"].forEach(function(t){jQuery("#"+k.getMetaBoxKey(t)+" .inside").css("height","430px")}),jQuery("#wp-statistics-platforms-table-widget .inside").html(k.placeholder()),jQuery(".wps-ph-picture").attr("style","height: 310px;"),k.run_meta_box("platforms",u,!1)),k.isset(k.global,"request_params","page")&&"privacy-audit"===k.global.request_params.page&&(jQuery(document).ready(function(){var t={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_getPrivacyStatus"},t=Object.assign(t,k.global.request_params);jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:t,timeout:3e4,success:function(t){var e=t.data;if(0==t.success)return console.log(e);Z(e.compliance_status),J(e.audit_list),tt(e.faq_list)},error:function(t,e,n){console.log(n)}})}),jQuery(document).on("click",".wps-privacy-list__button[data-action]",function(t){var n=jQuery(t.currentTarget),t=n.data("audit"),e=n.data("action"),a=jQuery("#"+t);n.hasClass("loading")||("resolve"===e&&alert(k._("privacy_resolve_alert")),n.addClass("loading"),jQuery(".wps-privacy-questions .wps-privacy-list__items").addClass("loading"),jQuery(".wps-privacy-mode__items .wps-privacy-mode__item").addClass("loading"),jQuery(".wps-privacy-status").addClass("loading"),t={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_updatePrivacyStatus",audit_name:t,audit_action:e},t=Object.assign(t,k.global.request_params),jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"POST",dataType:"json",data:t,timeout:3e4,success:function(t){var e=t.data;if(0==t.success)return console.log(e);n.removeClass("loading"),Z(e.compliance_status),tt(e.faq_list),e.audit_item&&(t=a,e=e.audit_item,t.attr("class","wps-privacy-list__item wps-privacy-list__item--"+e.status),t.find(".wps-privacy-list__icon").attr("class","wps-privacy-list__icon wps-privacy-list__icon--"+e.status),t.find(".wps-privacy-list__button").attr("class","wps-privacy-list__button wps-privacy-list__button--"+e.status),t.find(".wps-privacy-list__text").html(e.title),t.find(".wps-privacy-list__content").html(e.notes),e.hasOwnProperty("action"))&&(t.find(".wps-privacy-list__button").attr("class","wps-privacy-list__button wps-privacy-list__button--"+e.action.key),t.find(".wps-privacy-list__button").attr("data-action",e.action.key),t.find(".wps-privacy-list__button").data("action",e.action.key),t.find(".wps-privacy-list__button").text(e.action.value))},error:function(t,e,n){console.log(n)}}))})),k.isset(k.global,"request_params","page")&&"referrals"===k.global.request_params.page&&(document.getElementById("incomeVisitorChart")&&(j=jQuery("#incomeVisitorChart").parent(),t=k.rectangle_placeholder(),j.append(t),null!=(C=Wp_Statistics_Referrals_Object.search_engine_chart_data)&&null!=(O=C.data)&&O.datasets&&0!==C.data.datasets.length?(jQuery(".wps-ph-item").remove(),jQuery(".wps-postbox-chart--data").removeClass("c-chart__wps-skeleton--legend"),j.removeClass("c-chart__wps-skeleton"),k.new_line_chart(C,"incomeVisitorChart",null)):(j.html(k.no_results()),jQuery(".wps-ph-item").remove())),jQuery(document).on("click","div#referral-filter",function(t){t.preventDefault(),tb_show("","#TB_inline?&width=430&height=193&inlineId=referral-filter-popup"),setTimeout(function(){var t,e,n="#wps-referral-filter-div";k.exist_tag(n+" input[type=submit]")||(jQuery(n).html('<div style="height: 50px;"></div>'+k.line_placeholder(1)),n=n,t=(t=(t='<table class="o-table wps-referrals-filter">')+'<tr><td class="wps-referrals-filter-title">'.concat(k._("search_by_referrer"),"</td></tr>")+'<tr><td><select name="referrer" class="wps-select2 wps-width-100">')+"<option value=''>".concat(k._("all"),"</option>")+"<option value='test'>test</option>",null!=(e=k.getLinkParams("referrer"))&&(t+="<option value='".concat(e,"'selected>").concat(e,"</option>")),t=(t+="</select></td></tr><tr><td></td></tr>")+'<tr><td><input type="submit" value="'.concat(k._("filter"),'" class="button-primary"> <span class="filter-loading"></span></td></tr>')+"</table>",jQuery(n).html(t),jQuery(".wps-select2").select2({ajax:{delay:500,url:k.global.ajax_url,dataType:"json",data:function(t){var e,t={wps_nonce:k.global.rest_api_nonce,search:t.term,action:"wp_statistics_search_referrers",paged:t.page||1};return k.isset(k.global,"request_params")&&(e=k.global.request_params).page&&(t.page=e.page),t},error:function(t,e,n){console.error("AJAX request error:",e,n)}}}))},500)}),v="#wps-referrals-filter-form",jQuery(document).on("submit",v,function(){var t={select:["referrer"]};Object.keys(t).forEach(function(e){t[e].forEach(function(t){(t=jQuery(v+" "+e+"[name="+t+"]")).val().length<1&&t.prop("disabled",!0)})}),jQuery("span.filter-loading").html(k._("please_wait"))})),jQuery(".wp-statistics-settings").length&&(t=function(){_.checked=!0},(O=function(t){if(t=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href))return t[1]}("tab"))&&et(O),jQuery(".wp-statistics-settings .wps-optionsMenu .wps-optionsMenuItem").click(function(){et(jQuery(this).attr("data-tab"))}),p=document.querySelector('input[name="user_custom_header_ip_method"]'),_=document.getElementById("custom-header"),p)&&_&&(_.addEventListener("change",function(){_.checked&&p.focus()}),p.addEventListener("click",t),p.addEventListener("paste",t),p.addEventListener("input",t),p.addEventListener("dragover",t),p.addEventListener("drop",t)),C="input[name=wps_referrerspam]",B="tr.referrerspam_field",jQuery(document).on("change",C,function(t){t.preventDefault(),t=jQuery(B),this.checked?t.show("slow"):(t.hide("slow"),t.find("input[type=checkbox]").prop("checked",!1))}),k.isset(k.global,"request_params","page")&&"settings"===k.global.request_params.page&&(j=function(){"yes"===h.value?(f.style.display="table-row",m.style.display="table-row"):(f.style.display="none",m.style.display="none")},jQuery("#wp-statistics-settings-form ul.tabs li").click(function(t){t.preventDefault(),t=e(this).attr("data-tab"),"undefined"!=typeof localStorage&&localStorage.setItem("wp-statistics-settings-active-tab",t)}),"undefined"!=typeof localStorage&&k.isset(k.global,"request_params","save_setting")&&"yes"===k.global.request_params.save_setting&&(O=localStorage.getItem("wp-statistics-settings-active-tab"))&&0<O.length&&e("#wp-statistics-settings-form ul.tabs li[data-tab="+O+"]").click(),h=document.getElementById("wps_addon_settings[customization][show_wps_about_widget_overview]"),f=document.querySelector('label[for="wps_addon_settings[customization][wps_about_widget_title]"]').parentElement.parentElement,m=document.querySelector('label[for="wps_addon_settings[customization][wps_about_widget_content]"]').parentElement.parentElement,h)&&(j(),h.addEventListener("change",j)),k.isset(k.global,"request_params","page")&&"taxonomies"===k.global.request_params.page&&(g={ago:0,type:k.global.request_params.taxonomy,ID:0},["from","to","ID"].forEach(function(t){k.isset(k.global,"request_params",t)&&(g[t]=k.global.request_params[t])}),jQuery("span[id^='number-total-']").html(k.rectangle_placeholder("wps-text-placeholder")),k.run_meta_box("pages-chart",g,!1)),k.isset(k.global,"request_params","page")&&"visitors"===k.global.request_params.page&&(w=function(t,a){var o='<table class="o-table">',i={browsers:["agent","browsers"],country:["location","location"],platform:["platform","platform"],referrer:["referrer","referrer"],user:["user_id","users"]};Object.keys(i).forEach(function(e){o=(o=(o+="<tr><td>".concat(k._(e),"</td></tr>"))+'<tr><td><select name="'.concat(i[e][0],'" class="select2 wps-width-100" data-type-show="select2">'))+"<option value=''>".concat(k._("all"),"</option>");var n=k.getLinkParams(i[e][0]);Object.keys(a[i[e][1]]).forEach(function(t){o+="<option value='".concat(t,"' ").concat(null!=n&&n.replace(/\+/g," ")==t?"selected":"",">").concat(a[i[e][1]][t],"</option>")}),o+="</select></td></tr>"}),o=(o=(o+="<tr><td>".concat(k._("ip"),"</td></tr>"))+'<tr><td><input name="ip" value="'.concat(null!=k.getLinkParams("ip")?decodeURIComponent(k.getLinkParams("ip")):"",'" class="wps-width-100" placeholder=\'xxx.xxx.xxx.xxx\' autocomplete="off"></td></tr>')+"<tr><td></td></tr>")+'<tr><td><input type="submit" value="'.concat(k._("filter"),'" class="button-primary"> <span class="filter-loading"></span></td></tr>')+"</table>",jQuery(t).html(o),k.select2()},jQuery(document).on("click","div#visitors-filter",function(t){t.preventDefault(),tb_show("","#TB_inline?&width=430&height=520&inlineId=visitors-filter-popup"),setTimeout(function(){var t,e,n="#wps-visitors-filter-form";k.exist_tag(n+" input[type=submit]")||(jQuery(n).html('<div style="height: 50px;"></div>'+k.line_placeholder(5)),t=localStorage.getItem("wp-statistics-visitors-filter")?JSON.parse(localStorage.getItem("wp-statistics-visitors-filter")):{},!k.isset(t,"timestamp")||!k.isset(t,"value")||k.isset(t,"timestamp")&&k.isset(t,"value")?(e={wps_nonce:k.global.rest_api_nonce,action:"wp_statistics_visitors_page_filters"},e=Object.assign(e,k.global.request_params),jQuery.ajax({url:k.global.admin_url+"admin-ajax.php",type:"GET",dataType:"json",data:e,timeout:3e4,success:function(t){w(n,t)},error:function(t,e,n){jQuery("span.tb-close-icon").click()}})):w(n,t.value))},500)}),v="#wp_statistics_visitors_filter_form",jQuery(document).on("submit",v,function(){var t,e=jQuery(v+" input[name=ip]").val();return 0<e.length&&!1===e.includes("#hash#")&&!1===k.isIP(e)?(alert(k._("er_valid_ip")),!1):(t={input:["ip"],select:["agent","platform","location","referrer","user_id"]},Object.keys(t).forEach(function(e){t[e].forEach(function(t){(t=jQuery(v+" "+e+"[name="+t+"]")).val().length<1&&t.prop("disabled",!0)})}),null!=(e=k.getLinkParams("order"))&&jQuery(this).append('<input type="hidden" name="order" value="'+e+'" /> '),jQuery("span.filter-loading").html(k._("please_wait")),!0)}),document.getElementById("trafficTrendsChart"))&&(t=Wp_Statistics_Visitors_Object.traffic_chart_data,k.new_line_chart(t,"trafficTrendsChart",null)),k.date_picker(),("index.php"===k.global.page.file||k.is_active("overview_page")||"post-new.php"===k.global.page.file||"post.php"===k.global.page.file&&k.isset(k.global,"page","ID"))&&k.run_meta_boxes(),jQuery(document).ready(function(e){var a;e(document.body).on("click",".wps_img_settings_upload_button",function(t){t.preventDefault();var n=e(this);a||((a=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",library:{type:["image"]},multiple:!1})).on("menu:render:default",function(t){t.unset("library-separator"),t.unset("gallery"),t.unset("featured-image"),t.unset("embed"),t.unset("playlist"),t.unset("video-playlist"),t.set({})}),a.on("insert",function(){a.state().get("selection").each(function(t,e){t=t.toJSON(),n.parent().parent().find('input[type="text"]').val(t.url),n.parent().parent().parent().find("#wps-upload-image-preview").attr("src",t.url),n.parent().parent().find(".wps_img_settings_clear_upload_button").show()})})),a.open()}),e(document.body).on("click",".wps_img_settings_clear_upload_button",function(t){t.preventDefault(),e(this).parent().prev().val(""),e("#wps-upload-image-preview").attr("src",wps_ar_vars.default_avatar_url),e(".wps_img_settings_clear_upload_button").hide()})})});
Save Changes
Rename File
Rename