{"size": 407978, "ext": "js", "max_stars_repo_path": "dist/js/libs/oj/min_es5/ojchart-toolkit.js", "max_stars_repo_name": "ConnectionMaster/oraclejet", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/js/libs/oj/min_es5/ojchart-toolkit.js", "max_issues_repo_name": "ConnectionMaster/oraclejet", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/js/libs/oj/min_es5/ojchart-toolkit.js", "max_forks_repo_name": "ConnectionMaster/oraclejet", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 634.4914463453, "max_line_length": 26285, "alphanum_fraction": 0.7464544657}
!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,i){if(!t)return;if("string"==typeof t)return e(t,i);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,i)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function i(t){return(i="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)}
/**
 * @license
 * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 * @ignore
 */define(["exports","ojs/ojdvt-toolkit","ojs/ojdvt-axis","ojs/ojlegend-toolkit","ojs/ojdvt-overview"],function(e,r,a,s,n){"use strict";
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */var o=function(t,e){return t+"; "+e},l=function(t,e,i){return null!=t&&null!=e&&r.Obj.compareValues(i,t,e)},h=function(t,e,i,r){this.id=t,this.series=e,this.group=i,this.context=r};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */r.Obj.createSubclass(h,r.Obj),h.prototype.equals=function(t){return t instanceof h&&(null!=this.id||null!=t.id?l(this.id,t.id,this.context):l(this.series,t.series,this.context)&&l(this.group,t.group,this.context))},h.prototype.toString=function(){return null!=this.id&&"object"!==i(this.id)?this.id.toString():o(this.series,this.group)},h.prototype.valueOf=function(){return this.toString()};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var u=new Object;r.Obj.createSubclass(u,r.Obj),u._SUPPORTED_TYPES=["bar","line","area","lineWithArea","combo","pie","bubble","scatter","funnel","pyramid","stock","boxPlot"],u.isValidType=function(t){return u._SUPPORTED_TYPES.indexOf(t.getType())>=0},u.isSpark=function(t){return t.getOptions().__spark},u.isOverview=function(t){return t.getOptions()._isOverview},u.isVertical=function(t){return!u.isHorizontal(t)&&!u.isPolar(t)},u.isHorizontal=function(t){return"horizontal"==t.getOptions().orientation&&!u.isPolar(t)&&!u.isStock(t)&&(u.isBLAC(t)||u.isFunnel(t))},u.isPolar=function(t){return"polar"==t.getOptions().coordinateSystem&&!u.isStock(t)&&!u.isBoxPlot(t)},u.isCombo=function(t){return"combo"==t.getType()},u.isBar=function(t){return"bar"==t.getType()},u.isLine=function(t){return"line"==t.getType()},u.isLineWithArea=function(t){return"lineWithArea"==t.getType()},u.isArea=function(t){return"area"==t.getType()},u.isStock=function(t){return"stock"==t.getType()},u.isBoxPlot=function(t){return"boxPlot"==t.getType()},u.isScatter=function(t){return"scatter"==t.getType()},u.isBubble=function(t){return"bubble"==t.getType()},u.isPie=function(t){return"pie"==t.getType()},u.isFunnel=function(t){return"funnel"==t.getType()},u.isPyramid=function(t){return"pyramid"==t.getType()},u.isDualY=function(t){return!(!u.hasAxes(t)||u.isScatterBubble(t)||u.isPolar(t))},u.isBLAC=function(t){var e=t.getType();return"bar"==e||"line"==e||"area"==e||"lineWithArea"==e||"combo"==e||"stock"==e||"boxPlot"==e},u.isScatterBubble=function(t){var e=t.getType();return"scatter"==e||"bubble"==e},u.isLineArea=function(t){var e=t.getType();return"line"==e||"area"==e||"lineWithArea"==e},u.isScrollSupported=function(t){return!(u.isPie(t)||u.isFunnel(t)||u.isPolar(t)||u.isPyramid(t))},u.isOverviewSupported=function(t){return u.isBLAC(t)&&u.isVertical(t)},u.hasAxes=function(t){return!("pie"==t.getType()||"funnel"==t.getType()||"pyramid"==t.getType())},u.isLegendRendered=function(t){var e=t.getOptions(),i=t.getOptionsCache().getFromCache("hasLargeSeriesCount"),r=e.legend;if("off"===r.rendered)return!1;if("auto"===r.rendered&&i)return!1;var a=t.getOptionsCache().getFromCache("hasSeriesDisplayedInLegend"),s=r.sections&&0!==r.sections.length,n=u.isStock(t),o=u.isFunnel(t),l=u.isPyramid(t);return!((n||o||l)&&!a&&!s)},u.hasTimeAxis=function(t){return u.isBLAC(t)&&"disabled"!=u.getTimeAxisType(t)},u.hasGroupAxis=function(t){return u.isBLAC(t)&&"disabled"==u.getTimeAxisType(t)},u.getTimeAxisType=function(t){var e=t.getOptions().timeAxisType;return e&&"auto"!=e&&u.isBLAC(t)&&!u.isPolar(t)?e:u.isStock(t)?"skipGaps":"disabled"},u.isMixedFrequency=function(t){return"mixedFrequency"==u.getTimeAxisType(t)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var g={polarToCartesian:function(t,e,i){var a=i.x+i.w/2+t*Math.sin(e),s=i.y+i.h/2-t*Math.cos(e);return new r.Point(a,s)},convertAxisCoord:function(t,e,i){if(u.isPolar(t)){var a=g.polarToCartesian(e.y,e.x,i);return new r.Point(a.x,a.y)}return u.isHorizontal(t)?new r.Point(e.y,e.x):new r.Point(e.x,e.y)}},d={getValueFormat:function(t,e){var i=t.getOptions().valueFormats;return i?i[e]?i[e]:"group"==e&&u.hasTimeAxis(t)?d.getValueFormat(t,"x"):"y"!=e&&"y2"!=e&&"min"!=e&&"max"!=e||!u.isBLAC(t)?{}:d.getValueFormat(t,"value"):{}},formatValue:function(t,e,i,r,s,n){var o,l="auto",h="on";e.scaling&&(l=e.scaling),e.autoPrecision&&(h=e.autoPrecision),e.converter&&(o=e.converter),r=null!=r?r:i,s=null!=s?s:i,n=null!=n?n:0;var u=new a.LinearScaleAxisValueFormatter(t.getCtx(),r,s,n,l,h,t.getOptions().translations);return o&&o.format?u.format(i,o):u.format(i)},formatDateValue:function(t,e){var i=t.converter;return i&&i.format?i.format(e):null}},c=new Object;
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */r.Obj.createSubclass(c,r.Obj),c.hasData=function(t){var e=t.getOptions();if(!e||!e.series||e.series.length<1)return!1;for(var i=c.getSeriesCount(t),r=0;r<i;r++){var a=c.getSeriesItem(t,r);if(a&&a.items&&a.items.length>=1)return!0}return!1},c.hasInvalidData=function(t){return!c.hasData(t)||c.hasInvalidTimeData(t)},c.hasInvalidTimeData=function(t){if(u.isFunnel(t)||u.isPie(t)||u.isPyramid(t))return!1;var e,i,r=t.getOptions(),a=c.getGroupCount(t);if(!r||!r.series||r.series.length<1)return!0;if(a<1)return!0;var s=c.getSeriesCount(t);if(u.isMixedFrequency(t))for(e=0;e<s;e++)for(i=0;i<a;i++){var n=c.getDataItem(t,e,i);if(n&&(null==n.x||isNaN(n.x)))return!0}else if(u.hasTimeAxis(t))for(i=0;i<a;i++){var o=c.getGroup(t,i);if(null==o||isNaN(o))return!0}return!1},c.hasSeriesData=function(t,e){var i=c.getSeriesItem(t,e).items;if(i)for(var r=0;r<i.length;r++)if(null!=i[r])return!0;return!1},c.getSeriesCount=function(t){var e=t.getOptions().series;return e?e.length:0},c.getY2SeriesCount=function(t,e,i){for(var r=0,a=c.getSeriesCount(t),s=0;s<a;s++)e&&c.getSeriesType(t,s)!=e||(i||c.isSeriesRendered(t,s))&&c.isAssignedToY2(t,s)&&r++;return r},c.getSeries=function(t,e){var i=c.getSeriesItem(t,e);return i?i.id?i.id:i.name||""===i.name?i.name:String(e):null},c.getSeriesLabel=function(t,e){var i=c.getSeriesItem(t,e);return i&&(i.name||""===i.name)?i.name:null},c.getSeriesIndex=function(t,e){for(var i=c.getSeriesCount(t),r=0;r<i;r++){if(c.getSeries(t,r)==e)return r}return-1},c.getSeriesStyleIndex=function(t,e){if(t.getOptionsCache().getFromCache("hasLargeSeriesCount"))return e;var i=c.getSeries(t,e);return null==i?e:t.getSeriesStyleArray().indexOf(i)},c.getSeriesItem=function(t,e){if(isNaN(e)||null==e||e<0)return null;var i=t.getOptions();return i.series&&i.series.length>e?i.series[e]:void 0},c.getDataItem=function(t,e,i){if(isNaN(i)||null==i||i<0)return null;var r=c.getSeriesItem(t,e);return r&&r.items&&r.items.length>i?r.items[i]:null},c.getRawDataItem=function(t,e,i){if(isNaN(i)||null==i||i<0)return null;var r=t.getRawOptions().series[e].items[i];if("number"==typeof r)return r;var a=Object.assign({},r);return a.itemData=r._itemData,delete a._itemData,r._noTemplate&&(delete a._dvtNoClone,delete a._noTemplate),a},c.getDataItemId=function(t,e,i){var r=c.getDataItem(t,e,i);return r?null!=r.id?r.id:o(c.getSeries(t,e),c.getGroup(t,i)):null},c.getNestedDataItem=function(t,e,i,r){if(isNaN(r)||null==r||r<0)return null;var a=c.getDataItem(t,e,i);return a&&a.items&&a.items.length>r?a.items[r]:null},c.getNestedDataItemCount=function(t,e,i){var r=c.getDataItem(t,e,i);return r&&r.items?r.items.length:0},c.getNestedDataItemId=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);return a?null!=a.id?a.id:c.getDataItemId(t,e,i)+"; "+String(r):null},c.getNestedDataItemIndex=function(t,e,i,r){for(var a=c.getNestedDataItemCount(t,e,i),s=0;s<a;s++){var n=c.getNestedDataItemId(t,e,i,s);if(l(n,r,t.getCtx()))return s}return-1},c.getGroupCount=function(t){return c._getGroupsArray(t).length},c.getGroup=function(t,e){if(null!=e&&e>=0&&e<c.getGroupCount(t)){var i=c._getGroupsArray(t)[e];if(i)return null!=i.id?i.id:null!=i.name?i.name:String(e)}return null},c.getGroupIndex=function(t,e){for(var i=c.getGroups(t),a=0;a<i.length;a++)if(e instanceof Array&&i[a]instanceof Array?r.ArrayUtils.equals(e,i[a]):e===i[a])return a;return-1},c.getGroupLabel=function(t,e){if(e>=0&&e<c.getGroupCount(t)){var i=c._getGroupsArray(t)[e];if(i)return null!=i.name?i.name:null!=i.id||"string"!=typeof i?"":i}return null},c.getGroups=function(t){var e=t.getOptionsCache().getFromCache("groups");if(!e){var i=c.getGroupCount(t);e=[];for(var r=0;r<i;r++)e.push(c.getGroup(t,r));t.getOptionsCache().putToCache("groups",e)}return e},c._getGroupsArray=function(t){var e=t.getOptions(),i=t.getOptionsCache().getFromCache("groupsArray");if(!i){i=[],e.groups&&(i=c._getNestedGroups(e.groups,i));for(var r=0;r<i.length;r++)1==i[r].id.length&&(i[r].id=i[r].id[0],i[r].name=i[r].name[0]);t.getOptionsCache().putToCache("groupsArray",i)}return i},c._getNestedGroups=function(t,e){if(!t||t&&0==t.length)return[];for(var r=0;r<t.length;r++){var a=t[r],s=null,n=null;if(null!=a&&(s=a.id?a.id:a.name?a.name:a,n=a.name?a.name:a),"object"==i(s)&&(s=null),"object"==i(n)&&(n=null),a&&a.groups){var o=c._getNestedGroups(a.groups,[]);0==o.length&&o.push({id:[],name:[]});for(var l=0;l<o.length;l++)o[l].id.unshift(s),o[l].name.unshift(n);e=e.concat(o)}else e.push({id:[s],name:[n]})}return e},c.getNumLevels=function(t){var e=t.getOptionsCache().getFromCache("groupsNumLevels");if(null!=e)return e;e=0;for(var i=c._getGroupsArray(t),r=0;r<i.length;r++){var a=i[r];if(a&&a.id){var s=Array.isArray(a.id)?a.id.length:1;e=Math.max(e,s)}}return t.getOptionsCache().putToCache("groupsNumLevels",e),e},c.getValue=function(t,e,r,a){var s,n="number"==typeof a&&a>=0;if(!n&&void 0!==(s=t.getOptionsCache().getFromCachedMap2D("value",e,r)))return s;var o=n?c.getNestedDataItem(t,e,r,a):c.getDataItem(t,e,r);return s=null,null!=o&&("object"!=i(o)?s=o:u.isStock(t)&&null!=o.close?s=o.close:null!=o.value?s=o.value:null!=o.y&&(s=o.y)),s=s||(0===s?0:null),n||t.getOptionsCache().putToCachedMap2D("value",e,r,s),s},c.getCumulativeValue=function(t,e,i,r){if(!c.isStacked(t))return c.getValue(t,e,i);var a=r?"cumValueH":"cumValue",s=t.getCache().getFromCachedMap2D(a,e,i);if(void 0!==s)return s;var n=c.getSeriesType(t,e),o=c.isAssignedToY2(t,e),l=c.getValue(t,e,i),h=c.getStackCategory(t,e),u="bar"==n?l<0:c.isSeriesNegative(t,e);s=0;for(var g=e;g>=0;g--)if((r||c.isDataItemRendered(t,g,i))&&n==c.getSeriesType(t,g)&&o==c.isAssignedToY2(t,g)&&c.getStackCategory(t,g)==h){var d=c.getValue(t,g,i),p="bar"==n?d<0:c.isSeriesNegative(t,g);if(u&&p||!u&&!p){var _=t.getCache().getFromCachedMap2D(a,g,i);if(void 0!==_){s=l+(_||0);break}s+=null==d||isNaN(d)?0:d}}return t.getCache().putToCachedMap2D(a,e,i,s),s},c.getLowValue=function(t,e,i){var r=c.getDataItem(t,e,i);return null==r?null:"candlestick"==c.getSeriesType(t,e)?null==r.low&&null!=r.close?null!=r.open?Math.min(r.close,r.open):r.close:r.low:null!=r.low&&null==r.close?r.low:null},c.getHighValue=function(t,e,i){var r=c.getDataItem(t,e,i);return null==r?null:"candlestick"==c.getSeriesType(t,e)?null==r.high?null!=r.open?Math.max(r.close,r.open):r.close:r.high:null!=r.high&&null==r.close?r.high:null},c.getXValue=function(t,e,i){var r=c.getDataItem(t,e,i);return c.getXValueFromItem(t,r,i)},c.getXValueFromItem=function(t,e,i){return null!=e&&null!=e.x?e.x:u.hasGroupAxis(t)?i:u.hasTimeAxis(t)&&!u.isMixedFrequency(t)?c.getGroupLabel(t,i):null},c.getTargetValue=function(t,e){var r=c.getDataItem(t,e,0);return null==r||"object"!=i(r)?null:r.targetValue},c.getZValue=function(t,e,r,a){var s=c.getDataItem(t,e,r);return null==s||"object"!=i(s)?a:null!=s.z?Math.max(0,s.z):a},c.isStockValueRising=function(t,e,i){var r=c.getDataItem(t,e,i);return!r||r.open<=r.close},c.getCategories=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);if(a&&a.categories)return a.categories;var s=c.getDataItem(t,e,i);if(s&&s.categories)return s.categories;var n=c.getSeriesItem(t,e);if(n&&n.categories)return n.categories;var o=c.getSeries(t,e);return null!=o?[o]:[]},c.isAssignedToY2=function(t,e){if(!t.getOptionsCache().getFromCache("hasY2Assignment"))return!1;var i=c.getSeriesItem(t,e);return!(!i||"on"!=i.assignedToY2||!u.isDualY(t))},c.getInitialSelection=function(t){var e=t.getOptions().selection,i=null!=t.getOptions().data;e||(e=[]);for(var r=t.getChartObjPeers(),a=0;a<e.length;a++){var s=null==e[a].id||i?e[a]:e[a].id;if(null!=e[a].id||e[a].series||e[a].group||(e[a]={id:s}),!(null==s||e[a].series&&e[a].group))for(var n=0;n<r.length;n++){var o=r[n];if(l(s,o.getDataItemId(),t.getCtx())){e[a].series=o.getSeries(),e[a].group=o.getGroup();break}}}return e},c.getCurrentSelection=function(t){var e=[],i=t.getSelectionHandler();if(i)for(var r=i.getSelectedIds(),a=0;a<r.length;a++){var s=r[a];e.push({series:s.series,group:s.group,id:s.id})}return e},c.hasVolumeSeries=function(t){var e=t.getOptionsCache().getFromCache("hasVolume");return e||!1},c.isDataSelected=function(t,e,i,r){var a=!isNaN(r)&&null!=r&&r>=0?c.getNestedDataItemId(t,e,i,r):c.getDataItemId(t,e,i),s=c.getSeries(t,e),n=c.getGroup(t,i),o=t.getOptions().selection;o||(o=[]);for(var h=0;h<o.length;h++){if(l(a,o[h],t.getCtx())||l(a,o[h].id,t.getCtx()))return!0;if(null==o[h].id&&l(s,o[h].series,t.getCtx())&&l(n,o[h].group,t.getCtx()))return!0}return!1},c.getDefaultDataLabel=function(t,e,i,r,a,s){var n;if(s)n=c.getCumulativeValue(t,e,i);else{var o=!isNaN(r)&&null!=r&&r>=0?c.getNestedDataItem(t,e,i,r):c.getDataItem(t,e,i);if(!o)return null;n=o.label,"low"==a?n=n instanceof Array?n[0]:n:"high"==a&&(n=n instanceof Array?n[1]:null)}if(null!=n){if("number"==typeof n){var l,h,u,g=c.isAssignedToY2(t,e)&&t.y2Axis?t.y2Axis:t.yAxis;if(g){var p=g.getInfo();l=p.getGlobalMin(),h=p.getGlobalMax(),u=p.getMajorIncrement()}var _=d.getValueFormat(t,"label");return d.formatValue(t,_,n,l,h,u)}return n}return null},c.getStackCategory=function(t,e){var i=t.getCache().getFromCachedMap("stackCategory",e);return void 0!==i||(i=c.isStacked(t)?c.getSeriesItem(t,e).stackCategory||null:c.getSeries(t,e)||null,t.getCache().putToCachedMap("stackCategory",e,i)),i},c.getStackCategories=function(t,e,i){var r=[],a=[],s={},n={},o=t.getCache().getFromCachedMap2D("stackCategories",e,i);if(o)return o;for(var l=c.getSeriesCount(t),h=0;h<l;h++)if(c.isSeriesRendered(t,h)||i){if(e){var u=c.getSeriesType(t,h);if("candlestick"!=u&&"boxPlot"!=u||(u="bar"),e!=u)continue}var g=c.getStackCategory(t,h);c.isAssignedToY2(t,h)?n[g]||(a.push(g),n[g]=!0):s[g]||(r.push(g),s[g]=!0)}return o={y:r,y2:a},t.getCache().putToCachedMap2D("stackCategories",e,i,o),o},c.getBarCategoryZ=function(t,e,i,r){for(var a=0,s=c.getSeriesCount(t),n=0;n<s;n++){var o=c.getSeriesType(t,n);if(("bar"==o||"candlestick"==o||"boxPlot"==o)&&c.getStackCategory(t,n)==e&&c.isSeriesRendered(t,n)){var l=c.isAssignedToY2(t,n);(r&&l||!r&&!l)&&(a=Math.max(a,c.getZValue(t,n,i,1)))}}return a},c.getMarkerPosition=function(t,e,i,a,s){var n,o,l=t.xAxis,h=c.isAssignedToY2(t,e)?t.y2Axis:t.yAxis,d=u.isPolar(t),p=c.isRangeSeries(t,e),_=!isNaN(a)&&null!=a&&a>=0,f=c.getXValue(t,e,i),v=_?c.getValue(t,e,i,a):c.getCumulativeValue(t,e,i);if(u.isBubble(t)){if(d&&v<h.getInfo().getViewportMin())return null;n=d?l.getCoordAt(f):l.getUnboundedCoordAt(f),o=h.getUnboundedCoordAt(v)}else if(p){var m=h.getCoordAt(c.getLowValue(t,e,i)),S=h.getCoordAt(c.getHighValue(t,e,i));n=l.getCoordAt(c.getXValue(t,e,i)),o=(m+S)/2}else n=l.getCoordAt(f),o=h.getCoordAt(v);return null==n||null==o?null:g.convertAxisCoord(t,new r.Point(n,o),s)},c.getScatterBubbleMarkerPosition=function(t,e,i){var a=t.xAxis,s=t.yAxis,n=c.getXValue(t,e,i),o=c.getValue(t,e,i),l=a.getCoordAt(n),h=s.getCoordAt(o);return null==l||null==h?null:new r.Point(l,h)},c.isSeriesNegative=function(t,e){if(!t.getOptionsCache().getFromCache("hasNegativeValues"))return!1;var i=t.getOptionsCache().getFromCachedMap("isSeriesNegative",e);if(null!=i)return i;var r=c.getGroupCount(t);i=!0;for(var a=0;a<r;a++){if(c.getValue(t,e,a)>0){i=!1;break}}return t.getOptionsCache().putToCachedMap("isSeriesNegative",e,i),i},c.getGroupsDataForContext=function(t){var e=t.getOptionsCache().getFromCache("groupsDataArray");if(!e){var i=t.getRawOptions();e=c._getNestedGroupsData(i.groups),t.getOptionsCache().putToCache("groupsDataArray",e)}return e},c.getSeriesDataForContext=function(t,e){var r=t.getRawOptions().series[e],a=Object.assign({},r);a.items=[];for(var s=r.items[0]&&r.items[0]._noTemplate,n=0;n<r.items.length;n++){var o,l=r.items[n];(o="object"===i(l)?Object.assign({},r.items[n]):l)&&"object"===i(o)&&(delete o._itemData,s&&(delete o._dvtNoClone,delete o._noTemplate)),a.items.push(o)}return a},c._getNestedGroupsData=function(t){if(!t)return[];for(var e=[],i=0;i<t.length;i++){var r=t[i];if(r.groups){for(var a=c._getNestedGroupsData(r.groups),s=0;s<a.length;s++)a[s].unshift(r);e=e.concat(a)}else e.push([r])}return e},c._computeOutermostBarMap=function(t){if(!t.getOptionsCache().getFromCache("outermostBar")){for(var e={},i=c.getSeriesCount(t),r=t.getOptionsCache().getFromCache("hasNegativeValues"),a=i-1;a>=0;a--)if(c.isSeriesRendered(t,a)&&"bar"==c.getSeriesType(t,a)){var s=(c.getStackCategory(t,a)||"")+c.isAssignedToY2(t,a);e[s]?e[s].push(a):e[s]=[a]}var n=c.getGroupCount(t);for(var o in e)for(var l=e[o],h=0;h<n;h++)for(var u=!1,g=!1,d=0;d<l.length&&!(!r&&u||u&&g);d++)if(a=l[d],c.isDataItemRendered(t,a,h)){var p=c.getValue(t,a,h);null==p?t.getOptionsCache().putToCachedMap2D("outermostBar",a,h,!1):!u&&p>=0?(u=!0,t.getOptionsCache().putToCachedMap2D("outermostBar",a,h,!0)):!g&&p<0&&(g=!0,t.getOptionsCache().putToCachedMap2D("outermostBar",a,h,!0))}}},c.isOutermostBar=function(t,e,i){return c._computeOutermostBarMap(t),t.getOptionsCache().getFromCachedMap2D("outermostBar",e,i)||!1},c.isDataItemFiltered=function(t,e,i){var r=c.getDataItem(t,e,i);return!(!r||!r._filtered)},c.isStacked=function(t){return!("on"!=t.getOptions().stack||u.isMixedFrequency(t)||c.getSeriesCount(t)<2)&&u.isBLAC(t)},c.isSplitDualY=function(t){return!(!u.isStock(t)||!c.hasVolumeSeries(t)||u.isOverview(t))||"on"==t.getOptions().splitDualY&&c.hasY2Data(t)&&!c.hasY2DataOnly(t)},c.hasY2DataOnly=function(t){return!!u.isDualY(t)&&c.getY2SeriesCount(t,null,!0)==c.getSeriesCount(t)},c.hasY2Data=function(t,e){return!!u.isDualY(t)&&c.getY2SeriesCount(t,null,!0)>0},c.hasY2BarData=function(t){return c.hasY2Data(t,"bar")},c.hasBarSeries=function(t){return c._hasSeriesType(t,"bar")},c.hasLineSeries=function(t){return c._hasSeriesType(t,"line")},c.hasAreaSeries=function(t){return c._hasSeriesType(t,"area")},c.hasLineWithAreaSeries=function(t){return c._hasSeriesType(t,"lineWithArea")},c.hasCandlestickSeries=function(t){return c._hasSeriesType(t,"candlestick")},c.hasBoxPlotSeries=function(t){return c._hasSeriesType(t,"boxPlot")},c._hasSeriesType=function(t,e){if(u.isBLAC(t))for(var i=c.getSeriesCount(t),r=0;r<i;r++)if(c.isSeriesRendered(t,r)&&c.getSeriesType(t,r)==e)return!0;return!1},c.getRefObjs=function(t){var e=c.getAxisRefObjs(t,"x"),i=c.getAxisRefObjs(t,"y"),r=c.getAxisRefObjs(t,"y2");return e.concat(i,r)},c.getAxisRefObjs=function(t,e){var i=t.getOptions();return i&&i[e+"Axis"]&&i[e+"Axis"].referenceObjects?i[e+"Axis"].referenceObjects:[]},c._SERIES_TYPE_RAMP=["bar","line","area"],c.getSeriesType=function(t,e){var i=t.getOptionsCache().getFromCachedMap("seriesType",e);if(i)return i;if(!u.isBLAC(t))return t.getOptionsCache().putToCachedMap("seriesType",e,"auto"),"auto";var r=c.getSeriesItem(t,e);if(i=r?r.type:null,u.isStock(t)||"candlestick"!=i||(i="auto"),!i||"auto"==i)if(u.isBar(t))i="bar";else if(u.isLine(t))i="line";else if(u.isArea(t))i="area";else if(u.isLineWithArea(t))i="lineWithArea";else if(u.isStock(t))i="candlestick";else if(u.isBoxPlot(t))i="boxPlot";else if(u.isCombo(t)){var a=c.getSeriesStyleIndex(t,e)%c._SERIES_TYPE_RAMP.length;i=c._SERIES_TYPE_RAMP[a]}return t.getOptionsCache().putToCachedMap("seriesType",e,i),i},c.getHiddenCategories=function(t){var e=t.getOptions();return e.hiddenCategories||(e.hiddenCategories=[]),e.hiddenCategories},c.getHighlightedCategories=function(t){var e=t.getOptions();return e.highlightedCategories||(e.highlightedCategories=[]),e.highlightedCategories},c.isSeriesRendered=function(t,e){var i=c.getHiddenCategories(t);return!(i.length>0&&r.ArrayUtils.hasAnyItem(i,c.getCategories(t,e)))},c.isDataItemRendered=function(t,e,i,a){var s,n=!isNaN(a)&&null!=a&&a>=0;if(!n&&void 0!==(s=t.getOptionsCache().getFromCachedMap2D("isDataItemRendered",e,i)))return s;if(s=!0,c.isSeriesRendered(t,e)){var o=c.getHiddenCategories(t);o.length>0&&((u.isPie(t)||u.isFunnel(t)||u.isPyramid(t))&&(i=0),r.ArrayUtils.hasAnyItem(o,c.getCategories(t,e,i))&&(s=!1),r.ArrayUtils.hasAnyItem(o,c.getCategories(t,e,i,a))&&(s=!1))}else s=!1;return n||t.getOptionsCache().putToCachedMap2D("isDataItemRendered",e,i,s),s},c.isRangeSeries=function(t,e){var i=t.getOptionsCache();if(!i.getFromCache("hasLowHighSeries"))return!1;var r=i.getFromCachedMap("isRange",e);if(null!=r)return r;r=!1;var a=c.getSeriesType(t,e);if("bar"==a||"area"==a)for(var s=0;s<c.getGroupCount(t);s++)if(null!=c.getLowValue(t,e,s)||null!=c.getHighValue(t,e,s)){r=!0;break}return t.getOptionsCache().putToCachedMap("isRange",e,r),r},c.isSeriesDrillable=function(t,e){var i=c.getSeriesItem(t,e),r=null!=i?i.drilling:"inherit";return"on"==r||"off"!=r&&("on"==(r=t.getOptions().drilling)||"seriesOnly"==r)},c.isDataItemDrillable=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);a||(a=c.getDataItem(t,e,i));var s=null!=a?a.drilling:"inherit";return"on"==s||"off"!=s&&"on"==(s=t.getOptions().drilling)},c.isMultiSeriesDrillEnabled=function(t){return"on"===t.getOptions().multiSeriesDrilling};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var p=function t(e){this.Init({alta:t.SKIN_ALTA},e)};r.Obj.createSubclass(p,r.BaseComponentDefaults),p.SKIN_ALTA={skin:r.CSSStyle.SKIN_ALTA,emptyText:null,type:"bar",stack:"off",stackLabel:"off",orientation:"vertical",polarGridShape:"circle",selectionMode:"none",hideAndShowBehavior:"none",hoverBehavior:"none",zoomAndScroll:"off",zoomDirection:"auto",initialZooming:"none",dragMode:"user",sorting:"off",otherThreshold:0,animationOnDataChange:"none",animationOnDisplay:"none",__sparkBarSpacing:"subpixel",__spark:!1,dataCursor:"auto",dataCursorBehavior:"auto",drilling:"off",highlightMatch:"all",series:[],groups:[],title:{style:new r.CSSStyle(r.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD_13+"color: #252525;"),halign:"start"},subtitle:{style:new r.CSSStyle(r.BaseComponentDefaults.FONT_FAMILY_ALTA_12+"color: #252525;")},footnote:{style:new r.CSSStyle(r.BaseComponentDefaults.FONT_FAMILY_ALTA_11+"color: #333333;"),halign:"start"},titleSeparator:{upperColor:"#74779A",lowerColor:"#FFFFFF",rendered:"off"},touchResponse:"auto",_statusMessageStyle:new r.CSSStyle(r.BaseComponentDefaults.FONT_FAMILY_ALTA_13+"color: #252525;"),_dropColor:"#D9F4FA",xAxis:{tickLabel:{rendered:"on"},majorTick:{rendered:"auto"},minorTick:{rendered:"auto"},axisLine:{rendered:"on"},scale:"linear"},yAxis:{tickLabel:{rendered:"on"},majorTick:{rendered:"auto"},minorTick:{rendered:"auto"},axisLine:{rendered:"auto"},scale:"linear"},y2Axis:{tickLabel:{rendered:"on"},majorTick:{rendered:"auto"},minorTick:{rendered:"auto"},axisLine:{rendered:"auto"},scale:"linear",alignTickMarks:"on"},pieCenter:{labelStyle:new r.CSSStyle("")},zAxis:{},plotArea:{backgroundColor:null},legend:{position:"auto",rendered:"auto",layout:{gapRatio:1},seriesSection:{},referenceObjectSection:{},sections:[]},overview:{rendered:"off"},dnd:{drag:{items:{},series:{},groups:{}},drop:{plotArea:{},xAxis:{},yAxis:{},y2Axis:{},legend:{}}},styleDefaults:{colors:r.CSSStyle.COLORS_ALTA,borderColor:"auto",borderWidth:"auto",patterns:["smallDiagonalRight","smallChecker","smallDiagonalLeft","smallTriangle","smallCrosshatch","smallDiamond","largeDiagonalRight","largeChecker","largeDiagonalLeft","largeTriangle","largeCrosshatch","largeDiamond"],shapes:["square","circle","diamond","plus","triangleDown","triangleUp"],seriesEffect:"color",threeDEffect:"off",selectionEffect:"highlight",animationDuration:1e3,animationIndicators:"all",animationUpColor:"",animationDownColor:"",lineStyle:"solid",lineType:"auto",markerDisplayed:"auto",markerColor:null,markerShape:"auto",markerSize:10,marqueeColor:"",marqueeBorderColor:"",pieFeelerColor:"#BAC5D6",pieInnerRadius:0,selectedInnerColor:"#ffffff",selectedOuterColor:"#5a5a5a",sliceLabelType:"percent",otherColor:"#4b4b4b",dataItemGaps:"auto",dataLabelStyle:new r.CSSStyle(""),_dataLabelStyle:new r.CSSStyle(""),dataLabelPosition:"auto",funnelBackgroundColor:"#EDEDED",x1Format:{},y1Format:{},y2Format:{},zFormat:{},_defaultSliceLabelColor:"#333333",_scrollbarHeight:3,_scrollbarTrackColor:"#F0F0F0",_scrollbarHandleColor:"#9E9E9E",hoverBehaviorDelay:200,dataCursor:{markerSize:8,markerDisplayed:"on",lineStyle:"solid"},groupSeparators:{rendered:"on",color:"rgba(138,141,172,0.4)"},tooltipLabelStyle:new r.CSSStyle(""),tooltipValueStyle:new r.CSSStyle(""),stackLabelStyle:new r.CSSStyle(""),boxPlot:{whiskerSvgStyle:{},whiskerEndSvgStyle:{strokeWidth:2},whiskerEndLength:"9px",medianSvgStyle:{strokeWidth:3}}},layout:{gapWidthRatio:null,gapHeightRatio:null,outerGapWidth:10,outerGapHeight:8,titleSubtitleGapWidth:14,titleSubtitleGapHeight:4,titleSeparatorGap:6,titlePlotAreaGap:16,footnoteGap:10,verticalAxisGap:6,legendGapWidth:15,legendGapHeight:10,tickLabelGapHeight:8,tickLabelGapWidth:9},_locale:"en-us",_resources:{}},p.getGapWidth=function(t,e){return Math.ceil(e*t.getGapWidthRatio())},p.getGapHeight=function(t,e){return Math.ceil(e*t.getGapHeightRatio())},p.prototype.getNoCloneObject=function(t){return{series:{items:{_itemData:!0}},data:!0}};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var _=new Object;r.Obj.createSubclass(_,r.Obj),_.OTHER_SLICE_SERIES_ID="_dvtOther",_.getSliceId=function(t,e){var i=c.getDataItem(t,e,0),r=i?i.id:null,a=c.getSeries(t,e),s=c.getGroup(t,0);return new h(r,a,s,t.getCtx())},_.getOtherSliceId=function(t){var e=c.getGroup(t,0);return new h(null,_.OTHER_SLICE_SERIES_ID,e,t.getCtx())},_.getRenderedSeriesIndices=function(t){return _._getSeriesIndicesArrays(t).rendered},_.hasOtherSeries=function(t){return _._getSeriesIndicesArrays(t).other.length>0},_.getOtherValue=function(t){for(var e=_._getSeriesIndicesArrays(t).other,i=0,r=0;r<e.length;r++){var a=e[r];if(c.isSeriesRendered(t,a)){var s=c.getValue(t,a,0);s>0&&(i+=s)}}return i},_.getOtherSliceIds=function(t){for(var e=_._getSeriesIndicesArrays(t).other,i=[],r=0;r<e.length;r++){var a=e[r];i.push(_.getSliceId(t,a))}return i},_.isOtherSliceSelected=function(t,e){for(var i=_.getOtherSliceIds(t),r=0;r<i.length;r++){for(var a=i[r],s=!1,n=0;n<e.length;n++)if(null!=e[n].id&&a.id===e[n].id||a.series===e[n].series&&a.group===e[n].group){s=!0;break}if(!s)return!1}return!0},_._getSeriesIndicesArrays=function(t){for(var e=[],i=[],r=c.getSeriesCount(t),a=t.getOptions(),s=a.otherThreshold*_.getTotalValue(t),n=0;n<r;n++){var o=c.getValue(t,n,0);s>0&&o<s?i.push(n):e.push(n)}return"ascending"==a.sorting?e.sort(function(e,i){return c.getValue(t,e,0)-c.getValue(t,i,0)}):"on"!=a.sorting&&"descending"!=a.sorting||e.sort(function(e,i){return c.getValue(t,i,0)-c.getValue(t,e,0)}),{rendered:e,other:i}},_.getTotalValue=function(t){for(var e=c.getSeriesCount(t),i=0,r=0;r<e;r++){var a=c.getValue(t,r,0);a>0&&(i+=a)}return i},_.getSliceExplode=function(t,e){var i=c.getSeriesItem(t,e);return i&&i.pieSliceExplode?i.pieSliceExplode:0},_.getSliceBySeriesIndex=function(t,e){for(var i=t.pieChart.__getSlices(),r=0;r<i.length;r++)if(i[r].getSeriesIndex()==e)return i[r];return null};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var f=new Object;r.Obj.createSubclass(f,r.Obj),f.MARKER_DATA_LABEL_GAP=4,f.getSeriesEffect=function(t){return t.getOptions().styleDefaults.seriesEffect},f.getColor=function(t,e,i){var r=c.getDataItem(t,e,i);if(r&&r.color)return r.color;var a=c.getSeriesItem(t,e);if(a&&a.color)return a.color;if("candlestick"==c.getSeriesType(t,e))return f.getStockItemColor(t,e,i);var s=t.getOptions().styleDefaults.colors;return s[c.getSeriesStyleIndex(t,e)%s.length]},f.getStockItemColor=function(t,e,i){var r=t.getOptions();return c.isStockValueRising(t,e,i)?r.styleDefaults.stockRisingColor:r.styleDefaults.stockFallingColor},f.getStockVolumeColor=function(t,e,i){var r=c.getDataItem(t,e,i);if(r&&r.color)return r.color;var a=t.getOptions();return a.styleDefaults.stockVolumeColor?a.styleDefaults.stockVolumeColor:f.getStockItemColor(t,e,i)},f.getSplitterPosition=function(t){var e=t.getOptions().splitterPosition;return null!=e?e:u.isStock(t)?.8:.5},f.getPattern=function(t,e,i,a){var s=c.getNestedDataItem(t,e,i,a);if(s&&s.pattern&&"auto"!=s.pattern)return s.pattern;var n=c.getDataItem(t,e,i);if(n&&n.pattern&&"auto"!=n.pattern)return n.pattern;var o=c.getSeriesType(t,e);if(("line"==o||"area"==o)&&null!=i)return null;var l=c.getSeriesItem(t,e);if(l&&l.pattern&&"auto"!=l.pattern)return l.pattern;if("pattern"==f.getSeriesEffect(t)){if(u.isStock&&"candlestick"==c.getSeriesType(t,e)){var h=c.isStockValueRising(t,e,i),g=r.Agent.isRightToLeft(t.getCtx());return h?g?"smallDiagonalLeft":"smallDiagonalRight":g?"smallDiagonalRight":"smallDiagonalLeft"}var d=t.getOptions().styleDefaults.patterns;return d[c.getSeriesStyleIndex(t,e)%d.length]}return null},f.getMarkerBorderColor=function(t,e,i,r){var a=f.getBorderColor(t,e,i,r);return a||f.getDefaultMarkerBorderColor(t,e,i,r)},f.getDefaultMarkerBorderColor=function(t,e,i,a){if("redwood"===t.getCtx().getThemeBehavior()&&!c.isRangeSeries(t,e))return f.getMarkerColor(t,e,i,a);if(f.getDataItemGaps(t)>0&&"lineWithArea"!=c.getSeriesType(t,e))return f.getBackgroundColor(t,!0);if(u.isBubble(t)&&"gradient"!=f.getSeriesEffect(t)){var s=f.getMarkerColor(t,e,i);if(s)return r.ColorUtils.adjustHSL(s,0,.15,-.25)}return null},f.getBorderColor=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);if(a&&a.borderColor)return a.borderColor;var s=c.getDataItem(t,e,i);if(s&&s.borderColor)return s.borderColor;var n=c.getSeriesItem(t,e);if(n&&n.borderColor)return n.borderColor;var o=t.getOptions().styleDefaults;return"auto"!=o.borderColor?o.borderColor:null},f.getUserBorderWidth=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);if(a&&null!=a.borderWidth)return a.borderWidth;var s=c.getDataItem(t,e,i);if(s&&null!=s.borderWidth)return s.borderWidth;var n=c.getSeriesItem(t,e);if(n&&null!=n.borderWidth)return n.borderWidth;var o=t.getOptions().styleDefaults;return"auto"!=o.borderWidth?o.borderWidth:null},f.getDefaultBorderWidth=function(t){return u.isScatterBubble(t)||u.isLineArea(t)?1.25:1},f.getDefaultMarkerBorderWidth=function(t){return"redwood"===t.getCtx().getThemeBehavior()?0:f.getDefaultBorderWidth(t)},f.getBorderWidth=function(t,e,i,r){var a=f.getUserBorderWidth(t,e,i,r);return null!=a?a:f.getDefaultBorderWidth(t)},f.getMarkerColor=function(t,e,i,r){if(!f.isMarkerDisplayed(t,e,i,r))return f.getColor(t,e,i);var a=c.getNestedDataItem(t,e,i,r);if(a&&a.color)return a.color;var s=c.getDataItem(t,e,i);if(s&&s.color)return s.color;var n=c.getSeriesItem(t,e);if(n&&n.markerColor)return n.markerColor;var o=t.getOptions().styleDefaults.markerColor;return o||f.getColor(t,e,i)},f.getMarkerShape=function(t,e,i,r){var a=t.getOptions(),s=a.styleDefaults.markerShape,n=c.getSeriesItem(t,e);n&&n.markerShape&&(s=n.markerShape);var o=c.getDataItem(t,e,i);o&&o.markerShape&&(s=o.markerShape);var l=c.getNestedDataItem(t,e,i,r);if(l&&l.markerShape&&(s=l.markerShape),"auto"==s)if(u.isBubble(t)||"boxPlot"==c.getSeriesType(t,e)||c.isRangeSeries(t,e))s="circle";else{var h=c.getSeriesStyleIndex(t,e),g=a.styleDefaults.shapes;s=g[h%g.length]}return s},f.getMarkerSize=function(t,e,i,r){var a;if(u.isBubble(t)&&(a=t.getOptionsCache().getFromCachedMap2D("bubbleSizeCache",e,i)))return a;var s=c.getNestedDataItem(t,e,i,r);if(s&&null!=s.markerSize)a=Number(s.markerSize);else{var n=c.getDataItem(t,e,i);if(n&&null!=n.markerSize)a=Number(n.markerSize);else{var o=c.getSeriesItem(t,e);a=o&&null!=o.markerSize?Number(o.markerSize):Number(t.getOptions().styleDefaults.markerSize)}}return u.isOverview(t)&&(a=Math.ceil(.6*a)),a},f.isMarkerDisplayed=function(t,e,i,r){var a,s=c.getNestedDataItem(t,e,i,r);if(s&&null!=s.markerDisplayed)a=s.markerDisplayed;else{var n=c.getDataItem(t,e,i);if(n&&null!=n.markerDisplayed)a=n.markerDisplayed;else{var o=c.getSeriesItem(t,e);a=o&&null!=o.markerDisplayed?o.markerDisplayed:t.getOptions().styleDefaults.markerDisplayed}}return"on"==a||"off"!=a&&(u.isScatterBubble(t)||"boxPlot"==c.getSeriesType(t,e)||"none"==f.getLineType(t,e))},f.getImageSource=function(t,e,i,r,a){var s=c.getNestedDataItem(t,e,i,r);if(s&&s[a])return s[a];var n=c.getDataItem(t,e,i);if(n&&n[a])return n[a];var o=c.getSeriesItem(t,e);return o&&o[a]?o[a]:void 0},f.getLineWidth=function(t,e){var i,r=c.getSeriesItem(t,e),a=t.getOptions();return i=r&&r.lineWidth?r.lineWidth:a.styleDefaults.lineWidth?a.styleDefaults.lineWidth:"lineWithArea"==c.getSeriesType(t,e)?2:3,u.isOverview(t)&&(i=Math.ceil(.6*i)),i},f.getLineStyle=function(t,e){var i=c.getSeriesItem(t,e);return i&&i.lineStyle?i.lineStyle:t.getOptions().styleDefaults.lineStyle},f.getLineType=function(t,e){var i,r=c.getSeriesItem(t,e);return"auto"==(i=r&&r.lineType?r.lineType:t.getOptions().styleDefaults.lineType)&&(i=u.isScatterBubble(t)?"none":"straight"),(u.isPolar(t)||u.isScatterBubble(t))&&("centeredSegmented"==i&&(i="segmented"),"centeredStepped"==i&&(i="stepped")),i},f.getBarSpacing=function(t){return t.getOptions().__sparkBarSpacing},f.getMaxBarWidth=function(t){var e=t.getOptions().styleDefaults.maxBarWidth;return null==e||u.isPolar(t)?1/0:e},f.getBarWidth=function(t,e,i){t.getOptionsCache().getFromCache("hasConstantZValue")&&(e=0,i=0);var r=t.getCache().getFromCachedMap2D("barWidth",e,i);if(null!=r)return r;var a=c.getZValue(t,e,i,1)/t.getOptions()._averageGroupZ;return r=Math.min(a*f.getGroupWidth(t),f.getMaxBarWidth(t)),t.getCache().putToCachedMap2D("barWidth",e,i,r),r},f.getBarStackWidth=function(t,e,i,r){t.getOptionsCache().getFromCache("hasConstantZValue")&&(i=0);var a=r?"y2BarStackWidth":"yBarStackWidth",s=t.getCache().getFromCachedMap2D(a,e,i);if(null!=s)return s;var n=c.getBarCategoryZ(t,e,i,r)/t.getOptions()._averageGroupZ;return s=Math.min(n*f.getGroupWidth(t),f.getMaxBarWidth(t)),t.getCache().putToCachedMap2D(a,e,i,s),s},f.getBarCategoryOffsetMap=function(t,e){t.getOptionsCache().getFromCache("hasConstantZValue")&&(e=0);var i=t.getCache().getFromCachedMap("barCategoryOffsetMap",e);if(i)return i;var r,a=c.isStacked(t),s=c.getStackCategories(t,"bar"),n=u.isMixedFrequency(t),o=c.isSplitDualY(t),l={},h={},g=0,d=0;if(a){for(_=0;_<s.y.length;_++)r=f.getBarStackWidth(t,s.y[_],e,!1),n?l[s.y[_]]=-.5*r:(l[s.y[_]]=g,g+=r);for(o||(d=g),_=0;_<s.y2.length;_++)r=f.getBarStackWidth(t,s.y2[_],e,!0),n?h[s.y2[_]]=-.5*r:(h[s.y2[_]]=d,d+=r);o||(g=d)}else for(var p=c.getSeriesCount(t),_=0;_<p;_++){var v=c.getSeriesType(t,_);if(("bar"==v||"candlestick"==v||"boxPlot"==v)&&c.isSeriesRendered(t,_)){var m=c.isAssignedToY2(t,_),S=c.getStackCategory(t,_);r=f.getBarWidth(t,_,e),m?n?h[S]=-.5*r:(h[S]=d,d+=r):n?l[S]=-.5*r:(l[S]=g,g+=r)}}for(var S in l)l[S]-=o||a?g/2:(g+d)/2;for(var S in h)h[S]-=o||a?d/2:(g+d)/2-g;return i={y:l,y2:h},t.getCache().putToCachedMap("barCategoryOffsetMap",e,i),i},f.getDataItemGaps=function(t){var e=t.getOptionsCache().getFromCache("dataItemGaps");if(null!=e)return e;var i=t.getOptions();if(null!=i.styleDefaults.sliceGaps)e=i.styleDefaults.sliceGaps;else{var r=i.styleDefaults.dataItemGaps;"auto"==r&&(r="on"==i.styleDefaults.threeDEffect?"0%":"50%");var a=r&&r.indexOf?r.indexOf("%"):-1;e=a>=0?(r=r.substring(0,a))/100:0}return t.getOptionsCache().putToCache("dataItemGaps",e),e},f.isSelectable=function(t,e,i){var r=c.getSeriesItem(t,e);return(!r||"off"!=r._selectable)&&(t.isSelectionSupported()&&null!=e&&e>=0&&null!=i&&i>=0)},f.getAnimationOnDisplay=function(t){return t.getOptions().animationOnDisplay},f.getAnimationOnDataChange=function(t){return t.getOptions().animationOnDataChange},f.getAnimationDuration=function(t){return r.CSSStyle.getTimeMilliseconds(t.getOptions().styleDefaults.animationDuration)/1e3},f.getAnimationIndicators=function(t){return t.getOptions().styleDefaults.animationIndicators},f.getAnimationUpColor=function(t){return t.getOptions().styleDefaults.animationUpColor},f.getAnimationDownColor=function(t){return t.getOptions().styleDefaults.animationDownColor},f.getSelectedInnerColor=function(t){return t.getOptions().styleDefaults.selectedInnerColor},f.getSelectedOuterColor=function(t){return t.getOptions().styleDefaults.selectedOuterColor},f.isSelectionHighlighted=function(t){var e=t.getOptions().styleDefaults.selectionEffect;return"highlight"==e||"highlightAndExplode"==e},f.isSelectionExploded=function(t){var e=t.getOptions().styleDefaults.selectionEffect;return"explode"==e||"highlightAndExplode"==e},f.getDataLabelStyle=function(t,e,i,a,s,n,o){var l,h=t.getOptions().styleDefaults,g=[h._dataLabelStyle,h.dataLabelStyle];!s||"bar"!=c.getSeriesType(t,e)&&!u.isBubble(t)||"center"!=n&&"inBottom"!=n&&"inTop"!=n&&"inRight"!=n&&"inLeft"!=n||(l=null!=f.getPattern(t,e,i,a)?"#000000":r.ColorUtils.getContrastingTextColor(s),g.push(new r.CSSStyle("color: "+l+";"))),g.push(f._parseLowHighArray(t.getOptions().styleDefaults.dataLabelStyle,o));var d=c.getDataItem(t,e,i);d&&g.push(new r.CSSStyle(f._parseLowHighArray(d.labelStyle,o)));var p=c.getNestedDataItem(t,e,i,a);return p&&g.push(new r.CSSStyle(f._parseLowHighArray(p.labelStyle,o))),l&&r.Agent.isHighContrast()&&g.push(new r.CSSStyle("color: "+l+";")),r.CSSStyle.mergeStyles(g)},f.getDataLabelCollisions=function(t,e,i,r,a){var s=e&&e.x&&e.x-i.w/2||i.x,n=e&&e.y&&e.y-i.h/2||i.y,o=f.MARKER_DATA_LABEL_GAP/2,l=t.getOptions(),h=a?p.getGapHeight(t,l.layout.legendGapHeight):p.getGapWidth(t,l.layout.legendGapWidth);return{xAxis:n+i.h+o>r.y+r.h,yAxis:s+o<r.x,y2Axis:s+i.w+o>r.x+r.w,legend:s+i.w+o>r.x+r.w+h,top:n<t.getDimensions().y}},f.adjustDataLabelPosition=function(t,e,i){var r=t;return"left"!=t&&"center"!=t||!e.yAxis?"right"!=t&&"center"!=t||!(i&&e.y2Axis||e.legend)?"top"!=t&&"center"!=t||!e.top?"bottom"!=t&&"center"!=t||!e.xAxis||(r="top"):r="bottom":r="left":r="right",r},f._parseLowHighArray=function(t,e){return t instanceof Array?"high"==e?t[1]:t[0]:t},f.isOverviewRendered=function(t){var e=t.getOptions();return u.isOverviewSupported(t)&&"off"!=e.overview.rendered},f.getOverviewHeight=function(t){var e=t.getOptions().overview.height;return null==e&&(e=u.hasTimeAxis(t)?.25:.2),f.getSizeInPixels(e,t.getHeight())},f.getSizeInPixels=function(t,e){if("string"==typeof t){if("%"==t.slice(-1))return e*Number(t.slice(0,-1))/100;if("px"==t.slice(-2))return Number(t.slice(0,-2));t=Number(t)}return"number"==typeof t?t<=1?e*t:t:0},f.getBackgroundColor=function(t,e){var i=t.getOptions();return i.plotArea.backgroundColor?i.plotArea.backgroundColor:e?"#FFFFFF":null},f.getHoverBehaviorDelay=function(t){var e=t.getOptions().styleDefaults.hoverBehaviorDelay;return e?(e=r.CSSStyle.getTimeMilliseconds(e),u.isScatterBubble(t)||u.isLine(t)?.75*e:1.25*e):0},f.optimizeMarkerStroke=function(t){return u.isScatterBubble(t)||u.isBoxPlot(t)},f.getGroupWidth=function(t){var e=t.getCache().getFromCache("groupWidth");return null==e&&(e=t.xAxis.getInfo().getGroupWidth(),t.getCache().putToCache("groupWidth",e)),e},f.isStackLabelRendered=function(t){var e=t.getOptions();return"on"==e.stack&&!u.isMixedFrequency(t)&&("on"===e.stackLabel&&u.isBLAC(t))},f.optimizeMarkerFill=function(t){return u.isLineArea(t)},f.getClassName=function(t,e,i){var r=c.getDataItem(t,e,i);if(r&&(r.className||r.svgClassName))return r.className||r.svgClassName;var a=c.getSeriesItem(t,e);return a&&(a.className||a.svgClassName)?a.className||a.svgClassName:null},f.getAreaClassName=function(t,e){var i=c.getSeriesItem(t,e);return i&&(i.areaClassName||i.areaSvgClassName)?i.areaClassName||i.areaSvgClassName:i&&(i.className||i.svgClassName)?i.className||i.svgClassName:null},f.getMarkerClassName=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);if(a&&(a.className||a.svgClassName))return a.className||a.svgClassName;var s=c.getDataItem(t,e,i);if(s&&(s.className||s.svgClassName))return s.className||s.svgClassName;var n=c.getSeriesItem(t,e);return n&&(n.markerClassName||n.markerSvgClassName)?n.markerClassName||n.markerSvgClassName:u.isScatterBubble(t)&&n&&(n.className||n.svgClassName)?n.className||n.svgClassName:null},f.getStyle=function(t,e,i){var r=c.getDataItem(t,e,i);if(r&&(r.style||r.svgStyle))return r.style||r.svgStyle;var a=c.getSeriesItem(t,e);return a&&(a.style||a.svgStyle)?a.style||a.svgStyle:null},f.getAreaStyle=function(t,e){var i=c.getSeriesItem(t,e);return i&&(i.areaStyle||i.areaSvgStyle)?i.areaStyle||i.areaSvgStyle:i&&(i.style||i.svgStyle)?i.style||i.svgStyle:null},f.getMarkerStyle=function(t,e,i,r){var a=c.getNestedDataItem(t,e,i,r);if(a&&(a.style||a.svgStyle))return a.style||a.svgStyle;var s=c.getDataItem(t,e,i);if(s&&(s.style||s.svgStyle))return s.style||s.svgStyle;var n=c.getSeriesItem(t,e);return n&&(n.markerStyle||n.markerSvgStyle)?n.markerStyle||n.markerSvgStyle:u.isScatterBubble(t)&&n&&(n.style||n.svgStyle)?n.style||n.svgStyle:null},f.getBoxPlotStyleOptions=function(t,e,i){var a=c.getDataItem(t,e,i),s=a&&a.boxPlot?a.boxPlot:{},n=c.getSeriesItem(t,e),o=n&&n.boxPlot?n.boxPlot:{},l=t.getOptions().styleDefaults.boxPlot,h=r.JsonUtils.merge(s,r.JsonUtils.merge(o,l)),u=f.getColor(t,e,i);h._color=u;var g=r.ColorUtils.getBrighter(u,.8);if(h.q2Color||(h.q2Color=g),h.q3Color||(h.q3Color=g),"pattern"==f.getSeriesEffect(t)){var d=f.getPattern(t,e,i);h._q2Pattern=d,h._q3Pattern=d}var p=f.getBorderColor(t,e,i);h.borderColor=p||u,h.borderWidth=f.getBorderWidth(t,e,i);var _=r.ColorUtils.getDarker(u,.1);return f._setBoxPlotDefaultLineColor(h,"whisker",_),f._setBoxPlotDefaultLineColor(h,"whiskerEnd",_),f._setBoxPlotDefaultLineColor(h,"median",_),h},f._setBoxPlotDefaultLineColor=function(t,e,i){var a=r.JsonUtils.merge(t[e+"Style"],t[e+"SvgStyle"]);t[e+"SvgStyle"]=a,t[e+"Style"]=null,!a||a.stroke||t[e+"ClassName"]||t[e+"SvgClassName"]||(t[e+"SvgStyle"].stroke=i)},f.getDataContext=function(t,e,r,a){var s,n=c.getSeriesItem(t,e),o=c.getDataItem(t,e,r),l=c.getNestedDataItem(t,e,r,a),h=t.getRawOptions(),g=u.isPie(t)&&(null==e||e<0),d=t.getOptions();if(g){var p=d.translations.labelOther;s={id:p,series:p,value:_.getOtherValue(t),color:d.styleDefaults.otherColor}}else if(l){(v=h.series[e].items[r])._noTemplate?v=v._itemData:v&&"object"===i(v)&&delete(v=Object.assign({},v))._itemData,s={id:c.getNestedDataItemId(t,e,r,a),data:[v,v.items[a]],value:c.getValue(t,e,r,a),y:c.getValue(t,e,r,a),color:f.getMarkerColor(t,e,r,a),itemData:d.series[e].items[r]._itemData}}else if(o){var v;(v=h.series[e].items[r])._noTemplate?v=v._itemData:v&&"object"===i(v)&&delete(v=Object.assign({},v))._itemData,s={id:c.getDataItemId(t,e,r),data:v,value:c.getValue(t,e,r),targetValue:c.getTargetValue(t,e,r),x:c.getXValue(t,e,r),y:c.getValue(t,e,r),z:c.getZValue(t,e,r),low:c.getLowValue(t,e,r),high:c.getHighValue(t,e,r),open:o.open,close:o.close,volume:o.volume,color:f.getColor(t,e,r),itemData:d.series[e].items[r]._itemData}}else n&&(s={id:c.getSeries(t,e),color:f.getColor(t,e)});if(s){s.component=d._widgetConstructor,(g||l||o)&&(s.group=c.getGroup(t,r),s.groupData=c.getGroupsDataForContext(t)[r]),!g&&(l||o||n)&&(s.series=c.getSeries(t,e),s.seriesData=c.getSeriesDataForContext(t,e)),u.isPie(t)&&t.pieChart&&(s.totalValue=t.pieChart.getTotalValue());var m=t.getOptionsCache().getFromCachedMap2D("barDims",e,r);m&&(s.dimensions=m),s=t.getCtx().fixRendererContext(s)}return s||{}},f.getDataLabel=function(t,e,i,r,a,s){var n,o=c.getDefaultDataLabel(t,e,i,r,a,s),l=t.getOptions().dataLabel;if(l&&!s){var h=f.getDataContext(t,e,i,r);if(h.label=o,"number"==typeof(n=l(h))){var u=DvtChartFormatUtils.getValueFormat(t,"label");n=DvtChartFormatUtils.formatValue(t,u,n)}}return n||o},f.hasCenteredSeries=function(t){if(!u.isBLAC(t))return!1;for(var e=c.getSeriesCount(t),i=0;i<e;i++)if(c.isSeriesRendered(t,i)&&"bar"!=c.getSeriesType(t,i)){var r=f.getLineType(t,i);if("centeredSegmented"==r||"centeredStepped"==r)return!0}return!1},f.hasUncenteredSeries=function(t){if(!u.isBLAC(t))return!1;for(var e=c.getSeriesCount(t),i=0;i<e;i++)if(c.isSeriesRendered(t,i)&&"bar"!=c.getSeriesType(t,i)){var r=f.getLineType(t,i);if("segmented"==r||"stepped"==r)return!0}return!1};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var v=function(t,e,i){this.Init(t,e,i)};r.Obj.createSubclass(v,r.Container),v.BEHAVIOR_SNAP="SNAP",v.BEHAVIOR_SMOOTH="SMOOTH",v.BEHAVIOR_AUTO="AUTO",v.TOOLTIP_ID="_dvtDataCursor",v.prototype.Init=function(t,e,i){v.superclass.Init.call(this,t),this._bHoriz=i,this._options=e,this.setMouseEnabled(!1),this.setVisible(!1);var a=e.lineWidth,s=e.lineColor,n=new r.Stroke(s,1,a,!1,r.Stroke.getDefaultDashProps(e.lineStyle,a));if(this._cursorLine=new r.Line(this.getCtx(),0,0,0,0,"dcLine"),this._cursorLine.setStroke(n),this.addChild(this._cursorLine),this._cursorOuterLine=new r.Line(this.getCtx(),0,0,0,0,"dcLine"),this._cursorOuterLine.setClassName("oj-chart-data-cursor-outer-line"),this.addChild(this._cursorOuterLine),"off"!=e.markerDisplayed){this._marker=new r.Container(this._context),this._marker.setMouseEnabled(!1),this.addChild(this._marker);var o=e.markerSize,l=new r.SimpleMarker(this._context,r.SimpleMarker.CIRCLE,0,0,o+4*a,o+4*a);l.setSolidFill(s),this._marker.addChild(l);var h=new r.SimpleMarker(this._context,r.SimpleMarker.CIRCLE,0,0,o+2*a,o+2*a);h.setSolidFill("white"),this._marker.addChild(h),this._markerInnerCircle=new r.SimpleMarker(this._context,r.SimpleMarker.CIRCLE,0,0,o,o),this._marker.addChild(this._markerInnerCircle)}},v.prototype.render=function(t,e,i,a,s,n){var o,l=this.isHorizontal(),h=r.Agent.isRightToLeft(this.getCtx());if(null!=s&&""!=s){var u=this.getCtx().getStageAbsolutePosition(),g=this.getCtx().getTooltipManager(v.TOOLTIP_ID);g.showDatatip(e+u.x,i+u.y,s,n,!1),o=g.getTooltipBounds();var d,c,p=this._options.markerSize+4*this._options.lineWidth;l?(d=h?t.x-.75*o.w:t.x+t.w-o.w/4,c=a-o.h/2,!h&&d-e<p?d=e+p:h&&e-(d+o.w)<p&&(d=e-p-o.w)):(d=a-o.w/2,i-((c=t.y-.75*o.h)+o.h)<p&&(c=i-p-o.h)),g.positionTip(d+u.x,c+u.y),(o=g.getTooltipBounds()).x-=u.x,o.y-=u.y}var _=this._cursorLine.getStroke().getWidth(),f=a+Math.ceil(_/2);if(l){var m,S;this._cursorLine.setTranslateY(a),this._cursorOuterLine.setTranslateY(f),h?(m=o?o.x+o.w-1:t.x,S=t.x+t.w):(m=t.x,S=o?o.x+1:t.x+t.w),this._cursorLine.setX1(m),this._cursorLine.setX2(S),this._cursorOuterLine.setX1(m),this._cursorOuterLine.setX2(S)}else{this._cursorLine.setTranslateX(a),this._cursorOuterLine.setTranslateX(f);var y=o?o.y+o.h-1:t.y,C=t.y+t.h;this._cursorLine.setY1(y),this._cursorLine.setY2(C),this._cursorOuterLine.setY1(y),this._cursorOuterLine.setY2(C)}if(this._marker){this._marker.setTranslate(e,i);var x=this._options.markerColor;this._markerInnerCircle.setSolidFill(x||n),r.Agent.workaroundFirefoxRepaint(this._marker)}},v.prototype.isHorizontal=function(){return this._bHoriz},v.prototype.getBehavior=function(){return this._behavior?this._behavior:v.BEHAVIOR_AUTO},v.prototype.setBehavior=function(t){this._behavior=t};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var m=new Object;r.Obj.createSubclass(m,r.Obj),m.getType=function(t){return"area"==t.type?"area":"line"},m.getLocation=function(t){return"front"==t.location?"front":"back"},m.getColor=function(t,e){return e.color?e.color:"line"===m.getType(e)?t.getOptions()._defaultReferenceObjectLineColor:t.getOptions()._defaultReferenceObjectAreaColor},m.getLineWidth=function(t,e){return e.lineWidth?e.lineWidth:parseFloat(t.getOptions()._defaultReferenceObjectLineWidth)},m.getLineType=function(t){return t.lineType?t.lineType:"straight"},m.isObjectRendered=function(t,e){var i=c.getHiddenCategories(t);if(i.length>0){var a=m.getRefObjCategories(e);if(a&&r.ArrayUtils.hasAnyItem(i,a))return!1}return!("hidden"==e.visibility)},m.getId=function(t){return null!=t.id?t.id:t.text},m.getRefObjCategories=function(t){return t.categories?t.categories:[m.getId(t)]},m.getRefObj=function(t,e){for(var i=c.getRefObjs(t),r=0;r<i.length;r++)if(m.getId(i[r])==e)return i[r]},m.getLowValue=function(t){return null==t?null:t.low},m.getHighValue=function(t){return null==t?null:t.high},m.getXValue=function(t,e,i){return c.getXValueFromItem(t,e[i],i)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var S=new Object;r.Obj.createSubclass(S,r.Obj),S.getDatatipColor=function(t,e,i,r){return u.isStock(t)?f.getColor(t,0,i):null!=r&&r>=0?f.getMarkerColor(t,e,i,r):f.getColor(t,e,i)},S.getDatatip=function(t,e,i,r,a){if(u.isSpark(t)||u.isOverview(t))return null;if(e<0||i<0)return null;var s=t.getOptions().tooltip,n=s?s.renderer:null;if(a&&n){var o=t.getCtx().getTooltipManager(S.isDataCursorEnabled(t)?v.TOOLTIP_ID:null),l=f.getDataContext(t,e,i,r);if(u.isPie(t)){var h=_.getSliceBySeriesIndex(t,e);l.label=h.getSliceLabelString()}else l.label=f.getDataLabel(t,e,i,r);return o.getCustomTooltip(n,l)}var g=c.getNestedDataItem(t,e,i,r);if(g&&null!=g.shortDesc)return g.shortDesc;var d,p=c.getDataItem(t,e,i);return p&&null!=p.shortDesc?p.shortDesc:(u.isStock(t)?d=S._getStockDatatip(t,0,i,a):(d=[],S._addSeriesDatatip(d,t,e,i,a),S._addGroupDatatip(d,t,e,i,a),S._addValueDatatip(d,t,e,i,r,a)),S._processDatatip(d,t,a))},S.getOtherSliceDatatip=function(t,e,i){var r=t.getOptions().translations.labelOther,a=t.getOptions().tooltip,s=a?a.renderer:null;if(i&&s){var n=_.getSliceBySeriesIndex(t,null),o=f.getDataContext(t,null,0);return o.label=n.getSliceLabelString(),t.getCtx().getTooltipManager().getCustomTooltip(s,o)}var l=[];return S._addDatatipRow(l,t,"series","labelSeries",r,i),S._addGroupDatatip(l,t,0,0,i),S._addDatatipRow(l,t,"value","labelValue",e,i),S._processDatatip(l,t,i)},S._processDatatip=function(t,e,i){return 0===t.length?null:i?r.HtmlTooltipManager.createElement("table",null,t,["oj-dvt-datatip-table"]):t.join("")},S.getRefObjTooltip=function(t,e,i,r){var a=t.getOptions().tooltip,s=a?a.renderer:null;if(s&&null!=e.id){var n=t.getCtx().getTooltipManager(S.isDataCursorEnabled(t)?v.TOOLTIP_ID:null),o={id:m.getId(e),label:e.text,data:t.getRawOptions()[i].referenceObjects[r],value:e.value,low:m.getLowValue(e),high:m.getHighValue(e),color:m.getColor(t,e)};return n.getCustomTooltip(s,o)}return e.shortDesc},S._getStockDatatip=function(t,e,i,r){var a=c.getDataItem(t,e,i),s=[];return S._addGroupDatatip(s,t,e,i,r),a&&(S._addDatatipRow(s,t,"open","labelOpen",a.open,r),S._addDatatipRow(s,t,"close","labelClose",a.close,r),S._addDatatipRow(s,t,"high","labelHigh",a.high,r),S._addDatatipRow(s,t,"low","labelLow",a.low,r),S._addDatatipRow(s,t,"volume","labelVolume",a.volume,r)),s},S._addSeriesDatatip=function(t,e,i,r,a){var s=c.getSeriesLabel(e,i);S._addDatatipRow(t,e,"series","labelSeries",s,a)},S._addGroupDatatip=function(t,e,i,r,a){var s;if(u.hasTimeAxis(e)){var n=d.getValueFormat(e,"group"),o=c.getXValue(e,i,r);null==(s=d.formatDateValue(n,new Date(o)))&&(s=e.xAxis.getInfo().formatLabel(o))}else s=c.getGroupLabel(e,r);var l=c.getNumLevels(e),h="labelGroup";if(1!=l&&Array.isArray(s))for(var g=l-1;g>=0;g--)S._addDatatipRow(t,e,"group",h,s[g],a,g),s[g]&&(h=null);else S._addDatatipRow(t,e,"group",h,s,a)},S._addValueDatatip=function(t,e,i,r,a,s){var n=c.getValue(e,i,r,a),o=c.getXValue(e,i,r),l=c.getZValue(e,i,r),h=c.getLowValue(e,i,r),g=c.getHighValue(e,i,r),d=null!=a&&a>=0;if(u.isScatterBubble(e))S._addDatatipRow(t,e,"x","labelX",o,s),S._addDatatipRow(t,e,"y","labelY",n,s),u.isBubble(e)&&S._addDatatipRow(t,e,"z","labelZ",l,s);else if(u.isPie(e)||u.isPyramid(e))S._addDatatipRow(t,e,"value","labelValue",n,s);else if(u.isFunnel(e)){S._addDatatipRow(t,e,"value","labelValue",n,s);var p=c.getTargetValue(e,i);null!=p&&S._addDatatipRow(t,e,"targetValue","labelTargetValue",p,s)}else if("boxPlot"!=c.getSeriesType(e,i)||d){if(u.isBLAC(e)){var _=c.isAssignedToY2(e,i)?"y2":"y";null==h&&null==g||d?null==l||d?S._addDatatipRow(t,e,_,"labelValue",n,s):(S._addDatatipRow(t,e,_,"labelY",n,s),S._addDatatipRow(t,e,"z","labelZ",l,s)):(S._addDatatipRow(t,e,"high","labelHigh",g,s),S._addDatatipRow(t,e,"low","labelLow",h,s),null!=l&&S._addDatatipRow(t,e,"z","labelZ",l,s))}}else{var f=c.getDataItem(e,i,r);S._addDatatipRow(t,e,"high","labelHigh",g,s),S._addDatatipRow(t,e,"q3","labelQ3",f.q3,s),S._addDatatipRow(t,e,"q2","labelQ2",f.q2,s),S._addDatatipRow(t,e,"q1","labelQ1",f.q1,s),S._addDatatipRow(t,e,"low","labelLow",h,s),null!=l&&S._addDatatipRow(t,e,"z","labelZ",l,s)}},S._addDatatipRow=function(t,e,i,a,s,n,o){if(null!=s&&""!==s){var l,h=e.getOptions().styleDefaults,g=d.getValueFormat(e,i),c=g.tooltipDisplay,p=e.getOptions().translations;if(c&&"auto"!=c||"group"==i&&(u.isPie(e)||u.isFunnel(e))&&(c="off"),"off"!=c)if("string"==typeof g.tooltipLabel?l=g.tooltipLabel:Array.isArray(g.tooltipLabel)&&(l=g.tooltipLabel[o||0]),null==l&&(l=null==a?"":"labelGroup"==a&&u.hasTimeAxis(e)?p.labelDate:p[a]),"series"!=i&&"group"!=i&&(s=d.formatValue(e,g,s)),n){var _=[r.HtmlTooltipManager.createElement("td",h.tooltipLabelStyle,l,["oj-dvt-datatip-label"]),r.HtmlTooltipManager.createElement("td",h.tooltipValueStyle,s,["oj-dvt-datatip-value"])];t.push(r.HtmlTooltipManager.createElement("tr",null,_))}else t.push((t.length>0?"<br>":"")+r.ResourceUtils.format(p.labelAndValue,[l,s]))}},S.isDataCursorEnabled=function(t){if(u.isPie(t)||u.isFunnel(t)||u.isPolar(t)||u.isPyramid(t))return!1;var e=t.getOptions();return"on"==e.dataCursor||"off"!=e.dataCursor&&(r.Agent.isTouchDevice()&&u.isLineArea(t))},S.getDataCursorBehavior=function(t){var e=t.getOptions().dataCursorBehavior;return"snap"==e?v.BEHAVIOR_SNAP:"smooth"==e||u.isLineArea(t)?v.BEHAVIOR_SMOOTH:v.BEHAVIOR_SNAP};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var y=function(t,e,i,r,a,s){this.Init(t,e,i,r,a,s)};r.Obj.createSubclass(y,r.Obj),y.prototype.Init=function(t,e,i,a,s,n){if(this._chart=t,this._displayables=e,this._seriesIndex=null!=i&&i>=0?i:-1,this._groupIndex=null!=a&&a>=0?a:-1,this._itemIndex=null!=s&&s>=0?s:-1,this._dataPos=n,this._isSelected=!1,this._isShowingKeyboardFocusEffect=!1,this._series=c.getSeries(t,i),this._group=c.getGroup(t,a),this._categories=c.getCategories(t,i,a,s),-1!=this._itemIndex)this._dataItemId=c.getNestedDataItemId(t,i,a,s),this._drillable=c.isDataItemDrillable(t,i,a,s);else if(-1!=this._groupIndex){c.getDataItem(t,i,a)&&(this._dataItemId=c.getDataItemId(t,i,a),this._drillable=c.isDataItemDrillable(t,i,a))}else{c.getSeriesItem(t,i)&&(this._drillable=c.isSeriesDrillable(t,i))}if(this._drillable)for(var o=0;o<this._displayables.length;o++)this._displayables[o].setCursor(r.SelectionEffectUtils.getSelectingCursor());for(var l=0;l<e.length;l++){var h=e[l];"lineArea"!==h.chartShapeType&&h.setAriaRole("img"),this._updateAriaLabel(h)}},y.associate=function(t,e,i,r,a,s){if(t&&!e.getOptions()._duringZoomAndScroll){var n=new y(e,[t],i,r,a,s);e.registerObject(n),e.getEventManager().associate(t,n)}},y.prototype.getId=function(){return this._seriesIndex>=0&&this._groupIndex>=0?new h(this._dataItemId,this.getSeries(),this.getGroup(),this._chart.getCtx()):this._seriesIndex>=0?this.getSeries():null},y.prototype.getDataItemId=function(){return this._dataItemId},y.prototype.getNestedDataItemIndex=function(){return this._itemIndex},y.prototype.getSeries=function(){return this._series},y.prototype.getSeriesIndex=function(){return this._seriesIndex},y.prototype.getGroup=function(){return this._group},y.prototype.getGroupIndex=function(){return this._groupIndex},y.prototype.isDrillable=function(){return this._drillable},y.prototype.isDoubleClickable=function(){return this.isSelectable()&&this.isDrillable()},y.prototype.getChart=function(){return this._chart},y.prototype.getDatatip=function(t){return S.getDatatip(this._chart,this._seriesIndex,this._groupIndex,this._itemIndex,!0)},y.prototype.getDatatipColor=function(){return S.getDatatipColor(this._chart,this._seriesIndex,this._groupIndex,this._itemIndex)},y.prototype.isSelectable=function(){return f.isSelectable(this.getChart(),this.getSeriesIndex(),this.getGroupIndex())},y.prototype.isSelected=function(){return this._isSelected},y.prototype.setSelected=function(t){this._isSelected=t;for(var e=0;e<this._displayables.length;e++)this._displayables[e].setSelected&&(this._displayables[e].setSelected(t),this._updateAriaLabel(this._displayables[e]))},y.prototype.showHoverEffect=function(){for(var t=0;t<this._displayables.length;t++)this._displayables[t].showHoverEffect&&this._displayables[t].showHoverEffect()},y.prototype.hideHoverEffect=function(){for(var t=0;t<this._displayables.length;t++)this._displayables[t].hideHoverEffect&&this._displayables[t].hideHoverEffect()},y.prototype.getDisplayables=function(){return this._displayables},y.prototype.getAriaLabel=function(){var t=[],e=this.getChart().getOptions().translations;this.isSelectable()&&t.push(e[this.isSelected()?"stateSelected":"stateUnselected"]),this.isDrillable()&&t.push(e.stateDrillable);var i=S.getDatatip(this._chart,this._seriesIndex,this._groupIndex,this._itemIndex,!1);return null==i&&this._groupIndex<0&&t.length>0&&(i=c.getSeriesLabel(this._chart,this._seriesIndex)),r.Displayable.generateAriaLabel(i,t)},y.prototype._updateAriaLabel=function(t){r.Agent.deferAriaCreation()||t.setAriaProperty("label",this.getAriaLabel())},y.prototype.getCategories=function(t){return this._categories},y.prototype.getDataPosition=function(){return this._dataPos},y.prototype.getNextNavigable=function(t){var e,i;if(e=t.keyCode,t.type==r.MouseEvent.CLICK)return this;if(e==r.KeyboardEvent.SPACE&&t.ctrlKey)return this;for(var a=this._chart,s=a.getChartObjPeers(),n=[],o=0;o<s.length;o++)s[o].isNavigable()&&n.push(s[o]);var l=t.keyCode==r.KeyboardEvent.UP_ARROW||t.keyCode==r.KeyboardEvent.DOWN_ARROW,h=u.isHorizontal(a),g=r.Agent.isRightToLeft(a.getCtx());return u.isScatterBubble(a)||u.isBoxPlot(a)&&(l&&!h||!l&&h)?i=r.KeyboardHandler.getNextAdjacentNavigable(this,t,n):u.isLineArea(a)||c.isStacked(a)||u.isPolar(a)?i=this._findNextNavigable(t):u.isFunnel(a)&&l?(t.keyCode=g?t.keyCode==r.KeyboardEvent.UP_ARROW?r.KeyboardEvent.RIGHT_ARROW:r.KeyboardEvent.LEFT_ARROW:t.keyCode-1,i=r.KeyboardHandler.getNextNavigable(this,t,n)):u.isPyramid(a)&&!l?(t.keyCode=g?t.keyCode==r.KeyboardEvent.RIGHT_ARROW?r.KeyboardEvent.DOWN_ARROW:r.KeyboardEvent.UP_ARROW:t.keyCode==r.KeyboardEvent.RIGHT_ARROW?r.KeyboardEvent.UP_ARROW:r.KeyboardEvent.DOWN_ARROW,i=r.KeyboardHandler.getNextNavigable(this,t,n)):i=r.KeyboardHandler.getNextNavigable(this,t,n,!0),i},y.prototype.getKeyboardBoundingBox=function(t){return this._displayables[0]?this._displayables[0].getDimensions(t):new r.Rectangle(0,0,0,0)},y.prototype.getTargetElem=function(){return this._displayables[0]?this._displayables[0].getElem():null},y.prototype.showKeyboardFocusEffect=function(){this.isNavigable()&&(this._isShowingKeyboardFocusEffect=!0,this.showHoverEffect())},y.prototype.hideKeyboardFocusEffect=function(){this.isNavigable()&&(this._isShowingKeyboardFocusEffect=!1,this.hideHoverEffect())},y.prototype.isShowingKeyboardFocusEffect=function(){return this._isShowingKeyboardFocusEffect},y.prototype.isNavigable=function(){return-1!=this.getGroupIndex()&&-1!=this.getSeriesIndex()},y.prototype._findNextNavigable=function(t){var e,i,a=t.keyCode,s=this._chart,n=s.getCtx(),o=this.getSeriesIndex(),l=this.getGroupIndex(),h=c.getGroupCount(s),g=u.isHorizontal(s),d=u.isPolar(s),p=r.Agent.isRightToLeft(n),_=g?p?a==r.KeyboardEvent.LEFT_ARROW:a==r.KeyboardEvent.RIGHT_ARROW:a==r.KeyboardEvent.UP_ARROW,f=g?p?a==r.KeyboardEvent.RIGHT_ARROW:a==r.KeyboardEvent.LEFT_ARROW:a==r.KeyboardEvent.DOWN_ARROW,v=g?a==r.KeyboardEvent.UP_ARROW:p?a==r.KeyboardEvent.RIGHT_ARROW:a==r.KeyboardEvent.LEFT_ARROW,m=g?a==r.KeyboardEvent.DOWN_ARROW:p?a==r.KeyboardEvent.LEFT_ARROW:a==r.KeyboardEvent.RIGHT_ARROW;if(_)i=l,e=this._findNextUpSeries(s,o,l);else if(f)i=l,e=this._findNextDownSeries(s,o,l);else if(m){e=o,i=l;do{i++,d&&i>=h&&(i=0)}while(null==s.getObject(e,i)&&i<h)}else if(v){e=o,i=l;do{i--,d&&i<0&&(i=h-1)}while(null==s.getObject(e,i)&&i>-1)}var S=s.getObject(e,i);return S&&S.isNavigable()?S:this},y.prototype._findNextUpSeries=function(t,e,i){for(var r=c.isStacked(t),a=c.getSeriesCount(t),s=c.getCumulativeValue(t,e,i),n=null,o=null,l=0;l<a;l++)if(c.isSeriesRendered(t,l)&&null!=c.getValue(t,l,i)&&(!r||null!=t.getObject(l,i))){var h=c.getCumulativeValue(t,l,i);(h>s||h==s&&l>e)&&(null!==n&&h<n||null==n)&&(n=h,o=l)}return o},y.prototype._findNextDownSeries=function(t,e,i){for(var r=c.isStacked(t),a=c.getSeriesCount(t),s=c.getCumulativeValue(t,e,i),n=null,o=null,l=a-1;l>=0;l--)if(c.isSeriesRendered(t,l)&&null!=c.getValue(t,l,i)&&(!r||null!=t.getObject(l,i))){var h=c.getCumulativeValue(t,l,i);(h<s||h==s&&l<e)&&(null!==n&&h>n||null==n)&&(n=h,o=l)}return o},y.prototype.isDragAvailable=function(t){return!0},y.prototype.getDragTransferable=function(t,e){return[this.getId()]},y.prototype.getDragFeedback=function(t,e){if(this._chart.isSelectionSupported()&&this._chart.getSelectionHandler().getSelectedCount()>1){for(var i=this._chart.getSelectionHandler().getSelection(),r=[],a=0;a<i.length;a++)r=r.concat(i[a].getDisplayables());return r}return this._displayables};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var C=function(t,e,i,r,a){this.Init(t,e,i,r,a)};r.Obj.createSubclass(C,r.Obj),C.prototype.Init=function(t,e,i,r,a){this._chart=t,this._displayables=e,this._refObj=i,this._categories=m.getRefObjCategories(this._refObj),this._index=r,this._axisType=a;for(var s=0;s<e.length;s++){var n=e[s];n.setAriaRole("img"),n.setAriaProperty("label",i.shortDesc)}},C.prototype.getCategories=function(){return this._categories},C.prototype.getDisplayables=function(){return this._displayables},C.prototype.getIndex=function(){return this._index},C.prototype.getAxisType=function(){return this._axisType},C.prototype.getDatatip=function(t){return S.getRefObjTooltip(this._chart,this._refObj,this._axisType,this._index)},C.prototype.getDatatipColor=function(){return m.getColor(this._chart,this._refObj)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var x={};r.Obj.createSubclass(x,r.Obj),x.TICK_LABEL="tickLabel",x.TITLE="title";
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var A=function t(e){this.Init({alta:t.SKIN_ALTA},e)};r.Obj.createSubclass(A,r.BaseComponentDefaults),A.SKIN_ALTA={position:null,baselineScaling:"zero",axisLine:{lineColor:"#9E9E9E",lineWidth:1,rendered:"on"},majorTick:{lineColor:"rgba(196,206,215,0.4)",baselineColor:"auto",lineWidth:1,rendered:"auto",lineStyle:"solid"},minorTick:{lineColor:"rgba(196,206,215,0.2)",lineWidth:1,rendered:"off",lineStyle:"solid"},tickLabel:{scaling:"auto",style:new r.CSSStyle(r.BaseComponentDefaults.FONT_FAMILY_ALTA_11+"color: #333333;"),rotation:"auto",rendered:"on"},titleStyle:new r.CSSStyle(r.BaseComponentDefaults.FONT_FAMILY_ALTA_12+"color: #737373;"),startGroupOffset:0,endGroupOffset:0,layout:{titleGap:6,radialLabelGap:5,insideLabelGapWidth:4,insideLabelGapHeight:2,hierarchicalLabelGapHeight:8,hierarchicalLabelGapWidth:15},_locale:"en-us"},A.getGapSize=function(t,e,i){var a=Math.min(r.TextUtils.getTextStringHeight(t,e.tickLabel.style)/14,1);return Math.ceil(i*a)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var b=function(){};r.Obj.createSubclass(b,a.BaseAxisInfo),b._constructors=[],b.registerConstructor=function(t,e){b._constructors[t]=e},b.getConstructor=function(t){return b._constructors[t]},b.newInstance=function(t,e,i){return e.timeAxisType&&"disabled"!=e.timeAxisType?new b._constructors.time(t,e,i):e._isGroupAxis?new b._constructors.group(t,e,i):new b._constructors.data(t,e,i)},b.prototype.Init=function(t,e,i){b.superclass.Init.call(this,t,e,i),this._title=null},b.prototype.getLabels=function(t,e){return null},b.prototype.getTitle=function(){return this._title},b.prototype.setTitle=function(t){this._title=t},b.prototype.getMajorTickCoords=function(){return[]},b.prototype.getMinorTickCoords=function(){return[]},b.prototype.getBaselineCoord=function(){return null},b.prototype.getDatatip=function(t,e){return null},b.prototype.getLabelBackground=function(t,e){return null},b.prototype.isDrillable=function(t){return null},b.prototype.isLabelRotated=function(){return!1},b.prototype.CreateLabel=function(t,e,i,a,s){var n;if("tangential"==this.Position){var o=16/180*Math.PI,l=1/180*Math.PI,h=.5*this.getTickLabelHeight(),u=this._radius+h;(i<l||i>2*Math.PI-l)&&(u+=h);var g=Math.round(u*Math.sin(i)),d=Math.round(-u*Math.cos(i));n=a?new r.BackgroundOutputText(t,e,g,d,a):new r.OutputText(t,e,g,d),i<l||Math.abs(i-Math.PI)<l||i>2*Math.PI-l?n.alignCenter():i<Math.PI?n.alignLeft():n.alignRight(),Math.abs(i-Math.PI/2)<o||Math.abs(i-3*Math.PI/2)<o?n.alignMiddle():i<Math.PI/2||i>3*Math.PI/2?n.alignBottom():n.alignTop()}else s?n=a?new r.BackgroundMultilineText(t,e,i,i,a):new r.MultilineText(t,e,i,i):(n=a?new r.BackgroundOutputText(t,e,i,i,a):new r.OutputText(t,e,i,i)).alignMiddle(),n.alignCenter();return(n instanceof r.OutputText||n instanceof r.MultilineText)&&n.setCSSStyle(this.Options.tickLabel.style),n},b.prototype.IsOverlapping=function(t,e,i){if(!t||t.length<=0)return!1;for(var a,s,n,o,l="left"==this.Position||"right"==this.Position||"radial"==this.Position,h=r.Agent.isRightToLeft(this.getCtx()),u=this.GetTickLabelGapSize(),g=0;g<t.length;g+=e+1)if(null!=t[g]){if(null!=i&&t[g].w>i[g])return!0;if(null!=a&&null!=s){if(l){if(n=t[g].y,o=t[g].y+t[g].h,n>=a&&n-u<s)return!0;if(n<a&&o+u>a)return!0}else{if(n=t[g].x,o=t[g].x+t[g].w,!h&&n-u<s)return!0;if(h&&o+u>a)return!0}a=n,s=o}else l?(a=t[g].y,s=t[g].y+t[g].h):(a=t[g].x,s=t[g].x+t[g].w)}return!1},b.prototype.IsOverlappingDims=function(t,e){if(!t||!e)return!1;var i=t.y,r=t.y+t.h,a=t.x,s=t.x+t.w,n=e.y,o=e.y+e.h,l=e.x,h=e.x+e.w;return(a<=l&&l<=s||a<=h&&h<=s||l<=a&&a<=h||l<=s&&s<=h)&&(n>=i&&n<r||n<=i&&o>=i)},b.prototype.GetTickLabelGapSize=function(){var t=this.getTickLabelHeight(),e=this instanceof b._constructors.group?.24*t:.79*t,i=this instanceof b._constructors.group?.08*t:.28*t;return"left"==this.Position||"right"==this.Position||"radial"==this.Position||this.isLabelRotated()?i:e},b.prototype.getTickLabelHeight=function(){return r.TextUtils.getTextStringHeight(this.getCtx(),this.Options.tickLabel.style)},b.prototype.SkipLabels=function(t,e){for(var i=0,r=this.IsOverlapping(e,i);r;)i++,r=this.IsOverlapping(e,i);if(i>0){for(var a=[],s=0;s<t.length;s+=i+1)a.push(t[s]);return a}return t},b.prototype.SkipTangentialLabels=function(t,e){var i=[],r=t.length,a=null;if(r>1){for(var s,n=0;n<r;n++)e[n]&&(!s||s&&!this.IsOverlappingDims(s,e[n]))&&(a||(a=e[n]),i.push(t[n]),s=e[n]);return this.IsOverlappingDims(s,a)&&i.pop(),i}return t},b.prototype.GetLabelDims=function(t,e,i){for(var r=[],a=this.isLabelRotated(i),s=0;s<t.length;s++){var n=t[s];if(null!=n){var o=n.getDimensions(e);null!=i&&(o.x=(a?n.getTranslateX():n.getX())-o.w/2,o.y=(a?n.getTranslateY():n.getY())-o.h/2),o.w&&o.h?r.push(o):r.push(null)}else r.push(null)}return r},b.prototype.getMajorTickCount=function(){return null},b.prototype.getMinorTickCount=function(){return null},b.prototype.getMajorIncrement=function(){return null},b.prototype.getMinorIncrement=function(){return null},b.prototype.getGlobalMin=function(){return this.GlobalMin},b.prototype.getGlobalMax=function(){return this.GlobalMax},b.prototype.getViewportMin=function(){return this.MinValue},b.prototype.getViewportMax=function(){return this.MaxValue},b.prototype.getDataMin=function(){return this.DataMin},b.prototype.getDataMax=function(){return this.DataMax},b.prototype.getMinimumExtent=function(){return 0},b.prototype.getStartCoord=function(){return this.StartCoord},b.prototype.getEndCoord=function(){return this.EndCoord},b.prototype.getStartOverflow=function(){return this.StartOverflow},b.prototype.getEndOverflow=function(){return this.EndOverflow},b.prototype.getGroupWidth=function(){return 0},b.prototype.getGroup=function(t,e){return null},b.prototype.linearToActual=function(t){return t},b.prototype.actualToLinear=function(t){return t},b.prototype.alignLogScaleToTickCount=function(t,e){return t},b.prototype.getLogScaleUnit=function(){return null};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var M=function(t,e,i,r,a,s,n){this.Init(t,e,i,r,a,s,n)};r.Obj.createSubclass(M,r.SimpleObjPeer),M.prototype.Init=function(t,e,i,a,s,n,o){M.superclass.Init.call(this,s,n,null,o),this._axis=t,this._label=e,this._group=i,this._drillable=a,this._drillable&&e.setCursor(r.SelectionEffectUtils.getSelectingCursor()),t.__registerObject(this)},M.prototype.getLabel=function(){return this._label},M.prototype.getId=function(){return this._group},M.prototype.isDrillable=function(){return this._drillable},M.prototype.getGroup=function(){return this._group},M.prototype.getNextNavigable=function(t){if(t.type==r.MouseEvent.CLICK)return this;var e=this._axis.__getKeyboardObjects();return r.KeyboardHandler.getNextNavigable(this,t,e,!1,this._axis.getCtx().getStage())},M.prototype.getKeyboardBoundingBox=function(t){return this._label?this._label.getDimensions(t):new r.Rectangle(0,0,0,0)},M.prototype.getDisplayable=function(){return this._label},M.prototype.getTargetElem=function(){return this._label?this._label.getElem():null},M.prototype.showKeyboardFocusEffect=function(){if(this._isShowingKeyboardFocusEffect=!0,this._label){var t=this.getKeyboardBoundingBox();this._overlayRect=new r.Rect(this._axis.getCtx(),t.x,t.y,t.w,t.h),this._overlayRect.setSolidStroke(r.Agent.getFocusColor()),this._overlayRect.setInvisibleFill(),this._overlayRect.setMatrix(this._label.getMatrix()),this._axis.addChild(this._overlayRect)}},M.prototype.hideKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!1,this._label&&(this._axis.removeChild(this._overlayRect),this._overlayRect=null)},M.prototype.isShowingKeyboardFocusEffect=function(){return this._isShowingKeyboardFocusEffect},M.prototype.getAriaLabel=function(){var t;return this.isDrillable()&&(t=[this._axis.getOptions().translations.stateDrillable]),null!=this.getDatatip()?r.Displayable.generateAriaLabel(this.getDatatip(),t):null!=t?r.Displayable.generateAriaLabel(this.getLabel().getTextString(),t):void 0},M.prototype.isDragAvailable=function(t){return!0},M.prototype.getDragTransferable=function(t,e){return[this.getId()]},M.prototype.getDragFeedback=function(t,e){return[this.getDisplayable()]};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var T=function(t){this.Init(t.getCtx(),t.processEvent,t,t),this._axis=t};r.Obj.createSubclass(T,r.EventManager),T.getUIParams=function(t,e,i,r){return{type:t,id:e,index:i,level:r}},T.prototype.OnClick=function(t){T.superclass.OnClick.call(this,t);var e=this.GetLogicalObject(t.target);e&&(this.processDrillEvent(e)&&t.stopPropagation())},T.prototype.HandleTouchClickInternal=function(t){var e=this.GetLogicalObject(t.target);if(e){var i=t.touchEvent;this.processDrillEvent(e)&&i&&i.preventDefault()}},T.prototype.processDrillEvent=function(t){return!!(t instanceof M&&t.isDrillable())&&(this.FireEvent(r.EventFactory.newChartDrillEvent(t.getId(),null,t.getGroup(),"group"),this._axis),!0)},T.prototype.isDndSupported=function(){return!0},T.prototype.GetDragSourceType=function(t){var e=this.DragSource.getDragObject();return e instanceof M&&null!=e.getGroup()?"groups":null},T.prototype.GetDragDataContexts=function(t){var e=this.DragSource.getDragObject();if(e instanceof M){var i={id:e.getId(),group:e.getGroup(),label:e.getLabel().getTextString()};return t&&r.ToolkitUtils.cleanDragDataContext(i),[i]}return[]};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var I=new Object;r.Obj.createSubclass(I,r.Obj),I._MAX_TITLE_LINE_WRAP=3,I.getPreferredSize=function(t,e,i,a){var s=I._createAxisInfo(t,new r.Rectangle(0,0,e,i)),n=t.getCtx(),o=t.getOptions(),l="top"==o.position||"bottom"==o.position;if(("off"==o.rendered||e<=0||i<=0)&&!a)return l?new r.Dimension(e,0):new r.Dimension(0,i);var h=I.getTitleHeight(n,o,.8*(l?e:i),.8*(l?i:e)),u=0!=h?h+I._getTitleGap(t):0;if("on"==o.tickLabel.rendered&&"inside"!=o.tickLabel.position)if(l){var g=r.TextUtils.getTextStringHeight(n,o.tickLabel.style);s instanceof b.getConstructor("data")?u+=g:s instanceof b.getConstructor("time")?u+=null!=s.getLabels(n,1)?2*g:g:s instanceof b.getConstructor("group")&&(u=I._getGroupAxisPreferredSize(t,s,u,i,l))}else if(s instanceof b.getConstructor("data"))u+=r.TextUtils.getMaxTextStringWidth(n,s.getAllLabels(n,!0),s.Options.tickLabel.style);else if(s instanceof b.getConstructor("time")){var d=s.getLabels(n),c=r.TextUtils.getMaxTextDimensions(d).w,p=s.getLabels(n,1),_=null!=p?r.TextUtils.getMaxTextDimensions(p).w:0;u+=Math.max(c,_)}else s instanceof b.getConstructor("group")&&(u=I._getGroupAxisPreferredSize(t,s,u,e,l));return l?new r.Dimension(e,Math.min(u,i)):new r.Dimension(Math.min(u,e),i)},I.render=function(t,e){var i=I._createAxisInfo(t,e);"off"!=t.getOptions().rendered&&(t.__setBounds(e.clone()),I._renderBackground(t,e),I._renderTitle(t,i,e),I._renderLabels(t,i,e))},I._createAxisInfo=function(t,e){var i=b.newInstance(t.getCtx(),t.getOptions(),e);return t.__setInfo(i),i},I._getTitleGap=function(t){var e=t.getOptions();return A.getGapSize(t.getCtx(),e,e.layout.titleGap)},I._renderBackground=function(t,e){var i=t.getOptions();if(i.dnd){var a=i.dnd.drop,s=Object.keys(a.xAxis).length>0||Object.keys(a.yAxis).length>0||Object.keys(a.y2Axis).length>0,n=i.dnd.drag,o=Object.keys(n.groups).length>0&&t.getInfo()instanceof b.getConstructor("group");if(s||o){var l=i.position,h="top"==l||"bottom"==l,u=h?4:10,g=h?10:4,d=new r.Rect(t.getCtx(),e.x-g,e.y-u,e.w+2*g,e.h+2*u);o&&d.setClassName("oj-draggable"),d.setInvisibleFill(),t.getCache().putToCache("background",d),t.addChild(d)}}},I._renderTitle=function(t,e,i){var a=t.getOptions();if(a.title){var s=a.position;if("radial"!=s&&"tangential"!=s){var n="top"==a.position||"bottom"==a.position,o=n?i.w:i.h,l=n?i.h:i.w,h=a.titleStyle,u=I.isWrapEnabled(h),g=I._createText(t.getEventManager(),t,a.title,h,0,0,o,l,T.getUIParams(x.TITLE),u);if(g){var d=I._getTitleGap(t),c=(e.getStartOverflow()-e.getEndOverflow())/2,p=r.Agent.isRightToLeft(t.getCtx()),_=g.getDimensions().h;g.alignCenter(),"top"==s?(g.setX(i.x+c+i.w/2),g.setY(i.y),i.y+=_+d,i.h-=_+d):"bottom"==s?(g.setX(i.x+c+i.w/2),g.setY(i.y+i.h-_),i.h-=_+d):"left"==s?(g.alignMiddle(),g.setRotation(p?Math.PI/2:3*Math.PI/2),g.setTranslate(i.x+_/2,i.y+i.h/2),i.x+=_+d,i.w-=_+d):"right"==s&&(g.alignMiddle(),g.setRotation(p?Math.PI/2:3*Math.PI/2),g.setTranslate(i.x+i.w-_/2,i.y+i.h/2),i.w-=_+d),e.setTitle(g)}}}},I._renderLabels=function(t,e,i){var r=t.getOptions();if("on"==r.tickLabel.rendered){var a=r.position;"top"==a||"bottom"==a?I._renderLabelsHoriz(t,e,i):"tangential"==a?I._renderLabelsTangent(t,e,i):I._renderLabelsVert(t,e,i),I._renderGroupSeparators(t,e,i)}},I._renderLabelsHoriz=function(t,e,i){var a=t.getCtx(),s=t.getOptions(),n=s.position,o="inside"==s.tickLabel.position,l=r.Agent.isRightToLeft(a),h=e instanceof b.getConstructor("group"),u=h&&e.getNumLevels()>1,g=u?0:null,d=e.getLabels(a,g);for(m=u?A.getGapSize(a,s,s.layout.hierarchicalLabelGapHeight):0;d;){for(var c=0,p=0,_=0;_<d.length;_++){var f=d[_];if(null!=f){var v=f instanceof r.MultilineText||f instanceof r.BackgroundMultilineText;if(e.isLabelRotated(g)){if((!v||v&&!f.isWrapEnabled())&&!r.TextUtils.fitText(f,i.h,i.w,t))continue;l?f.alignLeft():f.alignRight(),u?(c=f.getDimensions().w,f.setTranslateY(i.h-c),p=Math.max(p,c)):f.setTranslateY(i.y)}else{if(!o&&f.getDimensions().h-1>i.h)continue;if(u&&"bottom"==n?f.setY(i.h):"bottom"==n?f.setY(i.y):f.setY(i.y+i.h),!u&&("bottom"==n&&!o||"top"==n&&o)||u&&"top"==n?f.alignTop():f.alignBottom(),u)p=Math.max(p,f.getDimensions().h);else if(o){var m=A.getGapSize(a,s,s.layout.insideLabelGapWidth);l?f.alignRight():f.alignLeft(),f.setX(f.getX()+m*(l?-1:1))}}var S=h?e.getLabelIndex(f):_,y=e.getDatatip(S,g),C=f.getUntruncatedTextString(),I=e.isDrillable(S,g),D=e.getGroup(S,g),O=T.getUIParams(x.TICK_LABEL,f.getTextString(),S,g);t.getEventManager().associate(f,new M(t,f,D,I,C,y,O)),u?e.setLastRenderedLevel(g):p=Math.max(p,f.getDimensions().h),t.addChild(f)}}if(u){for(_=0;_<d.length;_++)if(null!=(f=d[_])){var E=e.isLabelRotated(g),P=g<e.getNumLevels()-1;!E&&P?(f.setY(i.h-p/2),f.alignMiddle()):f.setTranslateY(i.h-p)}i.y+=p+m,i.h-=p+m,g++,d=e.getLabels(t.getCtx(),g)}else i.y+=p,i.h-=p,d=null}if(e instanceof b.getConstructor("time")){d=e.getLabels(t.getCtx());var L=e.getLabels(t.getCtx(),1),w=0;if(null!=L)for(_=0;_<L.length;_++)if(null!=(f=L[_])&&!(f.getDimensions().h-1>i.h)){t.getEventManager().associate(f,new r.SimpleObjPeer(null,null,null,T.getUIParams(x.TICK_LABEL,f.getTextString())));var R=0,B=0,k=e.getOptions()._maxOverflowCoord,F=e.getOptions()._minOverflowCoord;if(null!=d[_]&&(w=d[_].getDimensions().w/2,R=e._level1Overflow[_],B=e._level2Overflow[_]),0==R&&0==B){var N,H=f.getX();l?(N=H+w<=k?H+w:k,f.setX(N)):(N=H-w>=F?H-w:F,f.setX(N))}else R<0?f.setX(F):R>0&&f.setX(k);f.alignTop(),f.setY(i.y),t.addChild(f)}}},I._renderLabelsVert=function(t,e,i){var a,s,n,o=t.getOptions(),l=o.position,h=t.getCtx(),u=r.Agent.isRightToLeft(h),g=e instanceof b.getConstructor("data"),d="inside"==o.tickLabel.position,c=e instanceof b.getConstructor("group"),p=c&&e.getNumLevels()>1,_=p?0:null;a=e.getLabels(t.getCtx(),_);var f=0;p?(s=A.getGapSize(h,o,o.layout.hierarchicalLabelGapWidth),n=r.TextUtils.getMaxTextDimensions(a).w):"radial"==l?(s=A.getGapSize(h,o,o.layout.radialLabelGap),f=i.x+i.w/2,u?f+=s+r.TextUtils.getMaxTextDimensions(a).w:f-=s):"left"==l?(f=i.x+i.w,g&&d&&(f+=r.TextUtils.getMaxTextDimensions(a).w)):(f=i.x,g&&!d&&(f+=r.TextUtils.getMaxTextDimensions(a).w));for(var v=function(s,v){var m=s instanceof r.MultilineText||s instanceof r.BackgroundMultilineText,S=!m||m&&!s.isWrapEnabled();if(!(p&&r.TextUtils.getMaxTextDimensions(a).w-1>i.w)&&(p||d||!S||r.TextUtils.fitText(s,i.w,i.h,t))){v=c?e.getLabelIndex(s):v;var y=e.getDatatip(v,_),C=s.getUntruncatedTextString(),b=e.isDrillable(v,_),I=e.getGroup(v,_),D=T.getUIParams(x.TICK_LABEL,s.getTextString(),v,_);if(t.getEventManager().associate(s,new M(t,s,I,b,C,y,D)),p)s.alignRight(),s.setX(u?i.w:i.x+n),e.setLastRenderedLevel(_);else if(s.setX(f),g||"right"!=l?s.alignRight():s.alignLeft(),d&&(s.alignBottom(),s.setY(s.getY()-A.getGapSize(h,o,o.layout.insideLabelGapHeight))),"radial"==l){var O=s.getY();s.setY(i.y+i.h/2-O);var E=s.getDimensions(),P=.15*E.h,L=r.PathUtils.roundedRectangle(E.x-P,E.y,E.w+2*P,E.h,2,2,2,2),w=new r.Path(t.getCtx(),L),R=s.getCSSStyle().getStyle(r.CSSStyle.BACKGROUND_COLOR),B=O+E.h/2>e.getEndCoord()&&"circle"==t.getOptions().polarGridShape?"outside":"inside";R?w.setSolidFill(R):w.setClassName("oj-chart-polar-axis-tick-label-"+B),t.addChild(w)}t.addChild(s)}};a;){for(var m=0;m<a.length;m++){var S=a[m];null!=S&&v(S,m)}if(!p)break;i.x+=n+s,i.w-=n+s,_++,a=e.getLabels(t.getCtx(),_),n=a?r.TextUtils.getMaxTextDimensions(a).w:null}if(e instanceof b.getConstructor("time")){var y=e.getLabels(t.getCtx(),1);if(null!=y)for(m=0;m<y.length;m++)null!=(S=y[m])&&v(S,m)}},I._renderLabelsTangent=function(t,e,i){for(var a=e.getLabels(t.getCtx()),s=0;s<a.length;s++){var n=a[s];if(null!=n){var o=i.w/2-Math.abs(n.getX()),l=i.h/2-Math.abs(n.getY());if(r.TextUtils.fitText(n,o,l,t)){var h=e instanceof b.getConstructor("group")?e.getLabelIndex(n):s,u=e.getDatatip(h),g=n.getUntruncatedTextString(),d=e.isDrillable(h),c=e.getGroup(h),p=T.getUIParams(x.TICK_LABEL,n.getTextString(),h);t.getEventManager().associate(n,new M(t,n,c,d,g,u,p)),n.setTranslateX(i.x+i.w/2),n.setTranslateY(i.y+i.h/2),t.addChild(n)}}}},I._createText=function(t,e,i,a,s,n,o,l,h,u){var g;return u?((g=new r.MultilineText(e.getCtx(),i,s,n)).setMaxLines(I._MAX_TITLE_LINE_WRAP),g.setCSSStyle(a),g.wrapText(o,l,1)):(g=new r.OutputText(e.getCtx(),i,s,n)).setCSSStyle(a),r.TextUtils.fitText(g,o,l,e)?(t.associate(g,new r.SimpleObjPeer(g.getUntruncatedTextString(),null,null,h)),g):null},I._renderGroupSeparators=function(t,e,i){if(e instanceof b.getConstructor("group")&&e.areSeparatorsRendered()){var a=e.getNumLevels(),s=e.getSeparatorStartLevel();if(a<=1||s<=0)return;for(var n,o,l,h,u,g,d=t.getOptions(),c=d.position,p="top"==c||"bottom"==c,_=t.getCtx(),f=r.Agent.isRightToLeft(_),v=e.getSeparatorColor(),m=new r.Stroke(v,1,1),S=0,y=A.getGapSize(_,d,p?d.layout.hierarchicalLabelGapHeight:d.layout.hierarchicalLabelGapWidth),C=d.startGroupOffset,x=d.endGroupOffset,M=s;M>=0;M--){var T=e.getLabels(t.getCtx(),M),D=r.TextUtils.getMaxTextDimensions(T),O=e.isLabelRotated(M),E=O||!p?D.w:D.h;if(0!=E){var P=!1,L=null;if(M<s)for(var w=0;w<T.length;w++){var R=T[w];if(null!=R){var B=e.getLabelIndex(R),k=0==e.getLabelAt(B,M).length;if(!k){var F=k&&0==M&&(0==B||B==T.length-1),N=R&&null==T[B-1],H=R&&null==T[B+1],G=e.getStartIndex(B,M),U=e.getEndIndex(B,M);if(p){var j;if(R)j=R instanceof r.MultilineText||R instanceof r.BackgroundMultilineText?R.getYAlignCoord():R.getY(),n=e.getCoordAt(G-C),o=O?j+.5*S:j-E/2-.5*S-y,l=e.getCoordAt(U+x),h=O?j+E+S+2*y:j,k&&F||0!=P||null==n||I._addSeparatorLine(t,m,n,h,n,o),null==l||F||I._addSeparatorLine(t,m,l,h,l,o);if(!k){if(R)var V=O?R.getDimensions().h:R.getDimensions().w;n=N&&0==L?e.getStartCoord():e.getBoundedCoordAt(G-C),N&&(N=!1);var Y=e.getLabelAt(B+1,M);if(l=H&&Y&&Y.length>0?e.getEndCoord():e.getBoundedCoordAt(U+x),u=R?f?R.getX()+.5*V:R.getX()-.5*V:e.getBoundedCoordAt(U+x),g=R?f?R.getX()-.5*V:R.getX()+.5*V:e.getBoundedCoordAt(G-C),R)if(O)I._addSeparatorLine(t,m,n,h,l,h);else{var W=f?.5*-R.getDimensions().h:.5*R.getDimensions().h,z=f?g+W>l:g+W<l;(f?n>u-W:n<u-W)&&I._addSeparatorLine(t,m,n,h,u-W,h),z&&I._addSeparatorLine(t,m,g+W,h,l,h)}}}else R&&(n=f?R.getX()-E-.5*y:R.getX()+.5*y,o=e.getCoordAt(G-C),l=f?R.getX()+.5*y:R.getX()-E-.5*y,h=e.getCoordAt(U+x),(!k&&0==P||0==B&&k&&0!=M)&&null!=o&&I._addSeparatorLine(t,m,n,o,l,o),null==h||F||I._addSeparatorLine(t,m,l,h,n,h)),k||(o=N&&0==L?0:e.getBoundedCoordAt(G-C),N&&(N=!1),Y=e.getLabelAt(B+1,M),h=H&&Y&&Y.length>0?e.getEndCoord():e.getBoundedCoordAt(U+x),R&&I._addSeparatorLine(t,m,l,o,l,h));P=!k&&null!=R,L=null!=R||null==R&&k}}}S=E}else S=E}}},I._addSeparatorLine=function(t,e,i,a,s,n){var o=new r.Line(t.getCtx(),i,a,s,n);o.setStroke(e),o.setPixelHinting(!0),t.addChild(o)},I._getGroupAxisPreferredSize=function(t,e,i,a,s){for(var n=t.getCtx(),o=t.getOptions(),l=e.getNumLevels(),h=s?"hierarchicalLabelGapHeight":"hierarchicalLabelGapWidth",u=l>1?A.getGapSize(n,o,o.layout[h]):0,g=0;g<l;g++){var d;if(e.isAutoRotate()){for(var c=[],p=[],_=e.getSkipIncrement(),f=0;f<e.getGroupCount();f+=_){c.push(e.getLabelAt(f,0));var v=e.getLabelStyleAt(f,0);v||(v=e.Options.tickLabel.style),p.push(v)}d=r.TextUtils.getMaxTextStringWidth(n,c,p)}else{var m=e.getLabels(n,g);if(s){var S=r.TextUtils.getMaxTextDimensions(m);d=e.isLabelRotated(g)?S.w:S.h}else d=r.TextUtils.getMaxTextDimensions(m).w}if(!(i+d<=a)){0==g&&(i=a);break}i+=d+u}return 0!=g&&(i-=u),i},I.getTitleHeight=function(t,e,i,a){var s=0;if(e.title)if(I.isWrapEnabled(e.titleStyle)){var n=new r.MultilineText(t,e.title,0,0);n.setMaxLines(I._MAX_TITLE_LINE_WRAP),n.setCSSStyle(e.titleStyle),n.wrapText(i,a,1),s=r.TextUtils.getTextStringHeight(t,e.titleStyle)*n.getLineCount()}else s=r.TextUtils.getTextStringHeight(t,e.titleStyle);return s},I.isWrapEnabled=function(t){var e=t.getStyle(r.CSSStyle.WHITE_SPACE);return"nowrap"!=e&&"noWrap"!=e};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var D=function(t,e,i){this.Init(t,e,i)};r.Obj.createSubclass(D,b),b.registerConstructor("group",D),D._MAX_LINE_WRAP=3,D._ROTATE_THRESHOLD=12,D.prototype.Init=function(t,e,i){D.superclass.Init.call(this,t,e,i);var a=r.Agent.isRightToLeft(t),s="top"==this.Position||"bottom"==this.Position;if(s&&a){var n=this.StartCoord;this.StartCoord=this.EndCoord,this.EndCoord=n}this._levelsArray=[],this._groupCount=this._generateLevelsArray(e.groups,0,this._levelsArray,0),this._numLevels=this._levelsArray.length,this._areSeparatorsRendered="off"!=e.groupSeparators.rendered,this._separatorColor=e.groupSeparators.color,this._lastRenderedLevel=null,this._drilling=e.drilling;var o=e.endGroupOffset>0?Number(e.endGroupOffset):0,l=e.startGroupOffset>0?Number(e.startGroupOffset):0;this.DataMin=0,this.DataMax=this._groupCount-1,this.GlobalMin=null==e.min?this.DataMin-l:e.min,this.GlobalMax=null==e.max?this.DataMax+o:e.max;var h=this.getGroupIndex(e.viewportStartGroup),u=this.getGroupIndex(e.viewportEndGroup);-1!=h&&(this.MinValue=h-l),-1!=u&&(this.MaxValue=u+o),null!=e.viewportMin&&(this.MinValue=e.viewportMin),null!=e.viewportMax&&(this.MaxValue=e.viewportMax),null==this.MinValue&&(this.MinValue=this.GlobalMin),null==this.MaxValue&&(this.MaxValue=this.GlobalMax),this.GlobalMin>this.MinValue&&(this.GlobalMin=this.MinValue),this.GlobalMax<this.MaxValue&&(this.GlobalMax=this.MaxValue),this._groupWidthRatios=e._groupWidthRatios,this._processGroupWidthRatios(),this._startBuffer=a?e.rightBuffer:e.leftBuffer,this._endBuffer=a?e.leftBuffer:e.rightBuffer,this._isLabelRotated=[];for(var g=0;g<this._numLevels;g++)this._isLabelRotated.push(!1);if(this._renderGridAtLabels=e._renderGridAtLabels,this._labels=null,this._maxSpace=s?i.h:i.w,"off"!=e.rendered){var d=I.getTitleHeight(t,e,s?i.w:i.h,s?i.h:i.w);this._maxSpace-=0!=d?d+A.getGapSize(t,e,e.layout.titleGap):0}this._maxLineWrap=D._MAX_LINE_WRAP},D.prototype._processGroupWidthRatios=function(){if(!this._groupWidthRatios||this._groupWidthRatios.length<2)this._groupWidthRatios=null;else{for(var t,e,i=0,r=0;r<this._groupCount;r++)t=0==r?this.MinValue:Math.max(r-.5,this.MinValue),(e=r==this._groupCount-1?this.MaxValue:Math.min(r+.5,this.MaxValue))>t&&(i+=(e-t)*this._groupWidthRatios[r]);var a=this.EndCoord-this.StartCoord;this._groupWidths=this._groupWidthRatios.map(function(t){return t*a/i}),this._borderValues=[];for(r=0;r<this._groupWidthRatios.length-1;r++)this._borderValues.push(r+.5);this._borderCoords=[];var s=Math.min(Math.max(Math.round(this.MinValue),0),this._borderValues.length-1);this._borderCoords[s]=this.StartCoord+(this._borderValues[s]-this.MinValue)*this._groupWidths[s];for(r=s+1;r<this._borderValues.length;r++)this._borderCoords[r]=this._borderCoords[r-1]+this._groupWidths[r];for(r=s-1;r>=0;r--)this._borderCoords[r]=this._borderCoords[r+1]-this._groupWidths[r+1]}},D.prototype._rotateLabels=function(t,e,i,a){var s,n,o=this.getCtx(),l=r.Agent.isRightToLeft(o),h=this._numLevels>1;null==a&&(a=this._numLevels-1),this._isLabelRotated[a]=!0,h||this._setOverflow(i,i,t);for(var u=0;u<t.length;u++)if(null!=(s=t[u])){if(n=s.getX(),s instanceof r.MultilineText||s instanceof r.BackgroundMultilineText){var g=this.getGroupWidth()*(this.getEndIndex(u,a)-this.getStartIndex(u,a)+1);2*s.getLineHeight()<g&&this._maxSpace>0?s.wrapText(this._maxSpace,s.getLineHeight()*D._MAX_LINE_WRAP,1):s.setWrapEnabled(!1)}s.setX(0),s.setY(0),l?s.setRotation(Math.PI/2):s.setRotation(3*Math.PI/2),s.setTranslateX(n)}var d=this.GetLabelDims(t,e,a);I.isWrapEnabled(this.Options.tickLabel.style)&&this._maxSpace>0&&(this._sanitizeWrappedText(o,d,t,!0,h)&&(d=this.GetLabelDims(t,e,a)));return this.SkipLabels(t,d)},D.prototype._sanitizeWrappedText=function(t,e,i,a,s){for(var n=this._calculateMaxWrap(e,i,a),o=0,l=0;l<i.length;l++){var h=i[l];if(h){var u=h instanceof r.MultilineText||h instanceof r.BackgroundMultilineText;n&&u&&h.isWrapEnabled()&&h.wrapText(this._maxSpace,h.getLineHeight()*this._maxLineWrap,1),s&&(o=Math.max(o,h.getDimensions().w)),h.alignMiddle()}}if(s){var g=a?this.Options.layout.hierarchicalLabelGapHeight:this.Options.layout.hierarchicalLabelGapWidth;this._maxSpace-=o+A.getGapSize(t,this.Options,g)}return n},D.prototype._calculateMaxWrap=function(t,e,i){for(var a=!1;this.IsOverlapping(t,0)&&this._maxLineWrap>1;){a=!0;for(var s=0;s<e.length;s++){var n=e[s];if((n instanceof r.MultilineText||n instanceof r.BackgroundMultilineText)&&n.getLineCount()==this._maxLineWrap){var o=n.getLineHeight();i?t[s].w-=o:(t[s].y+=.5*o,t[s].h-=o)}}this._maxLineWrap--}return a},D.prototype.isLabelRotated=function(t){return null==t&&(t=this._numLevels-1),this._isLabelRotated[t]},D.prototype._setOverflow=function(t,e,i){t=Math.max(t-this._startBuffer,0),e=Math.max(e-this._endBuffer,0);var a=r.Agent.isRightToLeft(this.getCtx());this.StartCoord+=(t-this.StartOverflow)*(a?-1:1),this.EndCoord-=(e-this.EndOverflow)*(a?-1:1),this._processGroupWidthRatios();for(var s=0;s<this._numLevels;s++){i=this._labels[s];for(var n=0;n<i.length;n++){var o=i[n];if(o){var l=this._getLabelCoord(s,this.getLabelIndex(o));o.setX(l)}}}this.StartOverflow=t,this.EndOverflow=e},D.prototype.getLabels=function(t,e){return null==e&&(e=this._numLevels-1),this._labels||this._generateLabels(t),this._labels[e]},D.prototype._getLabelCoord=function(t,e){var i=this.getStartIndex(e,t),r=this.getEndIndex(e,t);if(null==i||null==r)return null;i<this.MinValue&&r>this.MinValue&&(i=this.MinValue),r>this.MaxValue&&i<this.MaxValue&&(r=this.MaxValue);var a=r?i+(r-i)/2:i;return this.getCoordAt(a)},D.prototype._generateLabels=function(t){var e=[];this._labels=[];for(var i,a,s,n,o,l=t.getStage(),h="top"==this.Position||"bottom"==this.Position,u=r.Agent.isRightToLeft(t),g=this._numLevels>1,d=this.getGroupWidth(),c=this._maxSpace,p=h?"hierarchicalLabelGapHeight":"hierarchicalLabelGapWidth",_=g?A.getGapSize(t,this.Options,this.Options.layout[p]):0,f="auto"==this.Options.tickLabel.rotation&&h,v={},m=this.isAutoRotate(),S=this.Options.tickLabel.style,y=I.isWrapEnabled(this.Options.tickLabel.style)&&"tangential"!=this.Position&&d>r.TextUtils.getTextStringHeight(t,S),C=0;C<this._numLevels;C++){var x=this._levelsArray[C],b=m?this.getSkipIncrement():1;v[C]=[];for(var M=0;M<x.length;M+=b)if(x[M]){if(""===(i=this.getLabelAt(M,C))||!i&&0!=i){e.push(null);continue}var T=this._getLabelCoord(C,M);if(null!=T){n=this.getLabelStyleAt(M,C);var D=!m&&y&&"number"!=typeof i&&i.indexOf(" ")>=0;o=this.CreateLabel(t,i,T,n,D);var O=d*(this.getEndIndex(M,C)-this.getStartIndex(M,C)+1);v[C].push(O),D&&this._isTextWrapNeeded(t,i,n,f,h?O:c)&&c>0?h?o.wrapText(O,c,1,!0):o.wrapText(c,o.getLineHeight()*this._maxLineWrap,1,!1):D&&(!h||c<0)&&o.setWrapEnabled(!1),o._index=M,e.push(o),a||0!=C||(a=o),0==C&&(s=o)}else e.push(null)}else e.push(null);if(y&&g){for(var E=0,P=0;P<e.length;P++)if(e[P]){var L=e[P].getDimensions();E=Math.max(E,h?L.h:L.w)}c-=E+_}this._labels.push(e),e=[]}e=this._labels[this._numLevels-1];var w=[];if(a){if("tangential"==this.Position)return w=this.GetLabelDims(e,l),void(this._labels[0]=this.SkipTangentialLabels(e,w));var R=a.getDimensions(),B=!1;if(h){var k,F;if(null!=this.Options._startOverflow&&null!=this.Options._endOverflow)k=this.Options._startOverflow,F=this.Options._endOverflow;else{var N=s.getDimensions();k=u?R.w+R.x-this.StartCoord:this.StartCoord-R.x,F=u?this.EndCoord-N.x:N.w+N.x-this.EndCoord}B=k>this._startBuffer||F>this._endBuffer}for(C=0;C<this._numLevels;C++)if(e=this._labels[C],m)this._labels[C]=this._rotateLabels(e,l,R.h/2,C);else{w=this.GetLabelDims(e,l,C);var H=this.IsOverlapping(w,0,v[C]);if(H||(this._labels[C]=e),h)if(f){if(H)this._labels[C]=this._rotateLabels(e,l,R.h/2,C);else if(B&&this._setOverflow(k,F,e),this._labels[C]=e,g){var G=0;for(P=0;P<w.length;P++)w[P]&&(G=Math.max(G,w[P].h));this._maxSpace-=G+_}}else B&&this._setOverflow(k,F,e),w=this.GetLabelDims(e,l),this._labels[C]=this.SkipLabels(e,w);else{if(y)this._sanitizeWrappedText(t,w,e,!1,g)&&(w=this.GetLabelDims(e,l,C));this._labels[C]=this.SkipLabels(e,w)}}}},D.prototype.getMajorTickCoords=function(){for(var t,e=[],i="tangential"==this.Position?this.getGroupCount():this.getGroupCount()-1,r=0;r<this._levelsArray[0].length;r++)if(this._levelsArray[0][r]){var a=this.getStartIndex(r,0),s=this.getEndIndex(r,0);null!=(t=this._renderGridAtLabels?this.getCoordAt(a+.5*(s-a)):s+.5<i?this.getCoordAt(s+.5):null)&&e.push(t)}return e},D.prototype.getMinorTickCoords=function(){var t,e=[];if(!this._levelsArray[1])return e;for(var i=0;i<this._levelsArray[1].length;i++)if(this._levelsArray[1][i]){var r=this.getStartIndex(i,1),a=this.getEndIndex(i,1);null!=(t=this._renderGridAtLabels?this.getCoordAt(r+.5*(a-r)):a+.5<this.getGroupCount()-1?this.getCoordAt(a+.5):null)&&e.push(t)}return e},D.prototype.getUnboundedValueAt=function(t){if(null==t)return null;if(this._groupWidthRatios){for(var e=this._borderCoords.length,i=0;i<this._borderCoords.length;i++)if(t<=this._borderCoords[i]){e=i;break}return 0==e?this._borderValues[0]-(this._borderCoords[0]-t)/this._groupWidths[0]:this._borderValues[e-1]+(t-this._borderCoords[e-1])/this._groupWidths[e]}var r=(this.EndCoord-this.StartCoord)/(this.MaxValue-this.MinValue);return this.MinValue+(t-this.StartCoord)/r},D.prototype.getUnboundedCoordAt=function(t){if(null==t)return null;if(this._groupWidthRatios){for(var e=this._borderValues.length,i=0;i<this._borderValues.length;i++)if(t<=this._borderValues[i]){e=i;break}return 0==e?this._borderCoords[0]-this._groupWidths[0]*(this._borderValues[0]-t):this._borderCoords[e-1]+this._groupWidths[e]*(t-this._borderValues[e-1])}var r=(this.EndCoord-this.StartCoord)/(this.MaxValue-this.MinValue);return this.StartCoord+(t-this.MinValue)*r},D.prototype.getLabelAt=function(t,e){if(null==e&&(e=this._numLevels-1),(t=Math.round(t))<0)return null;var i=this._levelsArray[e]&&this._levelsArray[e][t]?this._levelsArray[e][t].item:null;return i&&(i.name?i=i.name:null!=i.id&&(i="")),i},D.prototype.getGroupAt=function(t,e){if(null==e&&(e=this._numLevels-1),(t=Math.round(t))<0)return null;var i=this._levelsArray[e]&&this._levelsArray[e][t]?this._levelsArray[e][t].item:null;if(i){if(i.id)return i.id;if(i.name||""===i.name)return i.name}return i},D.prototype.getLabelStyleAt=function(t,e){var i=this._getGroupAttribute(t,e,"labelStyle");if(i){var a=new r.CSSStyle(i);return a.getStyle("font-size")||a.setStyle("font-size",this.Options.tickLabel.style.getStyle("font-size")),a}return null},D.prototype.getDatatip=function(t,e){return this._getGroupAttribute(t,e,"shortDesc")},D.prototype.isDrillable=function(t,e){var i=this._getGroupAttribute(t,e,"drilling");return"on"==i||"off"!=i&&("on"==this._drilling||"groupsOnly"==this._drilling)},D.prototype.getGroup=function(t,e){if(t<0||t>this.getGroupCount()-1)return null;if(1==this._numLevels)return this.getGroupAt(t);var i=[];null==e&&(e=this._numLevels-1);for(var r=this.getStartIndex(t,e),a=0;a<=e;a++)for(var s=this._levelsArray[a],n=0;n<s.length;n++)this.getStartIndex(n,a)<=r&&this.getEndIndex(n,a)>=r&&i.push(this.getGroupAt(n,a));return i.length>0?1===i.length&&1===this._numLevels?i[0]:i:null},D.prototype.getLabelBackground=function(t,e,i){null==i&&(i=this._numLevels-1);var a=t.getCSSStyle();if(a){var s=a.getStyle(r.CSSStyle.BACKGROUND_COLOR),n=a.getStyle(r.CSSStyle.BORDER_COLOR),o=a.getStyle(r.CSSStyle.BORDER_WIDTH),l=a.getStyle(r.CSSStyle.BORDER_RADIUS);if(null!=s||null!=n||null!=o||null!=l){var h=t.getDimensions(),u=.15*h.h;"blink"!==r.Agent.engine&&"ie"!==r.Agent.browser&&"edge"!==r.Agent.browser||t.getVertAlignment()!==r.OutputText.V_ALIGN_BOTTOM||(h.y+=h.h/2);var g=new r.Rect(e,h.x-u,h.y,h.w+2*u,h.h),d=new r.CSSStyle;return null!=s?d.setStyle(r.CSSStyle.BACKGROUND_COLOR,s):g.setInvisibleFill(),d.setStyle(r.CSSStyle.BORDER_COLOR,n),d.setStyle(r.CSSStyle.BORDER_WIDTH,o),d.setStyle(r.CSSStyle.BORDER_RADIUS,l),g.setCSSStyle(d),this._isLabelRotated[i]&&g.setMatrix(t.getMatrix()),g.setMouseEnabled(!1),g}return null}return null},D.prototype.getGroupIndex=function(t){if(null==t)return-1;for(var e=-1,i=0;i<this._groupCount;i++){var a=this.getGroup(i);if(t instanceof Array&&a instanceof Array?r.ArrayUtils.equals(t,a):t==a){e=i;break}}return e},D.prototype.getMinimumExtent=function(){return 1},D.prototype.getGroupWidth=function(){return Math.abs(this.EndCoord-this.StartCoord)/Math.abs(this.MaxValue-this.MinValue)},D.prototype.getGroupCount=function(){return this._groupCount},D.prototype.getNumLevels=function(){return this._numLevels},D.prototype._generateLevelsArray=function(t,e,i,r){for(var a=0;a<t.length;a++)if(i[e]||(i[e]=[]),i[e].push({item:t[a],start:r,end:r,position:a}),t[a]&&t[a].groups){var s=i[e].length-1,n=this._generateLevelsArray(t[a].groups,e+1,i,i[e][s].start);r!=n?(i[e][s].end=n-1,r=n):r++}else r++;return r},D.prototype._getGroupAttribute=function(t,e,i){null==e&&(e=this._numLevels-1);var r=this._levelsArray[e]&&this._levelsArray[e][t]?this._levelsArray[e][t].item:null;return r?r[i]:null},D.prototype.areSeparatorsRendered=function(){return this._areSeparatorsRendered},D.prototype.getSeparatorColor=function(){return this._separatorColor},D.prototype.getStartIndex=function(t,e){return null==e&&(e=this._numLevels-1),this._levelsArray[e]&&this._levelsArray[e][t]?this._levelsArray[e][t].start:null},D.prototype.getEndIndex=function(t,e){return null==e&&(e=this._numLevels-1),this._levelsArray[e]&&this._levelsArray[e][t]?this._levelsArray[e][t].end:null},D.prototype.getPosition=function(t,e){return null==e&&(e=this._numLevels-1),this._levelsArray[e]&&this._levelsArray[e][t]?this._levelsArray[e][t].position:null},D.prototype.getItemsRange=function(t){t instanceof Array||(t=[t]);for(var e=0,i=this._groupCount,r=[],a=0;a<t.length;a++)for(var s=this._levelsArray[a],n=t[a],o=0;o<s.length;o++){if((s[o].item.id?s[o].item.id:s[o].item.name)===n){var l=s[o].start,h=s[o].end;e<=l&&i>=h&&(e=l,i=h,r.push(s[o].item))}}return{startIndex:e,endIndex:i,groupData:r}},D.prototype.isRenderGridAtLabels=function(){return this._renderGridAtLabels},D.prototype.setLastRenderedLevel=function(t){this._lastRenderedLevel=t},D.prototype.getLastRenderedLevel=function(){return this._lastRenderedLevel},D.prototype.getSeparatorStartLevel=function(){for(var t=this._lastRenderedLevel,e=this._lastRenderedLevel-1;e>=0;e--)this._labels[e].length!=this._levelsArray[e].length&&(t=e);return t},D.prototype.getLabelIndex=function(t){return t._index>=0?t._index:null},D.prototype.getMaxLineWrap=function(){return this._maxLineWrap},D.prototype._isTextWrapNeeded=function(t,e,i,a,s){var n=r.TextUtils.getTextStringWidth(t,e,i);return n>=s&&(n/this._maxLineWrap<s||!a)},D.prototype.isAutoRotate=function(){var t="top"==this.Position||"bottom"==this.Position,e=this._numLevels>1,i=this.getGroupWidth(),r="auto"==this.Options.tickLabel.rotation&&t;return!e&&r&&i<D._ROTATE_THRESHOLD},D.prototype.getSkipIncrement=function(){var t=1;return t=D._ROTATE_THRESHOLD/(2*this.getGroupWidth()),this.Options._duringZoomAndScroll&&(t*=4),Math.max(1,Math.floor(t))};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var O=function(t){this._axis=t,this._options=this._axis.getOptions(),this._axisInfo=this._axis.getInfo()};r.Obj.createSubclass(O,r.Automation),O.prototype.GetSubIdForDomElement=function(t){var e=this._axis.getEventManager().GetLogicalObject(t);if(e&&e instanceof r.SimpleObjPeer){if(e.getParams().type==x.TITLE)return"title";if(this._options.groups){for(var i=e.getParams().level,a=this._axisInfo.getStartIndex(e.getParams().index,i),s="",n=0;n<=i;n++)for(var o=this._axisInfo.getLabels(this._axis.getCtx(),n),l=0;l<o.length;l++){var h=this._axisInfo.getLabelIndex(o[l]);this._axisInfo.getStartIndex(h,n)<=a&&this._axisInfo.getEndIndex(h,n)>=a&&(s+="["+this._axisInfo.getPosition(h,n)+"]")}if(s.length>0)return"item"+s}}return null},O.prototype.getDomElementForSubId=function(t){if("title"==t){var e=this._axisInfo.getTitle();if(e)return e.getElem()}else if(this._axisInfo instanceof D)for(var i=t.split("[").length-1-1,r=0,a=0,s=0;s<=i;s++){var n=t.indexOf("["),o=t.indexOf("]"),l=t.substring(n+1,o);t=t.substring(o+1);for(var h,u=this._axisInfo.getLabels(this._axis.getCtx(),s),g=0;g<u.length;g++)if(h=this._axisInfo.getLabelIndex(u[g]),this._axisInfo.getStartIndex(h,s)==a){r=h;break}for(var d=r;d<u.length;d++)if(h=this._axisInfo.getLabelIndex(u[d]),this._axisInfo.getPosition(h,s)==l){if(0==t.length)return u[d].getElem();a=this._axisInfo.getStartIndex(h,s);break}}return null};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var E=function(t,e){this.Init(t,e)};r.Obj.createSubclass(E,r.KeyboardHandler),E.prototype.Init=function(t,e){E.superclass.Init.call(this,t),this._axis=e},E.prototype.processKeyDown=function(t){var e=t.keyCode,i=this._eventManager.getFocus(),a=null;if(e==r.KeyboardEvent.TAB){i&&(r.EventManager.consumeEvent(t),a=i);var s=this._axis.__getKeyboardObjects();s.length>0&&(r.EventManager.consumeEvent(t),a=this.getDefaultNavigable(s))}else e==r.KeyboardEvent.ENTER?i&&(this._eventManager.processDrillEvent(i),r.EventManager.consumeEvent(t)):a=E.superclass.processKeyDown.call(this,t);return a};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var P=function(){};r.Obj.createSubclass(P,r.BaseComponent),P.newInstance=function(t,e,i){var r=new P;return r.Init(t,e,i),r},P.getDefaults=function(t){return(new A).getDefaults(t)},P.prototype.Init=function(t,e,i){P.superclass.Init.call(this,t,e,i),this.Defaults=new A(t),this.EventManager=new T(this),this.EventManager.addListeners(this),r.Agent.isTouchDevice()||this.EventManager.setKeyboardHandler(new E(this.EventManager,this)),this._bounds=null},P.prototype.SetOptions=function(t){t?"off"!==t.rendered?this.Options=this.Defaults.calcOptions(t):(t.tickLabel.style=new r.CSSStyle(t.tickLabel.style),t.titleStyle=new r.CSSStyle(t.titleStyle),this.Options=t):this.Options||(this.Options=this.GetDefaults())},P.prototype.getPreferredSize=function(t,e,i,r){return this.SetOptions(t),I.getPreferredSize(this,e,i,r)},P.prototype.render=function(t,e,i,a,s){this.getCache().clearCache(),this.SetOptions(t),this._navigablePeers=[],this.Width=e,this.Height=i,this.removeChildren(),a||(a=0),s||(s=0);var n=new r.Rectangle(a,s,e,i);I.render(this,n)},P.prototype.__registerObject=function(t){(null!=t.getDatatip()||t.isDrillable())&&this._navigablePeers.push(t)},P.prototype.__getKeyboardObjects=function(){return this._navigablePeers},P.prototype.isNavigable=function(){return this._navigablePeers.length>0},P.prototype.getKeyboardFocus=function(){return null!=this.EventManager?this.EventManager.getFocus():null},P.prototype.setKeyboardFocus=function(t,e){if(null!=this.EventManager){for(var i=this.__getKeyboardObjects(),a=t.getId(),s=!1,n=0;n<i.length;n++){var o=i[n].getId();if(a instanceof Array&&o instanceof Array&&r.ArrayUtils.equals(a,o)||a===o){this.EventManager.setFocusObj(i[n]),s=!0,e&&i[n].showKeyboardFocusEffect();break}}s||this.EventManager.setFocusObj(this.EventManager.getKeyboardHandler().getDefaultNavigable(i));var l=this.getKeyboardFocus();if(l){var h=l.getDisplayable();h.setAriaProperty("label",l.getAriaLabel()),this.getCtx().setActiveElement(h)}}},P.prototype.processEvent=function(t,e){this===e&&this.dispatchEvent(t)},P.prototype.getInfo=function(){return this.Info},P.prototype.__setInfo=function(t){this.Info=t},P.prototype.getWidth=function(){return this.Width},P.prototype.getHeight=function(){return this.Height},P.prototype.__setBounds=function(t){this._bounds=t},P.prototype.__getBounds=function(){return this._bounds},P.prototype.getAutomation=function(){return new O(this)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var L={getHideAndShowBehavior:function(t){return t.getOptions().hideAndShowBehavior},getHoverBehavior:function(t){return t.getOptions().hoverBehavior},isScrollable:function(t){return!!u.isScrollSupported(t)&&"off"!=t.getOptions().zoomAndScroll},isZoomable:function(t){if(!u.isScrollSupported(t))return!1;var e=t.getOptions().zoomAndScroll;return"live"==e||"delayed"==e},getZoomDirection:function(t){return u.isScatterBubble(t)?t.getOptions().zoomDirection:"auto"},isLiveScroll:function(t){if(!u.isScrollSupported(t))return!1;var e=t.getOptions().zoomAndScroll;return"live"==e||"liveScrollOnly"==e},isDelayedScroll:function(t){if(!u.isScrollSupported(t))return!1;var e=t.getOptions().zoomAndScroll;return"delayed"==e||"delayedScrollOnly"==e},isPlotAreaDraggable:function(t){var e=t.getOptions(),i=e.dnd?e.dnd.drag.items:{};return Object.keys(i).length>0},isPlotAreaDropTarget:function(t){var e=t.getOptions(),i=e.dnd?e.dnd.drop.plotArea:{};return Object.keys(i).length>0},isHorizScrollbarSupported:function(t){var e=L.getZoomDirection(t);return!u.isPolar(t)&&(u.isBLAC(t)&&u.isVertical(t)||u.isScatterBubble(t)&&"y"!=e)},isVertScrollbarSupported:function(t){var e=L.getZoomDirection(t);return!u.isPolar(t)&&(u.isBLAC(t)&&u.isHorizontal(t)||u.isScatterBubble(t)&&"x"!=e)}},w=new Object;
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */r.Obj.createSubclass(w,r.Obj),w.createText=function(t,e,i,a,s,n,o,l){var h=new r.OutputText(e.getCtx(),i,s,n);return h.setCSSStyle(a),r.TextUtils.fitText(h,o,l,e)?(t.associate(h,new r.SimpleObjPeer(h.getUntruncatedTextString())),h):null},w.areTitlesRendered=function(t){var e=t.getOptions();return e.title.text||e.subtitle.text||e.footnote.text},w.renderEmptyText=function(t,e,i){var a=t.getOptions();if(c.hasInvalidTimeData(t)&&c.hasData(t))var s=a.translations.labelInvalidData;else(s=a.emptyText)||(s=a.translations.labelNoData);t.renderEmptyText(e,s,new r.Rectangle(i.x,i.y,i.w,i.h),t.getEventManager(),a._statusMessageStyle)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var R=new Object;r.Obj.createSubclass(R,r.Obj),R.getXAxisPosition=function(t){return u.isPolar(t)?"tangential":u.isHorizontal(t)?r.Agent.isRightToLeft(t.getCtx())?"right":"left":"bottom"},R.getBaselineScaling=function(t,e){var i=e+"Axis",r=t.getOptions()[i].baselineScaling;return!r||"zero"!=r&&"min"!=r?u.isStock(t)?"min":"zero":r},R.getYAxisPosition=function(t){var e=t.getOptions().yAxis.position;return u.isPolar(t)?"radial":u.isHorizontal(t)?!e||"top"!=e&&"bottom"!=e?"bottom":e:(u.isStock(t)&&(e=e||"end"),r.Agent.isRightToLeft(t.getCtx())?e&&"end"==e?"left":"right":e&&"end"==e?"right":"left")},R.getY2AxisPosition=function(t){var e=t.getOptions().y2Axis.position;return u.isHorizontal(t)?!e||"top"!=e&&"bottom"!=e?"top":e:r.Agent.isRightToLeft(t.getCtx())?e&&"start"==e?"right":"left":e&&"start"==e?"left":"right"},R.getAxisOffset=function(t){var e=t.getCache().getFromCache("axisOffset");if(null!=e)return e;var i=t.getOptions().styleDefaults.groupSeparators;if(u.hasGroupAxis(t)&&c.getNumLevels(t)>1&&"on"==i.rendered)e=.5;else if(c.hasBarSeries(t)||f.hasCenteredSeries(t)||c.hasCandlestickSeries(t)||c.hasBoxPlotSeries(t)||u.isBLAC(t)&&1==c.getGroupCount(t))e=.5;else if(u.isSpark(t)||L.isScrollable(t)||u.isOverview(t))e=0;else{var r=u.isHorizontal(t)?.2:.5;e=r-r/Math.sqrt(c.getGroupCount(t))}return t.getCache().putToCache("axisOffset",e),e},R.isGridShifted=function(t){if(!u.isBLAC(t))return!1;if(c.getNumLevels(t)>1)return!0;for(var e=c.getSeriesCount(t),i=0;i<e;i++)if(c.isSeriesRendered(t,i)){var r=c.getSeriesType(t,i),a=f.getLineType(t,i);if("bar"!=r&&"centeredSegmented"!=a&&"centeredStepped"!=a)return!1}return!0},R.isGridPolygonal=function(t){return!(!u.isBLAC(t)||c.hasBarSeries(t))&&"polygon"==t.getOptions().polarGridShape},R.isAxisRendered=function(t,e){if(!u.hasAxes(t))return!1;var i=t.getOptions(),r=i.overview.content&&i.overview.content[e+"Axis"],a=r&&"on"==r.rendered;if("y"==e&&c.hasY2DataOnly(t)&&!a)return!1;if("y2"==e&&!c.hasY2Data(t)&&!a)return!1;var s=i[e+"Axis"];return!("off"==s.rendered&&!a)&&!("off"==s.tickLabel.rendered&&!s.title&&!a)},R.isAxisLineRendered=function(t,e){var i=t.getOptions()[e+"Axis"];return"off"!=i.rendered&&"off"!=i.axisLine.rendered&&!("auto"==i.axisLine.rendered&&"x"!=e&&u.isBLAC(t)&&!u.isPolar(t))},R.isMajorTickRendered=function(t,e){var i=t.getOptions()[e+"Axis"];return"off"!=i.rendered&&"off"!=i.majorTick.rendered&&!("auto"==i.majorTick.rendered&&"x"==e&&u.isBLAC(t)&&!u.isPolar(t))},R.isMinorTickRendered=function(t,e){var i=t.getOptions()[e+"Axis"];return"off"!=i.rendered&&"off"!=i.minorTick.rendered&&("on"==i.minorTick.rendered||R.isLog(t,e))},R.isLog=function(t,e){return"log"==t.getOptions()[e+"Axis"].scale},R.getTickLabelHeight=function(t,e){var i=t.getOptions(),a=i[e+"Axis"].tickLabel.style;return a instanceof r.CSSStyle||(a=new r.CSSStyle(a)),a.mergeUnder(P.getDefaults(i.skin).tickLabel.style),r.TextUtils.getTextStringHeight(t.getCtx(),a)},R.getTickLabelGapSize=function(t,e){if(R.isTickLabelInside(t,e))return 0;var i=t.getOptions(),r=u.isHorizontal(t),a=R.getGapScalingFactor(t,e),s=Math.ceil(i.layout.tickLabelGapWidth*a),n=Math.ceil(i.layout.tickLabelGapHeight*a);return"x"==e?r?s:n:r?n:s},R.getGapScalingFactor=function(t,e){return R.isAxisRendered(t,e)?R.getTickLabelHeight(t,e)/14:0},R.isTickLabelInside=function(t,e){return!(u.isPolar(t)||u.isScatterBubble(t)||u.isBLAC(t)&&"x"==e)&&"inside"==t.getOptions()[e+"Axis"].tickLabel.position},R.getXAxisViewportMinMax=function(t,e){var i=e?"xAxisViewportMinMaxUG":"xAxisViewportMinMax",r=t.getCache().getFromCache(i);if(r)return r;var a=t.getOptions().xAxis,s=u.hasGroupAxis(t),n=R.getAxisOffset(t);if(e)var o=R.getXAxisGlobalMinMax(t);var l=null;null!=a.viewportMin?l=a.viewportMin:null!=a.viewportStartGroup?l=s?c.getGroupIndex(t,a.viewportStartGroup)-n:a.viewportStartGroup:e&&(l=o.min);var h=null;return null!=a.viewportMax?h=a.viewportMax:null!=a.viewportEndGroup?h=s?c.getGroupIndex(t,a.viewportEndGroup)+n:a.viewportEndGroup:e&&(h=o.max),r={min:l,max:h},t.getCache().putToCache(i,r),r},R.getXAxisGlobalMinMax=function(t){var e=t.getOptions().xAxis,i=u.hasGroupAxis(t),r=R.getAxisOffset(t);if(!i)var a=R.getMinMaxValue(t,"x");return{min:null!=e.min?e.min:i?0-r:a.min,max:null!=e.max?e.max:i?c.getGroupCount(t)-1+r:a.max}},R.applyInitialZooming=function(t,e){var i=t.getOptions(),r=i.xAxis,a=i.initialZooming;if(u.isBLAC(t)&&"off"!=i.zoomAndScroll&&"none"!=a){i._initialZoomed&&("last"==a?r.viewportMin=null:r.viewportMax=null);var s=R.getXAxisViewportMinMax(t,!1),n=s.min,o=s.max;if(!("last"==a&&null!=n||"first"==a&&null!=o)){var l=u.isHorizontal(t)?e.h:e.w,h=Math.floor(l/(2*R.getTickLabelHeight(t,"x")))+R.getAxisOffset(t),g=c.getGroupCount(t)-1;if(!(g<=h)){var d,p;if(u.hasGroupAxis(t))d=0,p=g;else{var _=R.getMinMaxValue(t,"x");d=_.min,p=_.max}var f=h/g*(p-d);"last"==i.initialZooming?(null==o&&(o=p),r.viewportMin=Math.max(o-f,d)):(null==n&&(n=d),r.viewportMax=Math.min(n+f,p)),i._initialZoomed=!0}}}},R.isYAdjustmentNeeded=function(t){var e=t.getOptions().styleDefaults.dataLabelPosition,i=t.getOptionsCache().getFromCache("hasDataOutsideBarEdge"),r="outsideBarEdge"==e||i,a=f.isStackLabelRendered(t);return!(!c.hasBarSeries(t)||!r&&!a)},R.axisContainsPoint=function(t,e){if(!t)return!1;var i=t.getOptions().position,r="top"==i||"bottom"==i,a=r?4:10,s=r?10:4,n=t.__getBounds().clone();n.x-=s,n.y-=a,n.w+=2*s,n.h+=2*a;var o=t.stageToLocal(e);return n.containsPoint(o.x,o.y)},R.isStandalonePlotArea=function(t){t.getOptions();return!w.areTitlesRendered(t)&&(!u.isLegendRendered(t)&&(!R.isAxisRendered(t,"x")&&(!R.isAxisRendered(t,"y")&&!R.isAxisRendered(t,"y2"))))},R.isStandaloneXAxis=function(t){var e=t.getOptions();return!w.areTitlesRendered(t)&&("off"==e.legend.rendered&&("off"==e.plotArea.rendered&&(!R.isAxisRendered(t,"y")&&!R.isAxisRendered(t,"y2"))))},R.isStandaloneYAxis=function(t){var e=t.getOptions();return!w.areTitlesRendered(t)&&("off"==e.legend.rendered&&(!R.isAxisRendered(t,"x")&&("off"==e.plotArea.rendered&&!R.isAxisRendered(t,"y2"))))},R.isStandaloneY2Axis=function(t){var e=t.getOptions();return!w.areTitlesRendered(t)&&("off"==e.legend.rendered&&(!R.isAxisRendered(t,"x")&&(!R.isAxisRendered(t,"y")&&"off"==e.plotArea.rendered)))},R.getViewportMinMaxGroupIndex=function(t,e){var i=R.getXAxisViewportMinMax(t,!0),r=u.hasGroupAxis(t),a=c.getGroupCount(t),s=i.min,n=0;if(null!=s)if(r)n=Math.ceil(s);else for(var o=0;o<a;o++){if(c.getXValue(t,e,o)>=s){n=o;break}}var l=i.max,h=a-1;if(null!=h)if(r)h=Math.floor(l);else for(o=a-1;o>=n;o--){if(c.getXValue(t,e,o)<=l){h=o;break}}return{min:n,max:h}},R.getViewportGroupCount=function(t){var e=R.getXAxisViewportMinMax(t,!0),i=R.getXAxisGlobalMinMax(t),r=(e.max-e.min)/(i.max-i.min);return isNaN(r)?1:r*c.getGroupCount(t)},R._computeYAlongLine=function(t,e,i,a,s,n){t&&(i=r.Math.log10(i),s=r.Math.log10(s));var o=i+(s-i)*(n-e)/(a-e);return t?Math.pow(10,o):o},R.getMinMaxValue=function(t,e,i){var r=e+(i?"MinMaxDO":"MinMax"),a=t.getCache().getFromCache(r);if(a)return a;var s=t.getOptions()[e+"Axis"];if(null!=s.dataMax&&null!=s.dataMin&&i)return a={min:s.dataMin,max:s.dataMax},t.getCache().putToCache(r,a),a;var n=u.hasTimeAxis(t);if(null!=s.max&&null!=s.min&&!i&&!n)return a={min:s.min,max:s.max},t.getCache().putToCache(r,a),a;var o="z"!=e&&R.isLog(t,e),l="y2"==e;l&&(e="y");for(var h="y"==e,g=!i&&h&&u.isBLAC(t),d="withoutRescale"==L.getHideAndShowBehavior(t)||"x"==e&&u.hasTimeAxis(t),p=-1/0,_=1/0,v=c.getSeriesCount(t),S=0;S<v;S++){var y=c.getSeriesItem(t,S),C=c.getSeriesType(t,S),x=h&&(c.isRangeSeries(t,S)||"candlestick"==C||"boxPlot"==C);if(d||c.isSeriesRendered(t,S)){var A=c.isAssignedToY2(t,S);if(!h||l==A){var b=y.items;if(b){var M=0,T=b.length-1;if(g){var I=R.getViewportMinMaxGroupIndex(t,S);M=I.min,T=I.max}for(var D=M;D<=T;D++)if(d||c.isDataItemRendered(t,S,D)){var O=b[D],E=null;if(h?x||(E=c.getCumulativeValue(t,S,D,d)):"x"==e&&n&&!u.isMixedFrequency(t)?(E=c.getGroupLabel(t,D),null!=O&&(O.x=E)):null!=O&&(E=O[e]),!("z"==e&&E<=0)){if(!(x||null==E||"number"!=typeof E||o&&E<=0)){var P=0;if(u.isBubble(t)&&!i&&"z"!=e){var w=f.getMarkerSize(t,S,D);P=R.getBubbleAxisRadius(t,e,w)}p=Math.max(p,o?E*Math.pow(10,P):E+P),_=Math.min(_,o?E/Math.pow(10,P):E-P)}if(x){var B=c.getHighValue(t,S,D),k=c.getLowValue(t,S,D);o&&(B<=0||k<=0)||(p=Math.max(p,B,k),_=Math.min(_,B,k))}if(g&&!x){var F=null,N=null;if(M>0&&D==M?(F=D-1,N=R.getXAxisViewportMinMax(t,!0).min):T<b.length-1&&D==T&&(F=D+1,N=R.getXAxisViewportMinMax(t,!0).max),null!=F){var H=c.getXValue(t,S,D),G=c.getXValue(t,S,F),U=c.getCumulativeValue(t,S,F),j=R._computeYAlongLine(o,H,E||0,G,U||0,N);p=Math.max(p,j),_=Math.min(_,j)}}var V=c.getNestedDataItemCount(t,S,D);if(V>0)for(var Y=0;Y<V;Y++){var W=c.getNestedDataItem(t,S,D,Y),z="number"==typeof W;p=z?Math.max(p,W):Math.max(p,W.value),_=z?Math.min(_,W):Math.min(_,W.value)}}}}}}}var X=null;if("x"==e?X=c.getAxisRefObjs(t,"x"):l?X=c.getAxisRefObjs(t,"y2"):h&&(X=c.getAxisRefObjs(t,"y")),null!=X)for(var K=0;K<X.length;K++){var Z=X[K],q=Z.items,Q="withRescale"==L.getHideAndShowBehavior(t)&&!m.isObjectRendered(t,Z);if(!Q)if(q&&!Q){var J=0,$=q.length-1;if(g){var tt=R.getViewportMinMaxIndex(t,q);J=tt.min,$=tt.max}for(var et=J;et<=$;et++)if(null!=q[et]){k=m.getLowValue(q[et]),B=m.getHighValue(q[et]);var it=isNaN(q[et])?q[et].value:q[et];null!=k&&isFinite(k)&&(_=Math.min(_,k),p=Math.max(p,k)),null!=B&&isFinite(B)&&(_=Math.min(_,B),p=Math.max(p,B)),null!=it&&isFinite(it)&&(_=Math.min(_,it),p=Math.max(p,it))}}else{k=m.getLowValue(Z),B=m.getHighValue(Z),it=Z.value;null!=k&&isFinite(k)&&(_=Math.min(_,k),p=Math.max(p,k)),null!=B&&isFinite(B)&&(_=Math.min(_,B),p=Math.max(p,B)),null!=it&&isFinite(it)&&(_=Math.min(_,it),p=Math.max(p,it))}}return a={min:_,max:p},t.getCache().putToCache(r,a),a},R.getBubbleAxisRadius=function(t,e,i){if(!i)return 0;var r="x"==e?"_xAxisBubbleRatio":"_yAxisBubbleRatio";return i/2*t.getCache().getFromCache(r)},R.getViewportMinMaxIndex=function(t,e){var i=R.getXAxisViewportMinMax(t,!0),r=u.hasGroupAxis(t),a=i.min,s=0;if(null!=a)if(r)s=Math.ceil(a);else for(var n=0;n<e.length;n++){if(m.getXValue(t,e,n)>=a){s=n;break}}var o=i.max,l=e.length-1;if(null!=l)if(r)l=Math.floor(o);else for(n=e.length-1;n>=s;n--){if(c.getXValue(t,e,n)<=o){l=n;break}}return{min:s,max:l}};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var B={getGroupWidthRatios:function(t){if(!c.hasBarSeries(t)&&!c.hasCandlestickSeries(t)&&!c.hasBoxPlotSeries(t))return null;var e=t.getOptions(),i=B.getBarGapRatio(t);if(i>=1)return e._averageGroupZ=1/0,null;e._averageGroupZ=0;var r,a,s,n,o,l,h=c.getGroupCount(t),u=c.isSplitDualY(t),g=c.getStackCategories(t,"bar"),d=g.y.length,p=g.y2.length;if(t.getOptionsCache().getFromCache("hasConstantZValue")){var _=t.getOptionsCache().getFromCache("constantZValue")*(u?Math.max(d,p):d+p);l=(o=_*h)*i/(1-i),r=null}else{for(var f=[],v=0;v<h;v++){for(a=0,n=0;n<d;n++)a+=c.getBarCategoryZ(t,g.y[n],v,!1);for(s=0,n=0;n<p;n++)s+=c.getBarCategoryZ(t,g.y2[n],v,!0);f.push(u?Math.max(a,s):a+s)}o=f.reduce(function(t,e){return t+e}),l=o*i/(1-i),r=f.map(function(t){return t+l/h})}return e._averageGroupZ=(o+l)/h,r},getBarGapRatio:function(t){var e=t.getCache().getFromCache("barGapRatio");if(e)return e;if("string"==typeof(e=t.getOptions().styleDefaults.barGapRatio)&&"%"==e.slice(-1)&&(e=Number(e.slice(0,-1))/100),null!=e&&!isNaN(e))return e;var i=c.getStackCategories(t,"bar"),r=i.y.length,a=i.y2.length,s=c.isSplitDualY(t)?Math.max(r,a):r+a;return e=u.isPolar(t)?1==s?0:.25:1==s?.37+.26/R.getViewportGroupCount(t):.25,t.getCache().putToCache("barGapRatio",e),e},getBarInfo:function(t,e,i,a){var s,n,o=u.isHorizontal(t),l=c.isStacked(t),h=r.Agent.isRightToLeft(t.getCtx()),d=t.xAxis,p=c.isRangeSeries(t,e),_=f.getBarCategoryOffsetMap(t,i),v=c.getXValue(t,e,i),m=d.getUnboundedCoordAt(v),S=c.isAssignedToY2(t,e),y=S?t.y2Axis:t.yAxis,C=y.getBaselineCoord();if(p){var x=c.getLowValue(t,e,i),A=c.getHighValue(t,e,i);if(null==x||isNaN(x)||null==A||isNaN(A))return null;if((s=y.getBoundedCoordAt(x))==(n=y.getBoundedCoordAt(A))&&null==y.getCoordAt(x))return null}else{var b=c.getValue(t,e,i),M=c.getCumulativeValue(t,e,i);if(null==b||isNaN(b))return null;if((s=y.getBoundedCoordAt(M))==(n=l?y.getBoundedCoordAt(M-b):C)&&null==y.getCoordAt(M))return null}var T=c.getStackCategory(t,e),I=f.getBarWidth(t,e,i),D=l?f.getBarStackWidth(t,T,i,S):I;if("pixel"==f.getBarSpacing(t)&&"firefox"===r.Agent.browser){var O=I/(1-B.getBarGapRatio(t));I>1&&O-I<2&&(D=--I)}var E=_[S?"y2":"y"][T]+.5*(D-I),P=h&&!o?m-E-I:m+E,L=P+I,w=(P+L)/2,R=p?(s+n)/2:s;return{x1:P,x2:L,axisCoord:C,baseCoord:n,yCoord:s,dataPos:g.convertAxisCoord(t,new r.Point(w,R),a),barWidth:I}},getDataLabelPosition:function(t,e,i,a,s,n){var o,l=c.getNestedDataItem(t,e,i,a),h=c.getDataItem(t,e,i);if(n)o="outsideBarEdge";else if((o=l&&l.labelPosition?l.labelPosition:h.labelPosition)||(o=t.getOptions().styleDefaults.dataLabelPosition),"none"==(o=f._parseLowHighArray(o,s)))return"none";var g=r.Agent.isRightToLeft(t.getCtx()),d=u.isHorizontal(t),p=u.isPolar(t);if(u.isFunnel(t)||u.isPyramid(t))return"center";if("bar"==c.getSeriesType(t,e)){if("center"==o||p)return"center";var _,v=c.isStacked(t);if("insideBarEdge"!=o){if(v&&!n)return"center";"outsideBarEdge"!=o&&(o="insideBarEdge")}if("insideBarEdge"==o&&!v){var m,S=t.getOptions().styleDefaults.dataLabelStyle,y=h.labelStyle?r.CSSStyle.mergeStyles([S,new r.CSSStyle(h.labelStyle)]):S;if(d){var C=f.getDataLabel(t,e,i,a,s);m=r.TextUtils.getTextStringWidth(t.getCtx(),C,y)}else m=r.TextUtils.getTextStringHeight(t.getCtx(),y);var x=B.getBarInfo(t,e,i);(x?Math.abs(x.baseCoord-x.yCoord):0)<=m&&(o="outsideBarEdge")}return _="low"==s?h.low<=h.high:"high"==s?h.high<h.low:c.getValue(t,e,i,a)<0,"outsideBarEdge"==o?d?!_&&!g||_&&g?"right":"left":_?"bottom":"top":d?!_&&!g||_&&g?"inRight":"inLeft":_?"inBottom":"inTop"}if("center"==o)return"center";if("belowMarker"==o)return"bottom";if("aboveMarker"==o)return"top";if("afterMarker"!=o&&"beforeMarker"!=o){if(u.isBubble(t))return"center";if("low"!=s||p)if("high"!=s||p)o="afterMarker";else{if(!d)return"top";o="afterMarker"}else{if(!d)return"bottom";o="beforeMarker"}}return!g&&"afterMarker"==o||g&&"beforeMarker"==o?"right":"left"}},k=new Object;
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */r.Obj.createSubclass(k,r.Obj),k.getBarFill=function(t,e,i,r){var a=f.getColor(t,e,i),s=f.getPattern(t,e,i);return k.getRectangleFill(t,a,s,r)},k.getRectangleFill=function(t,e,i,a){var s=f.getSeriesEffect(t);if(i)return new r.PatternFill(i,e);if("gradient"==s&&a>3){var n,o,l=u.isHorizontal(t)?270:0;return n=[r.ColorUtils.adjustHSL(e,0,-.09,.04),r.ColorUtils.adjustHSL(e,0,-.04,-.05)],o=[0,1],new r.LinearGradientFill(l,n,null,o)}return new r.SolidFill(e)},k.getAreaFill=function(t,e){var i,a="lineWithArea"==c.getSeriesType(t,e),s=c.getSeriesItem(t,e);s&&s.areaColor?i=s.areaColor:(i=f.getColor(t,e),a&&(i=r.ColorUtils.setAlpha(i,.2)));var n=f.getPattern(t,e),o=f.getSeriesEffect(t);if(n)return new r.PatternFill(n,i);if("gradient"==o){var l,h,g=u.isHorizontal(t)?180:270;if(a){var d=r.ColorUtils.getAlpha(i);l=[r.ColorUtils.setAlpha(i,Math.min(d+.2,1)),r.ColorUtils.setAlpha(i,Math.max(d-.15,0))],h=[0,1]}else l=[r.ColorUtils.adjustHSL(i,0,-.09,.04),r.ColorUtils.adjustHSL(i,0,-.04,-.05)],h=[0,1];return new r.LinearGradientFill(g,l,null,h)}return new r.SolidFill(i)},k.getMarkerFill=function(t,e,i,a){var s=f.getMarkerColor(t,e,i,a),n=f.getPattern(t,e,i,a);if(n)return new r.PatternFill(n,s);if(u.isBubble(t)&&"gradient"==f.getSeriesEffect(t)){var o=[r.ColorUtils.adjustHSL(s,0,-.09,.04),r.ColorUtils.adjustHSL(s,0,-.04,-.05)];return new r.LinearGradientFill(270,o,null,[0,1])}return new r.SolidFill(s)},k.getFunnelPyramidSliceFill=function(t,e,i,a,s){var n,o=f.getPattern(t,e,0),l=f.getSeriesEffect(t);if(o&&!s)return("vertical"==t.getOptions().orientation||u.isPyramid(t))&&(n=r.Agent.isRightToLeft(t.getCtx())?new r.Matrix(0,-1,1,0):new r.Matrix(0,1,-1,0)),new r.PatternFill(o,i,null,n);if("gradient"==l){var h,g,d=u.isPyramid(t)?180:90;return"on"==t.getOptions().styleDefaults.threeDEffect?(h=[r.ColorUtils.adjustHSL(i,0,0,-.1),r.ColorUtils.adjustHSL(i,0,0,.12),i],g=[0,.65,1]):(h=[r.ColorUtils.adjustHSL(i,0,-.09,.04),r.ColorUtils.adjustHSL(i,0,-.04,-.05)],g=[0,1]),new r.LinearGradientFill(d,h,null,g,[a.x,a.y,a.w,a.h])}return new r.SolidFill(i)};
/**
   * @license
   * Copyright (c) 2013 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var F=function(t,e,i,r,a,s,n,o,l){this.Init(t,e,i,r,a,s,n,o,l)};r.Obj.createSubclass(F,r.Path),F.prototype.Init=function(t,e,i,a,s,n,o,l,h){F.superclass.Init.call(this,t.getCtx()),this._chart=t;var u=t.getOptions().styleDefaults;this._seriesIndex=e,this._numDrawnSeries=i,this._funnelWidth=a,this._funnelHeight=s,this._startPercent=n,this._valuePercent=o,this._fillPercent=l,this._3dRatio="on"==u.threeDEffect?1:0,this._gap=h;var g=this._getPath();this._dataColor=f.getColor(this._chart,this._seriesIndex,0),this._backgroundColor=u.backgroundColor?u.backgroundColor:u.funnelBackgroundColor,this.setCmds(g.slice),g.bar&&(this._bar=new r.Path(this.getCtx(),g.bar),this.addChild(this._bar),this._bar.setMouseEnabled(!1)),this._setColorProperties(g.sliceBounds),this._label=this._getSliceLabel(g.sliceBounds,g.barBounds),null!=this._label&&(this._label.setMouseEnabled(!1),this.addChild(this._label))},F._FUNNEL_3D_WIDTH_RATIO=.08,F._FUNNEL_ANGLE_2D=36,F._FUNNEL_RATIO=1/3,F._BORDER_COLOR="#FFFFFF",F._MIN_CHARS_DATA_LABEL=3,F._LINE_FRACTION=2/3,F._AREA_FRACTION=.41,F._HEIGHT_FRACTION=.28,F._LINE_FRACTION_2=.4,F._AREA_FRACTION_2=.8,F._HEIGHT_FRACTION_2=.7,F.prototype._getPath=function(){var t=r.Agent.isRightToLeft(this.getCtx()),e=c.getSeriesCount(this._chart),i=(this._numDrawnSeries+1)*this._gap,a=r.Math.degreesToRads(F._FUNNEL_ANGLE_2D-2*this._3dRatio),s=this._funnelWidth-e*this._gap,n=s/Math.sin(r.Math.degreesToRads(F._FUNNEL_ANGLE_2D)),o=this._funnelHeight/Math.sin(a),l=this._3dRatio*this._funnelWidth/this._funnelHeight*F._FUNNEL_3D_WIDTH_RATIO;l<1e-5&&(l=0);var h,u,g,d,p,_,f,v,m,S,y,C,x=this._funnelHeight,A=this._funnelHeight*F._FUNNEL_RATIO;this._startPercent<F._AREA_FRACTION?(h=this._startPercent,g=x,p=this._funnelHeight*F._LINE_FRACTION,f=F._AREA_FRACTION,m=s*F._HEIGHT_FRACTION,y=s*(1-F._HEIGHT_FRACTION)):this._startPercent<F._AREA_FRACTION_2?(h=this._startPercent-F._AREA_FRACTION,g=this._funnelHeight*F._LINE_FRACTION,p=this._funnelHeight*F._LINE_FRACTION_2,f=F._AREA_FRACTION_2-F._AREA_FRACTION,m=s*(F._HEIGHT_FRACTION_2-F._HEIGHT_FRACTION),y=s*(1-F._HEIGHT_FRACTION_2)):(h=this._startPercent-F._AREA_FRACTION_2,g=this._funnelHeight*F._LINE_FRACTION_2,p=A,f=1-F._AREA_FRACTION_2,m=s*(1-F._HEIGHT_FRACTION_2),y=0),this._startPercent+this._valuePercent<F._AREA_FRACTION?(d=x,_=this._funnelHeight*F._LINE_FRACTION,u=this._startPercent+this._valuePercent,v=F._AREA_FRACTION,S=s*F._HEIGHT_FRACTION,C=s*(1-F._HEIGHT_FRACTION)):this._startPercent+this._valuePercent<F._AREA_FRACTION_2?(d=this._funnelHeight*F._LINE_FRACTION,_=this._funnelHeight*F._LINE_FRACTION_2,u=this._startPercent+this._valuePercent-F._AREA_FRACTION,v=F._AREA_FRACTION_2-F._AREA_FRACTION,S=s*(F._HEIGHT_FRACTION_2-F._HEIGHT_FRACTION),C=s*(1-F._HEIGHT_FRACTION_2)):(d=this._funnelHeight*F._LINE_FRACTION_2,_=A,u=this._startPercent+this._valuePercent-F._AREA_FRACTION_2,v=1-F._AREA_FRACTION_2,S=s*(1-F._HEIGHT_FRACTION_2),C=0);var b,M,T,I=Math.sqrt((f-h)/f*g*g+h/f*p*p),D=Math.sqrt((v-u)/v*d*d+u/v*_*_),O=.98*Math.asin(((I-p)*m/(g-p)+y)/n),E=.98*Math.asin(((D-_)*S/(d-_)+C)/n),P=(1+F._FUNNEL_RATIO)/2*this._funnelHeight+o,L=(1-F._FUNNEL_RATIO)/2*this._funnelHeight-o;t?(b=[n*Math.sin(O)+i,P-o*Math.cos(O),n*Math.sin(E)+i,P-o*Math.cos(E),n*Math.sin(E)+i,L+o*Math.cos(E),n*Math.sin(O)+i,L+o*Math.cos(O)],M=0,T=1):(b=[this._funnelWidth-i-n*Math.sin(O),P-o*Math.cos(O),this._funnelWidth-i-n*Math.sin(E),P-o*Math.cos(E),this._funnelWidth-i-n*Math.sin(E),L+o*Math.cos(E),this._funnelWidth-i-n*Math.sin(O),L+o*Math.cos(O)],M=1,T=0);var w=r.PathUtils.moveTo(b[0],b[1]),R=null;w+=r.PathUtils.arcTo(l*(b[1]-b[7])/2,(b[1]-b[7])/2,Math.PI,T,b[6],b[7]),w+=r.PathUtils.arcTo(l*(b[1]-b[7])/2,(b[1]-b[7])/2,Math.PI,T,b[0],b[1]),w+=r.PathUtils.arcTo(n,o,a,M,b[2],b[3]),w+=r.PathUtils.arcTo(l*(b[3]-b[5])/2,(b[3]-b[5])/2,Math.PI,T,b[4],b[5]),w+=r.PathUtils.arcTo(n,o,a,M,b[6],b[7]);var B=new r.Rectangle(Math.min(b[0],b[2]),b[5],Math.abs(b[0]-b[2]),Math.abs(b[3]-b[5]));if(null!=this._fillPercent){var k=Math.max(Math.min(this._fillPercent,1),0),N=t?-k*Math.PI:k*Math.PI;R=r.PathUtils.moveTo(b[0],b[1]),R+=r.PathUtils.arcTo(n,o,a,M,b[2],b[3]),R+=r.PathUtils.arcTo(l*(b[3]-b[5])/2,(b[3]-b[5])/2,N,T,b[2]+l*(b[3]-b[5])/2*Math.sin(N),(b[5]+b[3])/2+(b[3]-b[5])/2*Math.cos(N)),this._fillPercent>.95?R+=r.PathUtils.arcTo(n,o,a,M,b[6],b[1]+k*(b[7]-b[1])):this._fillPercent<.05?R+=r.PathUtils.arcTo(n,o,a,T,b[6],b[1]+k*(b[7]-b[1])):R+=r.PathUtils.lineTo(b[6]+l*(b[1]-b[7])/2*Math.sin(N),(b[7]+b[1])/2+(b[1]-b[7])/2*Math.cos(N)),R+=r.PathUtils.arcTo(l*(b[1]-b[7])/2,(b[1]-b[7])/2,N,M,b[0],b[1]),R+=r.PathUtils.closePath();var H=new r.Rectangle(Math.min(b[0],b[2]),b[5]+Math.abs(b[3]-b[5])*(1-k),Math.abs(b[0]-b[2]),Math.abs(b[3]-b[5])*k)}return{slice:w,bar:R,sliceBounds:B,barBounds:R?H:B}},F.prototype._getSliceLabel=function(t,e){var i=f.getDataLabel(this._chart,this._seriesIndex,0);if(i||(i=c.getSeriesLabel(this._chart,this._seriesIndex)),i&&"none"!=B.getDataLabelPosition(this._chart,this._seriesIndex,0)){var a=new r.MultilineText(this.getCtx(),i,0,0),s=null!=f.getPattern(this._chart,this._seriesIndex,0),n=this._chart.getOptions().styleDefaults,o=[n._dataLabelStyle,n.dataLabelStyle,new r.CSSStyle(c.getDataItem(this._chart,this._seriesIndex,0).labelStyle)],l=r.CSSStyle.mergeStyles(o);if(a.setCSSStyle(l),r.TextUtils.fitText(a,t.h-this._3dRatio*(.8-this._valuePercent)*50,t.w,this,F._MIN_CHARS_DATA_LABEL)){var h=a.getDimensions(),u=this._getLabelPosition(t);if(s){var g=.15*h.h,d=r.Agent.isRightToLeft(this.getCtx())?.5:-.5,p=r.PathUtils.roundedRectangle(h.x-g,h.y,h.w+2*g,h.h,2,2,2,2),_=new r.Path(this.getCtx(),p);_.setSolidFill("#FFFFFF",.9),u=u.translate(d*h.h,-d*h.w),_.setMatrix(u),this.addChild(_)}var v=s?"#000000":e.containsPoint(t.x,t.y+(t.h-h.w)/2)?r.ColorUtils.getContrastingTextColor(this._dataColor):r.ColorUtils.getContrastingTextColor(this._backgroundColor),m=new r.CSSStyle({color:v});return o.splice(1,0,m),r.Agent.isHighContrast()&&o.push(m),l=r.CSSStyle.mergeStyles(o),a.setCSSStyle(l),a.setMatrix(this._getLabelPosition(t)),a.alignCenter(),a.alignMiddle(),a}}},F.prototype._getLabelPosition=function(t){var e=this._3dRatio*(t.h*this._funnelWidth/this._funnelHeight*F._FUNNEL_3D_WIDTH_RATIO/2),i=new r.Matrix;return i=r.Agent.isRightToLeft(this.getCtx())?(i=i.rotate(Math.PI/2)).translate(t.x+t.w/2-e,t.y+t.h/2):(i=i.rotate(3*Math.PI/2)).translate(t.x+t.w/2+e,t.y+t.h/2)},F.prototype._setColorProperties=function(t){var e=k.getFunnelPyramidSliceFill(this._chart,this._seriesIndex,this._dataColor,t),i=f.getBorderColor(this._chart,this._seriesIndex,0),a=f.getUserBorderWidth(this._chart,this._seriesIndex,0),s=f.getDefaultBorderWidth(this._chart,this._seriesIndex,0),n=!1,o="redwood"===this.getCtx().getThemeBehavior();null==i&&this._3dRatio>0&&(n=!0,i=F._BORDER_COLOR);var l=null!==a?a:s;!i||o&&this._chart.isSelectionSupported()&&!this._bar&&n||this.setSolidStroke(i,null,l);var h=r.SelectionEffectUtils.getHoverBorderColor(this._dataColor),u=k.getFunnelPyramidSliceFill(this._chart,this._seriesIndex,this._backgroundColor,t,!0);this._bar?(this.setFill(u),this._bar.setFill(e),this._bar.setStyle(f.getStyle(this._chart,this._seriesIndex,0)),this._bar.setClassName(f.getClassName(this._chart,this._seriesIndex,0))):(this.setFill(e),this.setStyle(f.getStyle(this._chart,this._seriesIndex,0)),this.setClassName(f.getClassName(this._chart,this._seriesIndex,0))),this.OriginalStroke=this.getStroke();var g=null!=this._bar?this._bar:this;if(this._chart.isSelectionSupported())if(this.setCursor(r.SelectionEffectUtils.getSelectingCursor()),o)if(null!=this._bar)g.setSolidStroke(this._dataColor,null,0),g.setFeedbackClassName("oj-dvt-selectable");else{var d=null==i||n?this._dataColor:i,c=null!==a?a:0;g.setSolidStroke(d,null,c),g.setFeedbackClassName("oj-dvt-selectable"),i&&(n&&g.addClassName("oj-dvt-default-border-color"),null==a&&g.addClassName("oj-dvt-default-border-width"))}else{var p=f.getSelectedInnerColor(this._chart),_=f.getSelectedOuterColor(this._chart)?f.getSelectedOuterColor(this._chart):this._dataColor;g.setHoverStroke(new r.Stroke(h,1,2)),g.setSelectedStroke(new r.Stroke(p,1,1.5),new r.Stroke(_,1,4.5)),g.setSelectedHoverStroke(new r.Stroke(p,1,1.5),new r.Stroke(h,1,4.5))}},F.prototype.getAnimationParams=function(){return[this._startPercent,this._valuePercent,this._fillPercent,this.getAlpha(),this._3dRatio]},F.prototype.setAnimationParams=function(t){this._startPercent=t[0],this._valuePercent=t[1],this._fillPercent=null!=this._fillPercent?t[2]:null,this.setAlpha(t[3]),this._3dRatio=t[4];var e=this._getPath();this.setCmds(e.slice),e.bar&&this._bar&&this._bar.setCmds(e.bar),this._label&&this._label.setMatrix(this._getLabelPosition(e.sliceBounds))},F.prototype.setSelected=function(t){if(null!=this._bar){if(this.IsSelected==t)return;this.IsSelected=t,this._bar.setSelected(t)}else F.superclass.setSelected.call(this,t);var e=this.getDimensions(),i=null!=this._bar?this._bar:this,r=e.w;t?(i.setScaleX((r-3)/r),i.setTranslateX(Math.ceil(1.5)+3/r*e.x)):(i.setScaleX(1),i.setTranslateX(0))},F.prototype.showHoverEffect=function(){null!=this._bar?this._bar.showHoverEffect():F.superclass.showHoverEffect.call(this)},F.prototype.hideHoverEffect=function(){null!=this._bar?this._bar.hideHoverEffect():F.superclass.hideHoverEffect.call(this)},F.prototype.copyShape=function(){return new F(this._chart,this._seriesIndex,this._numDrawnSeries,this._funnelWidth,this._funnelHeight,this._startPercent,this._valuePercent,this._fillPercent,this._gap)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var N=new Object;r.Obj.createSubclass(N,r.Obj),N.setVisibility=function(t,e,i){var r=m.getRefObj(t,e);null!=r&&(r.visibility=i);var a=c.getHiddenCategories(t),s=a.indexOf(e);"hidden"==i&&s<0?a.push(e):"visible"==i&&s>=0&&a.splice(s,1);var n=t.getOptions();if(n&&n.legend&&n.legend.sections){for(var o=0;o<n.legend.sections.length;o++){var l=n.legend.sections[o];if(l&&l.items)for(var h=0;h<l.items.length;h++)l.items[h].id==e&&(l.items[h].categoryVisibility=i)}return!0}return!1},N.processIds=function(t,e){for(var i=[],r=0;r<e.length;r++){var a=e[r];if(a.series==_.OTHER_SLICE_SERIES_ID){var s=_.getOtherSliceIds(t);i=i.concat(s)}else i.push(a)}return i},N.adjustBounds=function(t){null!=t.x&&(t.x-=1),null!=t.w&&(t.w+=2),null!=t.y&&(t.y-=1),null!=t.h&&(t.h+=2)},N.getBoundedObjects=function(t,e){for(var i=t.getChartObjPeers().concat(N.getFilteredChartObjPeers(t)),r=[],a=0;a<i.length;a++){var s=i[a],n=s.getDataPosition();if(n){n=t.getPlotArea().localToStage(n);var o=null==e.x||n.x>=e.x&&n.x<=e.x+e.w,l=null==e.y||n.y>=e.y&&n.y<=e.y+e.h;o&&l&&r.push(s)}}return r},N.getFilteredChartObjPeers=function(t){if(!t.getCache().getFromCache("dataFiltered"))return[];var e=t.getCache().getFromCache("filteredChartObjPeers");if(!e){e=[];for(var i=0;i<c.getSeriesCount(t);i++)for(var r=0;r<c.getGroupCount(t);r++){var a;if(c.isDataItemFiltered(t,i,r))a="bar"==c.getSeriesType(t,i)?B.getBarInfo(t,i,r).dataPos:c.getMarkerPosition(t,i,r),e.push(new y(t,[],i,r,null,a))}t.getCache().putToCache("filteredChartObjPeers",e)}return e},N.getAxisBounds=function(t,e,i){var a=t.getPlotArea(),s=a.stageToLocal(new r.Point(e.x,e.y)),n=a.stageToLocal(new r.Point(e.x+e.w,e.y+e.h));null==e.x&&(s.x=null,n.x=null),null==e.y&&(s.y=null,n.y=null);var o=N._convertToAxisCoord(t,s.x,n.x,s.y,n.y),l={},h={},u={},g={};return t.xAxis&&(l=N._getAxisMinMax(t.xAxis,o.xMin,o.xMax,i),g=N.getAxisStartEndGroup(t.xAxis,l.min,l.max)),t.yAxis&&(h=N._getAxisMinMax(t.yAxis,o.yMin,o.yMax,i)),t.y2Axis&&(u=N._getAxisMinMax(t.y2Axis,o.yMin,o.yMax,i)),{xMin:l.min,xMax:l.max,unchanged:l.unchanged,yMin:h.min,yMax:h.max,y2Min:u.min,y2Max:u.max,startGroup:g.startGroup,endGroup:g.endGroup}},N._getAxisMinMax=function(t,e,i,r){if(null==e||null==i)return{min:null,max:null};var a=t.getUnboundedLinearValueAt(e),s=t.getUnboundedLinearValueAt(i);if(r){var n=t.getInfo().getMinimumExtent();if(s-a<n){var o=(s+a)/2;s=o+n/2,a=o-n/2}return N._limitToGlobal(t,a,s)}return N.getActualMinMax(t,a,s)},N.getAxisBoundsByDelta=function(t,e,i,r,a){var s=N._convertToAxisCoord(t,e,i,r,a),n=L.getZoomDirection(t),o={},l={},h={},u={};return t.xAxis&&"y"!=n&&(o=N._getAxisMinMaxByDelta(t.xAxis,s.xMin,s.xMax),u=N.getAxisStartEndGroup(t.xAxis,o.min,o.max)),t.yAxis&&"x"!=n&&(l=N._getAxisMinMaxByDelta(t.yAxis,s.yMin,s.yMax)),t.y2Axis&&(h=N._getAxisMinMaxByDelta(t.y2Axis,s.yMin,s.yMax)),{xMin:o.min,xMax:o.max,unchanged:o.unchanged,yMin:l.min,yMax:l.max,y2Min:h.min,y2Max:h.max,startGroup:u.startGroup,endGroup:u.endGroup}},N._getAxisMinMaxByDelta=function(t,e,i){var r=t.getLinearViewportMin(),a=t.getLinearViewportMax();if(i==e&&t.isFullViewport())return N.getActualMinMax(t,r,a);var s=t.getUnboundedLinearValueAt(e)-t.getUnboundedLinearValueAt(0),n=t.getUnboundedLinearValueAt(i)-t.getUnboundedLinearValueAt(0),o=1,l=a+n-(r+s),h=t.getInfo().getMinimumExtent();return e!=i&&l<h&&(o=(a-r-h)/(s-n)),r+=s*o,a+=n*o,N._limitToGlobal(t,r,a)},N._convertToAxisCoord=function(t,e,i,a,s){var n={},o=r.Agent.isRightToLeft(t.getCtx());return u.isHorizontal(t)?(n.xMin=a,n.xMax=s,n.yMin=o?i:e,n.yMax=o?e:i):(n.xMin=o?i:e,n.xMax=o?e:i,n.yMin=s,n.yMax=a),n},N._limitToGlobal=function(t,e,i){var r=t.getLinearGlobalMin(),a=t.getLinearGlobalMax();return i-e>=a-r?(e=r,i=a):e<r?(i+=r-e,e=r):i>a&&(e-=i-a,i=a),N.getActualMinMax(t,e,i)},N.getActualMinMax=function(t,e,i){var r={min:t.linearToActual(e),max:t.linearToActual(i)};if(t.isGroupAxis()){var a=t.getLinearViewportMin(),s=t.getLinearViewportMax();Math.abs(e-a)<1e-4&&Math.abs(i-s)<1e-4&&(r.unchanged=!0)}return r},N.getAxisStartEndGroup=function(t,e,i){if(t.isGroupAxis()&&null!=e&&null!=i){var r=Math.ceil(e),a=Math.floor(i);if(a>=r)return{startGroup:t.getInfo().getGroup(r),endGroup:t.getInfo().getGroup(a)}}return{startGroup:null,endGroup:null}},N.setInitialSelection=function(t,e){var i=t.getSelectionHandler();if(i)if(e&&0!=e.length){for(var r=[],a=0;a<e.length;a++)null!=e[a].id?r.push(e[a].id):null!=e[a].series&&null!=e[a].group&&r.push(o(e[a].series,e[a].group));for(var s=new(t.getCtx().KeySetImpl)(r),n=t.getChartObjPeers(),l=[],h=0;h<n.length;h++){var u=n[h];if(u.isSelectable()){var g=u.getDataItemId(),d=o(u.getSeries(),u.getGroup());(s.has(g)||s.has(d))&&l.push(u.getId())}}i.processInitialSelections(l,n)}else i.clearSelection()},N.getKeyboardNavigables=function(t){var e=[];if(u.isPie(t))for(var i=t.pieChart.__getSlices(),r=0;r<i.length;r++)c.isSeriesRendered(t,i[r].getSeriesIndex())&&e.push(i[r]);else{var a=t.getChartObjPeers();for(r=0;r<a.length;r++)a[r].isNavigable()&&e.push(a[r])}return e},N.addEventData=function(t,e){var i=c.getSeriesIndex(t,e.series),r=c.getGroupIndex(t,e.group),a=c.getNestedDataItemIndex(t,i,r,e.id),s=f.getDataContext(t,i,r,a);s&&(e.data=s.data,e.itemData=s.itemData,e.seriesData=s.seriesData,s.groupData?e.groupData=s.groupData:null!=r&&(e.groupData=c.getGroupsDataForContext(t)[r]))},N.addGroupDrillEventData=function(t,e){var i={};Object.assign(i,e);var r=t.xAxis.getInfo().getItemsRange(e.group);delete i.series;for(var a=r.startIndex,s=r.endIndex,n=[],o=a;o<s+1;o++)for(var l=c.getSeriesCount(t),h=0;h<l;h++)n.push(c.getRawDataItem(t,h,o));return i.items=n,i.groupData=r.groupData,i},N.addMultiSeriesDrillEventData=function(t,e){var i={};Object.assign(i,e);var r=_._getSeriesIndicesArrays(t).other;delete i.group;for(var a=[],s=[],n=[],o=0;o<r.length;o++){var l=c.getSeriesDataForContext(t,r[o]),h=c.getRawDataItem(t,r[o],0);a.push(l),s.push(h),n.push(c.getSeries(t,r[o]))}return i.seriesData=a,i.items=s,i.series=n,i},N.addSeriesDrillEventData=function(t,e){var i={};Object.assign(i,e);var r=c.getSeriesIndex(t,e.id),a=c.getGroupCount(t);i.series=e.id,delete i.group,i.seriesData=c.getSeriesDataForContext(t,r);for(var s=[],n=0;n<a;n++){var o=c.getRawDataItem(t,r,n);s.push(o)}return i.items=s,i},N.addItemDrillEventData=function(t,e){var i={};Object.assign(i,e);var r=c.getSeriesIndex(t,e.series),a=c.getGroupIndex(t,e.group),s=c.getNestedDataItemIndex(t,r,a,e.id);return i.seriesData=c.getSeriesDataForContext(t,r),i.groupData=c.getGroupsDataForContext(t)[a],i.data=c.getRawDataItem(t,r,a,s),i.itemData=c.getDataItem(t,r,a,s)._itemData,i},N.addPlotAreaDnDBackground=function(t,e,i,a){var s=L.isPlotAreaDraggable(t);(L.isPlotAreaDropTarget(t)||s)&&(background=new r.Rect(t.getCtx(),0,0,a?i.w:i.h,a?i.h:i.w),background.setInvisibleFill(),e.addChild(background),t.getCache().putToCache("plotAreaBackground",background),s&&background.setClassName("oj-draggable"))};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var H=new Object;r.Obj.createSubclass(H,r.Obj),H._DEFAULT_3D_GAP_RATIO=1/36,H._DEFAULT_2D_GAP_RATIO=1/70,H._MAX_WIDTH_FOR_GAPS=.25,H._GROUP_INDEX=0,H._SLICE_VALUE_THRESHOLD=1e-4,H.render=function(t,e,i){var a=new r.Container(t.getCtx());a.setTranslate(i.x,i.y),e.addChild(a),t.setPlotArea(a);var s,n=u.isHorizontal(t);if(n)s=new r.Rectangle(0,0,i.w,i.h);else{var o=new r.Matrix,l=r.Agent.isRightToLeft(t.getCtx())?-1:1;o=(o=(o=o.translate(-i.h/2,-i.w/2)).rotate(l*Math.PI/2)).translate(i.x+i.w/2,i.y+i.h/2),s=new r.Rectangle(0,0,i.h,i.w),a.setMatrix(o)}N.addPlotAreaDnDBackground(t,a,i,n),H._renderFunnelSlices(t,a,s)||w.renderEmptyText(t,e,i);var h=c.getInitialSelection(t);N.setInitialSelection(t,h),t.highlight(c.getHighlightedCategories(t))},H._renderFunnelSlices=function(t,e,i){for(var r=t.getOptions(),a=c.getSeriesCount(t),s=f.getDataItemGaps(t),n=("on"==r.styleDefaults.threeDEffect?H._DEFAULT_3D_GAP_RATIO:H._DEFAULT_2D_GAP_RATIO)*i.w,o=s*Math.min(H._MAX_WIDTH_FOR_GAPS*i.w/(a-1),n),l=0,h=0,u=0,g=0;g<a;g++){if(c.isDataItemRendered(t,g))null==(p=c.getTargetValue(t,g))&&(p=c.getValue(t,g,H._GROUP_INDEX)),p<=0||(l+=p)}if(0==l)return!1;for(g=a-1;g>=0;g--)if(c.isDataItemRendered(t,g)){var d,p=c.getValue(t,g,H._GROUP_INDEX),_=c.getTargetValue(t,g);if(!(p<=0&&null==_||null!=_&&_<=0))if(!((null!=_?_:p)<H._SLICE_VALUE_THRESHOLD*l))null!=_?(u+=_/l,d=new F(t,g,h,i.w,i.h,1-u,_/l,p/_,o)):(u+=p/l,d=new F(t,g,h,i.w,i.h,1-u,p/l,null,o)),h++,e.addChild(d),y.associate(d,t,g,H._GROUP_INDEX)}return!0};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var G=function(t,e,i,r,a,s,n,o){this.Init(t,e,i,r,a,s,n,o)};r.Obj.createSubclass(G,r.Path),G.prototype.Init=function(t,e,i,a,s,n,o,l){G.superclass.Init.call(this,t.getCtx()),this._chart=t;var h=t.getOptions().styleDefaults;this._seriesIndex=e,this._numDrawnSeries=i,this._pyramidWidth=a,this._pyramidHeight=s,this._startPercent=n,this._valuePercent=o,this._3dRatio="on"==h.threeDEffect?1:0,this._gap=l;var u=this._getPath();this._dataColor=f.getColor(this._chart,this._seriesIndex,0),this._3dRatio>0?(this.setCmds(u.threeDPathTop),this._threeDPathSide=new r.Path(this.getCtx(),u.threeDPathSide),this._mainFace=new r.Path(this.getCtx(),u.slice),this.addChild(this._threeDPathSide),this.addChild(this._mainFace)):this.setCmds(u.slice),this._setColorProperties(u.sliceBounds),this._label=this._getSliceLabel(u.sliceBounds),null!=this._label&&(this._label.setMouseEnabled(!1),this.addChild(this._label))},G._BORDER_COLOR="#FFFFFF",G._MIN_CHARS_DATA_LABEL=3,G._SLICE_LABEL_HORIZONTAL_PADDING=4,G._3D_WIDTH_FACTOR=.2,G.prototype._getPath=function(){var t,e,i,a,s,n,o=r.Agent.isRightToLeft(this.getCtx()),l=c.getSeriesCount(this._chart),h=(l-this._numDrawnSeries-1)*this._gap,u=this._3dRatio*G._3D_WIDTH_FACTOR*.98*this._pyramidWidth,g=this._chart.getOptions(),d=Math.sqrt(Math.pow(this._pyramidHeight-(l-1)*this._gap,2)*(1-this._startPercent)),p=this._startPercent+this._valuePercent>=1?0:Math.sqrt(Math.pow(this._pyramidHeight-(l-1)*this._gap,2)*(1-this._startPercent-this._valuePercent)),_=.98*(1-this._3dRatio*G._3D_WIDTH_FACTOR)*this._pyramidWidth*(p/this._pyramidHeight),f=0==this._numDrawnSeries?d:d-this._gap,v=.98*(1-this._3dRatio*G._3D_WIDTH_FACTOR)*this._pyramidWidth*(f/this._pyramidHeight);if(o?(e=[this._pyramidWidth-.5*this._pyramidWidth+u/2-_/2,h+p],a=[this._pyramidWidth-.5*this._pyramidWidth+u/2-v/2,h+d],i=[this._pyramidWidth-.5*this._pyramidWidth+u/2+v/2,h+d],t=[this._pyramidWidth-.5*this._pyramidWidth+u/2+_/2,h+p]):(t=[.5*this._pyramidWidth-u/2-_/2,h+p],i=[.5*this._pyramidWidth-u/2-v/2,h+d],a=[.5*this._pyramidWidth-u/2+v/2,h+d],e=[.5*this._pyramidWidth-u/2+_/2,h+p]),"on"==g.styleDefaults.threeDEffect){var m=Math.atan(2*d/v),S=Math.min(.9*m,Math.PI/4),y=this._3dRatio*G._3D_WIDTH_FACTOR*v*Math.sqrt(2)/2,C=this._3dRatio*G._3D_WIDTH_FACTOR*_*Math.sqrt(2)/2,x=C/Math.tan(S);s=r.PathUtils.moveTo(e[0],e[1]),s+=r.PathUtils.lineTo(e[0]+(o?-1:1)*Math.max(C,1),e[1]-Math.max(C,.5)),s+=r.PathUtils.lineTo(t[0]+(o?-1:1)*Math.max(x,1),t[1]-Math.max(C,.5)),s+=r.PathUtils.lineTo(t[0],t[1]),s+=r.PathUtils.closePath(),n=r.PathUtils.moveTo(e[0],e[1]),n+=r.PathUtils.lineTo(e[0]+(o?-1:1)*Math.max(C,1),e[1]-Math.max(C,.5)),n+=r.PathUtils.lineTo(a[0]+(o?-1:1)*y,a[1]-y),n+=r.PathUtils.lineTo(a[0],a[1]),n+=r.PathUtils.closePath()}var A=r.PathUtils.moveTo(e[0],e[1]);A+=r.PathUtils.lineTo(a[0],a[1]),A+=r.PathUtils.lineTo(i[0],i[1]),A+=r.PathUtils.lineTo(t[0],t[1]),A+=r.PathUtils.closePath();var b=_/v,M=.5*Math.abs(t[1]-i[1])*(1+b),T=.5*Math.abs(a[0]-i[0])*(1+b)-G._SLICE_LABEL_HORIZONTAL_PADDING,I=i[1]-M,D=i[0]+(v-T)/2*(o?-1:1);return{slice:A,sliceBounds:new r.Rectangle(D,I,T,M),threeDPathTop:s,threeDPathSide:n}},G.prototype._getSliceLabel=function(t){var e=f.getDataLabel(this._chart,this._seriesIndex,0);if(e||(e=c.getSeriesLabel(this._chart,this._seriesIndex)),e&&"none"!=B.getDataLabelPosition(this._chart,this._seriesIndex,0)){var i=new r.MultilineText(this.getCtx(),e,0,0),a=null!=f.getPattern(this._chart,this._seriesIndex,0),s=this._chart.getOptions().styleDefaults,n=[s._dataLabelStyle,s.dataLabelStyle,new r.CSSStyle(c.getDataItem(this._chart,this._seriesIndex,0).labelStyle)],o=r.CSSStyle.mergeStyles(n);if(i.setCSSStyle(o),r.TextUtils.fitText(i,t.w,t.h,this,G._MIN_CHARS_DATA_LABEL)){var l=i.getDimensions(),h=this._getLabelPosition(t);if(a){var u=.15*l.h,g=r.PathUtils.roundedRectangle(l.x-u,l.y,l.w+2*u,l.h,2,2,2,2),d=new r.Path(this.getCtx(),g);d.setSolidFill("#FFFFFF",.9),h=h.translate(-.5*l.w,-.5*l.h),d.setMatrix(h),this.addChild(d)}var p=a?"#000000":t.containsPoint(t.x+(t.w-l.w)/2,t.y)?r.ColorUtils.getContrastingTextColor(this._dataColor):r.ColorUtils.getContrastingTextColor(null),_=new r.CSSStyle({color:p});return n.splice(1,0,_),r.Agent.isHighContrast()&&n.push(_),o=r.CSSStyle.mergeStyles(n),i.setCSSStyle(o),i.setMatrix(this._getLabelPosition(t)),i.alignCenter(),i.alignMiddle(),i}}},G.prototype._getLabelPosition=function(t){var e=new r.Matrix;return e=r.Agent.isRightToLeft(this.getCtx())?e.translate(t.x-t.w/2,t.y+t.h/2):e.translate(t.x+t.w/2,t.y+t.h/2)},G.prototype._setColorProperties=function(t){var e=k.getFunnelPyramidSliceFill(this._chart,this._seriesIndex,this._dataColor,t),i=f.getBorderColor(this._chart,this._seriesIndex,0),a=f.getUserBorderWidth(this._chart,this._seriesIndex,0),s=f.getDefaultBorderWidth(this._chart,this._seriesIndex,0),n=null!==a?a:s,o=!1,l="redwood"===this.getCtx().getThemeBehavior();null==i&&this._3dRatio>0&&(o=!0,i=G._BORDER_COLOR),!i||l&&this._chart.isSelectionSupported()&&o||(this.setSolidStroke(i,null,n),this._3dRatio>0&&(this._threeDPathSide.setSolidStroke(i,null,n),this._mainFace.setSolidStroke(i,null,n)));var h=r.SelectionEffectUtils.getHoverBorderColor(this._dataColor);if(this._3dRatio>0){var u=!e.getPattern&&!e.getAlphas;this._mainFace.setFill(e),this._mainFace.setStyle(f.getStyle(this._chart,this._seriesIndex,0)),this._mainFace.setClassName(f.getClassName(this._chart,this._seriesIndex,0)),this._threeDPathSide.setFill(u?new r.SolidFill(r.ColorUtils.getDarker(e.getColor(),.3)):e),this._threeDPathSide.setStyle(f.getStyle(this._chart,this._seriesIndex,0)),this._threeDPathSide.setClassName(f.getClassName(this._chart,this._seriesIndex,0)),this.setFill(u?new r.SolidFill(r.ColorUtils.getDarker(e.getColor(),.3)):e),this.setStyle(f.getStyle(this._chart,this._seriesIndex,0)),this.setClassName(f.getClassName(this._chart,this._seriesIndex,0))}else this.setFill(e),this.setStyle(f.getStyle(this._chart,this._seriesIndex,0)),this.setClassName(f.getClassName(this._chart,this._seriesIndex,0));if(this.OriginalStroke=this.getStroke(),this._chart.isSelectionSupported())if(this.setCursor(r.SelectionEffectUtils.getSelectingCursor()),this._3dRatio>0)if(this._mainFace.setCursor(r.SelectionEffectUtils.getSelectingCursor()),this._threeDPathSide.setCursor(r.SelectionEffectUtils.getSelectingCursor()),l){this._mainFace.setFeedbackClassName("oj-dvt-selectable"),this._threeDPathSide.setFeedbackClassName("oj-dvt-selectable");var g=null==i||o?this._dataColor:i,d=null!==a?a:0;this._mainFace.setSolidStroke(g,null,d),this._threeDPathSide.setSolidStroke(g,null,d),i&&(o&&(this._mainFace.addClassName("oj-dvt-default-border-color"),this._threeDPathSide.addClassName("oj-dvt-default-border-color")),null==a&&(this._mainFace.addClassName("oj-dvt-default-border-width"),this._threeDPathSide.addClassName("oj-dvt-default-border-width")))}else{var c=f.getSelectedInnerColor(this._chart),p=f.getSelectedOuterColor(this._chart)?f.getSelectedOuterColor(this._chart):this._dataColor;this._mainFace.setHoverStroke(new r.Stroke(h,1,2)),this._threeDPathSide.setHoverStroke(new r.Stroke(h,1,2)),this._mainFace.setSelectedStroke(new r.Stroke(c,1,1.5),new r.Stroke(p,1,4.5)),this._mainFace.setSelectedHoverStroke(new r.Stroke(c,1,1.5),new r.Stroke(h,1,4.5))}else if(this.setCursor(r.SelectionEffectUtils.getSelectingCursor()),l){this.setFeedbackClassName("oj-dvt-selectable");g=null==i||o?this._dataColor:i,d=null!==a?a:0;this.setSolidStroke(g,null,d),i&&(o&&this.addClassName("oj-dvt-default-border-color"),null==a&&this.addClassName("oj-dvt-default-border-width"))}else{c=f.getSelectedInnerColor(this._chart),p=f.getSelectedOuterColor(this._chart)?f.getSelectedOuterColor(this._chart):this._dataColor;this.setHoverStroke(new r.Stroke(h,1,2)),this.setSelectedStroke(new r.Stroke(c,1,1.5),new r.Stroke(p,1,4.5)),this.setSelectedHoverStroke(new r.Stroke(c,1,1.5),new r.Stroke(h,1,4.5))}},G.prototype.getAnimationParams=function(){return[this._startPercent,this._valuePercent,this.getAlpha(),this._3dRatio]},G.prototype.setAnimationParams=function(t){this._startPercent=t[0],this._valuePercent=t[1],this.setAlpha(t[2]),this._3dRatio=t[3];var e=this._getPath();this._threeDPathSide&&this._mainFace?(this.setCmds(e.threeDPathTop),this._threeDPathSide.setCmds(e.threeDPathSide),this._mainFace.setCmds(e.slice)):this.setCmds(e.slice),this._label&&this._label.setMatrix(this._getLabelPosition(e.sliceBounds))},G.prototype.setSelected=function(t){if(this._3dRatio>0)if(this._mainFace.setSelected(t),"redwood"===this.getCtx().getThemeBehavior()&&this._threeDPathSide.setSelected(t),t){var e=this.getDimensions(),i=e.w,r=e.h,a=(i-3)/i,s=(r-5)/r;this._mainFace.setScaleX(a),this._mainFace.setScaleY(s),this._mainFace.setTranslateX(Math.ceil(1.5)+3/i*e.x),this._mainFace.setTranslateY(Math.ceil(2.5)+5/r*e.y)}else this._mainFace.setScaleX(1),this._mainFace.setScaleY(1),this._mainFace.setTranslateX(0),this._mainFace.setTranslateY(0);else G.superclass.setSelected.call(this,t)},G.prototype.showHoverEffect=function(){"redwood"===this.getCtx().getThemeBehavior()&&0!==this._3dRatio||G.superclass.showHoverEffect.call(this),this._3dRatio>0&&(this._threeDPathSide.showHoverEffect(),this._mainFace.showHoverEffect())},G.prototype.hideHoverEffect=function(){"redwood"===this.getCtx().getThemeBehavior()&&0!==this._3dRatio||G.superclass.hideHoverEffect.call(this),this._3dRatio>0&&(this._threeDPathSide.hideHoverEffect(),this._mainFace.hideHoverEffect())},G.prototype.copyShape=function(){return new G(this._chart,this._seriesIndex,this._numDrawnSeries,this._pyramidWidth,this._pyramidHeight,this._startPercent,this._valuePercent,this._gap)},G.prototype.getPrimaryFill=function(){return this._mainFace?this._mainFace.getFill():this.getFill()};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var U=new Object;r.Obj.createSubclass(U,r.Obj),U._DEFAULT_GAP_RATIO=1/70,U._MAX_HEIGHT_FOR_GAPS=.25,U._GROUP_INDEX=0,U.render=function(t,e,i){var a=new r.Container(t.getCtx());a.setTranslate(i.x,i.y),e.addChild(a),t.setPlotArea(a);var s=new r.Rectangle(0,0,i.w,i.h);N.addPlotAreaDnDBackground(t,a,i,!0),U._renderPyramidSlices(t,a,s)||w.renderEmptyText(t,e,i);var n=c.getInitialSelection(t);N.setInitialSelection(t,n),t.highlight(c.getHighlightedCategories(t))},U._renderPyramidSlices=function(t,e,i){for(var r=c.getSeriesCount(t),a=f.getDataItemGaps(t),s=U._DEFAULT_GAP_RATIO*i.h,n=a*Math.min(U._MAX_HEIGHT_FOR_GAPS*i.h/(r-1),s),o=0,l=0,h=0,u=0;u<r;u++){if(c.isDataItemRendered(t,u))(g=c.getValue(t,u,U._GROUP_INDEX))<=0||(o+=g)}if(0==o)return!1;for(u=0;u<r;u++){var g;if(c.isDataItemRendered(t,u))if(!((g=c.getValue(t,u,U._GROUP_INDEX))<=0)){var d=new G(t,u,l,i.w,i.h,h,g/o,n);h+=g/o,l++,e.addChild(d),y.associate(d,t,u,U._GROUP_INDEX)}}return!0};
/**
   * @license
   * Copyright (c) 2011 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var j=function(t,e,i,r,a,s,n,o,l,h){this.Init(t,null,h),this.setWedgeParams(e,i,r,a,s,n,o,l)};r.Obj.createSubclass(j,r.Path),j._OUTER_BORDER_WIDTH=2,j._OUTER_BORDER_WIDTH_HOVER=1.25,j._INNER_BORDER_WIDTH=1,j.prototype.Init=function(t,e,i){j.superclass.Init.call(this,t,e,i)},j.prototype.setWedgeParams=function(t,e,i,r,a,s,n,o){this._cx=t,this._cy=e,this._rx=i,this._ry=r,this._sa=a,this._ae=s,this._gap=n,this._ir=o;var l=this._makeWedgePath(0);this.setCmds(l)},j.prototype._makeWedgePath=function(t){var e,i=Math.max(this._rx-t,0),a=Math.max(this._ry-t,0),s=360==this._ae||i<t?0:this._gap+2*t,n=this._ir?this._ir+t:0,o=360==this._ae?r.Math.degreesToRads(359.99):r.Math.degreesToRads(this._ae),l=r.Math.degreesToRads(this._sa),h=s/2,u=h<i?Math.asin(h/i):0,g=-o/2-l,d=Math.min(5*h,o>0?Math.abs(h/Math.sin(o/2)):0),c=0==i?d:d*a/i,p=this._cx+Math.cos(g)*d,_=this._cy+Math.sin(g)*c,f=this._cx+Math.cos(-u-l)*i,v=this._cy+Math.sin(-u-l)*a,m=this._cx+Math.cos(-l-o+u)*i,S=this._cy+Math.sin(-l-o+u)*a,y=r.Math.calculateAngleBetweenTwoVectors(m-this._cx,S-this._cy,f-this._cx,v-this._cy);if(y=Math.min(y,o),n>0){var C=h<n?Math.asin(h/n):0,x=this._cx+Math.cos(-C-l)*n,A=this._cy+Math.sin(-C-l)*n,b=this._cx+Math.cos(-l-o+C)*n,M=this._cy+Math.sin(-l-o+C)*n,T=r.Math.calculateAngleBetweenTwoVectors(b-this._cx,M-this._cy,x-this._cx,A-this._cy);T=Math.min(T,y,o),360==this._ae?(e=r.PathUtils.moveTo(m,S),e+=r.PathUtils.arcTo(i,a,o,1,f,v),e+=r.PathUtils.lineTo(m,S),e+=r.PathUtils.moveTo(x,A),e+=r.PathUtils.arcTo(n,n,o,0,b,M)):(e=r.PathUtils.moveTo(b,M),e+=r.PathUtils.lineTo(m,S),e+=r.PathUtils.arcTo(i,a,y,1,f,v),e+=r.PathUtils.lineTo(x,A),e+=r.PathUtils.arcTo(n,n,T,0,b,M))}else 360==this._ae?(e=r.PathUtils.moveTo(m,S),e+=r.PathUtils.arcTo(i,a,o,1,f,v)):(e=r.PathUtils.moveTo(p,_),e+=r.PathUtils.lineTo(m,S),e+=r.PathUtils.arcTo(i,a,y,1,f,v));return e+=r.PathUtils.closePath()},j.prototype._initializeSelectionEffects=function(){var t="redwood"===this.getCtx().getThemeBehavior(),e=this.isSelected()||t?j._OUTER_BORDER_WIDTH:j._OUTER_BORDER_WIDTH_HOVER,i=this._makeWedgePath(e),a=this._makeWedgePath(e+j._INNER_BORDER_WIDTH);if(this.OuterChild)return this.OuterChild.setCmds(i),void this.InnerChild.setCmds(a);this.OuterChild=new r.Path(this.getCtx(),i),this.OuterChild.setInvisibleFill(),this.OuterChild.setMouseEnabled(!0),this.addChild(this.OuterChild),this.InnerChild=new r.Path(this.getCtx(),a),this.InnerChild.setInvisibleFill(),this.InnerChild.setMouseEnabled(!0),this.addChild(this.InnerChild)},j.prototype._showNestedBorders=function(t,e){this._initializeSelectionEffects(),e?(this.setSolidFill(t),this.setStroke(null),this.setClassName().setStyle(),this.OuterChild.setSolidFill(e),this.OuterChild.setClassName().setStyle(),this.InnerChild.setFill(this._fill),this.InnerChild.setClassName(this._shapeClassName).setStyle(this._shapeStyle)):t?(this.setSolidFill(t),this.setStroke(null),this.setClassName().setStyle(),this.OuterChild.setFill(this._fill),this.OuterChild.setClassName(this._shapeClassName).setStyle(this._shapeStyle),this.InnerChild.setInvisibleFill(),this.InnerChild.setClassName().setStyle()):(this.setFill(this._fill),this.setStroke(this._shapeStroke),this.setClassName(this._shapeClassName).setStyle(this._shapeStyle),this.OuterChild.setInvisibleFill(),this.OuterChild.setClassName().setStyle(),this.InnerChild.setInvisibleFill(),this.InnerChild.setClassName().setStyle())},j.prototype.setStyleProperties=function(t,e,i,a,s,n,o){this._fill=t,this._shapeStroke=e;var l="redwood"===this.getCtx().getThemeBehavior();this._hoverColor=l?i:r.SelectionEffectUtils.getHoverBorderColor(i),this._innerColor=a,this._outerColor=s,this._shapeClassName=n,this._shapeStyle=o,this.setStyle(o).setClassName(n),this.setFill(t),e&&this.setStroke(e)},j.prototype.showHoverEffect=function(){this.IsShowingHoverEffect=!0;var t="redwood"===this.getCtx().getThemeBehavior()&&this.isSelected()?this._outerColor:this._hoverColor;this._showNestedBorders(t,this._innerColor)},j.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect=!1,this.isSelected()?this._showNestedBorders(this._outerColor,this._innerColor):this._showNestedBorders()},j.prototype.setSelected=function(t){if(this.IsSelected!=t){this.IsSelected=t;var e="redwood"===this.getCtx().getThemeBehavior();if(this.isHoverEffectShown()){var i=e&&this.isSelected()?this._outerColor:this._hoverColor;this._showNestedBorders(i,this._innerColor)}else this.isSelected()?this._showNestedBorders(this._outerColor,this._innerColor):this._showNestedBorders()}},j.prototype.UpdateSelectionEffect=function(){};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var V=function(){this._init()};r.Obj.createSubclass(V,r.Obj),V.prototype._init=function(){this._sliceLabel=null,this._slice=null,this._angle=-1,this._position=-1,this._width=-1,this._height=-1,this._x=-1,this._y=-1,this._initialNumLines=-1,this._hasFeeler=!1,this._maxY=-1,this._minY=-1},V.prototype.getAngle=function(){return this._angle},V.prototype.setAngle=function(t){this._angle=t},V.prototype.getHeight=function(){return this._height},V.prototype.setHeight=function(t){this._height=t},V.prototype.getInitialNumLines=function(){return this._initialNumLines},V.prototype.setInitialNumLines=function(t){this._initialNumLines=t},V.prototype.getMaxY=function(){return this._maxY},V.prototype.setMaxY=function(t){this._maxY=t},V.prototype.getMinY=function(){return this._minY},V.prototype.setMinY=function(t){this._minY=t},V.prototype.boundY=function(t){return this._minY<=this._maxY&&(t=Math.max(t,this._minY),t=Math.min(t,this._maxY)),t},V.prototype.hasFeeler=function(){return this._hasFeeler},V.prototype.setHasFeeler=function(t){this._hasFeeler=t},V.prototype.getPosition=function(){return this._position},V.prototype.setPosition=function(t){this._position=t},V.prototype.getSlice=function(){return this._slice},V.prototype.setSlice=function(t){this._slice=t},V.prototype.getSliceLabel=function(){return this._sliceLabel},V.prototype.setSliceLabel=function(t){this._sliceLabel=t},V.prototype.getWidth=function(){return this._width},V.prototype.setWidth=function(t){this._width=t},V.prototype.getX=function(){return this._x},V.prototype.setX=function(t){this._x=t},V.prototype.getY=function(){return this._y},V.prototype.setY=function(t){this._y=t};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Y=function(){};r.Obj.createSubclass(Y,r.Obj),Y.TWOD="2D",Y.THREED="3D",Y.CRUST="CRUST",Y.SIDE="SIDE",Y.BORDER="BORDER",Y.SURFACE_CRUST=0,Y.SURFACE_LEFT=1,Y.SURFACE_RIGHT=2,Y.SURFACE_TOP=3,Y.reflectAngleOverYAxis=function(t,e,i,a,s){var n=r.Math.degreesToRads(360-t);return{x:e+Math.cos(n)*a,y:i+Math.sin(n)*s}},Y.getGradientColors=function(t,e){return e==Y.TWOD||e==Y.THREED?[r.ColorUtils.adjustHSL(t,0,-.04,-.05),r.ColorUtils.adjustHSL(t,0,-.09,.04)]:e==Y.CRUST?[r.ColorUtils.adjustHSL(t,0,-.04,-.05),r.ColorUtils.adjustHSL(t,0,0,-.14)]:e==Y.SIDE?[r.ColorUtils.adjustHSL(t,0,-.1,.06),r.ColorUtils.adjustHSL(t,0,-.04,-.05)]:void 0},Y.getGradientAlphas=function(t,e){var i=null==t||isNaN(t)||0==t?1:t;return e==Y.TWOD?[i,i,i]:e==Y.BORDER?[i/1.59375,i/5.3125,i/(255/96)]:e==Y.THREED?[i,i,i,i,i]:e==Y.CRUST?[i,i,i,i]:e==Y.SIDE?[i,i]:void 0},Y.createTopSurface=function(t,e){var i=t.getPieChart(),a=i.getCtx(),s=t.getCenter(),n=t.getInnerRadius(),o=i.is3D()||t.getSliceGaps()>Math.sin(r.Math.degreesToRads(t.getAngleExtent()))*t._radiusX+1?null:t.getSliceGaps(),l=new j(a,s.x,s.y,t._radiusX,t._radiusY,t.getAngleStart(),t.getAngleExtent(),o,n),h=f.getSelectedInnerColor(i.chart),u=f.getSelectedOuterColor(i.chart),g=new r.Stroke(t.getStrokeColor(),1,t.getBorderWidth()),d=t.getSeriesIndex(),c=f.getClassName(i.chart,d,0),p=f.getStyle(i.chart,d,0);l.setStyleProperties(e,g,t.getFillColor(),h,u,c,p);var _=[l];return Y.associate(t,_),_},Y.associate=function(t,e){if(e)for(var i=0;i<e.length;i++)t.getPieChart().chart.getEventManager().associate(e[i],t)},Y.createLateralSurface=function(t,e,i){if(0==t.getAngleExtent())return[];var a=[];if(r.ColorUtils.getAlpha(t.getFillColor())>0)if(e==Y.SURFACE_LEFT||e==Y.SURFACE_RIGHT)a.push(Y._generateLateralShape(t,e,null,i));else if(e==Y.SURFACE_CRUST)for(var s=Y._createCrustPathCommands(t),n=s.length,o=0;o<n;o++)a.push(Y._generateLateralShape(t,e,s[o],i));return Y.associate(t,a),a},Y.generateLateralGradientFill=function(t,e){t.getPieChart(),e==Y.CRUST&&t.getDepth();var i=Y.getGradientColors(r.ColorUtils.getRGB(t.getFillColor()),e),a=Y.getGradientAlphas(r.ColorUtils.getAlpha(t.getFillColor()),e);return new r.LinearGradientFill(270,i,a,[0,1],null)},Y._generateLateralShape=function(t,e,i,a){var s=t.getPieChart().getCtx();if(e==Y.SURFACE_LEFT||e==Y.SURFACE_RIGHT){for(var n=t.getAngleStart(),o=t.getAngleExtent(),l=t.getCenter().x,h=t.getCenter().y,u=t._radiusX,g=t._radiusY,d=t.getDepth(),c=Y.reflectAngleOverYAxis(e==Y.SURFACE_LEFT?n+o:n,l,h,u,g),p=Y._generateInnerPoints(l,h,c.x,c.y,d),_=[],f=0;f<p.length;f++)_.push(p[f].x,p[f].y);var v=new r.Polygon(s,_);return v.setFill(a),t.getStrokeColor()&&v.setSolidStroke(t.getStrokeColor()),v}if(i){var m=new r.Path(s,null);return m.setCmds(i),m.setTranslate(t.__getExplodeOffsetX(),t.__getExplodeOffsetY()),m.setFill(a),t.getStrokeColor()&&m.setSolidStroke(t.getStrokeColor()),m}return null},Y._createCrustPathCommands=function(t){var e=t.getAngleStart(),i=t.getAngleExtent(),r=e+i,a=t.getCenter().x,s=t.getCenter().y,n=t._radiusX,o=t._radiusY,l=t.getDepth(),h=[];return e<180&&r>360?(h.push(Y._makeOuterPath(a,s,n,o,l,e,180-e)),h.push(Y._makeOuterPath(a,s,n,o,l,360,r-360)),h.push(Y._makeOuterPath(a,s,n,o,l,180,180))):r>360?(h.push(Y._makeOuterPath(a,s,n,o,l,e,360-e)),h.push(Y._makeOuterPath(a,s,n,o,l,360,r-360))):e<180&&r>180?(h.push(Y._makeOuterPath(a,s,n,o,l,e,180-e)),h.push(Y._makeOuterPath(a,s,n,o,l,180,r-180))):h.push(Y._makeOuterPath(a,s,n,o,l,e,i)),h},Y._makeOuterPath=function(t,e,i,a,s,n,o){var l=r.Math.degreesToRads(o),h=-(r.Math.degreesToRads(n)+l),u=Y.reflectAngleOverYAxis(n,t,e,i,a),g=t+Math.cos(h)*i,d=e+Math.sin(h)*a,c=r.PathUtils.moveTo(u.x,u.y);return c+=r.PathUtils.arcTo(i,a,l,0,g,d),c+=r.PathUtils.lineTo(g,d+s),c+=r.PathUtils.arcTo(i,a,l,1,u.x,u.y+s),c+=r.PathUtils.lineTo(u.x,u.y)},Y._generateInnerPoints=function(t,e,i,r,a){var s=[];return s.push({x:t,y:e}),s.push({x:i,y:r}),s.push({x:i,y:r+a}),s.push({x:t,y:e+a}),s};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var W=function(){};r.Obj.createSubclass(W,r.Obj),W._MAX_LINES_PER_LABEL=3,W._COLLISION_MARGIN=1,W._LEFT_SIDE_LABELS=1,W._RIGHT_SIDE_LABELS=2,W._OUTSIDE_LABEL_DISTANCE=1.04,W._FEELER_RAD_MINSIZE=.1,W._FEELER_HORIZ_MINSIZE=.1,W._LABEL_TO_FEELER_OFFSET=.5,W._LABEL_TO_FEELER_DISTANCE=3,W._NO_COLLISION=0,W._HALF_COLLISION=1,W._ALL_COLLISION=2,W.layoutLabelsAndFeelers=function(t){var e=t.getLabelPosition();W._layoutInsideLabels(t,"auto"==e),W._layoutOutsideLabelsAndFeelers(t)},W._layoutInsideLabels=function(t,e){for(var i=t.__getSlices(),a=0;a<i.length;a++){var s=i[a],n=t.getSeriesLabelPosition(s.getSeriesIndex());if("none"!=n&&"outsideSlice"!=n&&!W._skipSliceLabel(t,s)){var o=s.getAngleStart()+s.getAngleExtent()/2,l=s.getInnerRadius(),h=s.getCenter(),u=0,g=0,d=W._createLabel(s,!0);if(1==i.length)u=h.x,g=h.y;else{var c=Math.max(.45,.65-.45*l/Math.max(s.getRadiusY(),.001)),p=Y.reflectAngleOverYAxis(o,h.x,h.y,l+(s.getRadiusX()-l)*c,l+(s.getRadiusY()-l)*c);u=p.x,g=p.y}d.setX(u),d.setY(g),d.alignMiddle(),d.alignCenter();for(var _=d.getDimensions(),f=u,v=u,m=g-_.h/2,S=g+_.h/2;s.contains(f,m)&&s.contains(f,S);)f--;for(;s.contains(v,m)&&s.contains(v,S);)v++;f=Math.ceil(f+3),v=Math.floor(v-3);var y=2*Math.min(u-f,v-u);if(y<_.w&&(d.setX((f+v)/2),y=v-f),e&&"center"!=n){d.getDimensions().w<y?s.setSliceLabel(d):s.setSliceLabel(null)}else{var C=t.getCtx().getStage(),x=W._isTextLabel(t,s)?null:d.getTextString().length;r.TextUtils.fitText(d,y,_.h,C,x)&&(C.removeChild(d),s.setSliceLabel(d))}null!=s.getSliceLabel()&&s.setNoOutsideFeeler()}}},W._layoutOutsideLabelsAndFeelers=function(t){var e,i,r=W._generateInitialLayout(t);e=r[0],i=r[1];var a=W._refineInitialLayout(t,e,W._LEFT_SIDE_LABELS),s=W._refineInitialLayout(t,i,W._RIGHT_SIDE_LABELS);a==W._HALF_COLLISION&&s!=W._NO_COLLISION&&W._columnLabels(t,e,!0,!0,!0),a!=W._NO_COLLISION&&s==W._HALF_COLLISION&&W._columnLabels(t,i,!1,!0,!0),W._setLabelsAndFeelers(t,e,W._LEFT_SIDE_LABELS),W._setLabelsAndFeelers(t,i,W._RIGHT_SIDE_LABELS)},W._createLabel=function(t,e){var i=t.getPieChart(),a=i.getCtx(),s=e?new r.OutputText(a):new r.MultilineText(a),n=r.ColorUtils.getContrastingTextColor(t.getFillColor()),o=new r.CSSStyle({color:n}),l=i.getOptions().styleDefaults,h=[l._dataLabelStyle];e&&h.push(o),h.push(l.dataLabelStyle);var u=c.getDataItem(i.chart,t.getSeriesIndex(),0);u&&h.push(new r.CSSStyle(u.labelStyle)),r.Agent.isHighContrast()&&h.push(o);var g=r.CSSStyle.mergeStyles(h);s.setCSSStyle(g);var d=W.generateSliceLabelString(t,l.sliceLabelType);return s.setTextString(d),t.setSliceLabelString(d),s},W.createPieCenter=function(t){var e=t.getOptions(),i=t.getCtx(),a=W.getPieCenterOptions(e),s=a.label,n=a.renderer,o=t.getLabelPosition(),l=e.tooltip,h=l?l.renderer:null,u=t.getCenter(),g=t.getInnerRadius();if(s||n){var c=t.getRadiusX(),p=(g=g>0?g:"outsideSlice"==o?.9*c:.5*c)*Math.sqrt(2);if(s){var _=new r.MultilineText(i),f=a.labelStyle;if(_.setCSSStyle(f),"number"==typeof s&&(s=d.formatValue(t,a,s,s,s,0)),_.setTextString(s),r.TextUtils.fitText(_,p,p,t)){var v=_.getDimensions();_.setY(u.y-v.h/2),_.setX(u.x),_.alignCenter(),h||t.chart.getEventManager().associate(_,new r.SimpleObjPeer(_.getTextString(),null,null,{type:"pieCenterLabel"})),t.addChild(_),t.setCenterLabel(_)}}if(h){var m=new r.Circle(i,u.x,u.y,g);m.setInvisibleFill(),t.addChild(m);var S=t.getCtx().getTooltipManager();t.chart.getEventManager().associate(m,new r.CustomDatatipPeer(S,h,"#4b4b4b",{component:e._widgetConstructor,label:s}))}if(n){var y={outerBounds:{x:u.x-g,y:u.y-g,width:2*g,height:2*g},innerBounds:{x:u.x-p/2,y:u.y-p/2,width:p,height:p},label:s,totalValue:t.getTotalValue(),component:e._widgetConstructor};y=i.fixRendererContext(y);var C=i.getContainer(),x=t.chart.pieCenterDiv;x&&C.removeChild(x);var A=n(y);if(!A)return;var b=i.createOverlayDiv();Array.isArray(A)?A.forEach(function(t){b.appendChild(t)}):b.appendChild(A),t.chart.pieCenterDiv=b,C.appendChild(b);var M=i.getOverlayAttachedCallback();M&&M(b)}}},W.generateSliceLabelString=function(t,e){var i,r=W.getDefaultSliceLabelString(t,e),a=t.getPieChart().getOptions().dataLabel;if(a){var s=f.getDataContext(t._chart,t.getSeriesIndex(),0);if(s.label=r,"number"==typeof(i=a(s))){var n=d.getValueFormat(t.getPieChart().chart,"label");i=d.formatValue(t.getPieChart(),n,i)}}return i||r},W.getDefaultSliceLabelString=function(t,e){var i=t.getPieChart(),r=t.getCustomLabel(),a=d.getValueFormat(i.chart,"label");return null!=r?"number"==typeof r?d.formatValue(i,a,r):r:"percent"==e?W.generateSlicePercentageString(t):"number"==e?d.formatValue(i,a,t.getValue()):"text"==e?t.getSeriesLabel():"textAndPercent"==e?t.getSeriesLabel()+", "+W.generateSlicePercentageString(t):null},W.generateSlicePercentageString=function(t){var e=t.getPieChart(),i=e.getTotalValue(),r=0==i?0:t.getValue()/i,a=r<.01?3:r<.1?2:r<1?1:0;2*e.getRadiusX()<150&&(a=Math.max(a-1,0));var s=e.getCtx().getNumberConverter({style:"percent",maximumFractionDigits:a,minimumFractionDigits:a}),n="";return s&&s.format?n=s.format(r):(r*=100,n=d.formatValue(e,{},r,null,null,100==r?1:Math.pow(10,-1*a))+"%"),n},W._refineInitialLayout=function(t,e,i){if(e&&e.length>0){for(var r,a=t.__getFrame().y,s=!1,n=!1,o=!1,l=0,h=!1,u=h,g=i==W._LEFT_SIDE_LABELS,d=0;d<e.length;d++)u=h,(r=e[d]).getPosition()>90&&(h=!0),l=r.getY()+r.getHeight(),a-r.getY()>W._COLLISION_MARGIN&&(h?h&&!u?n=!0:o=!0:s=!0),l>a&&(a=l);return s&&o||n?(W._columnLabels(t,e,g,!0,!0),W._ALL_COLLISION):s?(W._columnLabels(t,e,g,!0,!1),W._HALF_COLLISION):o?(W._columnLabels(t,e,g,!1,!0),W._HALF_COLLISION):W._NO_COLLISION}},W._setLabelsAndFeelers=function(t,e,i){if(!(null==e||e.length<=0)){var a,s,n,o,l,h=i==W._LEFT_SIDE_LABELS,u=t.__getFrame(),g=1/0;for(a=0;a<e.length;a++)if(s=(o=e[a]).getSlice(),o.hasFeeler()){l=W._calculateFeeler(o,s,h);var d=r.TextUtils.getTextStringHeight(t.getCtx(),o.getSliceLabel().getCSSStyle()),c=o.getWidth(),p=W._isTextLabel(t,s)?Math.min(2*d,c):c;if(W.getMaxLabelWidth(t,o.getX(),h)+l<p||0==o.getWidth()){o.setSliceLabel(null),s.setNoOutsideFeeler();continue}g=Math.min(g,l)}else s.setNoOutsideFeeler();for(a=0;a<e.length;a++)s=(o=e[a]).getSlice(),(n=o.getSliceLabel())&&(o.hasFeeler()&&(h?o.setX(o.getX()+g):o.setX(o.getX()-g),W._calculateFeeler(o,s,h)),n.setY(o.getY()),n.setX(o.getX()),o.getY()<u.y||o.getY()+o.getHeight()>u.y+u.h?(s.setSliceLabel(null),s.setNoOutsideFeeler()):(W._truncateSliceLabel(t,s,o,h),0==o.getWidth()||0==o.getHeight()?(s.setSliceLabel(null),s.setNoOutsideFeeler()):s.setSliceLabel(n)))}},W._calculateFeeler=function(t,e,i){var a,s=t.getX(),n=t.getY()+t.getHeight()*W._LABEL_TO_FEELER_OFFSET,o=W._FEELER_HORIZ_MINSIZE*e.getRadiusX(),l={x:i?(s+=W._LABEL_TO_FEELER_DISTANCE)+o:(s-=W._LABEL_TO_FEELER_DISTANCE)-o,y:n},h={x:s,y:n},u=t.getAngle(),g=W._adjustForDepth(u,e.getDepth());a=Y.reflectAngleOverYAxis(u,e.getCenter().x,e.getCenter().y+g,e.getRadiusX(),e.getRadiusY());var d=r.Math.degreesToRads(t.getPosition()),c=Math.abs(Math.atan2(l.x-a.x,a.y-l.y)),p=(a.y-l.y)*Math.tan(d);return(d>Math.PI/2&&c>Math.PI/2&&c<d||d<Math.PI/2&&c<Math.PI/2&&c>d)&&(l.x=i?a.x-p:a.x+p),e.setOutsideFeelerPoints(a,l,h),Math.abs(h.x-l.x)-o},W._adjustForDepth=function(t,e){var i=0;return t>189&&t<351&&(i=e),i},W._getMiddleLabel=function(t){for(var e=91,i=-1,r=0;r<t.length;r++){var a=t[r].getPosition();Math.abs(a-90)<e&&(e=Math.abs(a-90),i=r)}return i},W._setOptimalLabelPosition=function(t,e,i,a){e.setX(i);var s=t.getRadiusY()*(1+W._FEELER_RAD_MINSIZE),n=r.Math.degreesToRads(e.getPosition()),o=s*Math.cos(n),l=W._adjustForDepth(e.getAngle(),t.getDepth()),h=t.getCenter().y-o-e.getHeight()*W._LABEL_TO_FEELER_OFFSET+l;e.setY(e.boundY(h))},W._getRadFeelerAngle=function(t,e,i){var r=t.getSlice(),a=r.getCenter(),s=t.getAngle(),n=W._adjustForDepth(s,r.getDepth()),o=Y.reflectAngleOverYAxis(s,a.x,a.y+n,r.getRadiusX(),r.getRadiusY());return Math.atan2(Math.abs(e-o.x),o.y-i)},W._columnLabels=function(t,e,i,a,s){var n,o,l,h=t.__getFrame(),u=h.y,g=h.y+h.h,d=0,c=t.getCenter().x,p=t.getRadiusX()*(1+W._FEELER_RAD_MINSIZE+W._FEELER_HORIZ_MINSIZE);for(l=i?(c-=p)+t.getRadiusX()*W._FEELER_HORIZ_MINSIZE:(c+=p)-t.getRadiusX()*W._FEELER_HORIZ_MINSIZE,n=0;n<e.length;n++)o=e[n],d=r.Math.degreesToRads(o.getPosition()),W._getRadFeelerAngle(o,l,u)-d>.45*Math.PI||W._skipSliceLabel(t,o.getSlice())?(e.splice(n,1),n--):(e[n].setMinY(u),u+=e[n].getHeight());for(n=e.length-1;n>=0;n--)o=e[n],(d=r.Math.degreesToRads(o.getPosition()))-W._getRadFeelerAngle(o,l,g)>.45*Math.PI||W._skipSliceLabel(t,o.getSlice())?e.splice(n,1):(g-=e[n].getHeight(),e[n].setMaxY(g));if(0!=e.length){var _=W._getMiddleLabel(e),f=e[_];a&&!s&&f.getMinY()+f.getHeight()>t.getCenter().y&&(s=!0),s&&!a&&f.getMaxY()<t.getCenter().y&&(a=!0);var v=f.getPosition();(s&&a||v>90&&s||v<=90&&a)&&(W._setOptimalLabelPosition(t,f,c,i),f.setHasFeeler(!0));var m,S,y=f.getY(),C=f.getY()+f.getHeight();if(a)for(n=_-1;n>=0;n--)S=(o=e[n]).getHeight(),W._setOptimalLabelPosition(t,o,c,i),o.setHasFeeler(!0),(m=o.getY())+S<y?y=m:y-=S,o.setY(y);if(s)for(n=_+1;n<e.length;n++)S=(o=e[n]).getHeight(),W._setOptimalLabelPosition(t,o,c,i),o.setHasFeeler(!0),(m=o.getY())>C?C=m+S:C+=S,o.setY(C-S)}},W._truncateSliceLabel=function(t,e,i,r){var a,s,n=i.getSliceLabel(),o=n.getCSSStyle(),l=t.getNumChildren(),h=!1;t.contains(n)||(t.addChild(n),h=!0),n.setCSSStyle(o);var u=e.getSliceLabelString();return n.setTextString(u),h&&t.removeChildAt(l),a=W.getMaxLabelWidth(t,i.getX(),r),s=W._getTextDimension(t,e,n,a,i.getInitialNumLines()),i.setWidth(s.x),i.getHeight()!=s.y&&(i.setHeight(s.y),!0)},W._generateInitialLayout=function(t){for(var e=new Array(2),i=[],r=[],a=t.__getSlices(),s=t.__getFrame(),n=0;n<a.length;n++){var o=a[n],l=t.getSeriesLabelPosition(o.getSeriesIndex());if(null==o.getSliceLabel()&&"none"!=l&&"center"!=l&&!W._skipSliceLabel(t,o)){var h=W._createLabel(o,!1),u=o.getAngleStart()+o.getAngleExtent()/2;u>360&&(u-=360),u<0&&(u+=360);var g=Y.reflectAngleOverYAxis(u,t.getCenter().x,t.getCenter().y,t.getRadiusX()*W._OUTSIDE_LABEL_DISTANCE,t.getRadiusY()*W._OUTSIDE_LABEL_DISTANCE),d=u>=90&&u<270,c=W.getMaxLabelWidth(t,g.x,d),p=W._getTextDimension(t,o,h,c,W._MAX_LINES_PER_LABEL);u<165&&u>15?g.y-=1*p.y:u<15||u>345?(g.y-=.5*p.y,g.x+=.2*p.y):u>165&&u<195&&(g.y-=.5*p.y,g.x-=.2*p.y);var _,f=W._adjustForDepth(u,t.getDepth());if(g.y+=f,1==a.length&&(g.x-=p.x/2),!(g.y<s.y||g.y+p.y>s.y+s.h))u>=90&&u<270?(h.alignRight(),W._createLabelInfo(o,h,u,_=u-90,p,g,i)):(_=u<=90?Math.abs(90-u):180-(u-270),W._createLabelInfo(o,h,u,_,p,g,r))}}return e[0]=i,e[1]=r,e},W._createLabelInfo=function(t,e,i,r,a,s,n){for(var o,l=-1,h=e,u=0;u<n.length;u++)if((o=n[u]).getPosition()>r){l=u;break}-1==l&&(l=n.length),(o=new V).setPosition(r),o.setAngle(i),o.setSliceLabel(h),o.setSlice(t),o.setWidth(a.x),o.setHeight(a.y),o.setX(s.x),o.setY(s.y),o.setInitialNumLines(h.getLineCount()),n.splice(l,0,o)},W._getTextDimension=function(t,e,i,a,s){i.setMaxLines(s);var n=W._isTextLabel(t,e)?null:i.getTextString().length;if(r.TextUtils.fitText(i,a,1/0,t,n)){t.addChild(i);var o=i.getDimensions();return t.removeChild(i),{x:o.w,y:o.h}}return{x:0,y:0}},W._isTextLabel=function(t,e){var i=e.getCustomLabel(),r=null!=t.getOptions().dataLabel;return-1!=t.getOptions().styleDefaults.sliceLabelType.indexOf("text")||null!=i&&"number"!=typeof i||r},W.getMaxLabelWidth=function(t,e,i){var r=t.__getFrame();return i?e-r.x:r.x+r.w-e},W.getPieCenterOptions=function(t){var e=r.JsonUtils.clone(t.pieCenter),i=t.pieCenterLabel;if(i){var a=i.style,s=i.text;s&&(e.label=s),a&&(e.labelStyle=new r.CSSStyle(a))}return e},W._skipSliceLabel=function(t,e){return e.getAngleExtent()<3&&c.getSeriesCount(t.chart)>120};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var z=function(t,e){this.Init(t,e)};r.Obj.createSubclass(z,r.Obj),z.THREED_TILT=.59,z.prototype.Init=function(t,e){this._pieChart=t,this._chart=t.chart,this._angleStart=0,this._angleExtent=0,this._topSurface=null,this._leftSurface=null,this._rightSurface=null,this._crustSurface=null,this._explodeOffsetX=0,this._explodeOffsetY=0,this._sliceLabel=null,this._sliceLabelString=null,this._hasFeeler=!1,this._feelerRad=null,this._feelerHoriz=null,this._outsideFeelerStart=null,this._outsideFeelerMid=null,this._outsideFeelerEnd=null,this._selected=!1,this._selecting=!1,this._centerX=this._pieChart.getCenter().x,this._centerY=this._pieChart.getCenter().y,this._radiusX=this._pieChart.getRadiusX(),this._radiusY=this._pieChart.getRadiusY(),this._depth=this._pieChart.getDepth();var i=this._chart.getOptions();if(null!=e){var r=c.getDataItem(this._chart,e,0);this._value=c.getValue(this._chart,e,0),this._explode=_.getSliceExplode(this._chart,e),this._fillColor=f.getColor(this._chart,e,0),this._fillPattern=f.getPattern(this._chart,e,0),this._strokeColor=f.getBorderColor(this._chart,e),this._borderWidth=f.getBorderWidth(this._chart,e),this._customLabel=r?r.label:null,this._seriesLabel=c.getSeries(this._chart,e),this._drillable=c.isDataItemDrillable(this._chart,e,0),this._id=_.getSliceId(this._chart,e),this._seriesIndex=e,this._categories=c.getCategories(this._chart,e,0)}else this._value=_.getOtherValue(this._chart),this._explode=0,this._fillColor=i.styleDefaults.otherColor,this._fillPattern=null,this._strokeColor=i.styleDefaults.borderColor,this._borderWidth=i.styleDefaults.borderWidth,this._customLabel=null,this._seriesLabel=i.translations.labelOther,this._drillable=c.isMultiSeriesDrillEnabled(this._chart),this._id=_.getOtherSliceId(this._chart)},z.prototype.getPieChart=function(){return this._pieChart},z.prototype.render=function(t){for(var e=z._sortPieSurfaces(this._topSurface,this._leftSurface,this._rightSurface,this._crustSurface,this._angleStart,this._angleExtent),i=e.length,a=0;a<i;a++)for(var s=e[a],n=s.length,o=0;o<n;o++){this._pieChart.__getShapesContainer().addChild(s[o]),s[o].render&&s[o].render()}if(this._sliceLabel&&(this._pieChart.addChild(this._sliceLabel),Y.associate(this,[this._sliceLabel]),t?(this._pieChart.addChild(this._feelerRad),this._pieChart.addChild(this._feelerHoriz)):this._renderOutsideFeeler()),this._explodeSlice(),this._drillable||this._pieChart.chart.isSelectionSupported()){var l=this.getDisplayables();for(a=0;a<l.length;a++)l[a].setCursor(r.SelectionEffectUtils.getSelectingCursor())}var h=this.getTopDisplayable();h&&(h.setAriaRole("img"),this._updateAriaLabel())},z.prototype._feelerFromPts=function(t,e){var i=new r.Line(this._pieChart.getCtx(),t.x,t.y,e.x,e.y),a=this._pieChart.getOptions().styleDefaults.pieFeelerColor,s=new r.Stroke(a);return i.setStroke(s),this._pieChart.addChild(i),i},z.prototype._renderOutsideFeeler=function(){if(this._hasFeeler){var t=this._feelerFromPts(this._outsideFeelerStart,this._outsideFeelerMid),e=this._feelerFromPts(this._outsideFeelerMid,this._outsideFeelerEnd);this._feelerRad=t,this._feelerHoriz=e}},z.prototype.preRender=function(){var t,e=this._bFillerSlice?"color":f.getSeriesEffect(this._chart),i=this.getFillColor(),a=this.getFillPattern();if("pattern"==e||null!=a)t=new r.PatternFill(a,i),e="pattern";else if("gradient"==e){var s=this._pieChart.is3D()?"3D":"2D",n=Y.getGradientColors(r.ColorUtils.getRGB(i),s),o=Y.getGradientAlphas(r.ColorUtils.getAlpha(i),s),l=[Math.floor(this._centerX-this._radiusX),Math.floor(this._centerY-this._radiusY),Math.ceil(2*this._radiusX),Math.ceil(2*this._radiusY)];t=new r.LinearGradientFill(270,n,o,[0,1],l)}else t=new r.SolidFill(i);if(this._topSurface=Y.createTopSurface(this,t),this._depth>0||this._radiusX!=this._radiusY){var h="gradient"==e,u=new r.SolidFill(r.ColorUtils.getDarker(i,.4)),g=h?Y.generateLateralGradientFill(this,Y.SIDE):u,d=h?Y.generateLateralGradientFill(this,Y.CRUST):u;this._leftSurface=Y.createLateralSurface(this,Y.SURFACE_LEFT,g),this._rightSurface=Y.createLateralSurface(this,Y.SURFACE_RIGHT,g),this._crustSurface=Y.createLateralSurface(this,Y.SURFACE_CRUST,d)}this.setSliceLabel(null),this.setNoOutsideFeeler()},z._sortPieSurfaces=function(t,e,i,r,a,s){var n=[];return e&&i&&r&&(a<=270&&a+s>270?(n.push(e),n.push(i),n.push(r)):a>270||a+s<=90?(n.push(e),n.push(r),n.push(i)):(n.push(i),n.push(r),n.push(e))),n.push(t),n},z.oppositeDirection=function(t,e,i){return t-e>0!=t-i>0},z.prototype._explodeSlice=function(){if(0!=this._explode){var t=this._angleExtent,e=(360-(this._angleStart+t/2))*r.Math.RADS_PER_DEGREE,i=this._pieChart.is3D()?z.THREED_TILT:1,a=this._explode*this._pieChart.__calcMaxExplodeDistance();this._explodeOffsetX=Math.cos(e)*a,this._explodeOffsetY=Math.sin(e)*i*a,"safari"!==r.Agent.browser&&"blink"!==r.Agent.engine||(this._explodeOffsetX=Math.round(this._explodeOffsetX),this._explodeOffsetY=Math.round(this._explodeOffsetY))}else this._explodeOffsetX=0,this._explodeOffsetY=0;if(this._topSurface){var s=this._pieChart.is3D()&&this._topSurface[0].getSelectionOffset?this._topSurface[0].getSelectionOffset():[];z._translateShapes(this._topSurface,s[0]?s[0]+this._explodeOffsetX:this._explodeOffsetX,s[1]?s[1]+this._explodeOffsetY:this._explodeOffsetY)}if(this._rightSurface&&z._translateShapes(this._rightSurface,this._explodeOffsetX,this._explodeOffsetY),this._leftSurface&&z._translateShapes(this._leftSurface,this._explodeOffsetX,this._explodeOffsetY),this._crustSurface&&z._translateShapes(this._crustSurface,this._explodeOffsetX,this._explodeOffsetY),this._hasFeeler){var n=this._outsideFeelerStart.x,o=this._outsideFeelerStart.y,l=n+this._explodeOffsetX,h=o+this._explodeOffsetY;this._feelerRad.setX1(l),this._feelerRad.setY1(h);var u=this._outsideFeelerMid.x,g=this._outsideFeelerMid.y;z.oppositeDirection(u,n,l)?(this._feelerRad.setX2(l),this._feelerHoriz.setX1(l)):(this._feelerRad.setX2(u),this._feelerHoriz.setX1(u)),z.oppositeDirection(g,o,h)?(this._feelerRad.setY2(h),this._feelerHoriz.setY1(h)):(this._feelerRad.setY2(g),this._feelerHoriz.setY1(g))}this._sliceLabel&&!this._hasFeeler&&this._sliceLabel.setTranslate(this._explodeOffsetX,this._explodeOffsetY)},z._translateShapes=function(t,e,i){if(t)for(var r=t.length,a=0;a<r;a++){t[a].setTranslate(e,i)}},z.prototype.getRadiusX=function(){return this._radiusX},z.prototype.getRadiusY=function(){return this._radiusY},z.prototype.getCenter=function(){return new r.Point(this._centerX,this._centerY)},z.prototype.getDepth=function(){return this._depth},z.prototype.getAngleExtent=function(){return this._angleExtent},z.prototype.setAngleExtent=function(t){this._angleExtent=t},z.prototype.getAngleStart=function(){return this._angleStart},z.prototype.setAngleStart=function(t){this._angleStart=t},z.prototype.__getExplodeOffsetX=function(){return this._explodeOffsetX},z.prototype.__getExplodeOffsetY=function(){return this._explodeOffsetY},z.prototype.setOutsideFeelerPoints=function(t,e,i){this._outsideFeelerStart=t,this._outsideFeelerMid=e,this._outsideFeelerEnd=i,this._hasFeeler=!0},z.prototype.setNoOutsideFeeler=function(){this._outsideFeelerStart=null,this._outsideFeelerMid=null,this._outsideFeelerEnd=null,this._hasFeeler=!1},z.prototype.getLabelAndFeeler=function(){var t=[];return this._sliceLabel&&t.push(this._sliceLabel),this._feelerRad&&t.push(this._feelerRad),this._feelerHoriz&&t.push(this._feelerHoriz),t},z.prototype.getSliceLabel=function(){return this._sliceLabel},z.prototype.setSliceLabel=function(t){this._sliceLabel=t},z.prototype.getSliceLabelString=function(){return this._sliceLabelString},z.prototype.setSliceLabelString=function(t){this._sliceLabelString=t},z.prototype.getTopSurface=function(){return this._topSurface},z.prototype.getValue=function(){return this._value},z.prototype.getId=function(){return this._id},z.prototype.getSeriesIndex=function(){return this._seriesIndex},z._shapeIsSelectable=function(t){return t instanceof j},z.prototype.contains=function(t,e){for(var i=this._pieChart.getInnerRadius(),r=this._pieChart.getCenter(),a=(t-r.x)/this._radiusX,s=(e-r.y)/this._radiusY,n=-Math.atan2(s,a)*(180/Math.PI);n<this._angleStart;)n+=360;for(;n-this._angleStart>=360;)n-=360;var o=Math.pow(a,2)+Math.pow(s,2),l=Math.sqrt(o)>i/this._radiusX&&o<=1,h=n<=this._angleStart+this._angleExtent;return l&&h},z.prototype.GetAnimationParams=function(){var t=r.ColorUtils.getRed(this._fillColor),e=r.ColorUtils.getGreen(this._fillColor),i=r.ColorUtils.getBlue(this._fillColor),a=r.ColorUtils.getAlpha(this._fillColor);return[this._value,this._radiusX,this._radiusY,this._explode,this._centerX,this._centerY,this._depth,t,e,i,a]},z.prototype.SetAnimationParams=function(t){this._value=t[0],this._radiusX=t[1],this._radiusY=t[2],this._explode=t[3],this._centerX=t[4],this._centerY=t[5],this._depth=t[6];var e=Math.round(t[7]),i=Math.round(t[8]),a=Math.round(t[9]),s=Math.round(t[10]);this._fillColor=r.ColorUtils.makeRGBA(e,i,a,s)},z.prototype.getDeletedAnimationParams=function(){var t=this.GetAnimationParams();return t[0]=0,t[1]=this.getInnerRadius(),t[2]=this.getInnerRadius(),t[3]=0,t},z.prototype.animateUpdate=function(t,e){var i=e.GetAnimationParams(),a=this.GetAnimationParams();if(!r.ArrayUtils.equals(i,a)){var s=new r.CustomAnimation(this._pieChart.getCtx(),this,this.getPieChart().getAnimationDuration());s.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,a),t.add(s,0),this.SetAnimationParams(i)}},z.prototype.animateInsert=function(t){var e=new r.CustomAnimation(this._pieChart.getCtx(),this,this.getPieChart().getAnimationDuration());e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,this.GetAnimationParams()),t.add(e,0),this.SetAnimationParams(this.getDeletedAnimationParams())},z.prototype.animateDelete=function(t,e){var i=e.__getSlices(),a=this.getPieChart().__getSlices(),s=a.indexOf(this)-1;if(s>=0){for(var n=a[s].getId(),o=0;o<i.length;o++)if(i[o].getId().equals(n)){i.splice(o+1,0,this);break}}else i.splice(0,0,this);this._pieChart=e;var l=new r.CustomAnimation(e.getCtx(),this,this.getPieChart().getAnimationDuration());l.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,this.getDeletedAnimationParams()),l.setOnEnd(this._removeDeletedSlice,this),t.add(l,0)},z.prototype._removeDeletedSlice=function(){var t=this.getPieChart().__getSlices(),e=t.indexOf(this);e>=0&&t.splice(e,1)},z.prototype.getDisplayables=function(){var t=new Array;return this._topSurface&&(t=t.concat(this._topSurface)),this._leftSurface&&(t=t.concat(this._leftSurface)),this._rightSurface&&(t=t.concat(this._rightSurface)),this._crustSurface&&(t=t.concat(this._crustSurface)),this._sliceLabel&&t.push(this._sliceLabel),this._feelerRad&&t.push(this._feelerRad),this._feelerHoriz&&t.push(this._feelerHoriz),t},z.prototype.getAriaLabel=function(){var t,e=this._pieChart.getOptions().translations;t=null==this._seriesIndex?S.getOtherSliceDatatip(this._chart,this._value,!1):S.getDatatip(this._chart,this._seriesIndex,0,null,!1);var i=e.labelPercentage,a=W.generateSlicePercentageString(this);t+="; "+r.ResourceUtils.format(e.labelAndValue,[i,a]);var s=[];return this.isSelectable()&&s.push(e[this.isSelected()?"stateSelected":"stateUnselected"]),c.isDataItemDrillable(this._chart,this._seriesIndex,this._groupIndex)&&s.push(e.stateDrillable),r.Displayable.generateAriaLabel(t,s)},z.prototype._updateAriaLabel=function(){var t=this.getTopDisplayable();t&&!r.Agent.deferAriaCreation()&&t.setAriaProperty("label",this.getAriaLabel())},z.prototype.getTopDisplayable=function(){return this._topSurface&&this._topSurface.length>0?this._topSurface[0]:null},z.prototype.isSelectable=function(){return this._chart.isSelectionSupported()},z.prototype.isSelected=function(){return this._selected},z.prototype.setSelected=function(t,e){if(this._selected=t,this.getTopSurface()){if(this._selected?this._pieChart.bringToFrontOfSelection(this):this._selecting||this._pieChart.pushToBackOfSelection(this),f.isSelectionHighlighted(this._chart))for(var i=this.getDisplayables(),a=0;a<i.length;a++)z._shapeIsSelectable(i[a])&&i[a].setSelected(t);if(f.isSelectionExploded(this._chart)){var s=t?1:0;if(e||"none"==f.getAnimationOnDataChange(this._chart))this.setExplode(s);else{var n=new r.CustomAnimation(this._pieChart.getCtx(),this,this._pieChart.getAnimationDuration()/2);n.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getExplode,this.setExplode,s),n.play()}}this._updateAriaLabel()}},z.prototype.showHoverEffect=function(){this._selecting=!0,this._pieChart.bringToFrontOfSelection(this);for(var t=this.getDisplayables(),e=0;e<t.length;e++)z._shapeIsSelectable(t[e])&&t[e].showHoverEffect()},z.prototype.hideHoverEffect=function(){this._selecting=!1,this._selected||this._pieChart.pushToBackOfSelection(this);for(var t=this.getDisplayables(),e=0;e<t.length;e++)z._shapeIsSelectable(t[e])&&t[e].hideHoverEffect()},z.prototype.getDatatip=function(t,e,i){return t==this._sliceLabel&&this._sliceLabel&&this._sliceLabel.isTruncated()?this.getSliceLabelString():this.getTooltip()},z.prototype.getDatatipColor=function(){return this.getFillColor()},z.prototype.getCategories=function(){return this._categories&&this._categories.length>0?this._categories:[this.getId().series]},z.prototype.getNextNavigable=function(t){var e=t.keyCode;if(t.type==r.MouseEvent.CLICK)return this;if(e==r.KeyboardEvent.SPACE&&t.ctrlKey)return this;var i=r.Agent.isRightToLeft(this._chart.getCtx()),a=this._pieChart.__getSlices(),s=a.indexOf(this),n=null;return e==r.KeyboardEvent.RIGHT_ARROW||e==r.KeyboardEvent.DOWN_ARROW&&!i||e==r.KeyboardEvent.UP_ARROW&&i?n=s<a.length-1?a[s+1]:a[0]:(e==r.KeyboardEvent.LEFT_ARROW||e==r.KeyboardEvent.DOWN_ARROW&&i||e==r.KeyboardEvent.UP_ARROW&&!i)&&(n=0==s?a[a.length-1]:a[s-1]),n},z.prototype.getKeyboardBoundingBox=function(t){var e=this.getDisplayables();return e[0]?e[0].getDimensions(t):new r.Rectangle(0,0,0,0)},z.prototype.getTargetElem=function(){var t=this.getDisplayables();return t[0]?t[0].getElem():null},z.prototype.showKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!0,this.showHoverEffect()},z.prototype.hideKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!1,this.hideHoverEffect()},z.prototype.isShowingKeyboardFocusEffect=function(){return this._isShowingKeyboardFocusEffect},z.prototype.isDragAvailable=function(t){return!0},z.prototype.getDragTransferable=function(t,e){return[this.getId()]},z.prototype.getDragFeedback=function(t,e){if(this._chart.isSelectionSupported()&&this._chart.getSelectionHandler().getSelectedCount()>1){for(var i=this._chart.getSelectionHandler().getSelection(),r=[],a=0;a<i.length;a++)r=r.concat(i[a].getDisplayables());return r}return this.getDisplayables()},z.prototype.getExplode=function(){return this._explode},z.prototype.setExplode=function(t){this._explode=t,this._explodeSlice()},z.prototype.getCustomLabel=function(){return this._customLabel},z.prototype.getSeriesLabel=function(){return this._seriesLabel},z.prototype.getFillColor=function(){return this._fillColor},z.prototype.getFillPattern=function(){return this._fillPattern},z.prototype.getStrokeColor=function(){return this._strokeColor},z.prototype.getBorderWidth=function(){return this._borderWidth},z.prototype.getSliceGaps=function(){return 0==this._depth?3*f.getDataItemGaps(this._chart):0},z.prototype.getInnerRadius=function(){return this._pieChart.getInnerRadius()},z.prototype.getTooltip=function(){return null==this._seriesIndex?S.getOtherSliceDatatip(this._chart,this._value,!0):S.getDatatip(this._chart,this._seriesIndex,0,null,!0)},z.prototype.isDrillable=function(){return this._drillable},z.createFillerSlice=function(t,e){var i=new z(t);return i._value=e,i._bFillerSlice=!0,i._centerX=t.getCenter().x,i._centerY=t.getCenter().y,i._fillColor="rgba(255,255,255,0)",i._strokeColor="rgba(255,255,255,0)",i._id=new h(null,null,null,null),i},z.prototype.getSeriesIndex=function(){return this._seriesIndex};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var X=function(t){this._chart=t,this._options=this._chart.getOptions(),this._legend=this._chart.legend,this._xAxis=this._chart.xAxis,this._yAxis=this._chart.yAxis,this._y2Axis=this._chart.y2Axis,this._legendAutomation=this._legend?this._legend.getAutomation():null,this._xAxisAutomation=this._xAxis?this._xAxis.getAutomation():null,this._yAxisAutomation=this._yAxis?this._yAxis.getAutomation():null,this._y2AxisAutomation=this._y2Axis?this._y2Axis.getAutomation():null};r.Obj.createSubclass(X,r.Automation),X.PLOT_AREA_SUBID="plotArea",X.PIE_CENTER_LABEL_SUBID="pieCenterLabel",X.prototype.GetSubIdForDomElement=function(t){var e=null;if(t.isDescendantOf(this._xAxis))return(e=this._xAxisAutomation.GetSubIdForDomElement(t))?this._convertAxisSubIdToChartSubId(e,"xAxis"):null;if(t.isDescendantOf(this._yAxis))return(e=this._yAxisAutomation.GetSubIdForDomElement(t))?this._convertAxisSubIdToChartSubId(e,"yAxis"):null;if(t.isDescendantOf(this._y2Axis))return(e=this._y2AxisAutomation.GetSubIdForDomElement(t))?this._convertAxisSubIdToChartSubId(e,"y2Axis"):null;if(t.isDescendantOf(this._legend)){var i=this._legendAutomation.GetSubIdForDomElement(t);return i?this._convertLegendSubIdToChartSubId(i):null}var a=this._chart.getEventManager().GetLogicalObject(t);if(!a)return null;if(a instanceof r.SimpleObjPeer){var s=a.getParams().type;if("pieCenterLabel"==s)return X.PIE_CENTER_LABEL_SUBID;if("plotArea"==s)return X.PLOT_AREA_SUBID}if(a instanceof z)return"dataItem["+a.getSeriesIndex()+"]";if(a instanceof y){var n=a.getSeriesIndex(),o=a.getGroupIndex();if(null!=n&&o>=0&&("funnel"!=this._options.type||"pyramid"!=this._options.type))return"dataItem["+n+"]["+o+"]";if(null!=n&&o==H._GROUP_INDEX&&("funnel"==this._options.type||"pyramid"==this._options.type))return"dataItem["+n+"]";if(null!=n&&(null==o||o<0))return"series["+n+"]"}else if(a instanceof C){var l=a.getAxisType(),h=a.getIndex();return l&&h>=0?l+":referenceObject["+h+"]":null}return null},X.prototype._convertLegendSubIdToChartSubId=function(t){var e=this._legend.getOptions(),i=this._legendAutomation.getLegendItem(e,t);if(i){for(var r=0;r<this._options.series.length;r++){if(this._options.series[r].name==i.text)return"series["+r+"]"}return"legend:"+t}return null},X.prototype._convertAxisSubIdToChartSubId=function(t,e){if("title"==t&&e)return e+":"+t;var i=t.substring(t.indexOf("["));return i?"group"+i:null},X.prototype.getDomElementForSubId=function(t){if(t==r.Automation.TOOLTIP_SUBID)return this.GetTooltipElement(this._chart,S.isDataCursorEnabled(this._chart)?v.TOOLTIP_ID:null);if(t==X.PIE_CENTER_LABEL_SUBID)return this._chart.pieChart.getCenterLabel().getElem();if(t==X.PLOT_AREA_SUBID)return this._chart.getPlotArea().getElem();var e,i,a,s=t.indexOf("["),n=t.indexOf("]"),o=t.indexOf(":");if(s>0&&n>0||o>0){var l=o<0?t.substring(0,s):t.substring(0,o);if("group"==l)return this._xAxisAutomation.getDomElementForSubId(t);if("series"==l)return t=this._convertToLegendSubId(t),this._legendAutomation.getDomElementForSubId(t);if("legend"==t.substring(0,o))return t=t.substring(o+1),this._legendAutomation.getDomElementForSubId(t);var h,u=t.substring(s+1,n);if("xAxis"==l||"yAxis"==l||"y2Axis"==l){var g=t.substring(o+1);if("title"==g){if("xAxis"==l)return this._xAxisAutomation.getDomElementForSubId(g);if("yAxis"==l)return this._yAxisAutomation.getDomElementForSubId(g);if("y2Axis"==l)return this._y2AxisAutomation.getDomElementForSubId(g)}else if(e=g.indexOf("["),i=g.indexOf("]"),"referenceObject"==g.substring(0,e)){var d=g.substring(e+1,i);if(a=this._getRefObjPeer(d))return a.getDisplayables()[0].getElem()}}if("pie"==this._options.type){var c=this._chart.pieChart.getSliceDisplayable(u);if(c)return c.getElem()}if("funnel"==this._options.type?h=H._GROUP_INDEX:"pyramid"==this._options.type?h=U._GROUP_INDEX:(e=(t=t.substring(n+1)).indexOf("["),i=t.indexOf("]"),e>=0&&i>=0&&(h=t.substring(e+1,i))),a=this._getChartObjPeer(u,h))return a.getDisplayables()[0].getElem()}return null},X.prototype._getChartObjPeer=function(t,e){for(var i=this._chart.getChartObjPeers(),r=0;r<i.length;r++){var a=i[r].getSeriesIndex(),s=i[r].getGroupIndex();if(a==t&&s==e)return i[r]}return null},X.prototype._getRefObjPeer=function(t){for(var e=this._chart.getRefObjPeers(),i=0;i<e.length;i++)if(t==e[i].getIndex())return e[i];return null},X.prototype._convertToLegendSubId=function(t){var e=t.indexOf("["),i=t.indexOf("]"),r=t.substring(e+1,i),a=this._legend.getOptions(),s=this._options.series[r];return"section"+this._legendAutomation.getIndicesFromSeries(s,a)},X.prototype.getDataItem=function(t,e){"pie"!=this._options.type&&"funnel"!=this._options.type&&"pyramid"!=this._options.type||(e=0);var i=c.getDataItem(this._chart,t,e);return i?{borderColor:f.getBorderColor(this._chart,t,e),color:f.getColor(this._chart,t,e),label:f.getDataLabel(this._chart,t,e),targetValue:c.getTargetValue(this._chart,t,e),tooltip:S.getDatatip(this._chart,t,e,null,!1),value:c.getValue(this._chart,t,e),open:i.open,close:i.close,high:c.getHighValue(this._chart,t,e),low:c.getLowValue(this._chart,t,e),volume:i.volume,x:c.getXValue(this._chart,t,e),y:i.y,z:i.z,min:i.min,max:i.max,group:c.getGroup(this._chart,e),series:c.getSeries(this._chart,t),selected:c.isDataSelected(this._chart,t,e)}:null},X.prototype.getGroup=function(t){return c.getGroup(this._chart,t)},X.prototype.getSeries=function(t){return this._options.series[t].name},X.prototype.getGroupCount=function(){return c.getGroupCount(this._chart)},X.prototype.getSeriesCount=function(){return this._options.series.length},X.prototype.getTitle=function(){return this._options.title.text},X.prototype.getLegend=function(){var t=this._legend.__getBounds(),e=this._legend.localToStage(new r.Point(t.x,t.y));return{bounds:{x:e.x,y:e.y,width:t.w,height:t.h},title:this._legend.getOptions().title}},X.prototype.getPlotArea=function(){var t=this._chart.__getPlotAreaSpace();return{bounds:{x:t.x,y:t.y,width:t.w,height:t.h}}},X.prototype.getXAxis=function(){return this._getAxis("x")},X.prototype.getYAxis=function(){return this._getAxis("y")},X.prototype.getY2Axis=function(){return this._getAxis("y2")},X.prototype._getAxis=function(t){var e="x"==t?this._xAxis:"y"==t?this._yAxis:this._y2Axis;if(e){var i=e.__getBounds(),a=e.localToStage(new r.Point(i.x,i.y)),s={x:a.x,y:a.y,width:i.w,height:i.h},n=this._chart;return{bounds:s,title:this._options[t+"Axis"].title,getPreferredSize:function(i,r){var a,s=e.getOptions(),o=s.position,l=R.getTickLabelGapSize(n,t),h=R.isStandaloneXAxis(n)||R.isStandaloneYAxis(n)||R.isStandaloneY2Axis(n)?2:0;return"top"==o||"bottom"==o?(a=e.getPreferredSize(s,i,r-l-h)).h=Math.ceil(a.h+l+h):(a=e.getPreferredSize(s,i-l-h,r)).w=Math.ceil(a.w+l+h),{width:a.w,height:a.h}}}}return null},r.Automation.prototype.IsTooltipElement=function(t){var e=t.getAttribute("id");return!(!e||0!=e.indexOf(v.TOOLTIP_ID)&&0!=e.indexOf(r.HtmlTooltipManager._TOOLTIP_DIV_ID))};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var K=function t(e){t.superclass.Init.call(this,e.getCtx(),e.processEvent,e,e),this._chart=e,this._dragMode=null,this._dragButtonsVisible=r.Agent.isTouchDevice(),this.panButton=null,this.zoomButton=null,this.selectButton=null,this._dataCursorHandler=null,this._panZoomHandler=null,this._marqueeZoomHandler=null,this._marqueeSelectHandler=null};r.Obj.createSubclass(K,r.EventManager),K.DRAG_MODE_PAN="pan",K.DRAG_MODE_ZOOM="zoom",K.DRAG_MODE_SELECT="select",K.DRAG_MODE_OFF="off",K.prototype.addListeners=function(t){r.SvgDocumentUtils.addDragListeners(this._chart,this._onDragStart,this._onDragMove,this._onDragEnd,this),K.superclass.addListeners.call(this,t),r.Agent.isTouchDevice()||t.addEvtListener(r.MouseEvent.MOUSEWHEEL,this.OnMouseWheel,!1,this)},K.prototype.RemoveListeners=function(t){K.superclass.RemoveListeners.call(this,t),r.Agent.isTouchDevice()||t.removeEvtListener(r.MouseEvent.MOUSEWHEEL,this.OnMouseWheel,!1,this)},K.prototype.getLogicalObject=function(t){return this.GetLogicalObject(t,!0)},K.prototype._getDragHandler=function(t){return t&&"user"==this._chart.getOptions().dragMode&&u.isBLAC(this._chart)&&(this._dragMode==K.DRAG_MODE_PAN||this._dragMode==K.DRAG_MODE_ZOOM)&&(this._panZoomHandler&&this._panZoomHandler.isWithinBounds(t)?this._dragMode=K.DRAG_MODE_PAN:this._dragMode=K.DRAG_MODE_ZOOM),this._dragMode==K.DRAG_MODE_PAN?this._panZoomHandler:this._dragMode==K.DRAG_MODE_ZOOM?this._marqueeZoomHandler:this._dragMode==K.DRAG_MODE_SELECT?this._marqueeSelectHandler:null},K.prototype._onDragStart=function(t){return r.Agent.isTouchDevice()?this._onTouchDragStart(t):this._onMouseDragStart(t)},K.prototype._onDragMove=function(t){return r.Agent.isTouchDevice()?this._onTouchDragMove(t):this._onMouseDragMove(t)},K.prototype._onDragEnd=function(t){return r.Agent.isTouchDevice()?this._onTouchDragEnd(t):this._onMouseDragEnd(t)},K.prototype._onMouseDragStart=function(t){var e,i=this._context.pageToStageCoords(t.pageX,t.pageY),r=this._getDragHandler(i),a=this.GetLogicalObject(t.target);return!(a&&a.isSelectable&&a.isSelectable())&&0==t.button&&r&&((e=r.processDragStart(i,t.ctrlKey))&&this._callback.call(this._callbackObj,e),this._chart.setCursor(r.getCursor(i)),this.setDragButtonsVisible(!1),this._chart!=this.getCtx().getCurrentKeyboardFocus()&&this.getCtx().setCurrentKeyboardFocus(this._chart)),!!e&&(this._dataCursorHandler&&this._dataCursorHandler.processEnd(),!0)},K.prototype._onMouseDragMove=function(t){var e,i=this._context.pageToStageCoords(t.pageX,t.pageY),r=this._getDragHandler();r&&(e=r.processDragMove(i,t.ctrlKey))&&(this._callback.call(this._callbackObj,e),this.setDragButtonsVisible(!1)),e&&t.stopPropagation()},K.prototype._onMouseDragEnd=function(t){var e,i=this._context.pageToStageCoords(t.pageX,t.pageY),r=this._getDragHandler();if(r){(e=r.processDragEnd(i,t.ctrlKey))&&(this._callback.call(this._callbackObj,e),this.autoToggleZoomButton()),this._chart.setCursor(r.getCursor(i));var a=this._chart.__getAxisSpace();a&&this.setDragButtonsVisible(a.containsPoint(i.x,i.y))}},K.prototype.OnMouseMove=function(t){K.superclass.OnMouseMove.call(this,t);var e=this._context.pageToStageCoords(t.pageX,t.pageY);this._dataCursorHandler&&(this.GetLogicalObjectAndDisplayable(t.target).displayable instanceof r.IconButton?this._dataCursorHandler.processEnd():this._dataCursorHandler.processMove(e));var i=this._getDragHandler(e);i?this._chart.setCursor(i.getCursor(e)):this._chart.setCursor("default")},K.prototype.OnMouseOut=function(t){K.superclass.OnMouseOut.call(this,t);var e=this._context.pageToStageCoords(t.pageX,t.pageY),i=this._chart.__getAxisSpace();i&&this.setDragButtonsVisible(i.containsPoint(e.x,e.y)),this._dataCursorHandler&&this._dataCursorHandler.processOut(e);this.GetLogicalObject(t.target)},K.prototype.OnMouseWheel=function(t){if(L.isZoomable(this._chart)){var e=null!=t.wheelDelta?t.wheelDelta:0,i=this._context.pageToStageCoords(t.pageX,t.pageY);if(this._panZoomHandler){var r=this._panZoomHandler.processMouseWheel(i,e);r&&(t.preventDefault(),t.stopPropagation(),this._callback.call(this._callbackObj,r),this._dataCursorHandler&&this._dataCursorHandler.processMove(i))}}},K.prototype.ShowFocusEffect=function(t,e){if(this._dataCursorHandler){var i=e.getDataPosition();if(i){var a=this._chart.__getPlotAreaSpace();this._dataCursorHandler.processMove(new r.Point(i.x+a.x,i.y+a.y))}}K.superclass.ShowFocusEffect.call(this,t,e)},K.prototype.OnBlur=function(t){this._dataCursorHandler&&this._dataCursorHandler.processEnd(),K.superclass.OnBlur.call(this,t)},K.prototype.OnClickInternal=function(t){var e=this.GetLogicalObject(t.target),i=this._context.pageToStageCoords(t.pageX,t.pageY);this.SeriesFocusHandler&&this.SeriesFocusHandler.processSeriesFocus(i,e),e&&(e.isSelectable&&e.isSelectable()||this.processDrillEvent(e))},K.prototype.OnDblClickInternal=function(t){var e=this.GetLogicalObject(t.target);e&&e.isSelectable&&e.isSelectable()&&this.processDrillEvent(e)},K.prototype.HandleTouchHoverStartInternal=function(t){if(this._dataCursorHandler&&!this.isTouchResponseTouchStart()){var e=this._context.pageToStageCoords(t.touch.pageX,t.touch.pageY);return this._dataCursorHandler.processMove(e),!1}var i=this.GetLogicalObject(t.target);return this.TouchManager.setTooltipEnabled(t.touch.identifier,this.getTooltipsEnabled(i)),!1},K.prototype.HandleTouchHoverMoveInternal=function(t){if(this._dataCursorHandler&&!this.isTouchResponseTouchStart()){var e=this._context.pageToStageCoords(t.touch.pageX,t.touch.pageY);return this._dataCursorHandler.processMove(e),!1}var i=this.GetLogicalObject(t.target);return this.TouchManager.setTooltipEnabled(t.touch.identifier,this.getTooltipsEnabled(i)),!1},K.prototype.HandleTouchHoverEndInternal=function(t){this.endDrag();var e=this.GetLogicalObject(t.target);e&&(e.isSelectable&&e.isSelectable()||this.processDrillEvent(e))},K.prototype.HandleTouchClickInternal=function(t){var e=this.GetLogicalObject(t.target);e&&(e.isSelectable&&e.isSelectable()||this.processDrillEvent(e))},K.prototype.HandleTouchDblClickInternal=function(t){var e=this.GetLogicalObject(t.target);e&&e.isSelectable&&e.isSelectable()&&(t.preventDefault(),t.stopPropagation(),this.processDrillEvent(e))},K.prototype.processDrillEvent=function(t){if(t&&t.isDrillable&&t.isDrillable()){var e=t.getId();if(t instanceof y)this.FireEvent(r.EventFactory.newChartDrillEvent(null!=e.id?e.id:e,t.getSeries(),t.getGroup(),"item"));else if(t instanceof z){var i="_dvtOther"===e.series?"multiSeries":"item";this.FireEvent(r.EventFactory.newChartDrillEvent(e.id,e.series,e.group,i))}}},K.prototype.ProcessRolloverEvent=function(t,e,i){var a=this._chart.getOptions();if("dim"==L.getHoverBehavior(this._chart)){var s=e.getCategories?e.getCategories():[];a.highlightedCategories=i?s.slice():null;var n=r.EventFactory.newCategoryHighlightEvent(a.highlightedCategories,i),o=f.getHoverBehaviorDelay(this._chart),l=this._chart.getObjects();this._chart.pieChart&&(l=l.concat(this._chart.pieChart.__getSlices())),this.RolloverHandler.processEvent(n,l,o,"any"==a.highlightMatch)}},K.prototype._onTouchDragStart=function(t){var e,i,r=t.touches;if(1==r.length){var a=this._context.pageToStageCoords(r[0].pageX,r[0].pageY),s=this._getDragHandler();s?e=s.processDragStart(a,!0):this._dataCursorHandler&&this.isTouchResponseTouchStart()&&(this._dataCursorHandler.processMove(a),i=!0)}else if(2==r.length&&this._panZoomHandler&&L.isZoomable(this._chart)){this.endDrag();var n=this._context.pageToStageCoords(r[0].pageX,r[0].pageY),o=this._context.pageToStageCoords(r[1].pageX,r[1].pageY);e=this._panZoomHandler.processPinchStart(n,o)}return e&&(this._callback.call(this._callbackObj,e),this.getCtx().getTooltipManager().hideTooltip()),!(!e&&!i)&&(t.preventDefault(),t.stopPropagation(),this.setDragButtonsVisible(!1),!0)},K.prototype._onTouchDragMove=function(t){var e,i,r=t.touches;if(1==r.length){var a=this._context.pageToStageCoords(r[0].pageX,r[0].pageY),s=this._getDragHandler();s?e=s.processDragMove(a,!0):this._dataCursorHandler&&this.isTouchResponseTouchStart()&&(this._dataCursorHandler.processMove(a),i=!0)}else if(2==r.length&&this._panZoomHandler&&L.isZoomable(this._chart)){var n=this._context.pageToStageCoords(r[0].pageX,r[0].pageY),o=this._context.pageToStageCoords(r[1].pageX,r[1].pageY);e=this._panZoomHandler.processPinchMove(n,o)}(e||i)&&t.preventDefault(),e&&(this._callback.call(this._callbackObj,e),this.getCtx().getTooltipManager().hideTooltip())},K.prototype._onTouchDragEnd=function(t){var e,i=this.endDrag();if(this._panZoomHandler&&L.isZoomable(this._chart)&&(e=this._panZoomHandler.processPinchEnd())&&this._callback.call(this._callbackObj,e),i||e){t.preventDefault(),this.getCtx().getTooltipManager().hideTooltip();var r=this.getTouchManager(),a=1==t.changedTouches.length?t.changedTouches[0].identifier:null,s=null!=a?r.getTouchInfo(a):null;s&&!s.touchMoved||r.reset()}this.setDragButtonsVisible(!0)},K.prototype.endDrag=function(){var t,e=this._getDragHandler();return e&&(t=e.processDragEnd(null,!0)),this._dataCursorHandler&&this._dataCursorHandler.processEnd(),t&&this._callback.call(this._callbackObj,t),t},K.prototype.zoomBy=function(t){if(this._panZoomHandler&&L.isZoomable(this._chart)){var e=this._panZoomHandler.zoomBy(t);e&&this._callback.call(this._callbackObj,e)}},K.prototype.panBy=function(t,e){if(this._panZoomHandler&&L.isScrollable(this._chart)){var i=this._panZoomHandler.panBy(t,e);i&&this._callback.call(this._callbackObj,i)}},K.prototype.hideHoverFeedback=function(){this.hideTooltip(),this._dataCursorHandler&&this._dataCursorHandler.processEnd()},K.prototype.hideTooltip=function(){this._dataCursorHandler&&this._dataCursorHandler.isDataCursorShown()||K.superclass.hideTooltip.call(this)},K.prototype.getTooltipsEnabled=function(t){return(!this._dataCursorHandler||!(t instanceof y||t instanceof C||this._dataCursorHandler.isDataCursorShown()))&&K.superclass.getTooltipsEnabled.call(this)},K.prototype.getDataCursorHandler=function(){return this._dataCursorHandler},K.prototype.setDataCursorHandler=function(t){this._dataCursorHandler=t},K.prototype.setPanZoomHandler=function(t){this._panZoomHandler=t},K.prototype.setMarqueeZoomHandler=function(t){this._marqueeZoomHandler=t},K.prototype.setMarqueeSelectHandler=function(t){this._marqueeSelectHandler=t},K.prototype.getMarqueeGlassPane=function(){return this._dragMode==K.DRAG_MODE_ZOOM?this._marqueeZoomHandler.getGlassPane():this._dragMode==K.DRAG_MODE_SELECT?this._marqueeSelectHandler.getGlassPane():null},K.prototype.cancelMarquee=function(t){this._dragMode==K.DRAG_MODE_ZOOM?this._marqueeZoomHandler.cancelMarquee()&&t.preventDefault():this._dragMode==K.DRAG_MODE_SELECT&&this._marqueeSelectHandler&&this._marqueeSelectHandler.cancelMarquee()&&this._chart.render()},K.prototype.getDragMode=function(){return this._dragMode},K.prototype.setDragMode=function(t){this._dragMode=null==t?this._getDefaultDragMode():t,!this._chart.xAxis.isFullViewport()||this._chart.yAxis&&!this._chart.yAxis.isFullViewport()||this.autoToggleZoomButton()},K.prototype._getDefaultDragMode=function(){return r.Agent.isTouchDevice()?K.DRAG_MODE_OFF:L.isScrollable(this._chart)?K.DRAG_MODE_PAN:"multiple"==this._chart.getOptions().selectionMode?K.DRAG_MODE_SELECT:null},K.prototype.onZoomButtonClick=function(t){this.zoomButton.isToggled()?(this.selectButton&&this.selectButton.setToggled(!1),this.setDragMode(K.DRAG_MODE_ZOOM)):this.setDragMode(null)},K.prototype.onPanButtonClick=function(t){this.panButton.isToggled()?(this.selectButton&&this.selectButton.setToggled(!1),this.setDragMode(K.DRAG_MODE_PAN)):this.setDragMode(null)},K.prototype.onSelectButtonClick=function(t){this.selectButton.isToggled()?(this.zoomButton&&this.zoomButton.setToggled(!1),this.panButton&&this.panButton.setToggled(!1),this.setDragMode(K.DRAG_MODE_SELECT)):this.setDragMode(null)},K.prototype.setDragButtonsVisible=function(t){t&&!this._dragButtonsVisible?(this._chart.showDragButtons(),this._dragButtonsVisible=!0):!t&&this._dragButtonsVisible&&(this._chart.hideDragButtons(),this._dragButtonsVisible=!1)},K.prototype.areDragButtonsVisible=function(){return this._dragButtonsVisible},K.prototype.autoToggleZoomButton=function(){!r.Agent.isTouchDevice()&&this.zoomButton&&(this._chart.xAxis.isFullViewport()&&this._chart.yAxis.isFullViewport()?this._dragMode==K.DRAG_MODE_PAN&&(this.zoomButton.setToggled(!0),this.onZoomButtonClick(null)):this._dragMode==K.DRAG_MODE_ZOOM&&(this.zoomButton.setToggled(!1),this.onZoomButtonClick(null)))},K.prototype.GetTouchResponse=function(){return this._dragMode&&this._dragMode!=K.DRAG_MODE_OFF?r.EventManager.TOUCH_RESPONSE_TOUCH_HOLD:this._chart.getOptions().touchResponse},K.prototype.isDndSupported=function(){return!0},K.prototype.GetDragSourceType=function(t){var e=this.DragSource.getDragObject();return e instanceof y&&e.getSeriesIndex()>=0&&e.getGroupIndex()>=0||e instanceof z?"items":null},K.prototype.GetDragDataContexts=function(t){if(this._chart.isSelectionSupported()&&this._chart.getSelectionHandler().getSelectedCount()>1){for(var e=this._chart.getSelectionHandler().getSelection(),i=[],a=0;a<e.length;a++){var s=f.getDataContext(this._chart,e[a].getSeriesIndex(),e[a].getGroupIndex(),e[a].getNestedDataItemIndex());t&&r.ToolkitUtils.cleanDragDataContext(s),i.push(s)}return i}var n=this.DragSource.getDragObject(),o=null;return n instanceof y&&(o=f.getDataContext(this._chart,n.getSeriesIndex(),n.getGroupIndex(),n.getNestedDataItemIndex())),n instanceof z&&(o=f.getDataContext(this._chart,n.getSeriesIndex(),0)),o&&t&&r.ToolkitUtils.cleanDragDataContext(o),o?[o]:null},K.prototype.GetDropOffset=function(t){var e=this.DragSource.getDragObject();if(e instanceof y){var i=e.getDataPosition();if(i){i=this._chart.getPlotArea().localToStage(i);var a=this._context.pageToStageCoords(t.pageX,t.pageY);return new r.Point(i.x-a.x,i.y-a.y)}}return null},K.prototype.GetDropTargetType=function(t){var e=this._context.pageToStageCoords(t.pageX,t.pageY),i=this._chart.getOptions().dnd.drop,r=this._chart.__getPlotAreaSpace();return Object.keys(i.plotArea).length>0&&r.containsPoint(e.x,e.y)?"plotArea":Object.keys(i.xAxis).length>0&&R.isAxisRendered(this._chart,"x")&&R.axisContainsPoint(this._chart.xAxis,e)?"xAxis":Object.keys(i.yAxis).length>0&&R.isAxisRendered(this._chart,"y")&&R.axisContainsPoint(this._chart.yAxis,e)?"yAxis":Object.keys(i.y2Axis).length>0&&R.isAxisRendered(this._chart,"y2")&&R.axisContainsPoint(this._chart.y2Axis,e)?"y2Axis":null},K.prototype.GetDropEventPayload=function(t){var e=t.getNativeEvent().dataTransfer,i=Number(e.getData(r.EventManager.DROP_OFFSET_X_DATA_TYPE))||0,a=Number(e.getData(r.EventManager.DROP_OFFSET_Y_DATA_TYPE))||0,s=this._context.pageToStageCoords(t.pageX,t.pageY);return this._chart.getValuesAt(s.x+i,s.y+a)},K.prototype.ShowDropEffect=function(t){var e=this._getDropObject(t);e&&(e.setClassName("oj-active-drop"),e.setSolidFill(this._chart.getOptions()._dropColor))},K.prototype.ClearDropEffect=function(){var t=this._chart.getCache().getFromCache("plotAreaBackground");if(t){var e=f.getBackgroundColor(this._chart);e?t.setSolidFill(e):t.setInvisibleFill(),r.ToolkitUtils.removeClassName(t.getElem(),"oj-invalid-drop"),r.ToolkitUtils.removeClassName(t.getElem(),"oj-active-drop")}var i=function(t){if(t){var e=t.getCache().getFromCache("background");e&&(e.setInvisibleFill(),r.ToolkitUtils.removeClassName(e.getElem(),"oj-invalid-drop"),r.ToolkitUtils.removeClassName(e.getElem(),"oj-active-drop"))}};i(this._chart.xAxis),i(this._chart.yAxis),i(this._chart.y2Axis)},K.prototype.ShowRejectedDropEffect=function(t){var e=this._getDropObject(t);e&&e.setClassName("oj-invalid-drop")},K.prototype._getDropObject=function(t){var e,i=this.GetDropTargetType(t);return"plotArea"==i?e=this._chart.getCache().getFromCache("plotAreaBackground"):"xAxis"==i?e=this._chart.xAxis.getCache().getFromCache("background"):"yAxis"==i?e=this._chart.yAxis.getCache().getFromCache("background"):"y2Axis"==i&&(e=this._chart.y2Axis.getCache().getFromCache("background")),e};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Z=function(t,e){this.Init(t,e)};r.Obj.createSubclass(Z,r.KeyboardHandler),Z.prototype.Init=function(t,e){Z.superclass.Init.call(this,t),this._chart=e},Z.prototype.isSelectionEvent=function(t){return this.isNavigationEvent(t)&&!t.ctrlKey},Z.prototype.isMultiSelectEvent=function(t){return t.keyCode==r.KeyboardEvent.SPACE&&t.ctrlKey},Z.prototype.processKeyDown=function(t){var e=t.keyCode;if(e==r.KeyboardEvent.TAB){if(a=this._eventManager.getFocus())return r.EventManager.consumeEvent(t),a;var i=N.getKeyboardNavigables(this._chart);if(i.length>0)return r.EventManager.consumeEvent(t),this.getDefaultNavigable(i)}else if(e==r.KeyboardEvent.ENTER){var a;if(a=this._eventManager.getFocus())return this._eventManager.processDrillEvent(a),r.EventManager.consumeEvent(t),a}else e==r.KeyboardEvent.ESCAPE?this._eventManager.cancelMarquee(t):e==r.KeyboardEvent.PAGE_UP?((t.ctrlKey||t.shiftKey||u.isBLAC(this._chart))&&u.isVertical(this._chart)?this._eventManager.panBy(-.25,0):this._eventManager.panBy(0,-.25),r.EventManager.consumeEvent(t)):e==r.KeyboardEvent.PAGE_DOWN?((t.ctrlKey||t.shiftKey||u.isBLAC(this._chart))&&u.isVertical(this._chart)?this._eventManager.panBy(.25,0):this._eventManager.panBy(0,.25),r.EventManager.consumeEvent(t)):r.KeyboardEvent.isEquals(t)||r.KeyboardEvent.isPlus(t)?this._eventManager.zoomBy(1.5):(r.KeyboardEvent.isMinus(t)||r.KeyboardEvent.isUnderscore(t))&&this._eventManager.zoomBy(1/1.5);return Z.superclass.processKeyDown.call(this,t)},Z.prototype.getDefaultNavigable=function(t){if(!t||t.length<=0)return null;for(var e,i,r,a,s=u.isPie(this._chart),n=0;n<t.length;n++)a=t[n],!e||a.getSeriesIndex()<i?(e=a,i=a.getSeriesIndex(),s||(r=a.getGroupIndex())):!s&&a.getGroupIndex()<r&&(e=a,i=a.getSeriesIndex(),r=a.getGroupIndex());return e};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var q=function(t,e){this.Init(t,e)};r.Obj.createSubclass(q,r.Obj),q.prototype.animateUpdate=function(t,e){var i=e._shape;this._shape&&this._shape.getUpdateAnimation&&t.add(this._shape.getUpdateAnimation(this._updateDuration,i),1)},q.prototype.animateInsert=function(t){if(this._shape&&this._shape.getInsertAnimation)t.add(this._shape.getInsertAnimation(this._insertDuration),2);else{var e=new r.AnimFadeIn(this._shape.getCtx(),this._shape,this._insertDuration);t.add(e,0)}},q.prototype.animateDelete=function(t,e){if(e.addChild(this._shape),this._shape&&this._shape.getDeleteAnimation)t.add(this._shape.getDeleteAnimation(this._deleteDuration),0);else{var i=new r.AnimFadeOut(this._shape.getCtx(),this._shape,this._deleteDuration);t.add(i,0)}},q.prototype.getId=function(){return this._animId},q.prototype.setId=function(t){this._animId=t},q.prototype.Init=function(t,e){this._peer=t,this._updateDuration=.75*e,this._insertDuration=.5*e,this._deleteDuration=.5*e,this._shape=t.getDisplayables()[0],this._animId=t.getDataItemId()||t.getSeries()+"/"+t.getGroup()},q.prototype.setOldChart=function(t){this._oldChart=t};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Q=new Object;r.Obj.createSubclass(Q,r.Obj),Q.DIR_UP=0,Q.DIR_DOWN=1,Q.DIR_NOCHANGE=2,Q.makeIndicator=function(t,e,i,r,a,s){if(u.isPolar(r))return null;var n=Q.getDirection(t,e,i,r,a,s);if(n==Q.DIR_NOCHANGE)return null;var o=n===Q.DIR_DOWN,l=o?f.getAnimationDownColor(r):f.getAnimationUpColor(r),h=Q._drawIndicator(r.getCtx(),o,u.isHorizontal(r),l);return r.getPlotArea().addChild(h),h},Q.getDirection=function(t,e,i,r,a,s){var n=c.getValue(t,e,i),o=c.getValue(r,a,s);return null==o||null==n||o==n?Q.DIR_NOCHANGE:o>n?Q.DIR_UP:Q.DIR_DOWN},Q._drawIndicator=function(t,e,i,a){var s;i?s=(r.Agent.isRightToLeft(t)?!e:e)?"M3.5,-5L3.5,5L-3.5,0L3.5,-5":"M-3.5,-5L-3.5,5L3.5,0L-3.5,-5":s=e?"M-5,-3.5L5,-3.5L0,3.5L-5,-3.5Z":"M-5,3.5L5,3.5L0,-3.5L-5,3.5Z";var n=e?"oj-chart-animation-down":"oj-chart-animation-up",o=new r.Path(t,s);return o.setClassName(n),o.setStyle({fill:a}),o};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var J=function(t,e){this.Init(t,e)};r.Obj.createSubclass(J,q),J.prototype.Init=function(t,e){J.superclass.Init.call(this,t,e),this._indicator=null,this._animId+="/bar"},J.prototype.animateInsert=function(t){var e=this._shape.getInsertAnimation(this._insertDuration);t.add(e,2)},J.prototype.animateDelete=function(t,e){e.addChild(this._shape);var i=this._shape.getDeleteAnimation(this._deleteDuration);t.add(i,0)},J.prototype.animateUpdate=function(t,e){var i=this._oldChart,a=this._peer.getChart(),s=u.isHorizontal(i)!=u.isHorizontal(a),n=e._getAnimationParams(s),o=this._getAnimationParams(),l=e._shape.getPrimaryFill(),h=this._shape.getPrimaryFill(),g=e._shape.isSelected()||this._shape.isSelected()||l.equals(h);if(!r.ArrayUtils.equals(n,o)||!l.equals(h)){var d=this._peer.getSeriesIndex(),c=e._peer.getSeriesIndex(),p=this._peer.getGroupIndex(),_=e._peer.getGroupIndex();"none"!==f.getAnimationIndicators(a)&&(this._indicator=Q.makeIndicator(i,c,_,a,d,p)),this._setAnimationParams(n),g||this._shape.setFill(l);var v=new r.CustomAnimation(this._shape.getCtx(),this,this._updateDuration);v.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,o),g||v.getAnimator().addProp(r.Animator.TYPE_FILL,this._shape,this._shape.getFill,this._shape.setFill,h),this._indicator&&(v.setOnEnd(this._onEndAnimation,this),this._indicator.setAlpha(0)),t.add(v,1)}},J.prototype._getAnimationParams=function(t){return this._shape.getAnimationParams(t)},J.prototype._setAnimationParams=function(t){this._shape.setAnimationParams(t,this._indicator)},J.prototype._onEndAnimation=function(){this._indicator&&(this._indicator.getParent().removeChild(this._indicator),this._indicator=null)};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var $=function(t,e){this.Init(t,e)};r.Obj.createSubclass($,q),$.prototype.Init=function(t,e){$.superclass.Init.call(this,t,e),this._animId+="/boxAndWhisker"};
/**
   * @license
   * Copyright (c) 2013 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var tt=function(t,e){this.Init(t,e)};r.Obj.createSubclass(tt,q),tt.prototype.animateUpdate=function(t,e){var i=this._shape,a=e._shape.getAnimationParams(),s=i.getAnimationParams(),n=e._shape.getFill(),o=this._shape.getFill();if(!r.ArrayUtils.equals(a,s)||!n.equals(o)){i.setAnimationParams(a);var l=new r.CustomAnimation(i.getCtx(),this,this._updateDuration);l.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,i,i.getAnimationParams,i.setAnimationParams,s),n.equals(o)||(this._shape.setFill(n),l.getAnimator().addProp(r.Animator.TYPE_FILL,i,i.getFill,i.setFill,o)),this._indicator&&l.setOnEnd(this._onEndAnimation,this),t.add(l,1)}},tt.prototype.animateInsert=function(t){var e=this._shape,i=e.getAnimationParams(),a=i.slice(0);a[0]+=a[1]/2,a[1]=0,a[3]=0,e.setAnimationParams(a);var s=new r.CustomAnimation(e.getCtx(),this,this._insertDuration);s.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getAnimationParams,e.setAnimationParams,i),t.add(s,2)},tt.prototype.animateDelete=function(t,e){var i=this._shape;e.setClipPath(null),e.addChild(i);var a=i.getAnimationParams(),s=a.slice(0);s[0]+=a[1]/2,s[1]=0,s[3]=0;var n=new r.CustomAnimation(i.getCtx(),this,this._deleteDuration);n.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,i,i.getAnimationParams,i.setAnimationParams,s),t.add(n,0)},tt.prototype.Init=function(t,e){tt.superclass.Init.call(this,t,e),this._animId+="/funnel"};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var et=function(t,e){this.Init(t,e)};r.Obj.createSubclass(et,q),et.prototype.animateUpdate=function(t,e){this._baseCoords=this._shape.getBaseCoords(),this._coords=this._shape.getCoords();var i,a,s=this._shape.isArea(),n=this._oldChart,o=this._chart,l=this._peer.getSeriesIndex(),h=e._peer.getSeriesIndex(),u=this._shape.getCommonGroupIndices(e._shape),g=e._shape.getCommonGroupIndices(this._shape);if(s){var d=e._getBaseAnimationParams(this._shape),p=this._getBaseAnimationParams(e._shape);et._matchGroupIndices(d,p),r.ArrayUtils.equals(d,p)||(this._setBaseAnimationParams(d),(i=new r.CustomAnimation(this._context,this,this._updateDuration)).getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getBaseAnimationParams,this._setBaseAnimationParams,p))}var _=e._getAnimationParams(this._shape),v=this._getAnimationParams(e._shape);et._matchGroupIndices(_,v),r.ArrayUtils.equals(_,v)||(this._setAnimationParams(_),(a=new r.CustomAnimation(this._context,this,this._updateDuration)).getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,v));var m=c.getSeriesType(this._peer.getChart(),l);if("none"!==f.getAnimationIndicators(o)&&(!s||"lineWithArea"!=m))for(var S,y,C=0;C<u.length;C++)S=Q.getDirection(n,h,g[C],o,l,u[C]),(y=Q.makeIndicator(n,h,g[C],o,l,u[C]))&&this._shape.addIndicator(u[C],S,y);if(i||a){var x=new r.ParallelPlayable(this._context,i,a);x.setOnEnd(this._onAnimationEnd,this),t.add(x,1)}},et.prototype.animateInsert=function(t){this._shape.setAlpha(0);var e=new r.AnimFadeIn(this._context,this._shape,this._insertDuration);t.add(e,2)},et.prototype.animateDelete=function(t,e){var i;if("area"==c.getSeriesType(this._oldChart,this._peer.getSeriesIndex())){var a=this._chart.__getAreaContainer();if(this._deletedAreas=this._shape.getParent().getParent(),!a)return;a.addChild(this._deletedAreas),(i=new r.AnimFadeOut(this._context,this._deletedAreas,this._deleteDuration)).setOnEnd(this._removeDeletedAreas,this),t.add(i,0)}else e.addChild(this._shape),i=new r.AnimFadeOut(this._context,this._shape,this._deleteDuration),t.add(i,0)},et.prototype._removeDeletedAreas=function(){var t=this._chart.__getAreaContainer();t&&t.removeChild(this._deletedAreas)},et.prototype._getAnimationParams=function(t){return this._shape.getAnimationParams(t)},et.prototype._setAnimationParams=function(t){this._shape.setAnimationParams(t)},et.prototype._getBaseAnimationParams=function(t){return this._shape.getBaseAnimationParams(t)},et.prototype._setBaseAnimationParams=function(t){this._shape.setBaseAnimationParams(t)},et.prototype._onAnimationEnd=function(){this._shape.removeIndicators(),this._shape.setCoords(this._coords,this._baseCoords)},et._matchGroupIndices=function(t,e){for(var i=3;i<t.length;i+=4)t[i]=e[i]},et.prototype.Init=function(t,e){et.superclass.Init.call(this,t,e),this._context=this._shape.getCtx(),this._chart=this._peer.getChart(),this._animId+="/"+(this._shape.isArea()?"area":"line")};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var it=function(t,e){this.Init(t,e)};r.Obj.createSubclass(it,q),it.prototype.animateUpdate=function(t,e){var i=e._shape.getCenterDimensions(),a=this._shape.getCenterDimensions();if(!a.equals(i)){this._shape.setCenterDimensions(i);var s=new r.CustomAnimation(this._shape.getCtx(),this,this._updateDuration);s.getAnimator().addProp(r.Animator.TYPE_RECTANGLE,this._shape,this._shape.getCenterDimensions,this._shape.setCenterDimensions,a);var n=this._peer.getChart();if(this.isValueChange(e)&&"none"!=f.getAnimationIndicators(n)&&u.isScatterBubble(n)){var o=e._shape;o.setAlpha(.9),o.setClassName("oj-chart-animation-marker"),o.setCenterDimensions(i),this._peer.getChart().getPlotArea().addChild(o),s.getAnimator().addProp(r.Animator.TYPE_RECTANGLE,o,o.getCenterDimensions,o.setCenterDimensions,a),s.getAnimator().addProp(r.Animator.TYPE_NUMBER,o,o.getAlpha,o.setAlpha,0),this._overlay=o,s.setOnEnd(this._onEndAnimation,this)}t.add(s,1)}},it.prototype.animateInsert=function(t){this._shape.setAlpha(0);var e=new r.AnimFadeIn(this._shape.getCtx(),this._shape,this._insertDuration);t.add(e,2)},it.prototype.animateDelete=function(t,e){e.addChild(this._shape);var i=new r.AnimFadeOut(this._shape.getCtx(),this._shape,this._deleteDuration);t.add(i,0)},it.prototype.isValueChange=function(t){var e=!1;if(t){var i=t._peer.getSeriesIndex(),r=t._peer.getGroupIndex(),a=this._peer.getSeriesIndex(),s=this._peer.getGroupIndex(),n=t._oldChart.getOptions(),o=this._peer.getChart().getOptions(),l=n.series[i].items[r].x,h=n.series[i].items[r].y,u=n.series[i].items[r].z,g=o.series[a].items[s].x,d=o.series[a].items[s].y,c=o.series[a].items[s].z;e=g!==l||d!==h||c!==u}return e},it.prototype._onEndAnimation=function(){this._overlay&&(this._peer.getChart().getPlotArea().removeChild(this._overlay),this._overlay=null)},it.prototype.Init=function(t,e){it.superclass.Init.call(this,t,e),this._animId+="/marker"};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var rt=function(t,e){this.Init(t,e)};r.Obj.createSubclass(rt,q),rt.prototype.animateUpdate=function(t,e){var i=this._shape,a=e._shape.getAnimationParams(),s=i.getAnimationParams(),n=e._shape.getPrimaryFill(),o=this._shape.getPrimaryFill();if(!r.ArrayUtils.equals(a,s)||!n.equals(o)){i.setAnimationParams(a);var l=new r.CustomAnimation(i.getCtx(),this,this._updateDuration);l.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,i,i.getAnimationParams,i.setAnimationParams,s),n.equals(o)||(this._shape.setFill(n),l.getAnimator().addProp(r.Animator.TYPE_FILL,i,i.getFill,i.setFill,o)),t.add(l,1)}},rt.prototype.animateInsert=function(t){var e=this._shape,i=e.getAnimationParams(),a=i.slice(0);a[1]=0,a[2]=0,e.setAnimationParams(a);var s=new r.CustomAnimation(e.getCtx(),this,this._insertDuration);s.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getAnimationParams,e.setAnimationParams,i),t.add(s,2)},rt.prototype.animateDelete=function(t,e){var i=this._shape;e.setClipPath(null),e.addChild(i);var a=i.getAnimationParams().slice(0);a[1]=0,a[2]=0;var s=new r.CustomAnimation(i.getCtx(),this,this._deleteDuration);s.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,i,i.getAnimationParams,i.setAnimationParams,a),t.add(s,0)},rt.prototype.Init=function(t,e){rt.superclass.Init.call(this,t,e),this._animId+="/pyramid"};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var at=function(t,e){this.Init(t,e)};r.Obj.createSubclass(at,q),at.prototype.Init=function(t,e){at.superclass.Init.call(this,t,e),this._animId+="/rangeMarker"},at.prototype.animateInsert=function(t){this._shape.setAlpha(0);var e=new r.AnimFadeIn(this._shape.getCtx(),this._shape,this._insertDuration);t.add(e,2)},at.prototype.animateDelete=function(t,e){e.addChild(this._shape);var i=new r.AnimFadeOut(this._shape.getCtx(),this._shape,this._deleteDuration);t.add(i,0)},at.prototype.animateUpdate=function(t,e){var i=e._shape.getAnimationParams(),a=this._shape.getAnimationParams();this._shape.setAnimationParams(i);var s=new r.CustomAnimation(this._shape.getCtx(),this,this._updateDuration);s.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._shape,this._shape.getAnimationParams,this._shape.setAnimationParams,a),t.add(s,1)};
/**
   * @license
   * Copyright (c) 2011 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var st=function(t,e,i){this._x1=Math.min(e[0],e[4]),this._x2=Math.max(e[0],e[4]),this._y1=Math.min(e[1],e[5]),this._y2=Math.max(e[1],e[5]),this.Init(t,[this._x1,this._y1,this._x2,this._y1,this._x2,this._y2,this._x1,this._y2],i)};r.Obj.createSubclass(st,r.Polygon),st.OUTER_BORDER_WIDTH=2,st.OUTER_BORDER_WIDTH_HOVER=1.25,st.INNER_BORDER_WIDTH=1,st.prototype.setStyleProperties=function(t,e,i,a,s,n,o){this._fill=t,this._borderStroke=e,this._hoverColor=r.SelectionEffectUtils.getHoverBorderColor(i),this._innerColor=a,this._outerColor=s,this._shapeClassName=n,this._shapeStyle=o,this.setStyle(o).setClassName(n),this.setFill(t),e&&this.setStroke(e)},st.prototype.setAnimationParams=function(t){this._x1=Math.min(t[0],t[4]),this._x2=Math.max(t[0],t[4]),this._y1=Math.min(t[1],t[5]),this._y2=Math.max(t[1],t[5]),this.setPoints(t),this._initializeSelectionEffects()},st.prototype.showHoverEffect=function(){if(!this.IsShowingHoverEffect)if(this.IsShowingHoverEffect=!0,"redwood"===this.getCtx().getThemeBehavior()){if(!this.isSelected()){var t=this.getFill().getColor();this._showNestedBorders(t,this._innerColor)}}else this._showNestedBorders(this._hoverColor,this._innerColor)},st.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect&&(this.IsShowingHoverEffect=!1,"redwood"===this.getCtx().getThemeBehavior()?this.isSelected()||this._showNestedBorders():this.isSelected()?this._showNestedBorders(this._outerColor,this._innerColor):this._showNestedBorders())},st.prototype.setSelected=function(t){if(this.IsSelected!=t)if(this.IsSelected=t,"redwood"===this.getCtx().getThemeBehavior()){var e=this.getPrimaryFill().getColor();this.isSelected()?this._showNestedBorders(this._outerColor,this._innerColor):this.isHoverEffectShown()?this._showNestedBorders(e,this._innerColor):this._showNestedBorders()}else this.isHoverEffectShown()?this._showNestedBorders(this._hoverColor,this._innerColor):this.isSelected()?this._showNestedBorders(this._outerColor,this._innerColor):this._showNestedBorders()},st.prototype.UpdateSelectionEffect=function(){},st.prototype.getPrimaryFill=function(){return this._fill},st.prototype._initializeSelectionEffects=function(){var t=this.isSelected()?st.OUTER_BORDER_WIDTH:st.OUTER_BORDER_WIDTH_HOVER,e=this._createPointsArray(t),i=this._createPointsArray(t+st.INNER_BORDER_WIDTH);if(this.OuterChild)return this.OuterChild.setPoints(e),void this.InnerChild.setPoints(i);this.OuterChild=new r.Polygon(this.getCtx(),e),this.OuterChild.setInvisibleFill(),this.OuterChild.setMouseEnabled(!0),this.addChild(this.OuterChild),this.InnerChild=new r.Polygon(this.getCtx(),i),this.InnerChild.setInvisibleFill(),this.InnerChild.setMouseEnabled(!0),this.addChild(this.InnerChild)},st.prototype._showNestedBorders=function(t,e){this._initializeSelectionEffects(),e?(this.setSolidFill(t),this.setStroke(null),this.setClassName().setStyle(),this.OuterChild.setSolidFill(e),this.OuterChild.setClassName().setStyle(),this.InnerChild.setFill(this._fill),this.InnerChild.setClassName(this._shapeClassName).setStyle(this._shapeStyle)):t?(this.setSolidFill(t),this.setStroke(null),this.setClassName().setStyle(),this.OuterChild.setFill(this._fill),this.OuterChild.setClassName(this._shapeClassName).setStyle(this._shapeStyle),this.InnerChild.setInvisibleFill(),this.InnerChild.setClassName().setStyle()):(this.setFill(this._fill),this.setStroke(this._borderStroke),this.setClassName(this._shapeClassName).setStyle(this._shapeStyle),this.OuterChild.setInvisibleFill(),this.OuterChild.setClassName().setStyle(),this.InnerChild.setInvisibleFill(),this.InnerChild.setClassName().setStyle())},st.prototype._createPointsArray=function(t){var e=this._x1+t,i=this._x2-t,r=this._y1+t,a=this._y2-t;return[e,r,i,r,i,a,e,a]};
/**
   * @license
   * Copyright (c) 2011 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var nt=function(t,e,i,r,a,s,n){n||this.Init(t.getCtx()),this._bHoriz=u.isHorizontal(t),this._bStacked=c.isStacked(t),this._barGapRatio=B.getBarGapRatio(t),this._dataItemGaps=f.getDataItemGaps(t),this._axisCoord=e,this._doNotRender=!!n,this._setBarCoords(i,r,a,s,!0)};r.Obj.createSubclass(nt,st),nt._INDICATOR_OFFSET=8,nt._MIN_BAR_WIDTH_FOR_GAPS=5,nt._MIN_BAR_WIDTH_FOR_GAPS_PIXEL_HINTING=15,nt._MIN_BAR_LENGTH_FOR_GAPS=5,nt._MAX_GAP_SIZE=2,nt.prototype.setSelected=function(t){if(this.IsSelected!=t){if(this.IsSelected=t,"redwood"===this.getCtx().getThemeBehavior())var e=this.getPrimaryFill().getColor();else e=this._hoverColor;this.isSelected()?(this._tempX1=this._x1,this._tempX2=this._x2,this._tempBaselineCoord=this._baselineCoord,this._x1=this._origX1,this._x2=this._origX2,this._baselineCoord=this._origBaselineCoord,this.setPoints(this._createPointsArray()),"redwood"===this.getCtx().getThemeBehavior()?this._showNestedBorders(this._outerColor,this._innerColor):this._showNestedBorders(this.isHoverEffectShown()?e:this._outerColor,this._innerColor)):(this._x1=this._tempX1,this._x2=this._tempX2,this._baselineCoord=this._tempBaselineCoord,this.setPoints(this._createPointsArray()),"redwood"===this.getCtx().getThemeBehavior()?this.isHoverEffectShown()?this._showNestedBorders(e,this._innerColor):this._showNestedBorders(null):this._showNestedBorders(this.isHoverEffectShown()?e:null))}},nt.prototype.getAnimationParams=function(t){return t?this._bHoriz?[this._x2,this._x1,this._baselineCoord,this._endCoord]:[this._x1,this._x2,this._endCoord,this._baselineCoord]:[this._baselineCoord,this._endCoord,this._x1,this._x2]},nt.prototype.setAnimationParams=function(t,e){if(this._setBarCoords(t[0],t[1],t[2],t[3],!1),e){var i=this.getIndicatorPosition();e.setTranslate(i.x,i.y),e.setAlpha(1),e.getParent().addChild(e)}},nt.prototype.getDisplayAnimation=function(t){var e=this.getAnimationParams();this.setAnimationParams([this._axisCoord,this._axisCoord,this._x1,this._x2]);var i=new r.CustomAnimation(this.getCtx(),this,t);return i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,e),i},nt.prototype.getDeleteAnimation=function(t){var e=[this._baselineCoord,this._baselineCoord,this._x1,this._x2],i=new r.CustomAnimation(this.getCtx(),this,t);return i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,e),i.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0),i},nt.prototype.getInsertAnimation=function(t){this.setAlpha(0);var e=this.getDisplayAnimation(t);return e.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,1),e},nt.prototype.getIndicatorPosition=function(){var t,e,i=(this._x1+this._x2)/2;if(this._bStacked){var a=(this._endCoord+this._baselineCoord)/2;t=this._bHoriz?a:i,e=this._bHoriz?i:a}else{var s=this._endCoord>=this._baselineCoord?this._endCoord+nt._INDICATOR_OFFSET:this._endCoord-nt._INDICATOR_OFFSET;t=this._bHoriz?s:i,e=this._bHoriz?i:s}return new r.Point(t,e)},nt.prototype._setBarCoords=function(t,e,i,a,s){this._baselineCoord=t,this._endCoord=e,this._x1=i,this._x2=a;var n=this._x2-this._x1;if(n<1&&(this._x1=Math.floor(this._x1),this._x2=this._x1+1,n=1),this._origX1=this._x1,this._origX2=this._x2,this._origBaselineCoord=this._baselineCoord,this._origSize=this._x2-this._x1,this._dataItemGaps>0&&s&&!this.isSelected()){var o=Math.ceil(nt._MAX_GAP_SIZE*this._dataItemGaps),l=Math.abs(this._baselineCoord-this._endCoord),h=this._axisCoord==this._baselineCoord;l>=nt._MIN_BAR_LENGTH_FOR_GAPS&&this._bStacked&&!h&&(this._baselineCoord+=this._endCoord>this._baselineCoord?o:-o),n>=nt._MIN_BAR_WIDTH_FOR_GAPS&&(1==r.Agent.getDevicePixelRatio()&&this._barGapRatio>0&&n>nt._MIN_BAR_WIDTH_FOR_GAPS_PIXEL_HINTING?("firefox"===r.Agent.browser||this._doNotRender||this.setPixelHinting(!0),this._x1=Math.round(this._x1),this._x2=Math.round(this._x2),this._origX1=this._x1,this._origX2=this._x2,this._x2-=o):(this._x1+=o/2,this._x2-=o/2),this._origSize-=o)}if(!this._doNotRender){var u=this._createPointsArray();this.setPoints(u),this.OuterChild&&this.OuterChild.setPoints(this._createPointsArray(st.OUTER_BORDER_WIDTH)),this.InnerChild&&this.InnerChild.setPoints(this._createPointsArray(st.OUTER_BORDER_WIDTH+st.INNER_BORDER_WIDTH))}},nt.prototype._createPointsArray=function(t){var e=this._baselineCoord,i=this._endCoord,r=this._x1,a=this._x2;if(t>0){if(Math.abs(r-a)<2*t||Math.abs(e-i)<2*t)return[];r+=t,a-=t,i<e?(e-=t,i+=t):(e+=t,i-=t)}return this._bHoriz?[i,r,i,a,e,a,e,r]:[r,i,a,i,a,e,r,e]},nt.prototype.getBoundingBox=function(){var t=Math.min(this._x2,this._x1),e=Math.min(this._endCoord,this._baselineCoord),i=Math.abs(this._x2-this._x1),a=Math.abs(this._endCoord-this._baselineCoord);return this._bHoriz?new r.Rectangle(e,t,a,i):new r.Rectangle(t,e,i,a)},nt.prototype.getOriginalBarSize=function(){return this._origSize},nt.prototype.getDimensionsSelf=function(t){return this.ConvertCoordSpaceRect(this.getBoundingBox(),t)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var ot=function(t,e,i,a,s,n,o,l,h){this.Init(t.getCtx()),this._chart=t,this._bHoriz=u.isHorizontal(t),this._styleOptions=h,this._innerColor=f.getSelectedInnerColor(this._chart),this._outerColor=f.getSelectedOuterColor(this._chart),this._hoverColor=r.SelectionEffectUtils.getHoverBorderColor(this._styleOptions._color);var g=e-i/2,d=e+i/2;f.getDataItemGaps(t)>0&&i>nt._MIN_BAR_WIDTH_FOR_GAPS&&d--,this._render(g,d,a,s,n,o,l)};r.Obj.createSubclass(ot,r.Shape),ot.prototype._render=function(t,e,i,a,s,n,o){this._cleanUp();var l=this.getCtx();this._x1=Math.round(t),this._x2=Math.round(e),this._low=Math.round(i),this._q1=Math.round(a),this._q2=Math.round(s),this._q3=Math.round(n),this._high=Math.round(o);var h=e-t,u=f.getSizeInPixels(this._styleOptions.whiskerEndLength,h);u=Math.min(h,u),u=2*Math.floor((u-1)/2)+1;var g=Math.floor((t+e)/2)+.5,d=g-Math.floor(u/2)-.5,c=g+Math.floor(u/2)+.5;this._drawLine(g,this._low,g,this._high,"whisker"),this._drawLine(d,this._low,c,this._low,"whiskerEnd"),this._drawLine(d,this._high,c,this._high,"whiskerEnd"),this._q2Box=new r.Polygon(l,this._createQ2PointsArray(0));var p=k.getRectangleFill(this._chart,this._styleOptions.q2Color,this._styleOptions._q2Pattern,h);this._q2Box.setFill(p),this._applyCustomStyle(this._q2Box,"q2"),this.addChild(this._q2Box),this._q3Box=new r.Polygon(l,this._createQ3PointsArray(0));var _=k.getRectangleFill(this._chart,this._styleOptions.q3Color,this._styleOptions._q3Pattern,h);this._q3Box.setFill(_),this._applyCustomStyle(this._q3Box,"q3"),this.addChild(this._q3Box),this._drawMedianLine(0),this._borderColor=this._styleOptions.borderColor,this._borderColor&&(this._borderWidth=this._styleOptions.borderWidth,this._drawBorders(this._borderColor,this._borderWidth)),this.IsSelected&&(this.IsSelected=!1,this.setSelected(!0))},ot.prototype.showHoverEffect=function(){this.IsShowingHoverEffect||(this.IsShowingHoverEffect=!0,this.isSelected()?"redwood"!==this.getCtx().getThemeBehavior()&&this._drawBorders(this._hoverColor,st.OUTER_BORDER_WIDTH,this._innerColor,st.INNER_BORDER_WIDTH):this._drawBorders(this._hoverColor,st.OUTER_BORDER_WIDTH_HOVER,this._innerColor,st.INNER_BORDER_WIDTH))},ot.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect&&(this.IsShowingHoverEffect=!1,this.isSelected()?this._drawBorders(this._outerColor,st.OUTER_BORDER_WIDTH,this._innerColor,st.INNER_BORDER_WIDTH):this._drawBorders(this._borderColor,this._borderWidth))},ot.prototype.setSelected=function(t){this.IsSelected!=t&&(this.IsSelected=t,this.isHoverEffectShown()?t?"redwood"===this.getCtx().getThemeBehavior()?this._drawBorders(this._outerColor,st.OUTER_BORDER_WIDTH,this._innerColor,st.INNER_BORDER_WIDTH):this._drawBorders(this._hoverColor,st.OUTER_BORDER_WIDTH,this._innerColor,st.INNER_BORDER_WIDTH):this._drawBorders(this._hoverColor,st.OUTER_BORDER_WIDTH_HOVER,this._innerColor,st.INNER_BORDER_WIDTH):t?this._drawBorders(this._outerColor,st.OUTER_BORDER_WIDTH,this._innerColor,st.INNER_BORDER_WIDTH):this._drawBorders(this._hoverColor,this._borderWidth))},ot.prototype.UpdateSelectionEffect=function(){},ot.prototype.getDisplayAnimation=function(t){return this.getInsertAnimation(t)},ot.prototype.getDeleteAnimation=function(t){var e=new r.CustomAnimation(this.getCtx(),this,t),i=[this._x1,this._x2,this._q2,this._q2,this._q2,this._q2,this._q2];return e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,i),e.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0),e},ot.prototype.getInsertAnimation=function(t){var e=new r.CustomAnimation(this.getCtx(),this,t),i=this._getAnimationParams();return this._setAnimationParams([this._x1,this._x2,this._q2,this._q2,this._q2,this._q2,this._q2]),e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,i),this.setAlpha(0),e.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,1),e},ot.prototype.getUpdateAnimation=function(t,e){var i=new r.CustomAnimation(this.getCtx(),this,t),a=e._getQ2Fill(),s=this._getQ2Fill();a.equals(s)||(this._setQ2Fill(a),i.getAnimator().addProp(r.Animator.TYPE_FILL,this,this._getQ2Fill,this._setQ2Fill,s));var n=e._getQ3Fill(),o=this._getQ3Fill();n.equals(o)||(this._setQ3Fill(n),i.getAnimator().addProp(r.Animator.TYPE_FILL,this,this._getQ3Fill,this._setQ3Fill,o));var l=this._getAnimationParams();return this._setAnimationParams(e._getAnimationParams()),i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,l),i},ot.prototype._getAnimationParams=function(){return[this._x1,this._x2,this._low,this._q1,this._q2,this._q3,this._high]},ot.prototype._setAnimationParams=function(t){this._render(t[0],t[1],t[2],t[3],t[4],t[5],t[6])},ot.prototype._getQ2Fill=function(){return new r.SolidFill(this._styleOptions.q2Color)},ot.prototype._setQ2Fill=function(t){this._styleOptions.q2Color=t.getColor()},ot.prototype._getQ3Fill=function(){return new r.SolidFill(this._styleOptions.q3Color)},ot.prototype._setQ3Fill=function(t){this._styleOptions.q3Color=t.getColor()},ot.prototype._drawLine=function(t,e,i,a,s){var n=this._bHoriz?new r.Line(this.getCtx(),e,t,a,i):new r.Line(this.getCtx(),t,e,i,a);return this._applyCustomStyle(n,s),n.setPixelHinting(!0),this.addChild(n),n},ot.prototype._drawMedianLine=function(t){if(!this._medianLine){var e=new r.Line(this.getCtx(),0,0,0,0);this._applyCustomStyle(e,"median"),e.setPixelHinting(!0),this.addChild(e),this._medianLine=e}var i=this._x1+t,a=this._x2-t,s=this._q2;this._bHoriz?(this._medianLine.setX1(s),this._medianLine.setX2(s),this._medianLine.setY1(i),this._medianLine.setY2(a)):(this._medianLine.setY1(s),this._medianLine.setY2(s),this._medianLine.setX1(i),this._medianLine.setX2(a))},ot.prototype._drawBorders=function(t,e,i,a){if(!this._outerBorderShape){var s=this.getChildIndex(this._q2Box);this._innerBorderShape=new r.Polygon(this.getCtx()),this._innerBorderShape.setInvisibleFill(),this.addChildAt(this._innerBorderShape,s),this._outerBorderShape=new r.Polygon(this.getCtx()),this._outerBorderShape.setInvisibleFill(),this.addChildAt(this._outerBorderShape,s)}var n=0;e?(this._outerBorderShape.setPoints(this._createBoxPointsArray(0)),this._outerBorderShape.setSolidFill(t),n+=e,a?(this._innerBorderShape.setPoints(this._createBoxPointsArray(e)),this._innerBorderShape.setSolidFill(i),n+=a):this._innerBorderShape.setInvisibleFill()):(this._outerBorderShape.setInvisibleFill(),this._innerBorderShape.setInvisibleFill()),this._q2Box.setPoints(this._createQ2PointsArray(n)),this._q3Box.setPoints(this._createQ3PointsArray(n)),this._drawMedianLine(n)},ot.prototype._createBoxPointsArray=function(t){var e,i,r=this._x1+t,a=this._x2-t;return this._q1<this._q3?(e=this._q1+t,i=this._q3-t):(e=this._q1-t,i=this._q3+t),this._createPointsArray(r,a,e,i)},ot.prototype._createQ3PointsArray=function(t){var e,i=this._x1+t,r=this._x2-t,a=this._q2;return e=this._q2<this._q3?this._q3-t:this._q3+t,this._createPointsArray(i,r,a,e)},ot.prototype._createQ2PointsArray=function(t){var e,i=this._x1+t,r=this._x2-t,a=this._q2;return e=this._q2<this._q1?this._q1-t:this._q1+t,this._createPointsArray(i,r,e,a)},ot.prototype._createPointsArray=function(t,e,i,r){return this._bHoriz?[i,t,i,e,r,e,r,t]:[t,i,e,i,e,r,t,r]},ot.prototype._applyCustomStyle=function(t,e){t.setStyle(this._styleOptions[e+"Style"]||this._styleOptions[e+"SvgStyle"],!0),t.setClassName(this._styleOptions[e+"ClassName"]||this._styleOptions[e+"SvgClassName"],!0)},ot.prototype._cleanUp=function(){this.removeChildren(),this._q2Box=null,this._q3Box=null,this._medianLine=null,this._outerBorderShape=null,this._innerBorderShape=null};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var lt=function t(e,i,r,a,s,n,o){this.Init(e),r=Math.max(2*Math.round(r/2),1);var l=Math.min(2*Math.ceil(t._BAR_WIDTH*r/2),r),h=Math.round(i)-r/2,u=h+r;if(null!=n&&null!=o){var g=Math.round(i)-l/2,d=g+l;this._rangeShape=new st(e,[g,n,d,n,d,o,g,o]),this.addChild(this._rangeShape)}this._changeShape=new st(e,[h,a,u,a,u,s,h,s]),this.addChild(this._changeShape),this.setPixelHinting(!0)};r.Obj.createSubclass(lt,r.Container),lt._BAR_WIDTH=.3,lt.prototype.setChangeStyle=function(t,e,i,r,a){this._changeShape.setStyleProperties(t,e,i,r,a)},lt.prototype.setRangeStyle=function(t,e,i,r){this._rangeShape&&this._rangeShape.setStyleProperties(t,e,i,null,r)},lt.prototype.setSelected=function(t){this._changeShape.setSelected(t),this._rangeShape&&this._rangeShape.setSelected(t)},lt.prototype.showHoverEffect=function(){this._changeShape.showHoverEffect(),this._rangeShape&&this._rangeShape.showHoverEffect()},lt.prototype.hideHoverEffect=function(){this._changeShape.hideHoverEffect(),this._rangeShape&&this._rangeShape.hideHoverEffect()},lt.prototype.getDisplayAnimation=function(t){var e=new r.CustomAnimation(this.getCtx(),this,t),i=this._changeShape.getPoints();if(this._changeShape.setPoints(lt._getInitialPoints(i)),e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._changeShape,this._changeShape.getPoints,this._changeShape.setAnimationParams,i),this._rangeShape){var a=this._rangeShape.getPoints();this._rangeShape.setPoints(lt._getInitialPoints(a)),e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._rangeShape,this._rangeShape.getPoints,this._rangeShape.setAnimationParams,a)}return e},lt.prototype.getDeleteAnimation=function(t){var e=new r.CustomAnimation(this.getCtx(),this,t),i=lt._getInitialPoints(this._changeShape.getPoints());if(e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._changeShape,this._changeShape.getPoints,this._changeShape.setAnimationParams,i),this._rangeShape){var a=lt._getInitialPoints(this._rangeShape.getPoints());e.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._rangeShape,this._rangeShape.getPoints,this._rangeShape.setAnimationParams,a)}return e.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0),e},lt.prototype.getInsertAnimation=function(t){this.setAlpha(0);var e=this.getDisplayAnimation(t);return e.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,1),e},lt.prototype.getUpdateAnimation=function(t,e){var i=new r.CustomAnimation(this.getCtx(),this,t),a=this._changeShape.getPoints();this._changeShape.setPoints(e._changeShape.getPoints()),i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._changeShape,this._changeShape.getPoints,this._changeShape.setAnimationParams,a);var s=e._changeShape.getPrimaryFill(),n=this._changeShape.getPrimaryFill();if(e._changeShape.isSelected()||this._changeShape.isSelected()||s.equals(n)||(this._changeShape.setFill(s),i.getAnimator().addProp(r.Animator.TYPE_FILL,this._changeShape,this._changeShape.getFill,this._changeShape.setFill,n)),this._rangeShape&&e._rangeShape){var o=this._rangeShape.getPoints();this._rangeShape.setPoints(e._rangeShape.getPoints()),i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this._rangeShape,this._rangeShape.getPoints,this._rangeShape.setAnimationParams,o)}return i},lt.prototype.UpdateSelectionEffect=function(){},lt._getInitialPoints=function(t){var e=t[0],i=t[2],r=(t[1]+t[5])/2;return[e,r,i,r,i,r,e,r]};
/**
   * @license
   * Copyright (c) 2011 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var ht=function(t,e,i,r,a,s){this.x=t,this.y1=e,this.y2=i,this.groupIndex=r,this.group=a,this.filtered=s};r.Obj.createSubclass(ht,r.Obj),ht.prototype.isUpstep=function(t){return Math.abs(this.y2-t)>Math.abs(this.y1-t)},ht.prototype.clone=function(){return new ht(this.x,this.y1,this.y2,this.groupIndex,this.group,this.filtered)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var ut=function(t,e,i,r,a,s,n,o,l,h,u,g){this.Init(t.getCtx()),this._chart=t,this._bArea=e,this._availSpace=i,this._baseline=r,this._style=a,this._className=s,this._fill=n,this._stroke=o,this._type=l,this._baseType=u||l,this._indicatorMap={},this.setCoords(h,g)};r.Obj.createSubclass(ut,r.Container),ut.prototype.chartShapeType="lineArea",ut._INDICATOR_OFFSET=8,ut.prototype.setCoords=function(t,e){this._arCoord=t,e&&(this._arBaseCoord=e),this.removeChildren(),this._bArea?this._renderAreas():this._renderLines(),this._positionIndicators()},ut.prototype.getCoords=function(){return this._arCoord},ut.prototype.getBaseCoords=function(){return this._arBaseCoord},ut.prototype.getBaseline=function(){return this._baseline},ut.prototype.isArea=function(){return this._bArea},ut.prototype._getPointArrays=function(t,e){var i=[],a=[];i.push(a),t=ut._convertToPointCoords(t);var s,n,o,l,h,g=u.isPolar(this._chart),d="centeredStepped"==e||"centeredSegmented"==e,c=d||"stepped"==e||"segmented"==e,p=f.getGroupWidth(this._chart),_=r.Agent.isRightToLeft(this.getCtx())&&u.isVertical(this._chart)?-1:1;g&&(s=t[t.length-1]);for(var v=!1,m=0;m<t.length;m++)null!=t[m]?(n=t[m],l=t[m]._isY2,o=d?n.x-p/2*_:n.x,l&&(v&&c&&(o+=p*_),v=!v),"curved"==e&&l&&a.push(null,null),s&&c&&this._pushCoord(a,o,s.y),this._bArea||"segmented"!=e&&"centeredSegmented"!=e||(a=[],i.push(a)),this._pushCoord(a,o,n.y),s=n):u.isMixedFrequency(this._chart)||(c&&!g&&s&&!l&&(h=d?s.x+.5*p*_:s.x+p*_,this._pushCoord(a,h,s.y)),a=[],i.push(a),s=null);if(c&&!g&&s&&!l&&(h=d?s.x+.5*p*_:s.x+p*_,this._pushCoord(a,h,s.y)),g&&i.length>1){var S=i.pop();i[0]=S.concat(i[0])}return i},ut.prototype._pushCoord=function(t,e,i){var a=g.convertAxisCoord(this._chart,new r.Point(e,i),this._availSpace);t.push(Math.round(10*a.x)/10,Math.round(10*a.y)/10)},ut.prototype._isRing=function(){if(!u.isPolar(this._chart)||!u.hasGroupAxis(this._chart)||this._arCoord.length<c.getGroupCount(this._chart))return!1;for(var t=0;t<this._arCoord.length;t++)if(null==this._arCoord[t].x)return!1;return!0},ut.prototype._getSplineType=function(){return u.isScatterBubble(this._chart)?r.PathUtils.SPLINE_TYPE_CARDINAL:u.isPolar(this._chart)?this._isRing()?r.PathUtils.SPLINE_TYPE_CARDINAL_CLOSED:r.PathUtils.SPLINE_TYPE_CARDINAL:u.isHorizontal(this._chart)?r.PathUtils.SPLINE_TYPE_MONOTONE_HORIZONTAL:r.PathUtils.SPLINE_TYPE_MONOTONE_VERTICAL},ut.prototype._renderLines=function(){for(var t,e=this._getPointArrays(this._arCoord,this._type),i=0;i<e.length;i++){var a=e[i];if(a&&a.length>1){if("curved"==this._type){var s=ut._getCurvedPathCommands(a,!1,this._getSplineType());(t=new r.Path(this.getCtx(),s)).setFill(null)}else this._isRing()?(t=new r.Polygon(this.getCtx(),a)).setFill(null):t=new r.Polyline(this.getCtx(),a);t.setStroke(this._stroke),t.setClassName(this._className).setStyle(this._style),this.addChild(t)}}},ut.prototype._renderAreas=function(){var t=this._arCoord,e=this._arBaseCoord;!u.isPolar(this._chart)&&t.length>0&&e.length>0&&(t=t.slice(0),e=e.slice(0),null!=t[0].x&&null!=e[0].x&&(ut._removeAreaEdge(t,0,this._baseline),ut._removeAreaEdge(e,0,this._baseline),e[0].x=t[0].x),null!=t[t.length-1].x&&null!=e[e.length-1].x&&(ut._removeAreaEdge(t,t.length-1,this._baseline),ut._removeAreaEdge(e,e.length-1,this._baseline),e[e.length-1].x=t[t.length-1].x));var i=this._getPointArrays(t,this._type),a=this._getPointArrays(e,this._baseType);if(i.length==a.length)for(var s,n=0;n<i.length;n++){var o=i[n],l=a[n];if(!(o.length<2)){var h="curved"==this._type,g="curved"==this._baseType;this._isRing()&&(h||o.push(o[0],o[1]),l.length>=2&&!g&&l.push(l[0],l[1]));for(var d=[],c=0;c<l.length;c+=2)d.unshift(l[c],l[c+1]);if(h||g){var p=this._getSplineType(),_=h?ut._getCurvedPathCommands(o,!1,p):r.PathUtils.polyline(o,!1);_+=g?ut._getCurvedPathCommands(d,!0,p):r.PathUtils.polyline(d,!0),_+=r.PathUtils.closePath(),s=new r.Path(this.getCtx(),_)}else{var f=d.concat(o);s=new r.Polygon(this.getCtx(),f)}s.setFill(this._fill),s.setClassName(this._className).setStyle(this._style),this._stroke&&s.setStroke(this._stroke),this.addChild(s)}}},ut.prototype._positionIndicators=function(){for(var t,e,i,a,s,n=0;n<this._arCoord.length;n++)s=this._arCoord[n],(t=this._indicatorMap[s.groupIndex])&&t.indicator&&(a=(s.isUpstep(this._baseline)?s.y2:s.y1)+ut._INDICATOR_OFFSET*(t.direction==Q.DIR_UP?-1:1),i=g.convertAxisCoord(this._chart,new r.Point(s.x,a),this._availSpace),(e=t.indicator).setTranslate(i.x,i.y),e.setAlpha(1),e.getParent().addChild(e))},ut.prototype.getAnimationParams=function(t){return ut._coordsToAnimationParams(this._arCoord,t?t._arCoord:null,this._baseline)},ut.prototype.setAnimationParams=function(t){var e=ut._animationParamsToCoords(t);this.setCoords(e)},ut.prototype.getBaseAnimationParams=function(t){return ut._coordsToAnimationParams(this._arBaseCoord,t?t._arBaseCoord:null,this._baseline)},ut.prototype.setBaseAnimationParams=function(t){this._arBaseCoord=ut._animationParamsToCoords(t)},ut.prototype.getCommonGroupIndices=function(t){for(var e=[],i=0;i<this._arCoord.length;i++)if(!this._arCoord[i].filtered&&null!=this._arCoord[i].x)for(var r=0;r<t._arCoord.length;r++)if(!t._arCoord[r].filtered&&null!=t._arCoord[r].x&&this._arCoord[i].group==t._arCoord[r].group){e.push(this._arCoord[i].groupIndex);break}return e},ut.prototype.addIndicator=function(t,e,i){i.setAlpha(0),this._indicatorMap[t]={direction:e,indicator:i}},ut.prototype.removeIndicators=function(){for(var t in this._indicatorMap){var e=this._indicatorMap[t].indicator;e&&e.getParent().removeChild(e)}this._indicatorMap={}},ut._convertToPointCoords=function(t){for(var e=[],i=0;i<t.length;i++)if(!t[i].filtered)if(null==t[i].x)e.push(null);else if(e.push(new r.Point(t[i].x,t[i].y1)),t[i].y1!=t[i].y2){var a=new r.Point(t[i].x,t[i].y2);a._isY2=!0,e.push(a)}return e},ut._coordsToAnimationParams=function(t,e,i){if(e&&e.length>0)if(t&&t.length>0){t=t.slice(0);for(var r,a,s,n=ut._coordsToGroups(e),o=ut._coordsToGroups(t),l=t.length,h=n.length-1;h>=0;h--)r=n[h],-1==(a=o.indexOf(r))?(0==l?(s=t[0].clone(),t[0]=t[0].clone(),ut._removeCoordJump(s,t[0],i)):(s=t[l-1].clone(),t[l-1]=t[l-1].clone(),ut._removeCoordJump(t[l-1],s,i)),s.groupIndex=-1,t.splice(l,0,s)):l=a}else{t=[];for(h=0;h<e.length;h++)t.push(new ht(e[h].x,i,i))}for(var u=[],g=0;g<t.length;g++)t[g].filtered||(null==t[g].x?(u.push(1/0),u.push(1/0),u.push(1/0)):(u.push(t[g].x),u.push(t[g].y1),u.push(t[g].y2)),u.push(t[g].groupIndex));return u},ut._animationParamsToCoords=function(t){for(var e=[],i=0;i<t.length;i+=4)t[i]==1/0||isNaN(t[i])?e.push(new ht(null,null,null,t[i+3])):e.push(new ht(t[i],t[i+1],t[i+2],t[i+3]));return e},ut._coordsToGroups=function(t){for(var e=[],i=0;i<t.length;i++)t[i].filtered||e.push(t[i].group);return e},ut._removeCoordJump=function(t,e,i){t.isUpstep(i)?e.y1=e.y2:t.y2=t.y1},ut._getCurvedPathCommands=function(t,e,i){var a=[],s=[];a.push(s);for(var n=0;n<t.length;n+=2)null==t[n]?(s=[],a.push(s)):s.push(t[n],t[n+1]);if(i==r.PathUtils.SPLINE_TYPE_CARDINAL_CLOSED&&a.length>1){var o=a.pop();a[0]=o.concat(a[0]),i=r.PathUtils.SPLINE_TYPE_CARDINAL}var l="";for(n=0;n<a.length;n++)s=a[n],l+=r.PathUtils.curveThroughPoints(s,e,i),e=!0;return l},ut._removeAreaEdge=function(t,e,i){var r=t[e].clone();r.isUpstep(i)?r.y1=r.y2:r.y2=r.y1,t[e]=r};
/**
   * @license
   * Copyright (c) 2011 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var gt=function t(e,i,r,a,s,n){this.Init(e,i,r,a,s,s,null,null,!0),n&&this.setStroke(t.DEFAULT_STROKE)};r.Obj.createSubclass(gt,r.SimpleMarker),gt.DEFAULT_STROKE=new r.Stroke("none"),gt.SELECTED_FILL=new r.SolidFill("#FFFFFF"),gt.SELECTED_STROKE=new r.Stroke("#5A5A5A",1,1.5),gt.prototype.setDataColor=function(t){this._dataColor=t,this._hoverStroke=new r.Stroke(t,1,1.5)},gt.prototype.getDataColor=function(){return this._dataColor},gt.prototype.showHoverEffect=function(){this.IsShowingHoverEffect=!0,this.setStroke(this._hoverStroke)},gt.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect=!1,this.setStroke(this.isSelected()?gt.SELECTED_STROKE:gt.DEFAULT_STROKE)},gt.prototype.setSelected=function(t){this.IsSelected!=t&&(this.IsSelected=t,this.isSelected()?(this.setFill(gt.SELECTED_FILL),this.setStroke(this.isHoverEffectShown()?this._hoverStroke:gt.SELECTED_STROKE)):(this.setInvisibleFill(),this.setStroke(this.isHoverEffectShown()?this._hoverStroke:gt.DEFAULT_STROKE)))},gt.prototype.UpdateSelectionEffect=function(){};
/**
   * @license
   * Copyright (c) 2011 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var dt=function t(e,i,r,a,s,n,o){this.Init(e.getCtx()),this._axisCoord=i,this._availSpace=o.clone(),this._bbox=null,this._dataItemGaps=f.getDataItemGaps(e)*t._MAX_DATA_ITEM_GAP,this._setBarCoords(r,a,s,n)};r.Obj.createSubclass(dt,j),dt._MIN_BAR_LENGTH_FOR_GAPS=4,dt._MAX_DATA_ITEM_GAP=3,dt.prototype.getAnimationParams=function(){return[this._baselineCoord,this._endCoord,this._x1,this._x2]},dt.prototype.setAnimationParams=function(t,e){this._setBarCoords(t[0],t[1],t[2],t[3])},dt.prototype.getPrimaryFill=function(){return this.getFill()},dt.prototype.getDisplayAnimation=function(t){var e=this.getAnimationParams();this.setAnimationParams([this._axisCoord,this._axisCoord,0,0]);var i=new r.CustomAnimation(this.getCtx(),this,t);return i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,e),i},dt.prototype.getDeleteAnimation=function(t){var e=[this._baselineCoord,this._baselineCoord,this._x1,this._x2],i=new r.CustomAnimation(this.getCtx(),this,t);return i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,e),i.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,0),i},dt.prototype.getInsertAnimation=function(t){this.setAlpha(0);var e=this.getAnimationParams();this.setAnimationParams([this._baselineCoord,this._baselineCoord,this._x1,this._x2]);var i=new r.CustomAnimation(this.getCtx(),this,t);return i.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,e),i.getAnimator().addProp(r.Animator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,1),i},dt.prototype._setBarCoords=function(t,e,i,a){var s=this._availSpace.x+this._availSpace.w/2,n=this._availSpace.y+this._availSpace.h/2,o=Math.max(e,t),l=Math.abs(e-t)>=dt._MIN_BAR_LENGTH_FOR_GAPS&&this._axisCoord!=t?Math.min(e,t)+this._dataItemGaps:Math.min(e,t),h=360-r.Math.radsToDegrees(Math.max(i,a))+90,u=r.Math.radsToDegrees(Math.abs(a-i));this.setWedgeParams(s,n,o,o,h,u,this._dataItemGaps,l);var d=g.polarToCartesian(t,i,this._availSpace),c=g.polarToCartesian(t,a,this._availSpace),p=g.polarToCartesian(e,i,this._availSpace),_=g.polarToCartesian(e,a,this._availSpace),f=Math.min(d.x,c.x,p.x,_.x),v=Math.max(d.x,c.x,p.x,_.x),m=Math.min(d.y,c.y,p.y,_.y),S=Math.max(d.y,c.y,p.y,_.y);this._bbox=new r.Rectangle(f,m,v-f,S-m),this._baselineCoord=t,this._endCoord=e,this._x1=i,this._x2=a},dt.prototype.getBoundingBox=function(){return this._bbox},dt.prototype.getOriginalBarSize=function(){return this._bbox.w};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var ct=function(t,e,i,r,a,s,n){this.Init(t),this._markerSize=s,this._isInvisible=n,this._drawPath(e,i,r,a)};r.Obj.createSubclass(ct,r.Path),ct.prototype._drawPath=function(t,e,i,a){var s=Math.atan2(a-e,i-t),n=this._markerSize/2,o=Math.PI/8,l=r.PathUtils.moveTo(t+n*Math.cos(s+o),e+n*Math.sin(s+o))+r.PathUtils.arcTo(n,n,2*(Math.PI-o),1,t+n*Math.cos(s-o),e+n*Math.sin(s-o))+r.PathUtils.lineTo(i-n*Math.cos(s+o),a-n*Math.sin(s+o))+r.PathUtils.arcTo(n,n,2*(Math.PI-o),1,i-n*Math.cos(s-o),a-n*Math.sin(s-o))+r.PathUtils.closePath();this.setCmds(l),this._x1=t,this._y1=e,this._x2=i,this._y2=a},ct.prototype.setStyleProperties=function(t,e,i,a,s){this._dataColor=i;var n=r.SelectionEffectUtils.getHoverBorderColor(i);this._isInvisible?(this.setInvisibleFill(),this._hoverStroke=new r.Stroke(n,1,1.5)):(this.setFill(t),this.setStroke(e),this.setHoverStroke(new r.Stroke(a,1,1),new r.Stroke(n,1,3.5)),this.setSelectedStroke(new r.Stroke(a,1,1.5),new r.Stroke(s,1,4.5)),this.setSelectedHoverStroke(new r.Stroke(a,1,1.5),new r.Stroke(n,1,4.5)))},ct.prototype.getDataColor=function(){return this._dataColor},ct.prototype.showHoverEffect=function(){this._isInvisible?(this.IsShowingHoverEffect=!0,this.setStroke(this._hoverStroke)):ct.superclass.showHoverEffect.call(this)},ct.prototype.hideHoverEffect=function(){this._isInvisible?(this.IsShowingHoverEffect=!1,this.setStroke(this.isSelected()?gt.SELECTED_STROKE:gt.DEFAULT_STROKE)):ct.superclass.hideHoverEffect.call(this)},ct.prototype.setSelected=function(t){if(this._isInvisible){if(this.IsSelected==t)return;this.IsSelected=t,this.isSelected()?(this.setFill(gt.SELECTED_FILL),this.setStroke(this.isHoverEffectShown()?this._hoverStroke:gt.SELECTED_STROKE)):(this.setInvisibleFill(),this.setStroke(this.isHoverEffectShown()?this._hoverStroke:gt.DEFAULT_STROKE))}else ct.superclass.setSelected.call(this,t)},ct.prototype.UpdateSelectionEffect=function(){this._isInvisible||ct.superclass.UpdateSelectionEffect.call(this)},ct.prototype.getAnimationParams=function(){return[this._x1,this._y1,this._x2,this._y2]},ct.prototype.setAnimationParams=function(t){this._drawPath(t[0],t[1],t[2],t[3])},ct.prototype.isInvisible=function(){return this._isInvisible},ct.prototype.getBoundingBox=function(){return this.getBoundingBox1().getUnion(this.getBoundingBox2())},ct.prototype.getBoundingBox1=function(){return new r.Rectangle(this._x1-this._markerSize/2,this._y1-this._markerSize/2,this._markerSize,this._markerSize)},ct.prototype.getBoundingBox2=function(){return new r.Rectangle(this._x2-this._markerSize/2,this._y2-this._markerSize/2,this._markerSize,this._markerSize)};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var pt=function(){};r.Obj.createSubclass(pt,r.Obj),pt.createAnimation=function(t,e,i,a,s){if(!pt._canAnimate(t,e))return null;var n,o=e.getCtx(),l=[],h=[];u.isPie(e)?(l.push(t.pieChart),h.push(e.pieChart)):pt._buildAnimLists(o,l,t,h,e,a);var g=new r.DataAnimationHandler(o,s);g.constructAnimation(l,h),g.getNumPlayables()>0&&(n=g.getAnimation(!0));var d=e.getDataLabels();if(n&&d.length>0){for(var c=0;c<d.length;c++)d[c].setAlpha(0);n=new r.SequentialPlayable(o,n,new r.AnimFadeIn(o,d,a/4))}return n},pt._buildAnimLists=function(t,e,i,a,s,n){var o,l,h,u,g,d=i.getChartObjPeers(),c=e,p=s.getCache().getFromCache("dataFiltered");for(o=0;o<2;o++){var _={},f={};for(l=0;l<d.length;l++){if(g=null,(u=(h=d[l]).getDisplayables()[0])instanceof F)g=new tt(h,n);else if(u instanceof G)g=new rt(h,n);else if(u instanceof nt||u instanceof dt){if(g=new J(h,n),p){var v=h.getSeries();_[v]=_[v]?_[v]+1:1,g.setId(v+"/"+_[v]+"/bar")}}else if(u instanceof ut){var m=(g=new et(h,n)).getId();f[m]=f[m]?f[m]+1:1,g.setId(m+"/"+f[m])}else if(u instanceof r.SimpleMarker){if(u instanceof gt&&!u.isSelected())continue;g=new it(h,n)}else if(u instanceof ct){if(u.isInvisible()&&!u.isSelected())continue;g=new at(h,n)}else u instanceof lt?g=new q(h,n):u instanceof ot&&(g=new $(h,n));g&&(c.push(g),g.setOldChart(i))}c=a,d=s.getChartObjPeers()}},pt._canAnimate=function(t,e){return u.isPie(t)&&u.isPie(e)?t&&e:u.isPolar(t)==u.isPolar(e)&&(!(!u.isBLAC(t)||!u.isBLAC(e))||(!(!u.isScatterBubble(t)||!u.isScatterBubble(e))||t.getType()==e.getType()))};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var _t=function(){};r.Obj.createSubclass(_t,r.Obj),_t.createAnimation=function(t,e,i){var a=[];if(u.isBLAC(t))_t._animBarLineArea(t,i,a);else if(u.isScatterBubble(t)||u.isFunnel(t)||u.isPyramid(t))_t._animBubbleScatterFunnelPyramid(t,i,a);else if(u.isPie(t)&&t.pieChart)return t.pieChart.getDisplayAnimation();return a.length>0?new r.ParallelPlayable(t.getCtx(),a):null},_t._animBarLineArea=function(t,e,i){var a=t.getChartObjPeers(),s=a?a.length:0;if(s)for(var n,o,l,h=0;h<s;h++){n=(o=a[h]).getDisplayables()[0];var u=c.getSeriesType(o.getChart(),o.getSeriesIndex());if(l=null,n instanceof nt||n instanceof dt||n instanceof lt||n instanceof ot)l=n.getDisplayAnimation(e);else if(n instanceof ut)l="line"==u?_t._getLinePlayable(t,n,e):_t._getAreaPlayable(t,n,e);else if(n instanceof r.SimpleMarker||n instanceof ct){if(n instanceof gt&&!n.isSelected())continue;l=new r.AnimFadeIn(t.getCtx(),n,e-.8,.8)}l&&i.push(l)}},_t._animBubbleScatterFunnelPyramid=function(t,e,i){var a=t.getObjects(),s=a?a.length:0;if(s)for(var n,o,l=0;l<s;l++)(n=a[l].getDisplayables()[0])instanceof r.SimpleMarker?o=new r.AnimPopIn(t.getCtx(),n,!0,e):(n instanceof F||n instanceof G)&&(o=_t._getFunnelPyramidPlayable(t,n,e)),o&&i.push(o)},_t._getAreaPlayable=function(t,e,i){var a,s=t.getCtx(),n=e.getBaseline();if(e.isArea()){for(var o=e.getBaseCoords(),l=e.getBaseAnimationParams(),h=l.slice(0),u=0;u<l.length;u++)u%4!=1&&u%4!=2||(l[u]=n);e.setBaseAnimationParams(l),(a=new r.CustomAnimation(s,e,i)).getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getBaseAnimationParams,e.setBaseAnimationParams,h)}var g=e.getCoords(),d=e.getAnimationParams(),c=d.slice(0);for(u=0;u<d.length;u++)u%4!=1&&u%4!=2||(d[u]=n);e.setAnimationParams(d);var p=new r.CustomAnimation(s,e,i);p.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getAnimationParams,e.setAnimationParams,c);var _=new r.ParallelPlayable(t.getCtx(),a,p);return _.setOnEnd(function(){e.setCoords(g,o)}),_},_t._getFunnelPyramidPlayable=function(t,e,i){var a=t.getCtx(),s=e.getAnimationParams(),n=s.slice(0),o=s.slice(0);s[0]=0,u.isFunnel(t)&&(s[2]=0,n[2]=0),e.setAnimationParams(s);var l=new r.CustomAnimation(a,e,i/2);l.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getAnimationParams,e.setAnimationParams,n);var h=new r.CustomAnimation(a,e,i/2);return h.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getAnimationParams,e.setAnimationParams,o),new r.SequentialPlayable(a,[l,h])},_t._getLinePlayable=function(t,e,i){var a=e.getCoords(),s=e.getAnimationParams(),n=s.slice(0);_t._getMeanPoints(s),e.setAnimationParams(s);var o=new r.CustomAnimation(t.getCtx(),e,i);return o.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,e,e.getAnimationParams,e.setAnimationParams,n),o.setOnEnd(function(){e.setCoords(a)}),o},_t._getMeanPoints=function(t){var e,i=0,r=Number.MAX_VALUE,a=-1*Number.MAX_VALUE,s=t.length;for(e=0;e<s;e++){var n=t[e];e%4!=0&&e%4!=3&&n!=1/0&&(n<r&&(r=n),n>a&&(a=n),i+=n)}for(s>8?(i-=2*r,i-=2*a,i/=s/2-4):i/=s/2,e=0;e<s;e++)e%4!=1&&e%4!=2||(t[e]=i)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var ft=function(t,e,i){this.Init(t,e,i)};r.Obj.createSubclass(ft,b),b.registerConstructor("data",ft),ft.prototype.Init=function(t,e,i){ft.superclass.Init.call(this,t,e,i),this.MixinInit.call(this,t,e,i)},ft.MAX_ZOOM_FACTOR=64,ft.prototype.getMinLabel=function(){return this.ZeroBaseline||"on"==this.Options._continuousExtent&&null==this.Options.min?Math.ceil(this.LinearMinValue/this.MajorIncrement)*this.MajorIncrement:Math.ceil((this.LinearMinValue-this.LinearGlobalMin)/this.MajorIncrement)*this.MajorIncrement+this.LinearGlobalMin},ft.prototype.getLabels=function(t,e){if(e&&e>0)return null;var i=this.getAllLabels(t),r=[],a=t.getStage();return"tangential"!=this.Position&&(r=this.GetLabelDims(i,a),i=this.SkipLabels(i,r)),i},ft.prototype.getAllLabels=function(t,e){var i=[];if(this.Options.tickLabel&&this.Options.tickLabel.scaling){var r=this.Options.tickLabel.autoPrecision?this.Options.tickLabel.autoPrecision:"on";this._axisValueFormatter=new a.LinearScaleAxisValueFormatter(t,this.LinearMinValue,this.LinearMaxValue,this.MajorIncrement,this.Options.tickLabel.scaling,r,this.Options.translations)}for(var s=0;s<=this.MajorTickCount;s++){var n=s*this.MajorIncrement+this.getMinLabel();if(n-this.LinearMaxValue>this.MAJOR_TICK_INCREMENT_BUFFER)break;var o,l=this.GetUnboundedCoordAt(n);if(this.Options._skipHighestTick){if(n==this.LinearMaxValue)continue;if("tangential"!=this.Position&&Math.abs(l-this.MaxCoord)<this.getTickLabelHeight())continue}this.IsLog?(n=this.linearToActual(n),this._axisValueFormatter=new a.LinearScaleAxisValueFormatter(t,n,n,n,this.Options.tickLabel.scaling,r,this.Options.translations),o=this._formatValue(n)):o=this._formatValue(n),e?i.push(o):i.push(this.CreateLabel(t,o,l))}return i},ft.prototype.getMajorTickCoords=function(){for(var t=[],e=0;e<=this.MajorTickCount;e++){var i=e*this.MajorIncrement+this.getMinLabel();if(i-this.LinearMaxValue>this.MAJOR_TICK_INCREMENT_BUFFER)break;if(!this.Options._skipHighestTick||i!=this.LinearMaxValue){var r=this.GetUnboundedCoordAt(i);t.push(r)}}return t},ft.prototype.getMinorTickCoords=function(){for(var t=[],e=-1;e<=this.MajorTickCount;e++){var i=e*this.MajorIncrement+this.getMinLabel();if(this.IsLog&&1==this.MajorIncrement&&1==this.MinorIncrement)for(var a=2;a<=9;a++){var s=i+r.Math.log10(a);if(s>this.LinearMaxValue)break;s<this.LinearMinValue||(o=this.GetUnboundedCoordAt(s),t.push(o))}else for(a=1;a<this.MinorTickCount;a++){var n=i+a*this.MinorIncrement;if(n>this.LinearMaxValue)break;if(!(n<this.LinearMinValue)){var o=this.GetUnboundedCoordAt(n);t.push(o)}}}return t},ft.prototype._formatValue=function(t){if(this.Converter&&this.Converter.format)return this._axisValueFormatter?this._axisValueFormatter.format(t,this.Converter):this.Converter.format(t);if(this._axisValueFormatter)return this._axisValueFormatter.format(t);var e=r.Math.log10(this.MajorIncrement),i=Math.max(Math.ceil(-e),0);return t.toFixed(i)},ft.prototype.getMajorTickCount=function(){return this.MajorTickCount},ft.prototype.getMinorTickCount=function(){return this.MinorTickCount},ft.prototype.getMajorIncrement=function(){return this.linearToActual(this.MajorIncrement)},ft.prototype.getMinorIncrement=function(){return this.linearToActual(this.MinorIncrement)},ft.prototype.getMinimumExtent=function(){return(this.LinearGlobalMax-this.LinearGlobalMin)/ft.MAX_ZOOM_FACTOR},ft.prototype.getStartOverflow=function(){return"top"!=this.Position&&"bottom"!=this.Position||!r.Agent.isRightToLeft(this.getCtx())?this.StartOverflow:this.EndOverflow},ft.prototype.getEndOverflow=function(){return"top"!=this.Position&&"bottom"!=this.Position||!r.Agent.isRightToLeft(this.getCtx())?this.EndOverflow:this.StartOverflow},ft.prototype.alignLogScaleToTickCount=function(t,e){if(this.IsLog)for(var i=this.getMajorTickCount();e<i;)this.MajorIncrement=null,this.MajorTickCount=null,this.MinorIncrement=null,this.MinorTickCount=null,t++,this.CalcMajorMinorIncr(t),i=this.getMajorTickCount();return t},ft.prototype.getLogScaleUnit=function(){return this.LogScaleUnit},a.DataAxisInfoMixin.call(ft.prototype);
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var vt=function(t,e,i){this.Init(t,e,i)};r.Obj.createSubclass(vt,b),b.registerConstructor("time",vt),vt.TIME_MONTH_MIN=28*(vt.TIME_DAY=24*(vt.TIME_HOUR=60*(vt.TIME_MINUTE=60*(vt.TIME_SECOND=1e3)))),vt.TIME_MONTH_MAX=31*vt.TIME_DAY,vt.TIME_YEAR_MIN=365*vt.TIME_DAY,vt.TIME_YEAR_MAX=366*vt.TIME_DAY,vt.prototype.Init=function(t,e,i){vt.superclass.Init.call(this,t,e,i),"top"==this.Position||"bottom"==this.Position?(e._isOverview||"on"!=e.tickLabel.rendered||(this.StartOverflow=Math.max(a.BaseAxisInfo.MINIMUM_AXIS_BUFFER-e.leftBuffer,0),this.EndOverflow=Math.max(a.BaseAxisInfo.MINIMUM_AXIS_BUFFER-e.rightBuffer,0)),r.Agent.isRightToLeft(t)?(this._startCoord=this.EndCoord-this.EndOverflow,this._endCoord=this.StartCoord+this.StartOverflow):(this._startCoord=this.StartCoord+this.StartOverflow,this._endCoord=this.EndCoord-this.EndOverflow)):(this._startCoord=this.StartCoord,this._endCoord=this.EndCoord);var s=null!=e.tickLabel?e.tickLabel.converter:null;this._label1Converter=s&&s[0]?s[0]:s,this._label2Converter=s&&s[1]?s[1]:null,this._dateToIsoWithTimeZoneConverter=t.getLocaleHelpers().dateToIsoWithTimeZoneConverter,this._groups=e.groups;var n=e.timeAxisType;this._skipGaps="skipGaps"==n,this._mixedFrequency="mixedFrequency"==n,this.DataMin=e.dataMin,this.DataMax=e.dataMax,this._groups.length>1?this._averageInterval=(this.DataMax-this.DataMin)/(this._groups.length-1):this.DataMax-this.DataMin>0?this._averageInterval=this.DataMax-this.DataMin:this._averageInterval=6*vt.TIME_MINUTE,this._step=e.step;var o=e.endGroupOffset>0?e.endGroupOffset*this._averageInterval:0,l=e.startGroupOffset>0?e.startGroupOffset*this._averageInterval:0;this.GlobalMin=null!=e.min?e.min:this.DataMin-l,this.GlobalMax=null!=e.max?e.max:this.DataMax+o,null!=e.viewportStartGroup&&(this.MinValue=e.viewportStartGroup-l),null!=e.viewportEndGroup&&(this.MaxValue=e.viewportEndGroup+o),null!=e.viewportMin&&(this.MinValue=e.viewportMin),null!=e.viewportMax&&(this.MaxValue=e.viewportMax),null==this.MinValue&&(this.MinValue=this.GlobalMin),null==this.MaxValue&&(this.MaxValue=this.GlobalMax),this.GlobalMin>this.MinValue&&(this.GlobalMin=this.MinValue),this.GlobalMax<this.MaxValue&&(this.GlobalMax=this.MaxValue),this._timeRange=this.MaxValue-this.MinValue,this._level1Labels=null,this._level2Labels=null,this._level1Coords=null,this._level2Coords=null,this._isOneLevel=!0,this._level1Overflow=[],this._level2Overflow=[],this._locale=e._locale.toLowerCase(),this._monthResources=t.LocaleData.getMonthNames("abbreviated")},vt._getAMString=function(t){var e=t.substring(0,2);if("en-au"==t||"en-ie"==t||"en-ph"==t)return"am";if("en-gb"==t)return"";switch(e){case"en":return"AM";case"ar":return"ص";case"el":return"πμ";case"ko":return"오전";case"zh":return"上午";default:return""}},vt._getPMString=function(t){var e=t.substring(0,2);if("en-au"==t||"en-ie"==t||"en-ph"==t)return"pm";if("en-gb"==t)return"";switch(e){case"en":return"PM";case"ar":return"م";case"el":return"μμ";case"ko":return"오후";case"zh":return"下午";default:return""}},vt._getAMPMBefore=function(t){var e=t.substring(0,2);return"ko"==e||"zh"==e},vt._getDMYOrder=function(t){var e=t.substring(0,2);return"en-us"==t||"en-ph"==t?"MDY":"fa"==e||"hu"==e||"ja"==e||"ko"==e||"lt"==e||"mn"==e||"zh"==e?"YMD":"DMY"},vt._getYearTrailingCharacters=function(t){return 0==t.indexOf("ja")||0==t.indexOf("zh")?"年":0==t.indexOf("ko")?"년":""},vt._getDayTrailingCharacters=function(t){return 0==t.indexOf("ja")||0==t.indexOf("zh")?"日":0==t.indexOf("ko")?"일":""},vt.prototype.formatLabel=function(t){var e=new Date(t),i=this._formatAxisLabel(e,null,!0);return null!=i[1]?"YMD"==vt._getDMYOrder(this._locale)||this._timeRange<vt.TIME_MONTH_MIN&&this._step<vt.TIME_DAY?i[1]+" "+i[0]:i[0]+" "+i[1]:i[0]},vt.prototype._calculateGranularity=function(){return this._step>=vt.TIME_YEAR_MIN||this._timeRange>=6*vt.TIME_YEAR_MIN?vt.TIME_YEAR_MIN:this._step>=vt.TIME_MONTH_MIN||this._timeRange>=6*vt.TIME_MONTH_MIN?vt.TIME_MONTH_MIN:this._step>=vt.TIME_DAY||this._timeRange>=6*vt.TIME_DAY?vt.TIME_DAY:this._step>=vt.TIME_HOUR||this._timeRange>=6*vt.TIME_HOUR?vt.TIME_HOUR:this._step>=vt.TIME_MINUTE||this._timeRange>=6*vt.TIME_MINUTE?vt.TIME_MINUTE:vt.TIME_SECOND},vt.prototype._formatAxisLabelWithConverter=function(t,e,i){if(i){var r=null,a=null;if(i.format&&(r=i.format(this._dateToIsoWithTimeZoneConverter&&t?this._dateToIsoWithTimeZoneConverter(t):t),a=i.format(this._dateToIsoWithTimeZoneConverter&&e?this._dateToIsoWithTimeZoneConverter(e):e)),a!=r)return r}return null},vt.prototype._formatAxisLabel=function(t,e,i){var r=null,a=null,s="left"==this.Position||"right"==this.Position,n=this._calculateGranularity();return this._label1Converter||this._label2Converter?(this._label1Converter&&(r=this._formatAxisLabelWithConverter(t,e,this._label1Converter)),this._label2Converter&&(a=this._formatAxisLabelWithConverter(t,e,this._label2Converter)),[r,a]):(n===vt.TIME_YEAR_MIN?r=this._formatDate(t,!1,!1,!0):n===vt.TIME_MONTH_MIN?(null!=e&&e.getMonth()==t.getMonth()||(r=this._formatDate(t,!1,!0,!1)),null!=e&&e.getYear()==t.getYear()||(a=this._formatDate(t,!1,!1,!0))):n===vt.TIME_DAY?i?r=this._formatDate(t,!0,!0,!0):(null!=e&&e.getDate()==t.getDate()||(r=this._formatDate(t,!0,!1,!1)),null==e||e.getYear()!=t.getYear()?a=this._formatDate(t,!1,!0,!0):e.getMonth()!=t.getMonth()&&(a=this._formatDate(t,!1,!0,!1))):(n===vt.TIME_HOUR?null!=e&&e.getHours()==t.getHours()||(r=this._formatTime(t,!1,!1)):n===vt.TIME_MINUTE?null!=e&&e.getMinutes()==t.getMinutes()||(r=this._formatTime(t,!0,!1)):null!=e&&e.getSeconds()==t.getSeconds()||(r=this._formatTime(t,!0,!0)),s?null!=e&&e.getDate()==t.getDate()||(a=this._formatDate(t,!0,!0,!1)):null==e||e.getYear()!=t.getYear()?a=this._formatDate(t,!0,!0,!0):e.getMonth()!=t.getMonth()?a=this._formatDate(t,!0,!0,!1):e.getDate()!=t.getDate()&&(a=this._formatDate(t,!0,!1,!1))),[r,a])},vt.prototype._formatDate=function(t,e,i,r){var a,s=t.getFullYear();a=this._monthResources&&this._monthResources.length>=12?this._monthResources[t.getMonth()]:t.toString().split(" ")[1];var n=t.getDate();s+=vt._getYearTrailingCharacters(this._locale),n+=vt._getDayTrailingCharacters(this._locale);for(var o=vt._getDMYOrder(this._locale),l="",h=0;h<o.length;h++)e&&"D"==o[h]?l+=n+" ":i&&"M"==o[h]?l+=a+" ":r&&"Y"==o[h]&&(l+=s+" ");return l.length>0?l.slice(0,l.length-1):l},vt.prototype._formatTime=function(t,e,i){var a,s=t.getHours(),n=t.getMinutes(),o=t.getSeconds(),l=vt._getAMString(this._locale),h=vt._getPMString(this._locale),u=vt._getAMPMBefore(this._locale),g=""!=l&&""!=h,d="";return r.Agent.isRightToLeft(this.getCtx())&&(d="‏"),g?(s<12?(a=l,0==s&&(s=12)):(a=h,s>12&&(s-=12)),d+=s,(e||0!=n)&&(d+=":"+this._doubleDigit(n))):d+=this._doubleDigit(s)+":"+this._doubleDigit(n),i&&(d+=":"+this._doubleDigit(o)),g?u?a+" "+d:d+" "+a:d},vt.prototype._doubleDigit=function(t){return t<10?"0"+t:""+t},vt.prototype._getMixedFrequencyStep=function(){return this._timeRange>=6*vt.TIME_YEAR_MIN?vt.TIME_YEAR_MIN:this._timeRange>=6*vt.TIME_MONTH_MIN?vt.TIME_MONTH_MIN:this._timeRange>=6*vt.TIME_DAY?vt.TIME_DAY:this._timeRange>=vt.TIME_DAY?3*vt.TIME_HOUR:this._timeRange>=6*vt.TIME_HOUR?vt.TIME_HOUR:this._timeRange>=vt.TIME_HOUR?15*vt.TIME_MINUTE:this._timeRange>=30*vt.TIME_MINUTE?5*vt.TIME_MINUTE:this._timeRange>=6*vt.TIME_MINUTE?vt.TIME_MINUTE:this._timeRange>=vt.TIME_MINUTE?15*vt.TIME_SECOND:this._timeRange>=30*vt.TIME_SECOND?5*vt.TIME_SECOND:vt.TIME_SECOND},vt._getLabelPositions=function(t,e,i){var r=new Date(t),a=r.getTimezoneOffset();r.setMonth(0,1),r.setHours(0,0,0,0);var s=60*(a-r.getTimezoneOffset())*1e3,n=r.getTime()+s,o=[];if(i>=vt.TIME_YEAR_MIN&&i<=vt.TIME_YEAR_MAX){for(;n<t;)n=vt._addOneYear(n);for(;n<=e;)o.push(n),n=vt._addOneYear(n)}else if(i>=vt.TIME_MONTH_MIN&&i<=vt.TIME_MONTH_MAX){for(;n<t;)n=vt._addOneMonth(n);for(;n<=e;)o.push(n),n=vt._addOneMonth(n)}else for(n+=Math.ceil((t-n)/i)*i;n<=e;)o.push(n),n+=i;return o},vt._addOneYear=function(t){var e=new Date(t);return e.setFullYear(e.getFullYear()+1),e.getTime()},vt._addOneMonth=function(t){var e=new Date(t);return e.setMonth(e.getMonth()+1),e.getTime()},vt.prototype._generateLabels=function(t){var e=[],i=[],a=[],s=[],n=[],o=null,l=0,h=0,u=t.getStage(t),g=r.Agent.isRightToLeft(t),d="left"==this.Position||"right"==this.Position,c="off"!=this.Options.zoomAndScroll,p=!0,_=0;d&&"blink"===r.Agent.engine&&(_=.16*this.getTickLabelHeight());var f=[];if(null!=this._step)f=vt._getLabelPositions(this.MinValue,this.MaxValue,this._step);else if(this._mixedFrequency)this._step=this._getMixedFrequencyStep(),f=vt._getLabelPositions(this.MinValue,this.MaxValue,this._step);else{for(var v=0;v<this._groups.length;v++)this._groups[v]>=this.MinValue&&this._groups[v]<=this.MaxValue&&f.push(this._groups[v]);if(this._step=this._averageInterval,!this._skipGaps){var m;if((f=vt._treatMissingValues(f,this._calculateGranularity())).length>1&&(this._step=(f[f.length-1]-f[0])/(f.length-1)),d)m=r.TextUtils.getTextStringHeight(t,this.Options.tickLabel.style);else{var S=this._formatAxisLabel(new Date(f[0]))[0];m=r.TextUtils.getTextStringWidth(t,S,this.Options.tickLabel.style)}(m+this.GetTickLabelGapSize())*(f.length-1)>Math.abs(this._endCoord-this._startCoord)&&(this._step=this._getMixedFrequencyStep(),f=vt._getLabelPositions(this.MinValue,this.MaxValue,this._step))}}0==f.length&&(f=[this.MinValue]);for(v=0;v<f.length;v++){var y=f[v],C=this.getCoordAt(y);if(null!=C){var x=new Date(y),A=this._formatAxisLabel(x,o),b=A[0],M=A[1];if(null!=b?(a.push({text:b,coord:null!=M?C+_:C}),s.push(C),l++):(a.push(null),s.push(null)),e.push(null),c&&p&&(C=this.MinValue?this.getCoordAt(this.MinValue):C),p=!1,null!=M){var T=this.CreateLabel(t,M,null!=M?C-_:C);n.push(C),d||(g?T.alignRight():T.alignLeft()),i.push(T),this._isOneLevel=!1,h++}else i.push(null),n.push(null);o=x}}if(l=this._skipLabelsUniform(a,e,u,!1,g),!c&&h>1&&l<1.5*h){e=i,i=null;for(var I=0;I<e.length;I++)null!=e[I]&&e[I].alignCenter();l=this._skipLabelsGreedy(e,this.GetLabelDims(e,u),!1,g)}else 0==(h=this._skipLabelsGreedy(i,this.GetLabelDims(i,u),!0,g))&&(i=null);d&&null!=i&&this._skipVertLabels(e,i,u),this._level1Labels=e,this._level2Labels=i,this._level1Coords=s,this._level2Coords=n},vt._getGCDInterval=function(t){for(var e=function t(e,i){return 0===e?i:t(i%e,e)},i=t[0],r=1;r<t.length;r++)if(1===(i=e(i,t[r])))return 1;return i},vt._calculateGranularInterval=function(t,e,i){var r,a=t.getTimezoneOffset(),s=e.getTimezoneOffset(),n=e.getTime(),o=1e3*(a-s)*60;return o>0&&e.setTime(n+o),r=i===vt.TIME_YEAR_MIN?e.getFullYear()-t.getFullYear():i===vt.TIME_MONTH_MIN?12*(e.getFullYear()-t.getFullYear())+(e.getMonth()-t.getMonth()):Math.round((e.getTime()-t.getTime())/i),o>0&&e.setTime(n),r},vt._treatMissingValues=function(e,i){var r,a,s=new Set,n=!1,o=e,l=[],h=e.length,u=new Date(e[0]);for(a=1;a<h;a++){var g=new Date(e[a]),d=vt._calculateGranularInterval(u,g,i);u=g,l.push(d),d<=0||(s.add(d),r?d!==r&&(n=!0):r=d)}if(n){var c=vt._getGCDInterval(t(s));for((o=[]).push(e[0]),a=1;a<h;a++){var p=e[a],_=e[a-1];if((d=l[a-1])<=c)o.push(p);else{var f,v=d/c,m=v-1,S=Math.round((p-_)/v);for(f=1;f<=m;f++)_+=S,o.push(_);o.push(p),_=p}}}return o},vt._isOverlapping=function(t,e,i,r,a){return i>=t&&i-a<e||i<t&&r+a>t},vt.prototype._getLabelOverflow=function(t,e,i,r){var a=t-(i?r?e:0:.5*e);if(a<this.Options._minOverflowCoord)return Math.floor(a-this.Options._minOverflowCoord);var s=t+(i?r?0:e:.5*e);return s>this.Options._maxOverflowCoord?Math.ceil(s-this.Options._maxOverflowCoord):0},vt.prototype._skipLabelsGreedy=function(t,e,i,r){if(!e||e.length<=0)return!1;for(var a,s,n,o,l,h="left"==this.Position||"right"==this.Position,u=this.getTickLabelHeight(),g=h?.08*u:.24*u,d=0,c=Math.abs(this._endCoord-this._startCoord),p=0;p<e.length;p++)if(this._level2Overflow.push(0),null!=t[p]){var _=(l=t[p]).getDimensions().w;if(e[p].w>c)t[p]=null;else{var f=this._getLabelOverflow(l.getX(),_,i,r);this._level2Overflow[p]=f,0!=f&&(l.setX(l.getX()-f),e[p].x-=f)}}for(p=0;p<e.length;p++)null!=e[p]&&(h?(n=e[p].y,o=e[p].y+e[p].h):(n=e[p].x,o=e[p].x+e[p].w),null!=a&&null!=s&&vt._isOverlapping(a,s,n,o,g)&&(t[p]=null),null!=t[p]&&(a=n,s=o,d++));return d},vt.prototype._skipLabelsUniform=function(t,e,i,r){for(var a=[],s=[],n=Math.abs(this._endCoord-this._startCoord),o=0;o<t.length;o++)null!=t[o]&&(a.push(t[o]),s.push(null),this._level1Overflow.push(0));for(var l="left"==this.Position||"right"==this.Position,h=this,u=function(t){if(null==s[t])if(a[t].label=h.CreateLabel(i.getCtx(),a[t].text,a[t].coord),s[t]=a[t].label.getDimensions(i),s[t].w>n)a[t].label=null,s[t].w=0,s[t].h=0;else{var e=h._getLabelOverflow(a[t].coord,s[t].w,!1,r);0!=e&&(a[t].coord-=e,s[t].x-=e,a[t].label.setX(a[t].label.getX()-e),h._level1Overflow[t]=e)}return l?s[t].h:s[t].w},g=(u(0)+this.GetTickLabelGapSize())*(a.length-1),d=n>0?Math.ceil(g/n)-1:0,c=!0;c;){for(o=0;o<a.length;o++)o%(d+1)==0?(u(o),a[o].skipped=!1):a[o].skipped=!0;c=this.IsOverlapping(s,d),d++}var p=0;for(o=0;o<t.length;o++)null==t[o]||t[o].skipped||(e[o]=t[o].label,p++);return p},vt.prototype._skipVertLabels=function(t,e,i){for(var r=.08*this.getTickLabelHeight(),a=function(t,e){return vt._isOverlapping(t.y,t.y+t.h,e.y,e.y+e.h,r)},s=null,n=!1,o=0;o<t.length;o++)if(t[o]&&e[o]){if(t[o].alignTop(),e[o].alignBottom(),s&&a(s,e[o].getDimensions())){n=!0;break}s=t[o].getDimensions()}else if(t[o]||e[o]){var l=t[o]?t[o]:e[o];if(s&&a(s,l.getDimensions())){n=!0;break}s=l.getDimensions()}if(n){var h,u=null,g=null,d=null;for(o=0;o<t.length;o++)e[o]?(t[o]=null,e[o].alignMiddle(),h=e[o].getDimensions(),g&&a(g,h)&&(t[u]=null),d=h):t[o]&&(h=t[o].getDimensions(),d&&a(d,h)?t[o]=null:(g=h,u=o))}},vt.prototype.getLabels=function(t,e){return e&&e>1?null:(this._level1Labels||this._generateLabels(t),1==e?this._level2Labels:this._level1Labels)},vt.prototype.getMajorTickCoords=function(){var t=[];if(this._isOneLevel)for(var e=0;e<this._level1Coords.length;e++)null!=this._level1Coords[e]&&null!=this._level1Labels[e]&&t.push(this._level1Coords[e]);else for(e=1;e<this._level2Coords.length;e++)null!=this._level2Coords[e]&&t.push(this._level2Coords[e]);return t},vt.prototype.getMinorTickCoords=function(){if(this._isOneLevel)return[];for(var t=[],e=0;e<this._level1Coords.length;e++)null!=this._level1Coords[e]&&null!=this._level1Labels[e]&&t.push(this._level1Coords[e]);return t},vt.prototype.getUnboundedValueAt=function(t){if(null==t)return null;var e=(t-this._startCoord)/(this._endCoord-this._startCoord);if(this._skipGaps){var i=this._timeToIndex(this.MinValue),r=this._timeToIndex(this.MaxValue);return this._indexToTime(i+e*(r-i))}return this.MinValue+e*(this.MaxValue-this.MinValue)},vt.prototype.getUnboundedCoordAt=function(t){if(null==t)return null;var e;if(this._skipGaps){var i=this._timeToIndex(this.MinValue),r=this._timeToIndex(this.MaxValue);e=(this._timeToIndex(t)-i)/(r-i)}else e=(t-this.MinValue)/(this.MaxValue-this.MinValue);return this._startCoord+e*(this._endCoord-this._startCoord)},vt.prototype.linearToActual=function(t){return null==t?null:this._skipGaps?this._indexToTime(t):t},vt.prototype.actualToLinear=function(t){return null==t?null:this._skipGaps?this._timeToIndex(t):t},vt.prototype._timeToIndex=function(t){for(var e=this._groups.length,i=0;i<this._groups.length;i++)if(t<=this._groups[i]){e=i;break}var r=e-1,a=void 0!==this._groups[r]?this._groups[r]:this._groups[0]-this._averageInterval;return r+(t-a)/((void 0!==this._groups[e]?this._groups[e]:this._groups[this._groups.length-1]+this._averageInterval)-a)},vt.prototype._indexToTime=function(t){var e=Math.min(Math.max(Math.ceil(t),0),this._groups.length),i=e-1,r=void 0!==this._groups[i]?this._groups[i]:this._groups[0]-this._averageInterval;return r+(t-i)*((void 0!==this._groups[e]?this._groups[e]:this._groups[this._groups.length-1]+this._averageInterval)-r)},vt.prototype.getGroupWidth=function(){return this._skipGaps?Math.abs(this.getUnboundedCoordAt(this._indexToTime(1))-this.getUnboundedCoordAt(this._indexToTime(0))):Math.abs(this.getUnboundedCoordAt(this.MinValue+this._averageInterval)-this.getUnboundedCoordAt(this.MinValue))},vt.prototype.getMinimumExtent=function(){return this._skipGaps?1:this._mixedFrequency?Math.min((this.getGlobalMax()-this.getGlobalMin())/8,this._averageInterval):this._averageInterval},vt.prototype.getStartOverflow=function(){return"top"!=this.Position&&"bottom"!=this.Position||!r.Agent.isRightToLeft(this.getCtx())?this.StartOverflow:this.EndOverflow},vt.prototype.getEndOverflow=function(){return"top"!=this.Position&&"bottom"!=this.Position||!r.Agent.isRightToLeft(this.getCtx())?this.EndOverflow:this.StartOverflow};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var mt=new Object;r.Obj.createSubclass(mt,r.Obj),mt.renderBackgroundObjects=function(t,e,i){mt._renderObjects(t,e,i,"back")},mt.renderForegroundObjects=function(t,e,i){mt._renderObjects(t,e,i,"front")},mt._renderObjects=function(t,e,i,r){mt._renderObjectsForAxis(t,e,i,r,t.xAxis,c.getAxisRefObjs(t,"x")),mt._renderObjectsForAxis(t,e,i,r,t.yAxis,c.getAxisRefObjs(t,"y")),mt._renderObjectsForAxis(t,e,i,r,t.y2Axis,c.getAxisRefObjs(t,"y2"))},mt._renderObjectsForAxis=function(t,e,i,r,a,s){if(s&&a)for(var n=0;n<s.length;n++){var o=s[n];if(m.isObjectRendered(t,o)&&(o&&m.getLocation(o)==r)){var l,h,u=m.getType(o);if("area"==u?l=mt._createReferenceArea(o,t,i,a):"line"==u&&(l=mt._createReferenceLine(o,t,i,a),h=mt._createReferenceLine(o,t,i,a,!0)),null!=l){var g=a==t.xAxis?"xAxis":a==t.yAxis?"yAxis":"y2Axis",d=new C(t,h?[l,h]:[l],o,n,g);t.registerObject(d),t.getEventManager().associate(l,d),e.addChild(l),h&&e.addChild(h)}}}},mt._createReferenceArea=function(t,e,i,a){var s,n=e.getCtx(),o=a.getPosition(),l="top"==o||"bottom"==o,h="radial"==o,d=m.getColor(e,t),p=m.getLineType(t),_=t.style||t.svgStyle,f=t.className||t.svgClassName;if(null==t.items||a!=e.yAxis&&a!=e.y2Axis){var v=m.getLowValue(t),S=m.getHighValue(t);null!=v&&v!=-1/0||(v=a.getInfo().getGlobalMin()),null!=S&&S!=1/0||(S=a.getInfo().getGlobalMax());var y=mt._getAxisCoord(e,a,v),C=mt._getAxisCoord(e,a,S);if(u.isPolar(e)){var x,A=i.x+i.w/2,b=i.y+i.h/2;if(h)if(R.isGridPolygonal(e)){var M=c.getGroupCount(e),T=r.PolygonUtils.getRegularPolygonPoints(A,b,M,C,0,1),I=r.PolygonUtils.getRegularPolygonPoints(A,b,M,y,0,0);x=r.PathUtils.polyline(T)+r.PathUtils.polyline(I)+r.PathUtils.closePath()}else x=r.PathUtils.moveTo(A,b-C)+r.PathUtils.arcTo(C,C,Math.PI,1,A,b+C)+r.PathUtils.arcTo(C,C,Math.PI,1,A,b-C)+r.PathUtils.moveTo(A,b-y)+r.PathUtils.arcTo(y,y,Math.PI,0,A,b+y)+r.PathUtils.arcTo(y,y,Math.PI,0,A,b-y)+r.PathUtils.closePath();else{var D=e.getRadius(),O=g.polarToCartesian(D,y,i),E=g.polarToCartesian(D,C,i);x=r.PathUtils.moveTo(A,b)+r.PathUtils.lineTo(O.x,O.y)+r.PathUtils.arcTo(D,D,C-y,r.Agent.isRightToLeft(n)?0:1,E.x,E.y)+r.PathUtils.lineTo(E.x,E.y)+r.PathUtils.closePath()}s=new r.Path(n,x)}else{var P;P=l?[y,0,C,0,C,i.h,y,i.h]:[0,y,0,C,i.w,C,i.w,y],s=new r.Polygon(n,P)}s.setSolidFill(d),s.setStyle(_).setClassName(f)}else{var L=t.items,w=[],B=[];if(e.xAxis.isGroupAxis())for(;L.length<c.getGroupCount(e);)L.push(null);for(var k=0;k<L.length;k++){var F=L[k],N=m.getLowValue(F),H=m.getHighValue(F);if(null!=N&&null!=H){var G=a.getUnboundedCoordAt(N),U=a.getUnboundedCoordAt(H),j=e.xAxis.getUnboundedCoordAt(m.getXValue(e,L,k));w.push(new ht(j,U,U)),B.push(new ht(j,G,G))}else w.push(new ht),B.push(new ht)}s=new ut(e,!0,i,null,_,f,new r.SolidFill(d),null,p,w,p,B)}return s},mt._createReferenceLine=function(t,e,a,s,n){var o,l=s.getPosition(),h="top"==l||"bottom"==l,u="radial"==l,d="tangential"==l,p=m.getLineWidth(e,t),_=m.getLineType(t),f=m.getColor(e,t),v=t.style||t.svgStyle,S=n?"oj-chart-reference-object-inner-line":t.className||t.svgClassName,y=new r.Stroke(f,1,p,!1,r.Stroke.getDefaultDashProps(t.lineStyle,p)),C=e.getCtx();if(null==t.items||s!=e.yAxis&&s!=e.y2Axis){if(null==t.value)return null;var x=mt._getAxisCoord(e,s,t.value);if(null==x||x==1/0||x==-1/0)return null;n&&(x-=Math.ceil(p/2));var A=a.x+a.w/2,b=a.y+a.h/2;if(u){if(R.isGridPolygonal(e)){T=r.PolygonUtils.getRegularPolygonPoints(A,b,c.getGroupCount(e),x,0);o=new r.Polygon(C,T)}else o=new r.Circle(C,A,b,x);o.setFill(null)}else if(d){var M=g.polarToCartesian(e.getRadius(),x,a);o=new r.Line(C,A,b,M.x,M.y)}else(o=h?new r.Line(C,x,0,x,a.h):new r.Line(C,0,x,a.w,x)).setPixelHinting(!0);o.setStroke(y),o.setStyle(v).setClassName(S)}else{var T,I=t.items;if([].push(T=[]),e.xAxis.isGroupAxis())for(;I.length<c.getGroupCount(e);)I.push(null);for(var D=[],O=0;O<I.length;O++){var E=I[O],P=null;if(null!=E&&("object"!=i(E)?P=E:null!=E.value&&(P=E.value)),null!=P){var L=s.getUnboundedCoordAt(P)-(n?p/2:0),w=e.xAxis.getUnboundedCoordAt(m.getXValue(e,I,O));D.push(new ht(w,L,L))}else D.push(new ht)}o=new ut(e,!1,a,null,v,S,null,y,_,D)}return o},mt._getAxisCoord=function(t,e,i){if(e.isGroupAxis()){var r=c.getGroupIndex(t,i);if(r>=0)return e.getUnboundedCoordAt(r)}return isNaN(i)?null:e.getUnboundedCoordAt(i)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var St=new Object;r.Obj.createSubclass(St,r.Obj),St._MIN_BUBBLE_SIZE=6,St._MAX_BUBBLE_SIZE_RATIO=.5,St.calcBubbleSizes=function(t,e){for(var i,a,s=R.getMinMaxValue(t,"z"),n=s.min,o=s.max,l=St._MIN_BUBBLE_SIZE,h=St._MAX_BUBBLE_SIZE_RATIO*Math.min(e.w,e.h),g=c.getSeriesCount(t),d="withoutRescale"==L.getHideAndShowBehavior(t),p=t.getOptionsCache(),_=0;_<g;_++)if(d||c.isSeriesRendered(t,_))for(var f=c.getSeriesItem(t,_),v=f.items?f.items.length:0,m=0;m<v;m++){var S=f.items[m];if(S){var y=r.LayoutUtils.getBubbleSize(S.z,n,o,l,h);p.putToCachedMap2D("bubbleSizeCache",_,m,y)}}u.isPolar(t)?(i=1/0,a=t.getRadius()):(i=e.w-2.4*R.getTickLabelHeight(t,"y"),a=e.h-1.6*R.getTickLabelHeight(t,"x")),i-=.5*h,a-=.5*h;var C=t.getCache(),x=St._getAxisValueRange(t,"x");C.putToCache("_xAxisBubbleRatio",x/i);var A=St._getAxisValueRange(t,"y");C.putToCache("_yAxisBubbleRatio",A/a)},St._getAxisValueRange=function(t,e){var i=t.getOptions()[e+"Axis"],a=R.isLog(t,e),s=!a&&"zero"==R.getBaselineScaling(t,e),n=R.getMinMaxValue(t,e,!0),o=i.min;null==o&&(o=s?Math.min(0,n.min):n.min);var l=i.max;return null==l&&(l=s?Math.max(0,n.max):n.max),a&&l>0&&o>0?l==o?6:r.Math.log10(l/o):l==o?60:l-o},St.sortMarkers=function(t){t.sort(St._compareSize)},St.sortMarkerInfos=function(t){t.sort(St._compareInfoSize)},St._compareSize=function(t,e){return e.getSize()-t.getSize()},St._compareInfoSize=function(t,e){return e.size-t.size},St.checkPixelMap=function(t,e,i,r){var a=r/2,s=Math.max(Math.floor(e-a),0),n=Math.max(Math.floor(i-a),0),o=Math.max(Math.ceil(e+a),0),l=Math.max(Math.ceil(i+a),0);return t.isObscured(s,n,o,l)},St.updatePixelMap=function(t,e,i,r,a){var s=.4*r,n=Math.max(Math.round(e-s),0),o=Math.max(Math.round(e+s),0),l=Math.max(Math.round(i-s),0),h=Math.max(Math.round(i+s),0);t.obscure(n,l,o,h,a)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var yt=new Object;r.Obj.createSubclass(yt,r.Obj),yt._MIN_TOUCH_MARKER_SIZE=16,yt._MIN_CHARS_DATA_LABEL=3,yt.FILTER_THRESHOLD_SCATTER_BUBBLE=1e4,yt.render=function(t,e,i){"off"==t.getOptions().plotArea.rendered?yt._renderAxisLines(t,e,i):i.w>0&&i.h>0&&(t._currentMarkers=new Array,t._currentAreas=new Array,yt._renderBackgroundObjects(t,e,i),yt._renderTicks(t,e,i),yt._renderForegroundObjects(t,e,i))},yt._renderBackgroundObjects=function(t,e,i){var a=t.getOptions(),s=yt._getBackgroundShape(t,i),n=f.getBackgroundColor(t);if(n?s.setSolidFill(n):s.setInvisibleFill(),e.addChild(s),t.getCache().putToCache("plotAreaBackground",s),L.isPlotAreaDraggable(t)&&s.setClassName("oj-draggable"),a.xAxis.referenceObjects||a.yAxis.referenceObjects||a.y2Axis.referenceObjects){var o=yt.createClippedGroup(t,e,i);mt.renderBackgroundObjects(t,o,i)}if(u.isBLAC(t)){var l=new r.Container(t.getCtx());e.addChild(l),t.__setAreaContainer(l),c.hasAreaSeries(t)&&yt._renderAreas(t,l,i,!1)}},yt._getBackgroundShape=function(t,e){var i,a=t.getCtx();if(u.isPolar(t)){var s=e.x+e.w/2,n=e.y+e.h/2;if(R.isGridPolygonal(t)){var o=r.PolygonUtils.getRegularPolygonPoints(s,n,c.getGroupCount(t),t.getRadius(),0);i=new r.Polygon(a,o)}else i=new r.Circle(a,s,n,t.getRadius())}else i=new r.Rect(a,e.x,e.y,e.w,e.h);return i},yt._renderTicks=function(t,e,i){t.xAxis&&R.isMinorTickRendered(t,"x")&&yt._renderMinorTicks(t,e,t.xAxis,i),t.yAxis&&R.isMinorTickRendered(t,"y")&&yt._renderMinorTicks(t,e,t.yAxis,i),t.y2Axis&&R.isMinorTickRendered(t,"y2")&&yt._renderMinorTicks(t,e,t.y2Axis,i),t.xAxis&&R.isMajorTickRendered(t,"x")&&yt._renderMajorTicks(t,e,t.xAxis,i),t.yAxis&&R.isMajorTickRendered(t,"y")&&yt._renderMajorTicks(t,e,t.yAxis,i),t.y2Axis&&R.isMajorTickRendered(t,"y2")&&yt._renderMajorTicks(t,e,t.y2Axis,i)},yt._renderAxisLines=function(t,e,i){t.xAxis&&t.yAxis&&R.isAxisLineRendered(t,"x")&&yt._renderAxisLine(t,e,t.xAxis,t.yAxis,i),t.xAxis&&t.y2Axis&&R.isAxisLineRendered(t,"x")&&(t.yAxis&&!c.isSplitDualY(t)||yt._renderAxisLine(t,e,t.xAxis,t.y2Axis,i)),t.yAxis&&t.xAxis&&R.isAxisLineRendered(t,"y")&&yt._renderAxisLine(t,e,t.yAxis,t.xAxis,i),t.y2Axis&&t.xAxis&&R.isAxisLineRendered(t,"y2")&&yt._renderAxisLine(t,e,t.y2Axis,t.xAxis,i)},yt._renderMajorTicks=function(t,e,i,r){yt._renderGridlines(t,e,i.getOptions().majorTick,i.getPosition(),i.getMajorTickCoords(),i.getBaselineCoord(),r)},yt._renderMinorTicks=function(t,e,i,r){yt._renderGridlines(t,e,i.getOptions().minorTick,i.getPosition(),i.getMinorTickCoords(),null,r)},yt._renderAxisLine=function(t,e,i,r,a){var s=i.getOptions(),n=s.position,o="bottom"==n||"right"==n||"tangential"==n?r.getMaxCoord():r.getMinCoord();yt._renderGridlines(t,e,s.axisLine,r.getPosition(),[o],null,a)},yt._renderGridlines=function(t,e,i,a,s,n,o){var l=i.lineColor,h=i.lineStyle,u=new r.Stroke(l,1,i.lineWidth,!1,r.Stroke.getDefaultDashProps(h,i.lineWidth)),g=u.getColor();"inherit"!=i.baselineColor&&(g="auto"==i.baselineColor?r.ColorUtils.getDarker(l,.6):i.baselineColor);for(var d=null!=i.baselineWidth?i.baselineWidth:i.lineWidth,c=i.baselineStyle?i.baselineStyle:i.lineStyle,p=new r.Stroke(g,1,d,!1,r.Stroke.getDefaultDashProps(c,d)),_="",f=0;f<s.length;f++){var v=null!=n&&s[f]==n;"radial"==a||"tangential"==a||v?yt._renderGridline(t,e,a,s[f],v?p:u,o):_+="top"==a||"bottom"==a?r.PathUtils.moveTo(s[f],o.y)+r.PathUtils.verticalLineTo(o.y+o.h):r.PathUtils.moveTo(o.x,s[f])+r.PathUtils.horizontalLineTo(o.x+o.w)}if(""!=_){var m=new r.Path(t.getCtx(),_);(!r.Agent.isTouchDevice()||r.Agent.getDevicePixelRatio()>1)&&m.setPixelHinting(!0),m.setStroke(u),m.setMouseEnabled(!1),e.addChild(m)}},yt._renderGridline=function(t,e,i,a,s,n){var o,l=e.getCtx(),h=!r.Agent.isTouchDevice()||r.Agent.getDevicePixelRatio()>1;if("radial"==i){if(R.isGridPolygonal(t)){var u=r.PolygonUtils.getRegularPolygonPoints(0,0,c.getGroupCount(t),a,0);o=new r.Polygon(l,u)}else o=new r.Circle(l,0,0,a);o.setInvisibleFill(),o.setTranslate(n.x+n.w/2,n.y+n.h/2)}else if("tangential"==i){o=new r.Line(l,0,0,t.getRadius()*Math.sin(a),-t.getRadius()*Math.cos(a));var g=a%(Math.PI/2);(g<.001||g>Math.PI/2-.001)&&h&&o.setPixelHinting(!0),o.setTranslate(n.x+n.w/2,n.y+n.h/2)}else o="top"==i||"bottom"==i?new r.Line(l,a,n.y,a,n.y+n.h):new r.Line(l,n.x,a,n.x+n.w,a),h&&o.setPixelHinting(!0);o.setStroke(s),o.setMouseEnabled(!1),e.addChild(o)},yt._renderForegroundObjects=function(t,e,i){var r=t.getOptions(),a=yt.createClippedGroup(t,e,i);yt._renderAxisLines(t,e,i);var s=r.plotArea.borderColor,n=r.plotArea.borderWidth;if(s&&0!=n){var o=yt._getBackgroundShape(t,i);o.setInvisibleFill(),o.setSolidStroke(s,null,n),o.setMouseEnabled(!1),e.addChild(o)}u.isBLAC(t)?(c.hasLineWithAreaSeries(t)&&yt._renderAreas(t,e,i,!0),c.hasBarSeries(t)&&yt._renderBars(t,a,i),c.hasCandlestickSeries(t)&&yt._renderStock(t,a,i),c.hasBoxPlotSeries(t)&&yt._renderBoxPlot(t,a,i),c.hasLineSeries(t)&&yt._renderLines(t,e,a,i)):u.isScatterBubble(t)&&yt._renderScatterBubble(t,e,a,!0,i),(r.xAxis.referenceObjects||r.yAxis.referenceObjects||r.y2Axis.referenceObjects)&&(a=yt.createClippedGroup(t,e,i),mt.renderForegroundObjects(t,a,i));var l=c.getInitialSelection(t);N.setInitialSelection(t,l),t.highlight(c.getHighlightedCategories(t))},yt._renderDataLabel=function(t,e,i,a,s,n,o,l,h,g){if(!u.isOverview(t)){var d="bar"==c.getSeriesType(t,a),p=u.isHorizontal(t),_={width:p?i.w:g,height:p?g:i.h},v=t.getOptions(),m=v.styleDefaults,S=null!=t.y2Axis,y="on"===v.legend.rendered;d&&t.getOptionsCache().putToCachedMap2D("barDims",a,s,_);var C=f.getDataLabel(t,a,s,n,l,h);if(null!=C){var x=B.getDataLabelPosition(t,a,s,n,l,h);if("none"!=x){var A=new r.OutputText(t.getCtx(),C,0,0);A.setMouseEnabled(!1);var b=h?m.stackLabelStyle:f.getDataLabelStyle(t,a,s,n,o,x,l);A.setCSSStyle(b),A.setY(i.y+i.h/2),A.setX(i.x+i.w/2),A.alignCenter(),A.alignMiddle();var M=A.getDimensions(),T=t.getCache().getFromCache("plotAreaDims");T||(T=t.getPlotArea().getDimensions(),t.getCache().putToCache("plotAreaDims",T));var I=function(t,e,i,r){var a={x:null,y:null},s=r&&r.xAxis&&("left"==t||"right"==t),n=r&&r.top&&("left"==t||"right"==t),o=r&&((S||!y)&&r.y2Axis||r.legend)&&("top"==t||"bottom"==t),l=r&&r.yAxis&&("top"==t||"bottom"==t);"left"==t?a.x=e.x-i.w/2-f.MARKER_DATA_LABEL_GAP:"right"==t?a.x=e.x+e.w+i.w/2+f.MARKER_DATA_LABEL_GAP:"top"==t?a.y=e.y-i.h/2:"bottom"==t&&(a.y=e.y+e.h+i.h/2+f.MARKER_DATA_LABEL_GAP/2);var h=2*f.MARKER_DATA_LABEL_GAP;return o?a.x=T.x+T.w-i.w/2-h:l?a.x=i.w/2+h:s?a.y=T.y+T.h-i.h/2-h:n&&(a.y=i.h/2+h),a},D=m.dataLabelCollision,O=I(x,i,M);if("fitInBounds"===D){var E=f.getDataLabelCollisions(t,O,M,T,p),P=f.adjustDataLabelPosition(x,E,S);P!=x&&u.isBubble(t)&&(b=h?m.stackLabelStyle:f.getDataLabelStyle(t,a,s,n,o,P,l),A.setCSSStyle(b)),O=I(x=P,i,M,E)}if(null!=O.x||null!=O.y)null!=O.x&&A.setX(O.x),null!=O.y&&A.setY(O.y);else{if(d){if(M.w>_.width||M.h>_.height)return;"inLeft"==x?A.setX(i.x+M.w/2+f.MARKER_DATA_LABEL_GAP):"inRight"==x?A.setX(i.x+i.w-M.w/2-f.MARKER_DATA_LABEL_GAP):"inTop"==x?A.setY(i.y+M.h/2+f.MARKER_DATA_LABEL_GAP):"inBottom"==x&&A.setY(i.y+i.h-M.h/2-f.MARKER_DATA_LABEL_GAP/2)}else if(u.isBubble(t)){i.x+=f.MARKER_DATA_LABEL_GAP,i.y+=f.MARKER_DATA_LABEL_GAP,i.h-=2*f.MARKER_DATA_LABEL_GAP,i.w-=2*f.MARKER_DATA_LABEL_GAP;var L=r.TextUtils.getOptimalFontSize(A.getCtx(),A.getTextString(),A.getCSSStyle(),i);if(A.setFontSize(L),!r.TextUtils.fitText(A,i.w,i.h,e,yt._MIN_CHARS_DATA_LABEL))return}if(null!=f.getPattern(t,a,s)){var w=.15*(M=A.getDimensions()).h,R=r.PathUtils.roundedRectangle(M.x-w,M.y,M.w+2*w,M.h,2,2,2,2),k=new r.Path(t.getCtx(),R);k.setSolidFill("#FFFFFF",.9),e.addChild(k)}}if(u.isBar(t)){var F,N=A.getDimensions(),H=!1;if("left"==x&&N.x<0)H=!0,F=i.x-f.MARKER_DATA_LABEL_GAP;else if("right"==x&&N.x+N.w>T.w+f.MARKER_DATA_LABEL_GAP)H=!0,F=T.w-i.w-f.MARKER_DATA_LABEL_GAP;else{if("top"==x&&N.y<0)return;if("bottom"==x&&N.y+N.h>T.y+T.h+f.MARKER_DATA_LABEL_GAP)return}if(H){if(!isNaN(C))return;if(!r.TextUtils.fitText(A,F,i.h,e,1))return;M=A.getDimensions(),"left"==x?A.setX(i.x-M.w/2-f.MARKER_DATA_LABEL_GAP):"right"==x&&A.setX(i.x+i.w+M.w/2+f.MARKER_DATA_LABEL_GAP)}}f.optimizeMarkerStroke(t)&&A.setSolidStroke("none"),e.addChild(A),t.addDataLabel(A)}}}},yt._renderDataLabelForMarker=function(t,e,i){var a=t.getEventManager().getLogicalObject(i);if(a){var s=a.getSeriesIndex(),n=a.getGroupIndex(),o=a.getNestedDataItemIndex();if(i instanceof r.SimpleMarker){var l=new r.Rectangle(i.getCx()-i.getWidth()/2,i.getCy()-i.getHeight()/2,i.getWidth(),i.getHeight());yt._renderDataLabel(t,e,l,s,n,o,i.getDataColor())}else i instanceof ct&&(yt._renderDataLabel(t,e,i.getBoundingBox1(),s,n,o,i.getDataColor(),"low"),yt._renderDataLabel(t,e,i.getBoundingBox2(),s,n,o,i.getDataColor(),"high"))}},yt._renderScatterBubble=function(t,e,i,a,s){var n,o=yt._filterScatterBubble(t,a,s),l=c.getSeriesCount(t);for(n=0;n<l;n++)"none"!=f.getLineType(t,n)&&yt._renderLinesForSeries(t,i,n,s);var h=f.getMarkerBorderColor(t),g=f.getBorderWidth(t),d=new r.Stroke(h,1,g),p=[];if(o)for(var _=f.optimizeMarkerStroke(t),v=_?d.getColor():null,m=_?d.getWidth():null,S=0;S<o.length;S++){var y=o[S],C=yt._createMarker(t,y,v,m);p.push(C)}else{for(n=0;n<l;n++){var x=yt._getMarkersForSeries(t,n,s,d);p=p.concat(x)}a&&St.sortMarkers(p)}u.isBubble(t)?yt._addMarkersToContainer(t,i,p,d):yt._addMarkersToContainer(t,e,p,d)},yt._renderMarkersForSeries=function(t,e,i,a){var s,n=f.getMarkerBorderColor(t,i),o=f.getBorderWidth(t,i),l=new r.Stroke(n,1,o);s=c.isRangeSeries(t,i)?yt._getRangeMarkersForSeries(t,i,a):yt._getMarkersForSeries(t,i,a,l),yt._addMarkersToContainer(t,e,s,l)},yt._addMarkersToContainer=function(t,e,i,a){var s=e,n=f.optimizeMarkerStroke(t),o=f.optimizeMarkerFill(t);(n||o)&&(s=new r.Container(t.getCtx()),n?s.setStroke(a):s.setInvisibleFill(),e.addChild(s));for(var l=0;l<i.length;l++)s.addChild(i[l]),yt._renderDataLabelForMarker(t,s,i[l]);t._currentMarkers.push(i)},yt._getMarkerInfo=function(t,e,i,a,s){var n=t.getOptions(),o=c.getValue(t,e,i,a);if(null==o||isNaN(o))return null;if(c.isDataItemFiltered(t,e,i))return null;var l=c.getGroupCount(t),h=f.isMarkerDisplayed(t,e,i,a);if(!h&&(null==a||a<0)){var g=l-1,d=u.isPolar(t),p=d&&g>0&&0==i?g:i-1,_=d&&g>0&&i==g?0:i+1,v=c.getValue(t,e,p),m=c.getValue(t,e,_);null!=v&&!isNaN(v)||null!=m&&!isNaN(m)||(h=!0)}if(!h){if(u.isSpark(t))return null;if((n._duringZoomAndScroll||u.isOverview(t))&&!c.isDataSelected(t,e,i,a))return null}if(!c.isDataItemRendered(t,e,i,a))return!1;var S=!0,y=c.getMarkerPosition(t,e,i,a,s),C=f.getMarkerSize(t,e,i,a);return s&&y&&C&&(S=s.intersects(new r.Rectangle(y.x-C/2,y.y-C/2,C,C))),y&&S?{seriesIndex:e,groupIndex:i,itemIndex:a,x:y.x,y:y.y,size:C,markerDisplayed:h}:null},yt._getScatterBubbleMarkerInfo=function(t,e,i,r){if(!c.isDataItemRendered(t,e,i))return!1;var a=c.getScatterBubbleMarkerPosition(t,e,i);if(!a)return null;var s=f.getMarkerSize(t,e,i);return s?{seriesIndex:e,groupIndex:i,x:a.x,y:a.y,size:s}:null},yt._getMarkersForSeries=function(t,e,i,r){if(!c.isSeriesRendered(t,e))return[];for(var a=f.optimizeMarkerStroke(t),s=a?r.getColor():null,n=a?r.getWidth():null,o=[],l=c.getGroupCount(t),h=0;h<l;h++){var u=yt._getMarkerInfo(t,e,h,null,i);if(u){var g=yt._createMarker(t,u,s,n);null!=g&&o.push(g)}}return o},yt._createMarker=function(t,e,i,a){var s,n=r.Agent.isTouchDevice(),o=t.getCtx(),l=f.optimizeMarkerStroke(t),h=f.optimizeMarkerFill(t),g=e.seriesIndex,d=e.groupIndex,c=e.itemIndex,p=f.getMarkerColor(t,g,d,c),_=f.getMarkerShape(t,g,d,c),v=e.markerDisplayed;if(null==v&&(v=f.isMarkerDisplayed(t,g,d,c)),v){var m=f.getImageSource(t,g,d,c,"source");if(m){var S=f.getImageSource(t,g,d,c,"sourceSelected"),C=f.getImageSource(t,g,d,c,"sourceHover"),x=f.getImageSource(t,g,d,c,"sourceHoverSelected");s=new r.ImageMarker(o,e.x,e.y,e.size,e.size,null,m,S,C,x),f.isSelectable(t,g,d)&&s.setCursor(r.SelectionEffectUtils.getSelectingCursor())}else{(s=new r.SimpleMarker(o,_,e.x,e.y,e.size,e.size,null,null,!0)).setFill(k.getMarkerFill(t,g,d,c));var A=f.getBorderColor(t,g,d,c),b=f.getDefaultMarkerBorderColor(t,g,d,c),M=f.getUserBorderWidth(t,g,d,c),T=f.getDefaultMarkerBorderWidth(t,g,d,c),I=A||b,D=null!==M?M:T;if(I===i&&D===a||s.setSolidStroke(I,null,D),s.setDataColor(p,!0),"redwood"===t.getCtx().getThemeBehavior())u.isBubble(t)&&s.addClassName("oj-dvt-bubble-marker"),A||u.isBubble(t)||s.addClassName("oj-dvt-default-border-color"),null==M&&s.addClassName("oj-dvt-default-border-width"),f.isSelectable(t,g,d)&&(s.setCursor(r.SelectionEffectUtils.getSelectingCursor()),u.isBubble(t)?s.setFeedbackClassName("oj-dvt-selectable"):s.setFeedbackClassName("oj-dvt-selectable-marker"));else{f.isSelectable(t,g,d)&&s.setCursor(r.SelectionEffectUtils.getSelectingCursor());var O=r.SelectionEffectUtils.getHoverBorderColor(p),E=f.getSelectedInnerColor(t),P=f.getSelectedOuterColor(t);s.setHoverStroke(new r.Stroke(E,1,1),new r.Stroke(O,1,3.5)),s.setSelectedStroke(new r.Stroke(E,1,1.5),new r.Stroke(P,1,4.5)),s.setSelectedHoverStroke(new r.Stroke(E,1,1.5),new r.Stroke(O,1,4.5))}s.addClassName(f.getMarkerClassName(t,g,d,c)),s.setStyle(f.getMarkerStyle(t,g,d,c))}n&&e.size<yt._MIN_TOUCH_MARKER_SIZE&&yt._addMarkerHitArea(s,e.x,e.y,l)}else f.isSelectable(t,g,d)?((s=new gt(o,_,e.x,e.y,e.size,l)).setCursor(r.SelectionEffectUtils.getSelectingCursor()),n&&yt._addMarkerHitArea(s,e.x,e.y,l)):(n&&(e.size=yt._MIN_TOUCH_MARKER_SIZE),s=new gt(o,r.SimpleMarker.SQUARE,e.x,e.y,e.size,l)),null!=s&&(h||s.setInvisibleFill(),s.setDataColor(p));return null!=s&&y.associate(s,t,g,d,c,e),s},yt._addMarkerHitArea=function(t,e,i,a){var s=new r.Rect(t.getCtx(),e-yt._MIN_TOUCH_MARKER_SIZE/2,i-yt._MIN_TOUCH_MARKER_SIZE/2,yt._MIN_TOUCH_MARKER_SIZE,yt._MIN_TOUCH_MARKER_SIZE);a&&s.setSolidStroke("none"),s.setInvisibleFill(),t.addChild(s)},yt._getRangeMarkersForSeries=function(t,e,i){if(!c.isSeriesRendered(t,e))return[];for(var a=r.Agent.isTouchDevice(),s=t.getCtx(),n=t.xAxis,o=c.isAssignedToY2(t,e)?t.y2Axis:t.yAxis,l=t.getOptions(),h=c.getGroupCount(t),d=[],p=0;p<h;p++)if(!c.isDataItemFiltered(t,e,p)&&c.isDataItemRendered(t,e,p)){var _=n.getCoordAt(c.getXValue(t,e,p)),v=o.getUnboundedCoordAt(c.getLowValue(t,e,p)),m=o.getUnboundedCoordAt(c.getHighValue(t,e,p));if(null!=_&&null!=v&&null!=m){var S=f.isMarkerDisplayed(t,e,p);if(!S){var C=h-1,x=u.isPolar(t),A=x&&C>0&&0==p?C:p-1,b=x&&C>0&&p==C?0:p+1,M=c.getLowValue(t,e,A),T=c.getHighValue(t,e,A),I=c.getLowValue(t,e,b),D=c.getHighValue(t,e,A);null==M&&null==T&&null==I&&null==D&&(S=!0)}if(!(l._duringZoomAndScroll||u.isOverview(t)||u.isSpark(t))||S||c.isDataSelected(t,e,p)){var O=g.convertAxisCoord(t,new r.Point(_,v),i),E=g.convertAxisCoord(t,new r.Point(_,m),i),P=new r.Point((O.x+E.x)/2,(O.y+E.y)/2),L=f.getMarkerSize(t,e,p),w=new ct(s,O.x,O.y,E.x,E.y,L,!S),R=k.getMarkerFill(t,e,p),B=f.getMarkerBorderColor(t,e,p),F=f.getBorderWidth(t,e,p),N=new r.Stroke(B,1,F),H=f.getMarkerColor(t,e,p),G=f.getSelectedInnerColor(t),U=f.getSelectedOuterColor(t);w.setStyleProperties(R,N,H,G,U),f.isSelectable(t,e,p)&&w.setCursor(r.SelectionEffectUtils.getSelectingCursor());var j=new r.Line(s,O.x,O.y,E.x,E.y);j.setSolidStroke("rgba(0,0,0,0)",null,a?Math.max(L,yt._MIN_TOUCH_MARKER_SIZE):L),w.addChild(j),d.push(w),y.associate(w,t,e,p,null,P)}}}return d},yt._renderBars=function(t,e,i){var a=u.isHorizontal(t),s=u.isPolar(t),n=u.isStock(t),o="pixel"==f.getBarSpacing(t),l=r.Agent.isRightToLeft(t.getCtx()),h=f.isStackLabelRendered(t),g=c.isStacked(t);c.getSeriesCount(t)<2&&h&&(g=!0);for(var d=f.getSelectedInnerColor(t),p=f.getSelectedOuterColor(t),_=t.getOptions()._duringZoomAndScroll,v=f.getGroupWidth(t),m={},S=0;S<c.getSeriesCount(t);S++)if("bar"==c.getSeriesType(t,S)){yt._filterPointsForSeries(t,S);for(var C="",x=t.getOptionsCache().getFromCachedMap("itemStyleSet",S),A=c.getStackCategory(t,S)||"",b=c.isAssignedToY2(t,S),M=R.getViewportMinMaxGroupIndex(t,S),T=M.min-1;T<=M.max+1;T++)if(!c.isDataItemFiltered(t,S,T)&&c.isDataItemRendered(t,S,T)&&0!=c.getZValue(t,S,T)){var I=B.getBarInfo(t,S,T,i);if(null!=I){var D=I.yCoord,O=I.baseCoord,E=I.axisCoord,P=I.x1,L=I.x2,w=I.barWidth;if(g){var F=""+T+A+b+(c.getValue(t,S,T)<0);if(Math.abs(O-D)<.5&&Math.abs(D-m[F])<.5&&!c.isOutermostBar(t,S,T))continue;m[F]&&(O=m[F]),m[F]=D}var N,H=!1;if(Math.abs(D-O)<1&&(c.isRangeSeries(t,S)?D--:g&&!c.isOutermostBar(t,S,T)||(H=!0,D=D>O||a&&!l&&D==O?O+3:O-3)),s)N=new dt(t,E,O,D,P,L,i);else{var G=_&&v<5&&!x;if(N=new nt(t,E,O,D,P,L,G),G){var U=N.getBoundingBox();C+=r.PathUtils.moveTo(U.x,U.y)+r.PathUtils.horizontalLineTo(U.x+U.w)+r.PathUtils.verticalLineTo(U.y+U.h)+r.PathUtils.horizontalLineTo(U.x)+r.PathUtils.closePath();continue}}e.addChild(N),f.isSelectable(t,S,T)&&N.setCursor(r.SelectionEffectUtils.getSelectingCursor());var j,V=null;if(H)j=r.SolidFill.invisibleFill();else{j=k.getBarFill(t,S,T,w);var Y=f.getBorderColor(t,S,T),W=f.getBorderWidth(t,S,T);Y&&(V=new r.Stroke(Y,1,W))}var z=f.getColor(t,S,T),X=f.getClassName(t,S,T),K=f.getStyle(t,S,T);N.setStyleProperties(j,V,z,d,p,X,K),o&&N.setPixelHinting(!0),y.associate(N,t,S,T,null,I.dataPos),c.isRangeSeries(t,S)?(yt._renderDataLabel(t,e,N.getBoundingBox(),S,T,null,z,"low",!1,N.getOriginalBarSize()),yt._renderDataLabel(t,e,N.getBoundingBox(),S,T,null,z,"high",!1,N.getOriginalBarSize())):yt._renderDataLabel(t,e,N.getBoundingBox(),S,T,null,z,null,!1,N.getOriginalBarSize());var Z=new Array;Z.push(N),n&&0!=S||t._currentMarkers.push(Z),h&&c.isOutermostBar(t,S,T)&&yt._renderDataLabel(t,e,N.getBoundingBox(),S,T,null,null,null,!0,N.getOriginalBarSize())}}if(C){var q=new r.Path(t.getCtx(),C),Q=f.getColor(t,S);q.setSolidFill(Q);var J=f.getBorderColor(t,S);if(J){var $=f.getBorderWidth(t,S);q.setSolidStroke(J,null,$)}var tt=f.getClassName(t,S),et=f.getStyle(t,S);q.setClassName(tt).setStyle(et),o&&q.setPixelHinting(!0),e.addChild(q)}}},yt._renderStock=function(t,e,i){var a=t.getOptions(),s=t.xAxis,n=t.yAxis;if("candlestick"==c.getSeriesType(t,0))for(var o=R.getViewportMinMaxGroupIndex(t,0),l=o.min-1;l<=o.max+1;l++)if(c.isDataItemRendered(t,0,l)){var h=c.getDataItem(t,0,l);if(h){var u=h.open,g=h.close,d=h.low,p=h.high,_=null!=d&&null!=p;if(null!=u&&null!=g){var v,m=c.getXValue(t,0,l),S=s.getUnboundedCoordAt(m),C=f.getBarWidth(t,0,l),x=n.getBoundedCoordAt(u),A=n.getBoundedCoordAt(g),b=null;_&&(v=n.getBoundedCoordAt(d),b=n.getBoundedCoordAt(p));var M=new lt(t.getCtx(),S,C,x,A,v,b);e.addChild(M),f.isSelectable(t,0,l)&&M.setCursor(r.SelectionEffectUtils.getSelectingCursor());var T=k.getBarFill(t,0,l,C),I=null,D=f.getBorderColor(t,0,l),O=f.getBorderWidth(t,0,l);D?I=new r.Stroke(D,1,O):T instanceof r.PatternFill&&(I=new r.Stroke(T.getColor(),1,O));var E=f.getColor(t,0,l),P=f.getSelectedInnerColor(t),L=f.getSelectedOuterColor(t),w=a.styleDefaults.stockRangeColor;M.setChangeStyle(T,I,E,P,L),M.setRangeStyle(new r.SolidFill(w),I,w,L);var B=new r.Point(S,(x+A)/2);y.associate(M,t,0,l,null,B);var F=new Array;F.push(M._changeShape),t._currentMarkers.push(F)}}}},yt._renderBoxPlot=function(t,e,i){for(var a=t.xAxis,s=0;s<c.getSeriesCount(t);s++)for(var n=R.getViewportMinMaxGroupIndex(t,s),o=n.min-1;o<=n.max+1;o++)if(c.isDataItemRendered(t,s,o)&&"boxPlot"==c.getSeriesType(t,s)){var l=c.getDataItem(t,s,o);if(l){var h=l.low,d=l.q1,p=l.q2,_=l.q3,v=l.high;if(null!=h&&null!=d&&null!=p&&null!=_&&null!=v){var m=f.getBarWidth(t,s,o),S=f.getBarCategoryOffsetMap(t,o),C=c.isAssignedToY2(t,s),x=c.getStackCategory(t,s),A=S[C?"y2":"y"][x]+m/2;r.Agent.isRightToLeft(t.getCtx())&&u.isVertical(t)&&(A*=-1);var b=c.getXValue(t,s,o),M=a.getUnboundedCoordAt(b)+A,T=C?t.y2Axis:t.yAxis,I=T.getBoundedCoordAt(h),D=T.getBoundedCoordAt(d),O=T.getBoundedCoordAt(p),E=T.getBoundedCoordAt(_),P=T.getBoundedCoordAt(v),L=f.getBoxPlotStyleOptions(t,s,o),w=new ot(t,M,m,I,D,O,E,P,L);e.addChild(w),f.isSelectable(t,s,o)&&w.setCursor(r.SelectionEffectUtils.getSelectingCursor());var B=g.convertAxisCoord(t,new r.Point(M,O),i);y.associate(w,t,s,o,null,B),yt._renderBoxPlotMarkers(t,e,s,o,i,M),t._currentMarkers.push([w._medianLine])}}}},yt._renderBoxPlotMarkers=function(t,e,i,a,s,n){for(var o=f.getMarkerBorderColor(t,i,a),l=f.getBorderWidth(t,i,a),h=new r.Stroke(o,1,l),g=[],d=c.getNestedDataItemCount(t,i,a),p=0;p<d;p++){var _=yt._getMarkerInfo(t,i,a,p,s);if(_){u.isHorizontal(t)?_.y=n:_.x=n;var v=yt._createMarker(t,_,o,l);null!=v&&g.push(v)}}yt._addMarkersToContainer(t,e,g,h)},yt._renderLines=function(t,e,i,r){var a,s=[],n=c.getSeriesCount(t);for(a=0;a<n;a++)c.isSeriesRendered(t,a)&&"line"==c.getSeriesType(t,a)&&s.push(a);for(var o=0;o<s.length;o++)a=s[o],"none"!=f.getLineType(t,a)&&(yt._filterPointsForSeries(t,a),yt._renderLinesForSeries(t,i,a,r));for(o=0;o<s.length;o++)yt._renderMarkersForSeries(t,e,s[o],r)},yt._renderAreas=function(t,e,i,r){for(var a=c.getSeriesCount(t),s=r?"lineWithArea":"area",n=[],o=[],l=0;l<a;l++)c.isSeriesRendered(t,l)&&c.getSeriesType(t,l)==s&&(c.isAssignedToY2(t,l)?o.push(l):n.push(l));n.length>0&&yt._renderAreasForAxis(t,e,n,t.yAxis.getBaselineCoord(),i,r),o.length>0&&yt._renderAreasForAxis(t,e,o,t.y2Axis.getBaselineCoord(),i,r)},yt._renderAreasForAxis=function(t,e,i,a,s,n){for(var o=c.isStacked(t),l=yt.createClippedGroup(t,e,s),h={},u={},g={},d={},p=[],_=c.getGroupCount(t),v=0;v<_;v++)p.push(new ht(null,a,a,v,c.getGroup(t,v),!0));for(var m=0;m<i.length;m++){var S=i[m],C=c.getStackCategory(t,S),x=c.isSeriesNegative(t,S),A=h[C],b=u[C],M=g[C],T=d[C];if("none"!=f.getLineType(t,S)){var I,D,O,E=k.getAreaFill(t,S),P=f.getBorderColor(t,S),L=f.getBorderWidth(t,S),w=f.getAreaClassName(t,S),R=f.getAreaStyle(t,S),B=P?new r.Stroke(P,1,L):null,F=f.getLineType(t,S);yt._filterPointsForSeries(t,S),c.isRangeSeries(t,S)?(I=yt._getCoordsForSeries(t,S,s,"high"),D=yt._getCoordsForSeries(t,S,s,"low"),O=F):x?(I=yt._getAreaCoordsForSeries(t,S,s,M||p),D=M||[],O=T):(I=yt._getAreaCoordsForSeries(t,S,s,A||p),D=A||[],O=b);var N=new ut(t,!0,s,a,R,w,E,B,F,I,O,D);l.addChild(N),t._currentAreas.push(N),y.associate(N,t,S),x?(g[C]=I,d[C]=F):(h[C]=I,u[C]=F),o||((n||f.getDataItemGaps(t)>0&&!P)&&yt._renderLinesForSeries(t,l,S,s,!n),n||yt._renderMarkersForSeries(t,e,S,s),m+1<i.length&&(l=yt.createClippedGroup(t,e,s)))}else yt._renderMarkersForSeries(t,e,S,s)}for(m=0;m<i.length;m++)if(S=i[m],"none"!=f.getLineType(t,S)){var H=f.getBorderColor(t,S)||f.getBorderColor(t,S+1);o&&(n||f.getDataItemGaps(t)>0&&!H)&&yt._renderLinesForSeries(t,l,S,s,!n),(o||n)&&yt._renderMarkersForSeries(t,e,S,s)}},yt._getAreaCoordsForSeries=function(t,e,i,r){for(var a=yt._getCoordsForSeries(t,e,i),s=[],n=0;n<r.length;n++)s.push(r[n].clone());var o=a.length-1,l=u.isPolar(t);for(n=0;n<a.length;n++)if(null!=a[n].x){var h=s[a[n].groupIndex],g=l&&0==n?o:n-1,d=l&&n==o?0:n+1;g>=0&&null!=a[g].x&&(h.y1=a[n].y1),d<=o&&null!=a[d].x&&(h.y2=a[n].y2),h.x=a[n].x,h.filtered=h.y1==h.y2&&a[n].filtered}return s},yt._renderLinesForSeries=function(t,e,i,a,s){var n;if(s){var o=2.5*f.getDataItemGaps(t);n=new r.Stroke(f.getBackgroundColor(t,!0),1,o)}else{var l=f.getColor(t,i),h=f.getLineWidth(t,i),u=f.getLineStyle(t,i);n=new r.Stroke(l,1,h,!1,r.Stroke.getDefaultDashProps(u,h))}var g=c.isAssignedToY2(t,i)?t.y2Axis.getBaselineCoord():t.yAxis.getBaselineCoord(),d=f.getLineType(t,i),p=f.getClassName(t,i),_=f.getStyle(t,i),v=function(r){var s=yt._getCoordsForSeries(t,i,a,r),o=new ut(t,!1,a,g,_,p,null,n,d,s);e.addChild(o),y.associate(o,t,i)};c.isRangeSeries(t,i)?(v("high"),v("low")):v("value")},yt._filterScatterBubble=function(t,e,i){var a,s=c.getSeriesCount(t),n=c.getGroupCount(t);if(s*n<yt.FILTER_THRESHOLD_SCATTER_BUBBLE)return null;for(var o=[],l=0;l<s;l++)if(c.isSeriesRendered(t,l))for(var h=0;h<n;h++)null!=(a=yt._getScatterBubbleMarkerInfo(t,l,h,i))&&o.push(a);if(o.length<yt.FILTER_THRESHOLD_SCATTER_BUBBLE)return null;e&&St.sortMarkerInfos(o);for(var u=new r.PixelMap(25,new r.PixelMap(5,new r.PixelMap)),g=[],d=o.length-1;d>=0;d--){if(a=o[d],!St.checkPixelMap(u,a.x,a.y,a.size)){var p=f.getColor(t,a.seriesIndex,a.groupIndex),_=f.isMarkerDisplayed(t,l,h)?r.ColorUtils.getAlpha(p):0;_>0&&(St.updatePixelMap(u,a.x,a.y,a.size,_),g.push(a))}}return t.getCache().putToCache("dataFiltered",!0),g.reverse(),g},yt._filterPointsForSeries=function(t,e){if(!u.isPolar(t)&&!c.isRangeSeries(t,e)){var i=t.__getPlotAreaSpace(),r=u.isHorizontal(t)?i.h:i.w,a=c.getSeriesItem(t,e).items,s="bar"==c.getSeriesType(t,e),n=t.xAxis.getInfo(),o=(n.getDataMax()-n.getDataMin())/(n.getViewportMax()-n.getViewportMin()),l=s?.5:2,h=o?Math.round(l*(a.length/o)/r):1;if(h<(s?2:3))for(var g=0;g<a.length;g++)(v=a[g])&&(v._filtered=!1);else{var d,p,_,f,v,m,S=!1;for(g=0;g<a.length;g+=h){d=-1,p=-1/0,_=-1,f=1/0;for(var y=g;y<Math.min(g+h,a.length);y++)m=c.getCumulativeValue(t,e,y),v=a[y],null!=m&&null!=v&&((!s||m>0)&&m>p&&(d=y,p=m),(!s||m<0)&&m<f&&(_=y,f=m),v._filtered=!0,S=!0);for(y=g;y<Math.min(g+h,a.length);y++)null!=(v=a[y])&&(y!=d&&y!=_||(v._filtered=!1))}t.getCache().putToCache("dataFiltered",S)}}},yt._getCoordsForSeries=function(t,e,i,r){var a=t.xAxis,s=t.yAxis;c.isAssignedToY2(t,e)&&(s=t.y2Axis);for(var n=[],o=R.getViewportMinMaxGroupIndex(t,e),l=o.min-1;l<=o.max+1;l++){var h=c.getGroup(t,l);if(null!=h){var g=c.getXValue(t,e,l),d=null;if("low"==r?d=c.getLowValue(t,e,l):"high"==r?d=c.getHighValue(t,e,l):null!=c.getValue(t,e,l)&&(d=c.getCumulativeValue(t,e,l)),null!=d&&!isNaN(d)&&c.isDataItemRendered(t,e,l)){u.isPolar(t)&&(d=Math.max(d,s.getInfo().getViewportMin()));var p=a.getUnboundedCoordAt(g),_=s.getUnboundedCoordAt(d);if(null!=p&&null!=_){var f=new ht(p,_,_,l,h,c.isDataItemFiltered(t,e,l));n.push(f)}else n.push(new ht(null,null,null,l,h,!1))}else n.push(new ht(null,null,null,l,h,!1))}}return n},yt.createClippedGroup=function(t,e,i){var a=new r.Container(e.getCtx());e.addChild(a);var s=new r.ClipPath(t.getId()),n=yt._extendClipGroup(t);if(u.isPolar(t)){var o=i.x+i.w/2,l=i.y+i.h/2;if(R.isGridPolygonal(t)){var h=r.PolygonUtils.getRegularPolygonPoints(o,l,c.getGroupCount(t),t.getRadius(),0);s.addPolygon(h)}else s.addCircle(o,l,t.getRadius())}else u.isHorizontal(t)?s.addRect(i.x-n,i.y,i.w+2*n,i.h):s.addRect(i.x,i.y-n,i.w,i.h+2*n);return a.setClipPath(s),a},yt._extendClipGroup=function(t){if((c.hasLineSeries(t)||c.hasLineWithAreaSeries(t))&&!u.isSpark(t)){var e=f.getLineWidth(t),i=function(t){var i=t.getInfo(),r=i.getCoordAt(i.getGlobalMax()),a=i.getCoordAt(i.getDataMax()),s=i.getCoordAt(i.getGlobalMin()),n=i.getCoordAt(i.getDataMin());return null!=r&&null!=a&&a-r<=e/2||null!=s&&null!=n&&s-n<=e/2};if(t.yAxis&&i(t.yAxis)||t.y2Axis&&i(t.y2Axis))return Math.ceil(e/2)}return 0};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Ct=function(t,e){this.Init(t,e)};r.Obj.createSubclass(Ct,r.Obj),Ct.prototype.Init=function(t,e){this._context=t.getCtx(),this._dataCursorShown=!1,this._dataCursor=e,this._chart=t},Ct.prototype.processMove=function(t,e){var i=this._chart.__getPlotAreaSpace();return i&&i.containsPoint(t.x,t.y)&&!this._chart.getOptions()._duringZoomAndScroll?(this._showDataCursor(i,t.x,t.y,e),!0):(this._removeDataCursor(e),!1)},Ct.prototype.processEnd=function(t){this._removeDataCursor(t)},Ct.prototype.processOut=function(t,e){var i=this._chart.__getPlotAreaSpace();i&&!i.containsPoint(t.x,t.y)&&this._removeDataCursor(e)},Ct.prototype._showDataCursor=function(t,e,i,r){if(this._context.isOffscreen(!0))this._removeDataCursor(r);else{var a=this._dataCursor,s=this._getClosestMatch(e,i);if(null!=s){var n=s.matchRegion.getCenter(),o=e,l=i;a.getBehavior()==v.BEHAVIOR_SNAP&&(a.isHorizontal()?l=Math.min(Math.max(n.y,t.y),t.y+t.h):o=Math.min(Math.max(n.x,t.x),t.x+t.w));var h=s.logicalObject,u=S.getDatatip(this._chart,h.getSeriesIndex(),h.getGroupIndex(),h.getNestedDataItemIndex(),!0);if(null!=u){a.setVisible(!0);var g=S.getDatatipColor(this._chart,h.getSeriesIndex(),h.getGroupIndex(),h.getNestedDataItemIndex()),d=a.isHorizontal()?l:o;if(a.render(t,n.x,n.y,d,u,g),this._dataCursorShown=!0,!r){var c=this._chart.getValuesAt(e,i);this._chart.changeOption("dataCursorPosition",c)}}else a.setVisible(!1)}else this._removeDataCursor(r)}},Ct.prototype._removeDataCursor=function(t){this._dataCursor.getVisible()&&this._dataCursor.setVisible(!1),this._context.getTooltipManager(v.TOOLTIP_ID).hideTooltip(),this._dataCursorShown=!1,t||this._chart.changeOption("dataCursorPosition",null)},Ct.prototype.isDataCursorShown=function(){return this._dataCursorShown},Ct._getClosestMatchSecondDirection=function(t,e,i,r){for(var a=null,s=1/0,n=t.length-1;0<=n;n--){var o=t[n],l=e?i:r,h=((e?o.matchRegion.x:o.matchRegion.y)+(e?o.matchRegion.x+o.matchRegion.w:o.matchRegion.y+o.matchRegion.h))/2,u=Math.round(Math.abs(h-l));u<s&&(s=u,a=o)}return a},Ct._getClosestMatchesFirstDirection=function(t,e,i,r,a){for(var s=1/0,n=new Array,o=0;o<t.length;o++){var l=t[o];if(a(l.logicalObject)){var h=l.matchRegion,u=e?r:i,g=((e?h.y:h.x)+(e?h.y+h.h:h.x+h.w))/2,d=Math.round(Math.abs(g-u));d<=s&&(d<s&&(n=new Array),n.push(l),s=d)}}return n},Ct.prototype._findMatches=function(){var t=this._context.getStage(),e=this._chart.getEventManager(),i=[];if(!this._chart._currentMarkers)return null;for(var r=0;r<this._chart._currentMarkers.length;r++)for(var a=this._chart._currentMarkers[r],s=a.length,n=0;n<s;n++){var o=a[n],l=e.GetLogicalObject(o),h={matchRegion:o.getDimensionsSelf?o.getDimensionsSelf(t):o.getDimensions(t),logicalObject:l};i.push(h)}return i},Ct.prototype._getClosestMatch=function(t,e){var i=u.isHorizontal(this._chart),a=u.isLineArea(this._chart)&&!u.isMixedFrequency(this._chart),s=this._findMatches(),n=c.getHighlightedCategories(this._chart),o="all"==this._chart.getOptions().highlightMatch,l=n.length>0?o?r.ArrayUtils.hasAllItems:r.ArrayUtils.hasAnyItem:null,h=function(t){return!l||l(t.getCategories(),n)},g=Ct._getClosestMatchesFirstDirection(s,i,t,e,h);if(!u.isScatterBubble(this._chart)){for(var d=1/0,p=-1/0,_=null,f=0;f<g.length;f++){var v=g[f];d=Math.min(d,i?v.matchRegion.y:v.matchRegion.x),p=Math.max(p,i?v.matchRegion.y+v.matchRegion.h:v.matchRegion.x+v.matchRegion.w),_=v.logicalObject.getGroupIndex()}for(f=0;f<s.length;f++){var m=s[f];if(h(m.logicalObject))if(a)m.logicalObject.getGroupIndex()==_&&g.push(m);else{var S=((i?m.matchRegion.y:m.matchRegion.x)+(i?m.matchRegion.y+m.matchRegion.h:m.matchRegion.x+m.matchRegion.w))/2;p>=S&&d<=S&&g.push(m)}}}return Ct._getClosestMatchSecondDirection(g,i,t,e)};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var xt=function(t,e,i){this.Init(t,e,i)};r.Obj.createSubclass(xt,P),xt.prototype.axisToPlotArea=function(t){if("tangential"==this.getOptions().position)return t;if(null==t)return null;var e=t-this.getLeftOverflow();return Math.round(10*e)/10},xt.prototype.plotAreaToAxis=function(t,e){if("tangential"==this.getOptions().position)return t;if(null==t)return null;var i=t+this.getLeftOverflow();return!1===e?i:Math.round(i)},xt.prototype.linearToActual=function(t){return this.Info.linearToActual(t)},xt.prototype.actualToLinear=function(t){return this.Info.actualToLinear(t)},xt.prototype.getValueAt=function(t){return this.Info.getValueAt(this.plotAreaToAxis(t))},xt.prototype.getCoordAt=function(t){return this.axisToPlotArea(this.Info.getCoordAt(t))},xt.prototype.getBoundedCoordAt=function(t){return this.axisToPlotArea(this.Info.getBoundedCoordAt(t))},xt.prototype.getUnboundedValueAt=function(t){return this.Info.getUnboundedValueAt(this.plotAreaToAxis(t))},xt.prototype.getUnboundedCoordAt=function(t){return this.axisToPlotArea(this.Info.getUnboundedCoordAt(t))},xt.prototype.getBaselineCoord=function(){return this.axisToPlotArea(this.Info.getBaselineCoord())},xt.prototype.getPosition=function(){return this.getOptions().position},xt.prototype.isGroupAxis=function(){return this.Info instanceof D},xt.prototype.getMajorTickCoords=function(){for(var t=this.Info?this.Info.getMajorTickCoords():[],e=0;e<t.length;e++)t[e]=this.axisToPlotArea(t[e]);return t},xt.prototype.getMinorTickCoords=function(){for(var t=this.Info?this.Info.getMinorTickCoords():[],e=0;e<t.length;e++)t[e]=this.axisToPlotArea(t[e]);return t},xt.prototype.getBaselineCoord=function(){return this.axisToPlotArea(this.Info.getBaselineCoord())},xt.prototype.getLinearGlobalMin=function(){return this.actualToLinear(this.Info.getGlobalMin())},xt.prototype.getLinearGlobalMax=function(){return this.actualToLinear(this.Info.getGlobalMax())},xt.prototype.getLinearViewportMin=function(){return this.actualToLinear(this.Info.getViewportMin())},xt.prototype.getLinearViewportMax=function(){return this.actualToLinear(this.Info.getViewportMax())},xt.prototype.getUnboundedLinearValueAt=function(t){return this.Info.actualToLinear(this.getUnboundedValueAt(t))},xt.prototype.isFullViewport=function(){return this.Info.getViewportMin()==this.Info.getGlobalMin()&&this.Info.getViewportMax()==this.Info.getGlobalMax()},xt.prototype.getLeftOverflow=function(){return r.Agent.isRightToLeft(this.getCtx())?this.Info.getEndOverflow():this.Info.getStartOverflow()},xt.prototype.getRightOverflow=function(){return r.Agent.isRightToLeft(this.getCtx())?this.Info.getStartOverflow():this.Info.getEndOverflow()},xt.prototype.getLength=function(){return Math.abs(this.Info.getStartCoord()-this.Info.getEndCoord())},xt.prototype.getMinCoord=function(){return this.axisToPlotArea(Math.min(this.Info.getStartCoord(),this.Info.getEndCoord()))},xt.prototype.getMaxCoord=function(){return this.axisToPlotArea(Math.max(this.Info.getStartCoord(),this.Info.getEndCoord()))};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var At=new Object;r.Obj.createSubclass(At,r.Obj),At._DEFAULT_AXIS_MAX_SIZE=.33,At.render=function(t,e,i){u.hasAxes(t)&&(R.applyInitialZooming(t,i),u.isBubble(t)&&St.calcBubbleSizes(t,i),u.isPolar(t)?At._renderPolar(t,e,i):At._renderCartesian(t,e,i))},At._renderCartesian=function(t,e,i){var a=t.getOptions(),s=u.isHorizontal(t),n=c.isSplitDualY(t),o=u.isOverview(t),l=i.clone(),h=R.getYAxisPosition(t),g=R.getY2AxisPosition(t),d=!o&&a.overview.content&&a.overview.content.yAxis&&"on"==a.overview.content.yAxis.rendered,p=!o&&a.overview.content&&a.overview.content.y2Axis&&"on"==a.overview.content.y2Axis.rendered;At._addAxisGaps(t,i),n&&h==g&&(a.yAxis._skipHighestTick=s,a.y2Axis._skipHighestTick=!s);var _=At._createYAxis(t,e,i,l,d),v=At._createY2Axis(t,e,i,l,p),m=!n&&"on"==a.y2Axis.alignTickMarks&&null==a.y2Axis.step;m&&_&&v&&(At._alignYAxes(t,_,v),s||(v.dim=At._getPreferredSize(t,v.axis,t.y2Axis,v.options,"y2",i,l,p)));var S,y=R.getTickLabelGapSize(t,"y"),C=R.getTickLabelGapSize(t,"y2");n&&h==g?(s?(S=Math.max(_.dim.h+y,v.dim.h+C),_.dim.h=S-y,v.dim.h=S-C):(S=Math.max(_.dim.w+y,v.dim.w+C),_.dim.w=S-y,v.dim.w=S-C),At._positionAxis(i.clone(),_,y,d),At._positionAxis(i,v,C,p)):(At._positionAxis(i,_,y,d),At._positionAxis(i,v,C,p));var x=c.getGroupCount(t);if("pixel"==f.getBarSpacing(t)&&u.isBar(t)&&i.w>x){var A=Math.floor(i.w/x)*x;i.x+=(i.w-A)/2,i.w=A}var b=At._createXAxis(t,e,i,l);b.axis.render(b.options,b.dim.w,b.dim.h),At._positionAxis(i,b,R.getTickLabelGapSize(t,"x"));var M=f.getSplitterPosition(t),T=r.Agent.isRightToLeft(t.getCtx()),I=At._getSplitAvailSpace(i,M,s,s&&T),D=At._getSplitAvailSpace(i,1-M,s,!s||!T);s?(_&&(_.axis.setTranslateX(i.x),n?_.axis.render(_.options,I.w,_.dim.h,I.x,0):_.axis.render(_.options,i.w,_.dim.h)),m&&_&&v&&At._alignYAxes(t,_,v),v&&(v.axis.setTranslateX(i.x),n?v.axis.render(v.options,D.w,v.dim.h,D.x,0):v.axis.render(v.options,i.w,v.dim.h)),At._setOverflow(i,_,b)):(_&&(n?_.axis.render(_.options,_.dim.w,I.h,0,I.y):_.axis.render(_.options,_.dim.w,i.h)),m&&_&&v&&At._alignYAxes(t,_,v),v&&(n?v.axis.render(v.options,v.dim.w,D.h,0,D.y):v.axis.render(v.options,v.dim.w,i.h)),At._setOverflow(i,b,_,v)),At._storeAxes(t,b,_,v)},At._renderPolar=function(t,e,i){var r=At._createXAxis(t,e,i,i);r.axis.setTranslateX(i.x),r.axis.setTranslateY(i.y),r.axis.render(r.options,i.w,i.h);var a=At._createYAxis(t,e,i,i);a.axis.setTranslateX(i.x),a.axis.setTranslateY(i.y),a.axis.render(a.options,i.w,i.h),At._storeAxes(t,r,a)},At._createXAxis=function(t,e,i,a){var s=t.getOptions(),n=R.getXAxisPosition(t),o=r.JsonUtils.clone(s.xAxis);o.position=n,o.isStandalone=R.isStandaloneXAxis(t),o.groupSeparators=s.styleDefaults.groupSeparators,At._addCommonAxisAttributes(o,"x",t),o.groups=s.groups,o._groupWidthRatios=B.getGroupWidthRatios(t),o.timeAxisType=u.getTimeAxisType(t),o._locale=s._locale,o.drilling=s.drilling,o._isGroupAxis=u.hasGroupAxis(t);var l="top"==n||"bottom"==n,h=R.isGridShifted(t);if("tangential"==n&&u.hasGroupAxis(t))h?(o.startGroupOffset=.5,o.endGroupOffset=.5):o.endGroupOffset=1;else{var g=R.getAxisOffset(t);if(o.startGroupOffset=g,o.endGroupOffset=g,f.hasUncenteredSeries(t)&&(o.endGroupOffset+=1),!L.isScrollable(t)&&!u.isOverview(t)){var d=c.getGroupCount(t);R.isAxisRendered(t,"y")&&R.isTickLabelInside(t,"y")&&(o[(l?"start":"end")+"GroupOffset"]+=.04*d),R.isAxisRendered(t,"y2")&&R.isTickLabelInside(t,"y2")&&(o[(l?"end":"start")+"GroupOffset"]+=.04*d)}}o.leftBuffer=l?i.x-a.x:0,o.rightBuffer=l?a.w+a.x-(i.w+i.x):0,o._renderGridAtLabels=!h||u.hasTimeAxis(t),o.translations=s.translations;var p=new xt(t.getCtx(),t.processEvent,t);e.addChild(p);var _=At._getPreferredSize(t,p,t.xAxis,o,"x",i,a);return o._minOverflowCoord=s._minOverflowCoord-i.x,o._maxOverflowCoord=s._maxOverflowCoord-i.x,{axis:p,options:o,dim:_}},At._createYAxis=function(t,e,i,a,s){var n=t.getOptions();if(c.hasY2DataOnly(t))return null;var o=r.JsonUtils.clone(n.yAxis);o.position=R.getYAxisPosition(t),o.isStandalone=R.isStandaloneYAxis(t),At._addCommonAxisAttributes(o,"y",t),At._addCommonYAxisAttributes(o,t),o.translations=n.translations;var l=new xt(t.getCtx(),t.processEvent,t);e.addChild(l);var h=At._getPreferredSize(t,l,t.yAxis,o,"y",i,a,s);return At._adjustYAxisForLabels(l,o,t,"y"),n.yAxis.min=o.min,n.yAxis.max=o.max,{axis:l,options:o,dim:h}},At._createY2Axis=function(t,e,i,a,s){var n=t.getOptions();if(c.hasY2Data(t)){var o=r.JsonUtils.clone(n.y2Axis);o.position=R.getY2AxisPosition(t),o.isStandalone=R.isStandaloneY2Axis(t),At._addCommonAxisAttributes(o,"y2",t),At._addCommonYAxisAttributes(o,t),o.translations=n.translations;var l=new xt(t.getCtx(),t.processEvent,t);e.addChild(l);var h=At._getPreferredSize(t,l,t.y2Axis,o,"y2",i,a,s);return At._adjustYAxisForLabels(l,o,t,"y2"),n.y2Axis.min=o.min,n.y2Axis.max=o.max,{axis:l,options:o,dim:h}}},At._addCommonAxisAttributes=function(t,e,i){var r=i.getOptions();if(t.skin=r.skin,t.tickLabel.position=R.isTickLabelInside(i,e)?"inside":"outside",t.baselineScaling=R.getBaselineScaling(i,e),(R.isTickLabelInside(i,e)||"tangential"==t.position)&&(t._skipHighestTick=!0),t.zoomAndScroll=u.isPolar(i)?"off":r.zoomAndScroll,t._isOverview=u.isOverview(i),t._duringZoomAndScroll=r._duringZoomAndScroll,"x"!=e||!u.hasGroupAxis(i)){var a=R.getMinMaxValue(i,e);t.dataMin=null!=t.dataMin?t.dataMin:a.min,t.dataMax=null!=t.dataMax?t.dataMax:a.max}u.isPolar(i)&&(t.polarGridShape=R.isGridPolygonal(i)?"polygon":"circle",t._radius=i.getRadius()),t.dnd=r.dnd},At._addCommonYAxisAttributes=function(t,e){if(t.timeAxisType="disabled",L.isLiveScroll(e)&&u.isBLAC(e)&&!u.isPolar(e)&&(t._continuousExtent="on"),t.isStandalone)t.leftBuffer=0,t.rightBuffer=0;else if(c.isSplitDualY(e))t.leftBuffer=1/0,t.rightBuffer=1/0;else{var i=r.Agent.isRightToLeft(e.getCtx());t.leftBuffer=i?0:a.BaseAxisInfo.MINIMUM_AXIS_BUFFER,t.rightBuffer=i?a.BaseAxisInfo.MINIMUM_AXIS_BUFFER:0}},At._adjustYAxisForLabels=function(t,e,i,a){var s=i.getOptions();if(R.isYAdjustmentNeeded(i)){var n=r.CSSStyle.mergeStyles([s.styleDefaults._dataLabelStyle,s.styleDefaults.dataLabelStyle]),o=s.styleDefaults.stackLabelStyle,l=t.getInfo(),h=f.isStackLabelRendered(i),g=r.TextUtils.getTextStringHeight(i.getCtx(),h?o:n),d=0;if("log"==e.scale){d=t.getUnboundedValueAt(t.getUnboundedCoordAt(l.getDataMax())-g)-l.getDataMax()}else{var p=1;c.isSplitDualY(i)&&(p="y"==a?f.getSplitterPosition(i):1-f.getSplitterPosition(i));var _=Math.abs(l.getEndCoord()-l.getStartCoord())*p;d=Math.abs(l.getViewportMax()-l.getViewportMin())/_*g}u.isHorizontal(i)?d*=4:d*=2,l.getDataMin()-l.getGlobalMin()<=d&&l.getDataMin()<0&&(e.dataMin-=d),l.getGlobalMax()-l.getDataMax()<=d&&l.getDataMax()>0&&(e.dataMax+=d)}},At._getPreferredSize=function(t,e,i,a,s,n,o,l){var h=a.isStandalone,u=a.position,g="top"==u||"bottom"==u,d=R.getTickLabelGapSize(t,s),c=a.maxSize,p=a.size,_=n.w,v=n.h;if("radial"==u||"tangential"==u)_=0,v=0;else if("off"!=a.rendered||l)if(h)g?v=n.h-d:_=n.w-d;else if(null!=p)g?(v=f.getSizeInPixels(p,o.h)-d,null!=c&&(v=Math.min(v,f.getSizeInPixels(c,o.h)-d))):(_=f.getSizeInPixels(p,o.w)-d,null!=c&&(_=Math.min(_,f.getSizeInPixels(c,o.w)-d)));else{if(!t.getOptions()._duringZoomAndScroll||!i)return c=null==c?At._DEFAULT_AXIS_MAX_SIZE:c,g?e.getPreferredSize(a,n.w,f.getSizeInPixels(c,o.h)-d,l):e.getPreferredSize(a,f.getSizeInPixels(c,o.w)-d,n.h,l);if(g){var m=r.Agent.isRightToLeft(t.getCtx());a._startOverflow=m?i.getRightOverflow():i.getLeftOverflow(),a._endOverflow=m?i.getLeftOverflow():i.getRightOverflow(),v=i.getHeight()}else _=i.getWidth()}else g?v=0:_=0;return R.isYAdjustmentNeeded(t)&&e.getPreferredSize(a,_,v),new r.Dimension(_,v)},At._addAxisGaps=function(t,e){var i=u.isHorizontal(t),r=R.getYAxisPosition(t),a=R.getY2AxisPosition(t),s=R.isAxisRendered(t,"x"),n=R.isAxisRendered(t,"y"),o=R.isAxisRendered(t,"y2"),l=t.getOptions().layout.verticalAxisGap;l*=i?R.getGapScalingFactor(t,"x"):Math.max(R.getGapScalingFactor(t,"y"),R.getGapScalingFactor(t,"y2")),l=Math.ceil(l),(!i||"top"==r&&n||"top"==a&&o)&&i||(e.y+=l,e.h-=l),(!i||"bottom"==r&&n||"bottom"==a&&o)&&(i||s)||(e.h-=l)},At._positionAxis=function(t,e,i,a){if(e){var s=a?Math.max(e.dim.h,1):e.dim.h,n=a?Math.max(e.dim.w,1):e.dim.w;r.LayoutUtils.position(t,e.options.position,e.axis,n,s,i)}},At._alignYAxes=function(t,e,i){var r=e.axis.getInfo();if(r){var a=r.getMajorTickCount(),s=r.getMinorTickCount(),n=i.options,o=i.axis.getInfo();o&&R.isLog(t,"y")&&R.isLog(t,"y2")&&a<o.getMajorTickCount()&&(n._logScaleUnit=o.alignLogScaleToTickCount(o.getLogScaleUnit(),a)),n._majorTickCount=a,n._minorTickCount=s}},At._getSplitAvailSpace=function(t,e,i,r){var a=t.clone();return i?(a.w=t.w*e,a.x=r?t.w*(1-e):0):(a.h=t.h*e,a.y=r?t.h*(1-e):0),a},At._setOverflow=function(t,e,i,r){if(e){var a=e.axis.getLeftOverflow(),s=e.axis.getRightOverflow();t.x+=a,t.w-=a+s,i&&i.axis.setTranslateX(i.axis.getTranslateX()+("left"==i.options.position?a:-s)),r&&r.axis.setTranslateX(r.axis.getTranslateX()+("left"==r.options.position?a:-s))}},At._storeAxes=function(t,e,i,r){t.xAxis&&(t.xAxis.destroy(),t.removeChild(t.xAxis)),t.yAxis&&(t.yAxis.destroy(),t.removeChild(t.yAxis)),t.y2Axis&&(t.y2Axis.destroy(),t.removeChild(t.y2Axis)),t.xAxis=e.axis,t.yAxis=i?i.axis:null,t.y2Axis=r?r.axis:null};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var bt=new Object;r.Obj.createSubclass(bt,r.Obj),bt._DEFAULT_LINE_WIDTH_WITH_MARKER=2,bt._DEFAULT_MAX_SIZE=.3,bt._PIE_SIZE_RATIO=1.2,bt.render=function(t,e,i){var a=t.getOptions(),n=a.legend.position;if(!("off"==a.legend.rendered||"auto"==a.legend.rendered&&t.getOptionsCache().getFromCache("hasLargeSeriesCount"))){var o=r.JsonUtils.clone(a.legend);delete o.position,o.skin=a.skin,o.hideAndShowBehavior=L.getHideAndShowBehavior(t),o.hoverBehavior=L.getHoverBehavior(t),o.hoverBehaviorDelay=f.getHoverBehaviorDelay(t),o.hiddenCategories=c.getHiddenCategories(t),o.highlightedCategories=c.getHighlightedCategories(t),o.dnd=a.dnd,o._dropColor=a._dropColor,o.translations=a.translations,"auto"==n&&(n=i.w>=i.h?"end":"bottom");var l="top"==n||"bottom"==n;if(o.orientation=l?"horizontal":"vertical","start"==n&&(o.halign="end"),"start"!=n&&"end"!=n||(o.valign="middle"),"top"==n&&(o.valign="bottom"),"top"!=n&&"bottom"!=n||(o.halign="center"),bt._addLegendData(t,o),0!=o.sections.length){var h,g=s.Legend.newInstance(t.getCtx(),t.processEvent,t);if(null!=t.getId()&&g.setId(t.getId()+"legend"),e.addChild(g),null!=o.size)h=l?new r.Dimension(i.w,f.getSizeInPixels(o.size,i.h)):new r.Dimension(f.getSizeInPixels(o.size,i.w),i.h);else{var d=o.maxSize;if(null==d&&(d=bt._DEFAULT_MAX_SIZE,u.isPie(t))){var _=1-bt._PIE_SIZE_RATIO*(l?i.w/i.h:i.h/i.w);d=Math.max(d,_)}var v=l?i.w:f.getSizeInPixels(d,i.w),m=l?f.getSizeInPixels(d,i.h):i.h;h=g.getPreferredSize(o,v,m)}g.render(o,h.w,h.h);var S=l?p.getGapHeight(t,a.layout.legendGapHeight):p.getGapWidth(t,a.layout.legendGapWidth);r.LayoutUtils.position(i,n,g,h.w,h.h,S);var y=Object.keys(o.dnd.drag.series).length>0,C=g.getCache().getFromCache("background");y&&C&&C.setClassName("oj-draggable");var x=g.__getBounds(),A=g.localToStage(new r.Point(x.x,x.y));if(!u.isOverview(t)){var b=r.Agent.isRightToLeft(t.getCtx());"end"==n?b?a._minOverflowCoord=A.x+x.w+S/2:a._maxOverflowCoord=A.x-S/2:"start"==n&&(b?a._maxOverflowCoord=A.x-S/2:a._minOverflowCoord=A.x+x.w+S/2)}t.legend&&(t.legend.destroy(),e.removeChild(t.legend)),t.legend=g}}},bt._addLegendData=function(t,e){var i=bt._getSeriesItems(t,"vertical"==e.orientation);if(i.length>0){var r=e.seriesSection;r.items=i,e.sections.unshift(r),delete e.seriesSection}var a=bt._getRefObjItems(t);if(a.length>0){var s=e.referenceObjectSection;s.items=a,e.sections.push(s),delete e.referenceObjectSection}},bt._getSeriesItems=function(t,e){var i,r,a=[];if("pie"==t.getType()||"pyramid"==t.getType()||"funnel"==t.getType()){var s=_.getRenderedSeriesIndices(t);"pyramid"==t.getType()&&e&&(s=s.reverse());for(var n=0;n<s.length;n++){r=s[n];var o=c.getValue(t,r,0);o>=0&&null!=o&&(i=bt._createLegendItem(t,r))&&a.push(i)}_.hasOtherSeries(t)&&(i={id:_.OTHER_SLICE_SERIES_ID,drilling:t.getOptions().multiSeriesDrilling,text:t.getOptions().translations.labelOther,categoryVisibility:c.getHiddenCategories(t).indexOf(_.OTHER_SLICE_SERIES_ID)>=0?"hidden":"visible",symbolType:"marker",color:t.getOptions().styleDefaults.otherColor,borderColor:t.getOptions().styleDefaults.borderColor},a.push(i))}else{var l={},h={},g=c.getSeriesCount(t);for(r=0;r<g;r++)if(i=bt._createLegendItem(t,r)){var d=c.getStackCategory(t,r);c.isAssignedToY2(t,r)?h[d]?h[d].push(i):h[d]=[i]:l[d]?l[d].push(i):l[d]=[i]}var p=c.getStackCategories(t,null,!0),f=c.isStacked(t)&&u.isVertical(t)&&e;a=bt._getSeriesItemsForAxis(l,p.y,f,a),a=bt._getSeriesItemsForAxis(h,p.y2,f,a)}return a},bt._getSeriesItemsForAxis=function(t,e,i,r){for(var a,s=0;s<e.length;s++)(a=t[e[s]])&&(r=i?r.concat(a.reverse()):r.concat(a));return r},bt._createLegendItem=function(t,e){var i=c.getSeriesItem(t,e),r=t.getType(),a=c.getSeriesType(t,e),s=f.getLineType(t,e),n=i.displayInLegend;if(!i||"off"==n)return null;if("on"!=n&&(u.isFunnel(t)||u.isPyramid(t)||u.isStock(t)))return null;if("on"!=n&&!c.hasSeriesData(t,e))return null;var o=c.getSeriesLabel(t,e);if("on"!=n&&(null==o||"string"==typeof o&&0===o.trim().length))return null;var l={id:c.getSeries(t,e),text:o,categories:c.getCategories(t,e),categoryVisibility:c.isSeriesRendered(t,e)?"visible":"hidden",_dataContext:f.getDataContext(t,e,-1)};if("line"==a||"lineWithArea"==a||"scatter"==r||"bubble"==r)if(l.lineStyle=f.getLineStyle(t,e),l.lineWidth=f.getLineWidth(t,e),f.isMarkerDisplayed(t,e)){var h=f.getImageSource(t,e,null,null,"source");h?(l.symbolType="image",l.source=h):(l.symbolType="none"==s?"marker":"lineWithMarker","lineWithMarker"==l.symbolType&&(l.lineWidth=Math.min(bt._DEFAULT_LINE_WIDTH_WITH_MARKER,l.lineWidth)),l.markerShape=f.getMarkerShape(t,e),l.markerColor=f.getMarkerColor(t,e))}else l.symbolType="line";else if("boxPlot"==a){var g=f.getBoxPlotStyleOptions(t,e);g.q2Color!=g.q3Color?(l.symbolType=u.isHorizontal(t)?"_horizontalBoxPlot":"_verticalBoxPlot",l._boxPlot=g):l.symbolType="marker"}else l.symbolType="marker","none"==f.getLineType(t,e)&&(l.markerShape=f.getMarkerShape(t,e));return l.color=f.getColor(t,e),l.borderColor=f.getBorderColor(t,e),l.pattern=f.getPattern(t,e),l.svgStyle="area"==a?f.getAreaStyle(t,e):f.getStyle(t,e),l.svgClassName="area"==a?f.getAreaClassName(t,e):f.getClassName(t,e),l.markerSvgStyle=f.getMarkerStyle(t,e),l.markerSvgClassName=f.getMarkerClassName(t,e),l.drilling=c.isSeriesDrillable(t,e)?"on":"off",l.shortDesc=i.shortDesc,l},bt._getRefObjItems=function(t){var e=c.getRefObjs(t);if(e.length<=0)return[];for(var i=[],r=0;r<e.length;r++){var a=e[r];if(a&&"on"==a.displayInLegend&&a.text){var s=m.getType(a);i.push({symbolType:"area"==s?"square":"line",text:a.text,color:m.getColor(t,a),lineStyle:a.lineStyle,lineWidth:m.getLineWidth(t,a),categories:m.getRefObjCategories(a),categoryVisibility:m.isObjectRendered(t,a)?"visible":"hidden",shortDesc:a.shortDesc,svgStyle:a.style||a.svgStyle,svgClassName:a.className||a.svgClassName})}}return i};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Mt=function(t){this.Init(t.getCtx(),t.processEvent,t),this._parentChart=t,this._chart=t.overview?t.overview.getBackgroundChart():null,this._newInstance=t.constructor.newInstance,this._id=t.getId()+"_overview"};r.Obj.createSubclass(Mt,n.Overview),Mt.prototype._renderChart=function(t,e,i){var a=this._parentChart.Defaults.getNoCloneObject();this._chartContainer=new r.Container(this.getCtx()),this.addChild(this._chartContainer);t=r.JsonUtils.merge({legend:{rendered:"off",size:null},xAxis:{viewportMin:null,viewportMax:null,viewportStartGroup:null,viewportEndGroup:null,axisLine:{rendered:"off"},size:null,maxSize:.5,title:null},yAxis:{rendered:"off",size:null},y2Axis:{rendered:"off",size:null},splitDualY:"off",title:{text:null},subtitle:{text:null},footnote:{text:null},titleSeparator:{rendered:"off"},styleDefaults:{animationIndicators:"none"},layout:{outerGapWidth:0,outerGapHeight:0},_isOverview:!0},t,a),u.hasGroupAxis(this._parentChart)&&(t.xAxis.tickLabel.rendered="off"),u.isStock(this._parentChart)&&t.series&&t.series[0]&&(t.series=[t.series[0]],t.series[0].type="lineWithArea");var s=this._parentChart.getOptions().overview.content,n=(t=r.JsonUtils.merge(s,t,a)).yAxis.rendered,o=t.y2Axis.rendered;t.zoomAndScroll="off",this._chart||(this._chart=this._newInstance(this.getCtx()),this._chart.setId(this._id));var l=e,h=this._parentChart.getWidth(),g=this._parentChart.__getPlotAreaSpace(),d=c.hasY2Data(this._parentChart),p=c.hasY2DataOnly(this._parentChart),_=(n="on"===t.yAxis.rendered&&!p,o="on"===t.y2Axis.rendered&&d,g.x),f=h-(_+e);n&&(l=_+e,t.yAxis.size=_),o&&(l=(n?_:0)+f+e,t.y2Axis.size=f),this._chartContainer.addChild(this._chart),this._chart.render(t,l,i);var v=new r.Rect(this.getCtx(),0,0,l,i);v.setInvisibleFill(),this._chartContainer.addChild(v),this._chart.getEventManager().setKeyboardHandler(null);var m=this._chart.__getPlotAreaSpace();if(n){var S=this._chartContainer.getTranslateX()-m.x;this._chartContainer.setTranslateX(S)}return new r.Dimension(e,m.h+m.y)},Mt.prototype.render=function(t,e,i){t.overview.style={overviewBackgroundColor:"rgba(0,0,0,0)",windowBackgroundColor:"rgba(0,0,0,0)",windowBorderTopColor:"#333333",windowBorderRightColor:"#333333",windowBorderBottomColor:"#333333",windowBorderLeftColor:"#333333",leftFilterPanelColor:"rgba(5,65,135,0.1)",rightFilterPanelColor:"rgba(5,65,135,0.1)",handleBackgroundClass:t.chart._resources.overviewGrippy,handleSize:16,handleFillColor:"rgba(0,0,0,0)"},t.overview.animationOnClick="off";var r=this._renderChart(t.chart,e,i);Mt.superclass.render.call(this,t.overview,r.w,r.h)},Mt.prototype.destroy=function(){Mt.superclass.destroy.call(this),this._parentChart=null,this._chart=null},Mt.prototype.getBackgroundChart=function(){return this._chart},Mt.prototype.isBackgroundRendered=function(){return!1},Mt.prototype.isLeftAndRightFilterRendered=function(){return!0},Mt.prototype.HandleKeyDown=function(t){},Mt.prototype.HandleKeyUp=function(t){};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Tt=function(t,e,i,r){this.Init(t,e,i,r)};Tt._THREED_TILT=z.THREED_TILT,Tt._THREED_DEPTH=.1,Tt._RADIUS=.45,Tt._RADIUS_LABELS=.38,Tt._MIN_ARC_LENGTH=1.5,r.Obj.createSubclass(Tt,r.Container),Tt.prototype.Init=function(t,e,i,a){Tt.superclass.Init.call(this,t.getCtx()),this.chart=t,this._options=t.getOptions(),this._frame=e.clone(),t.pieChart=this;for(var s=this.getLabelPosition(),n=c.getSeriesCount(t),o=0;o<n;o++){var l=c.getDataItem(t,o,0);!l||"center"!=s&&"none"!=s||"outsideSlice"!=l.labelPosition||(s="outsideSlice")}this._center=new r.Point(e.x+Math.floor(e.w/2),e.y+Math.floor(e.h/2));var h="center"==s||"none"==s?Tt._RADIUS:Tt._RADIUS_LABELS;this._radiusX=Math.floor(Math.min(e.w,e.h)*h),this._radiusY=this._radiusX,this._depth=0,this._anchorOffset=90,this.is3D()&&(this._depth=e.h*Tt._THREED_DEPTH,this._center.y-=Math.floor(this._depth/2),this._radiusY*=Tt._THREED_TILT),this._slices=this._createSlices(),this._centerLabel=null,this._shapesContainer=new r.Container(this.getCtx()),this._numFrontObjs=0,this._numSelectedObjsInFront=0},Tt.prototype.getOptions=function(){return this._options},Tt.prototype.highlight=function(t){r.CategoryRolloverHandler.highlight(t,this._slices,"any"==this.getOptions().highlightMatch)},Tt.prototype._createSlices=function(){for(var t,e,i=[],a=_.getRenderedSeriesIndices(this.chart),s=_.getOtherValue(this.chart),n=0;n<a.length;n++)if(e=a[n],c.isDataItemRendered(this.chart,e)){var o=(t=new z(this,e)).getValue();null==o||o<=0||i.push(t)}var l=c.getHiddenCategories(this.chart).indexOf(_.OTHER_SLICE_SERIES_ID)>=0;if(s>0&&!l){var h=new z(this);"ascending"==this.chart.getOptions().sorting?i.unshift(h):i.push(h)}return r.Agent.isRightToLeft(this.getCtx())&&i.reverse(),i},Tt.prototype.setInitialSelection=function(){var t=this.chart.getSelectionHandler();if(t){for(var e=c.getInitialSelection(this.chart),i=[],r=0;r<e.length;r++)for(var a=0;a<this._slices.length;a++){var s=this._slices[a].getId();null!=s&&(null!=e[r].id&&s.id==e[r].id||s.series==e[r].series&&s.group==e[r].group)&&i.push(s)}if(_.isOtherSliceSelected(this.chart,e)){var n=_.getOtherSliceId(this.chart);i.push(n)}t.processInitialSelections(i,this._slices)}},Tt.prototype.render=function(){N.addPlotAreaDnDBackground(this.chart,this,this._frame,!0),this.contains(this._shapesContainer)||(this._shapesContainer||(this._shapesContainer=new r.Container(this.getCtx())),this.addChild(this._shapesContainer)),Tt._layoutSlices(this._slices,this._anchorOffset);for(var t=2*Math.PI*this.getRadiusX(),e=0,i={},a=this.chart.getOptionsCache().getFromCache("hasLargeSeriesCount"),s=0;s<this._slices.length;s++){if(a){var n=this._slices[s].getAngleExtent(),o=n/360*t,l=(this._slices[s].getAngleStart()+n)/360*t;if(o<Tt._MIN_ARC_LENGTH&&Math.abs(e-l)<Tt._MIN_ARC_LENGTH){i[this._slices[s].getSeriesIndex()]=!0;continue}e=l}this._slices[s].preRender()}var h=Tt._orderSlicesForRendering(this._slices);this._duringDisplayAnim||(W.createPieCenter(this),W.layoutLabelsAndFeelers(this));for(s=0;s<h.length;s++)i[h[s].getSeriesIndex()]||h[s].render(this._duringDisplayAnim);this.setInitialSelection(),this.highlight(c.getHighlightedCategories(this.chart))},Tt.prototype.getTotalValue=function(){for(var t=0,e=0;e<this._slices.length;e++){var i=this._slices[e].getValue();i>=0&&(t+=i)}return t},Tt._layoutSlices=function(t,e){var i,r,a=0,s=t?t.length:0;e>360&&(e-=360),e<0&&(e+=360);var n=0;s>0&&(n=t[0].getPieChart().getTotalValue());for(var o=0;o<s;o++){var l=(i=t[o]).getValue();(r=e-(a=3.6*(l==n?100:0==n?0:Math.min(l/n*100,99.99))))<0&&(r+=360),i.setAngleStart(r),i.setAngleExtent(a),e=i.getAngleStart()}},Tt._orderSlicesForRendering=function(t){for(var e,i,r,a,s=[],n=t?t.length:0,o=-1,l=0;l<n;l++)if((r=(i=(e=t[l]).getAngleStart())+e.getAngleExtent())>360&&(r-=360),r<0&&(r+=360),90==r||i<90&&r>90){o=l,a=r-90;break}var h=[];for(l=o;l<n;l++)h.push(t[l]);for(l=0;l<o;l++)h.push(t[l]);var u=0,g=0,d=180+a;for(l=0;l<n;l++)if(e=h[l]){if(u+e.getAngleExtent()>d){g=l;break}s.push(e),u+=e.getAngleExtent()}for(l=n-1;l>=g;l--)(e=h[l])&&s.push(e);return s},Tt.prototype.is3D=function(){return"on"==this._options.styleDefaults.threeDEffect},Tt.prototype.__calcMaxExplodeDistance=function(){var t=.5/Tt._RADIUS-1;return this._radiusX*t},Tt.prototype.getAnimationDuration=function(){return f.getAnimationDuration(this.chart)},Tt.prototype.getDisplayAnimation=function(){this._duringDisplayAnim=!0;var t=new r.DataAnimationHandler(this.getCtx(),this),e=this.getAnimationDuration(),i=z.createFillerSlice(this,this.getTotalValue());this._slices.push(i);var a=new r.CustomAnimation(this.getCtx(),i,e);a.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,i,i.GetAnimationParams,i.SetAnimationParams,i.getDeletedAnimationParams()),a.setOnEnd(i._removeDeletedSlice,i),t.add(a,0);for(var s=0;s<this._slices.length-1;s++)this._slices[s].animateInsert(t);var n=new r.CustomAnimation(this.getCtx(),this,e);n.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,this._getAnimationParams()),t.add(n,0);var o=[];for(s=0;s<this._slices.length;s++)o=o.concat(this._slices[s].getLabelAndFeeler());var l=new r.AnimFadeIn(this._context,o,e);t.add(l,0),this._setAnimationParams();var h=t.getAnimation(!0);return h.setOnEnd(this._onEnd,this),h},Tt.prototype._onEnd=function(){this._duringDisplayAnim=!1,this._setAnimationParams()},Tt.prototype.getCenter=function(){return this._center},Tt.prototype.getId=function(){return"chart/pie"},Tt.prototype.getInnerRadius=function(){return this.is3D()?0:this._options.styleDefaults.pieInnerRadius*Math.min(this._radiusX,this._radiusY)*.95},Tt.prototype.__getFrame=function(){return this._frame},Tt.prototype.getRadiusX=function(){return this._radiusX},Tt.prototype.getRadiusY=function(){return this._radiusY},Tt.prototype.getDepth=function(){return this._depth},Tt.prototype.getSliceDisplayable=function(t){var e=_.getSliceBySeriesIndex(this.chart,t);return e?e.getTopDisplayable():null},Tt.prototype.__getShapesContainer=function(){return this._shapesContainer},Tt.prototype.__getSlices=function(){return this._slices},Tt.prototype.animateUpdate=function(t,e){var i=new r.DataAnimationHandler(this.getCtx(),this);i.constructAnimation(e.__getSlices(),this.__getSlices());var a=i.getAnimation(!0),s=new r.CustomAnimation(this.getCtx(),this,this.getAnimationDuration());s.getAnimator().addProp(r.Animator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,this._getAnimationParams());var n=new r.ParallelPlayable(this.getCtx(),a,s);n.setOnEnd(this._setAnimationParams,this),t.add(n,0),this._setAnimationParams([e.getDepth(),e.getRadiusY(),e.getCenter().y])},Tt.prototype.animateInsert=function(t){},Tt.prototype.animateDelete=function(t,e){},Tt.prototype._getAnimationParams=function(){return[this._depth,this._radiusY,this._center.y]},Tt.prototype._setAnimationParams=function(t){this.removeChildren(),this._shapesContainer&&this._shapesContainer.destroy(),this._shapesContainer=null,t&&(this._depth=t[0],this._radiusY=t[1],this._center.y=t[2]),this.render()},Tt.prototype.bringToFrontOfSelection=function(t){var e=t.getPieChart()._shapesContainer;if(e){var i=e.getNumChildren();if(i-this._numFrontObjs>1){e.removeChild(t._topSurface[0]);var r=i-this._numFrontObjs-1;e.addChildAt(t._topSurface[0],r)}}},Tt.prototype.pushToBackOfSelection=function(t){for(var e=this._slices.length,i=0,r=0;r<e;r++)this._slices[r].isSelected()&&i++;this._numSelectedObjsInFront=i;var a=t.getPieChart()._shapesContainer;if(a){var s=a.getNumChildren()-this._numFrontObjs-1-this._numSelectedObjsInFront;s>=0&&(a.removeChild(t._topSurface[0]),a.addChildAt(t._topSurface[0],s))}},Tt.prototype.getLabelPosition=function(){return Tt.parseLabelPosition(this._options.styleDefaults.dataLabelPosition)},Tt.prototype.getSeriesLabelPosition=function(t){var e=this.getLabelPosition(),i=c.getDataItem(this.chart,t,0);return i&&i.labelPosition&&(e=i.labelPosition),Tt.parseLabelPosition(e)},Tt.parseLabelPosition=function(t){return"center"==t||"inside"==t?"center":"outsideSlice"==t||"outside"==t?"outsideSlice":"none"==t?"none":"auto"},Tt.prototype.getSkin=function(){return this._options.skin},Tt.prototype.setCenterLabel=function(t){this._centerLabel=t},Tt.prototype.getCenterLabel=function(){return this._centerLabel};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var It=new Object;r.Obj.createSubclass(It,r.Obj),It._BUTTON_SIZE=16,It._BUTTON_PADDING=5,It._BUTTON_CORNER_DIST=4,It._BUTTON_OPACITY=.8,It._MOUSE_WHEEL_ZOOM_RATE_SLOW=.05,It._MOUSE_WHEEL_ZOOM_RATE_FAST=.2,It.render=function(t,e,i){if(It._renderBackground(t,e,i),c.hasInvalidData(t))w.renderEmptyText(t,e,i);else{u.isOverview(t)||(t.getOptions()._maxOverflowCoord=i.x+i.w,t.getOptions()._minOverflowCoord=i.x),It._addOuterGaps(t,i);var r=i.clone();It._renderTitles(t,e,i),It._adjustAvailSpace(i),bt.render(t,e,i),It._adjustAvailSpace(i);var a=It._prerenderHorizScrollbar(t,e,i),s=It._prerenderVertScrollbar(t,e,i);It._adjustAvailSpace(i),t.__setAxisSpace(i.clone()),At.render(t,e,i),It._adjustAvailSpace(i),It._positionLegend(t.legend,i),t.__setPlotAreaSpace(i.clone()),It._setEventHandlers(t),It._renderScrollbars(t,a,s),It._updateTitles(t,e,r,i),It._renderPlotArea(t,e,i),It._renderDragButtons(t,e)}},It._setEventHandlers=function(t){var e=t.getOptions(),i=t.getEventManager();if(u.hasAxes(t)&&!u.isOverview(t)){var a,s,n=new r.Rectangle(0,0,t.getWidth(),t.getHeight()),o=t.__getPlotAreaSpace(),l=t.__getAxisSpace(),h=new r.Rectangle(o.x,l.y,o.w,l.h),g=new r.Rectangle(l.x,o.y,l.w,o.h),d=new r.SolidFill(e.styleDefaults.marqueeColor),c=new r.Stroke(e.styleDefaults.marqueeBorderColor);if(L.isScrollable(t)){var p=L.isDelayedScroll(t)?It._MOUSE_WHEEL_ZOOM_RATE_FAST:It._MOUSE_WHEEL_ZOOM_RATE_SLOW;if(s=new r.PanZoomHandler(t,o,n,p),i.setPanZoomHandler(s),L.isZoomable(t)){var _=L.getZoomDirection(t);a=u.isHorizontal(t)||"y"==_?new r.MarqueeHandler(t,o,n,d,c,!1,!0,null,g):u.isBLAC(t)||"x"==_?new r.MarqueeHandler(t,o,n,d,c,!0,!1,h,null):new r.MarqueeHandler(t,o,n,d,c,!0,!0,h,g),i.setMarqueeZoomHandler(a)}}"multiple"==e.selectionMode&&(a=new r.MarqueeHandler(t,o,n,d,c,!0,!0,h,g),i.setMarqueeSelectHandler(a))}},It.rerenderAxisAndPlotArea=function(t,e){if(!c.hasInvalidData(t)){var i=t.__getAxisSpace().clone(),r=t.getSelectionHandler();if(r)var a=r.getSelectedIds();var s=t.__cacheChartFocus();t.__cleanUpAxisAndPlotArea(),At.render(t,e,i),It._adjustAvailSpace(i),t.__setPlotAreaSpace(i.clone()),It._renderPlotArea(t,e,i),r&&r.processInitialSelections(a,t.getChartObjPeers()),t.getEventManager().autoToggleZoomButton(),It.positionDragButtons(t),t.highlight(c.getHighlightedCategories(t)),t.__restoreChartFocus(s)}},It._renderBackground=function(t,e,i){var a=new r.Rect(t.getCtx(),i.x,i.y,i.w,i.h);a.setInvisibleFill(),e.addChild(a)},It._addOuterGaps=function(t,e){var i=t.getOptions(),r=p.getGapWidth(t,i.layout.outerGapWidth),a=p.getGapHeight(t,i.layout.outerGapHeight);It._needsOuterGaps(t)||(r=Math.min(r,1),a=Math.min(a,1)),e.x+=r,e.w-=2*r,e.y+=a,e.h-=2*a},It._needsOuterGaps=function(t){var e=t.getOptions();return!(!u.isFunnel(t)||"on"!==e.styleDefaults.threeDEffect)||!(R.isStandalonePlotArea(t)||R.isStandaloneXAxis(t)||R.isStandaloneYAxis(t)||R.isStandaloneY2Axis(t))},It._renderTitles=function(t,e,i){var a=t.getOptions();if(a.title.text){var s,n,o=w.createText(t.getEventManager(),e,a.title.text,a.title.style,i.x,i.y,i.w,i.h),l=null!=a.title.hAlign?a.title.hAlign:a.title.halign,h="plotArea"==l.substring(0,8);if(o?(s=(n=o.getDimensions()).h,o.setAriaProperty("hidden",null)):(s=0,n=new r.Rectangle(0,0,0,0)),a.subtitle.text){var u=new r.OutputText(t.getCtx(),a.subtitle.text,i.x,i.y);if(u){u.setCSSStyle(a.subtitle.style),e.addChild(u);var g=u.getDimensions(),d=p.getGapWidth(t,a.layout.titleSubtitleGapWidth),c=n.w+d+g.w;if(c>i.w||h)d=p.getGapHeight(t,a.layout.titleSubtitleGapHeight),u.setY(i.y+s+d),r.TextUtils.fitText(u,i.w,i.h,e)&&(s+=(g=u.getDimensions()).h+d,r.Agent.isRightToLeft(t.getCtx())&&(u&&u.setX(i.w-g.w),o&&o.setX(i.w-n.w)));else{var _=n.h-g.h;u.setY(_+i.y),o&&(r.LayoutUtils.align(i,l,o,c),r.Agent.isRightToLeft(t.getCtx())?(u.setX(o.getX()),o&&o.setX(o.getX()+g.w+d)):u.setX(o.getX()+c-g.w))}u.setAriaProperty("hidden",null),t.getEventManager().associate(u,new r.SimpleObjPeer(u.getUntruncatedTextString()))}}else r.LayoutUtils.align(i,l,o,n.w);h&&(t.getCache().putToCache("title",o),t.getCache().putToCache("subtitle",u));var f="on"==a.titleSeparator.rendered?a.layout.titleSeparatorGap:a.layout.titlePlotAreaGap;if(i.y+=s+p.getGapHeight(t,f),i.h-=s+p.getGapHeight(t,f),"on"==a.titleSeparator.rendered){var v=new r.Line(t.getCtx(),i.x,i.y,i.x+i.w,i.y),m=new r.Line(t.getCtx(),i.x,i.y+1,i.x+i.w,i.y+1);v.setSolidStroke(a.titleSeparator.upperColor),m.setSolidStroke(a.titleSeparator.lowerColor),e.addChild(v),e.addChild(m);var S=2+p.getGapHeight(t,a.layout.titlePlotAreaGap);i.y+=S,i.h-=S}}if(a.footnote.text){var y=w.createText(t.getEventManager(),e,a.footnote.text,a.footnote.style,i.x,0,i.w,i.h),C=null!=a.footnote.hAlign?a.footnote.hAlign:a.footnote.halign,x="plotArea"==C.substring(0,8);if(y){var A=y.getDimensions();y.setY(i.y+i.h-A.h),i.h-=A.h+p.getGapHeight(t,a.layout.footnoteGap),r.LayoutUtils.align(i,C,y,A.w),y.setAriaProperty("hidden",null)}x&&t.getCache().putToCache("footnote",y)}},It._updateTitles=function(t,e,i,r){var a=t.getOptions(),s=null!=a.title.hAlign?a.title.hAlign:a.title.halign,n=null!=a.footnote.hAlign?a.footnote.hAlign:a.footnote.halign,o=a.title.text&&"plotArea"==s.substring(0,8),l=a.footnote.text&&"plotArea"==n.substring(0,8);if(i.x=r.x,i.w=r.w,o){var h,u=t.getCache().getFromCache("title"),g=t.getCache().getFromCache("subtitle"),d=u.getDimensions();It._alignTextToPlotArea(e,i,s,u,d.w),g&&(h=g.getDimensions(),It._alignTextToPlotArea(e,i,s,g,h.w))}if(l){var c=t.getCache().getFromCache("footnote"),p=c.getDimensions();It._alignTextToPlotArea(e,i,n,c,p.w)}},It._alignTextToPlotArea=function(t,e,i,a,s){r.TextUtils.fitText(a,e.w,e.h,t)&&("plotAreaStart"==i?r.LayoutUtils.align(e,"start",a,s):"plotAreaCenter"==i?r.LayoutUtils.align(e,"center",a,s):"plotAreaEnd"==i&&r.LayoutUtils.align(e,"end",a,s))},It._renderPlotArea=function(t,e,i){if(u.hasAxes(t)){var a=new r.Container(t.getCtx());a.setTranslate(i.x,i.y),e.addChildAt(a,1),t.setPlotArea(a),t.getEventManager().associate(a,new r.SimpleObjPeer(null,null,null,{type:"plotArea"}));var s=new r.Rectangle(0,0,i.w,i.h);yt.render(t,a,s)}else if(u.isPie(t)){var n=new Tt(t,i);n.__getSlices().length>0?(e.addChild(n),t.setPlotArea(n),n.render()):w.renderEmptyText(t,e,i)}else u.isFunnel(t)?H.render(t,e,i):u.isPyramid(t)&&U.render(t,e,i);i.w=0,i.h=0},It._prerenderHorizScrollbar=function(t,e,i){var a=i.w,s=0;return L.isScrollable(t)&&L.isHorizScrollbarSupported(t)?f.isOverviewRendered(t)?(s=Math.min(f.getOverviewHeight(t),i.h))>0&&(t.overview=new Mt(t),e.addChild(t.overview),r.LayoutUtils.position(i,"bottom",t.overview,a,s,10)):(s=t.getOptions().styleDefaults._scrollbarHeight,t.xScrollbar=new r.SimpleScrollbar(t.getCtx(),t.processEvent,t),e.addChild(t.xScrollbar),r.LayoutUtils.position(i,"bottom",t.xScrollbar,a,s,8),t.overview=null):t.overview=null,new r.Dimension(a,s)},It._prerenderVertScrollbar=function(t,e,i){var a=0,s=i.h;if(L.isScrollable(t)&&L.isVertScrollbarSupported(t)){a=t.getOptions().styleDefaults._scrollbarHeight;var n=new r.SimpleScrollbar(t.getCtx(),t.processEvent,t);e.addChild(n),r.LayoutUtils.position(i,r.Agent.isRightToLeft(t.getCtx())?"right":"left",n,a,s,8),u.isHorizontal(t)?t.xScrollbar=n:t.yScrollbar=n}return new r.Dimension(a,s)},It._renderScrollbars=function(t,e,i){var a=t.getOptions(),s={color:a.styleDefaults._scrollbarHandleColor,backgroundColor:a.styleDefaults._scrollbarTrackColor},n=t.__getPlotAreaSpace();if(t.xScrollbar&&(s.min=t.xAxis.getLinearGlobalMin(),s.max=t.xAxis.getLinearGlobalMax(),u.isHorizontal(t)?(s.isHorizontal=!1,s.isReversed=!1,t.xScrollbar.setTranslateY(n.y),t.xScrollbar.render(s,i.w,n.h)):(s.isHorizontal=!0,s.isReversed=r.Agent.isRightToLeft(t.getCtx()),t.xScrollbar.setTranslateX(n.x),t.xScrollbar.render(s,n.w,e.h)),t.xScrollbar.setViewportRange(t.xAxis.getLinearViewportMin(),t.xAxis.getLinearViewportMax())),t.yScrollbar&&(s.min=t.yAxis.getLinearGlobalMin(),s.max=t.yAxis.getLinearGlobalMax(),s.isHorizontal=!1,s.isReversed=!0,t.yScrollbar.setTranslateY(n.y),t.yScrollbar.render(s,i.w,n.h),t.yScrollbar.setViewportRange(t.yAxis.getLinearViewportMin(),t.yAxis.getLinearViewportMax())),t.overview){var o=t.Defaults.getNoCloneObject(),l={overview:{xMin:t.xAxis.getLinearGlobalMin(),xMax:t.xAxis.getLinearGlobalMax(),x1:t.xAxis.getLinearViewportMin(),x2:t.xAxis.getLinearViewportMax(),minimumWindowSize:t.xAxis.getInfo().getMinimumExtent()},chart:r.JsonUtils.clone(a,null,o)};L.isZoomable(t)||(l.featuresOff="zoom"),l.chart._minOverflowCoord=a._minOverflowCoord-n.x,l.chart._maxOverflowCoord=a._maxOverflowCoord-n.x,t.overview.setTranslateX(n.x),t.overview.render(l,n.w,e.h),t.overview.setViewportRange(t.xAxis.getLinearViewportMin(),t.xAxis.getLinearViewportMax())}},It._positionLegend=function(t,e){if(t){var i=t.getDimensions(),r=t.getOptions().orientation;"vertical"==r&&i.h<=e.h?t.setTranslateY(Math.round(e.y+e.h/2-i.h/2)):"horizontal"==r&&i.w<=e.w&&t.setTranslateX(Math.round(e.x+e.w/2-i.w/2))}},It._renderDragButtons=function(t,e){var i=It._BUTTON_SIZE+2*(It._BUTTON_PADDING+It._BUTTON_CORNER_DIST),a=t.__getPlotAreaSpace();if(!(!u.hasAxes(t)||u.isOverview(t)||a.w<i||a.h<i)){var s=t.getOptions(),n=s._resources,o=s.translations,l=t.getEventManager(),h=s.dragMode;if("user"==h){var g,d,c,p=r.Agent.isTouchDevice(),_=L.isScrollable(t);t.dragButtons=new r.Container(t.getCtx());var f=[],v="multiple"==s.selectionMode&&(p||_),m=_&&p,S=_&&!p&&L.isZoomable(t)&&u.isScatterBubble(t);v&&n.select&&f.push(n.select),m&&n.pan&&f.push(n.pan),S&&n.zoom&&f.push(n.zoom),c=r.ToolkitUtils.getIconStyles(t.getCtx(),f),v&&(d=m||S?"end":"solo",l.selectButton=It._createDragButton(t,t.dragButtons,c[n.select],l.onSelectButtonClick,l,d),g=o.tooltipSelect,l.selectButton.setTooltip(g),l.associate(l.selectButton,l.selectButton)),m&&(d=v?"start":"solo",l.panButton=It._createDragButton(t,t.dragButtons,c[n.pan],l.onPanButtonClick,l,d),g=o.tooltipPan,l.panButton.setTooltip(g),l.associate(l.panButton,l.panButton)),S&&(d=v?"start":"solo",l.zoomButton=It._createDragButton(t,t.dragButtons,c[n.zoom],l.onZoomButtonClick,l,d),g=o.tooltipZoom,l.zoomButton.setTooltip(g),l.associate(l.zoomButton,l.zoomButton)),It.positionDragButtons(t),l.setDragMode(null),t.dragButtons.getNumChildren()>0&&(t.addChild(t.dragButtons),p?_&&(l.panButton.setToggled(!0),l.onPanButtonClick(null)):t.hideDragButtons(),t.dragButtons.setCursor("default"))}else"pan"==h?l.setDragMode(K.DRAG_MODE_PAN):"zoom"==h?l.setDragMode(K.DRAG_MODE_ZOOM):"select"==h?l.setDragMode(K.DRAG_MODE_SELECT):l.setDragMode(K.DRAG_MODE_OFF)}},It._positionDragButton=function(t,e,i){var a;r.Agent.isRightToLeft(t.getCtx())?(a=i.x+It._BUTTON_PADDING,i.x+=It._BUTTON_SIZE+2*It._BUTTON_PADDING):a=i.x+i.w-It._BUTTON_SIZE-It._BUTTON_PADDING,i.w-=It._BUTTON_SIZE+2*It._BUTTON_PADDING,e.setTranslate(a,i.y+It._BUTTON_PADDING)},It.positionDragButtons=function(t){var e=t.__getPlotAreaSpace().clone();e.x+=It._BUTTON_CORNER_DIST,e.w-=2*It._BUTTON_CORNER_DIST,e.y+=It._BUTTON_CORNER_DIST;var i=t.getEventManager();i.selectButton&&It._positionDragButton(t,i.selectButton,e),i.panButton&&It._positionDragButton(t,i.panButton,e),i.zoomButton&&It._positionDragButton(t,i.zoomButton,e)},It._createDragButtonBackground=function(t,e){var i=2,a=2,s=r.Agent.isRightToLeft(t);"start"==e?s?i=0:a=0:"end"==e&&(s?a=0:i=0);var n=i,o=a,l=-It._BUTTON_PADDING,h=It._BUTTON_SIZE+2*It._BUTTON_PADDING,u=r.PathUtils.roundedRectangle(l,l,h,h,n,a,o,i),g=new r.Path(t,u);return g.setPixelHinting(r.Agent.getDevicePixelRatio()>1),g},It._getImageUrl=function(t,e,i,r){var a,s=t.getOptions()._resources[i];return null==s?r:null!=(a=e[s])?a:s},It._createDragButton=function(t,e,i,a,s,n){var o=t.getCtx(),l=It._createDragButtonBackground(o,n),h=new r.IconButton(o,"outlined",{style:i,size:It._BUTTON_SIZE},l,null,a,s);if(r.Agent.isTouchDevice()){var u,g=r.Agent.isRightToLeft(o),d=2*It._BUTTON_PADDING;(u="solo"==n?new r.Rect(o,-d,-d,It._BUTTON_SIZE+2*d,It._BUTTON_SIZE+2*d):"start"==n&&!g||"end"==n&&g?new r.Rect(o,-d,-d,It._BUTTON_SIZE+1.5*d,It._BUTTON_SIZE+2*d):new r.Rect(o,-.5*d,-d,It._BUTTON_SIZE+1.5*d,It._BUTTON_SIZE+2*d)).setInvisibleFill(),u.setSolidStroke("none"),h.addChild(u)}return h.setToggleEnabled(!0),e.addChild(h),h.addEvtListener(r.MouseEvent.MOUSEDOWN,function(t){t.stopPropagation()}),h},It._adjustAvailSpace=function(t){t.x=Math.round(t.x),t.y=Math.round(t.y),t.w=Math.round(t.w),t.h=Math.round(t.h)},It.renderDataCursor=function(t){var e=null,i=t.getOptions(),r=t.getEventManager();if(S.isDataCursorEnabled(t)){(e=new v(t.getCtx(),i.styleDefaults.dataCursor,u.isHorizontal(t))).setBehavior(S.getDataCursorBehavior(t)),t.addChild(e);var a=new Ct(t,e);r.setDataCursorHandler(a),t.positionDataCursor(i.dataCursorPosition)}else r.setDataCursorHandler(null);return e};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Dt={processDataObject:function(t){if(c.hasData(t)){var e=t.getOptions(),a=t.getOptionsCache(),s=c.getSeriesCount(t);u.isValidType(t)||(e.type="bar");var n=!1,o=!1,l=!0,h=null,g=!1,d=!1,p=!1,_=!1,v=u.isStock(t);v&&s>1&&(e.series=e.series.slice(0,1),s=1);var m=u.isMixedFrequency(t),S=s>100;a.putToCache("hasLargeSeriesCount",S);for(var y=0,C=t.getSeriesStyleArray(),x=0;x<s;x++){var A=c.getSeries(t,x);!S&&null!=A&&C.indexOf(A)<0&&C.push(A);var b=c.getSeriesItem(t,x);if(b.items&&b.items.length>y&&(y=b.items.length),"hidden"===b.visibility){var M=c.getHiddenCategories(t);M.indexOf(A)<0&&M.push(A)}if(b.visibility=null,"on"===b.assignedToY2&&(n=!0),"on"===b.displayInLegend&&(_=!0),b&&b.items)for(var T=b.items,I=0;I<T.length;I++)null!=T[I]&&("object"!=i(w=T[I])&&(w={y:w},T[I]=w),m||null==w.x||(w.x=Number(w.x)),null!=w.y&&(w.y=Number(w.y),w.y<0&&(d=!0)),null!=w.z?(w.z=Number(w.z),null==h?h=w.z:h!=w.z&&(l=!1)):h=1,null!=w.value&&(w.value=Number(w.value),w.value<0&&(d=!0)),null!=w.targetValue&&(w.targetValue=Number(w.targetValue)),null!=w.open&&(w.open=Number(w.open),g=!0),null!=w.close&&(w.close=Number(w.close),g=!0,w.close<0&&(d=!0)),null!=w.low&&(w.low=Number(w.low),g=!0),null!=w.high&&(w.high=Number(w.high),g=!0),null!=w.volume&&(w.volume=Number(w.volume),o=!0),(w.color||w.borderColor||w.borderWidth||w.style||w.svgStyle||w.className||w.svgClassName)&&a.putToCachedMap("itemStyleSet",x,!0),"outsideBarEdge"==w.labelPosition&&(p=!0))}if(a.putToCache("hasVolume",o),a.putToCache("hasConstantZValue",l),a.putToCache("constantZValue",l?h:null),a.putToCache("hasLowHighSeries",g),a.putToCache("hasNegativeValues",d),a.putToCache("hasDataOutsideBarEdge",p),a.putToCache("hasSeriesDisplayedInLegend",_),v&&c.hasVolumeSeries(t)&&!u.isOverview(t)){var D=r.JsonUtils.clone(c.getSeriesItem(t,0));D.assignedToY2="on",n=!0,D.type="bar",D.categories=c.getCategories(t,0),D.id="_volume",D._selectable="off",D.items=[];for(var O=0;O<b.items.length;O++){var E={};E.color=f.getStockVolumeColor(t,0,O),E.x=b.items[O].x,E.value=b.items[O].volume,E.drilling="off",D.items.push(E)}e.series.push(D),a.putToCachedMap("itemStyleSet",e.series.length-1,!0)}a.putToCache("hasY2Assignment",n);for(var P=c.getRefObjs(t),L=0;L<P.length;L++){if(T=P[L].items)for(I=0;I<T.length;I++){var w;(w=T[I])&&("object"!=i(w)?T[I]=Number(w):(!u.isMixedFrequency(t)&&w.x&&(w.x=Number(w.x)),w.max&&(w.max=Number(w.max)),w.min&&(w.min=Number(w.min)),w.value&&(w.value=Number(w.value))))}}e.groups||(e.groups=new Array);var R=c.getGroupCount(t);for(L=0;L<y-R;L++){var B=e.translations.labelDefaultGroupName||"Group {0}",k=r.ResourceUtils.format(B,[e.groups.length+1]);e.groups.push(k)}a.putToCache("groupsArray",null),Dt._processTimeAxis(t);var F=e.sorting;if(F="on"===F?"descending":"ascending"!==F&&"descending"!==F?"off":F,u.isBLAC(t)&&u.hasGroupAxis(t)&&"off"!=F&&1==c.getNumLevels(t)){var N=c.getGroups(t),H={};for(I=0;I<N.length;I++){var G=0;for(L=0;L<=s;L++)if(c.isSeriesRendered(t,L)&&!c.isAssignedToY2(t,L)){var U=c.getValue(t,L,I);G+=null==U||isNaN(U)?0:U}H[N[I]]={index:I,total:G,group:e.groups[I]}}"ascending"===F?N.sort(function(t,e){return H[t].total-H[e].total}):N.sort(function(t,e){return H[e].total-H[t].total});for(L=0;L<s;L++){var j=[];for(I=0;I<N.length;I++)j.push(c.getDataItem(t,L,H[N[I]].index));e.series[L].items=j}var V=[];for(I=0;I<N.length;I++)V.push(H[N[I]].group);e.groups=V,a.putToCache("groupsArray",null),a.putToCache("value",null)}e.styleDefaults.dataCursor.lineWidth=parseFloat(e.styleDefaults.dataCursor.lineWidth),Dt._sanitizeAxis(e.xAxis),Dt._sanitizeAxis(e.yAxis),Dt._sanitizeAxis(e.y2Axis)}},_processTimeAxis:function(t){var e,i,r=t.getCtx(),a=t.getOptions(),s=c.getSeriesCount(t),n=c.getGroupCount(t);if(u.isMixedFrequency(t))for(e=0;e<s;e++)for(i=0;i<n;i++){var o=c.getDataItem(t,e,i);null!=o&&"string"==typeof o.x&&null!=o.x&&(o.x=Dt._sanitizeDateTime(r,o.x))}else if(u.hasTimeAxis(t)){for(i=0;i<n;i++){var l=c.getGroup(t,i);null!=l&&(a.groups[i]=Dt._sanitizeDateTime(r,l))}t.getOptionsCache().putToCache("groupsArray",null)}if(u.hasTimeAxis(t)){var h=a.xAxis;null!=h.dataMin&&(h.dataMin=Dt._sanitizeDateTime(r,h.dataMin)),null!=h.dataMax&&(h.dataMax=Dt._sanitizeDateTime(r,h.dataMax)),null!=h.min&&(h.min=Dt._sanitizeDateTime(r,h.min)),null!=h.max&&(h.max=Dt._sanitizeDateTime(r,h.max)),null!=h.viewportMin&&(h.viewportMin=Dt._sanitizeDateTime(r,h.viewportMin)),null!=h.viewportMax&&(h.viewportMax=Dt._sanitizeDateTime(r,h.viewportMax)),null!=h.viewportStartGroup&&(h.viewportStartGroup=Dt._sanitizeDateTime(r,h.viewportStartGroup)),null!=h.viewportEndGroup&&(h.viewportEndGroup=Dt._sanitizeDateTime(r,h.viewportEndGroup));for(var g=c.getRefObjs(t),d=0;d<g.length;d++){var p=g[d].items;if(p)for(var _=0;_<p.length;_++)p[_]&&null!=p[_].x&&(p[_].x=Dt._sanitizeDateTime(r,p[_].x))}}},_sanitizeAxis:function(t){t.min==t.max&&(t.min=null,t.max=null)},_sanitizeDateTime:function(t,e){var i=null,r=t.getLocaleHelpers().isoToDateConverter;if(r){try{i=r(e)}catch(t){i=null}i=null!=i&&i.getTime?i.getTime():null}return null==i&&(i=Date.parse(e)),isNaN(i)&&(i=Number(e)),i}},Ot=function(t,e,i){this.Init(t,e,i)};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */r.Obj.createSubclass(Ot,r.BaseComponent),Ot.newInstance=function(t,e,i){return new Ot(t,e,i)},Ot.getDefaults=function(t){return(new p).getDefaults(t)},Ot.prototype.Init=function(t,e,i){Ot.superclass.Init.call(this,t,e,i),this.Defaults=new p(t),this.EventManager=new K(this),this.EventManager.addListeners(this),r.Agent.isTouchDevice()||this.EventManager.setKeyboardHandler(this.CreateKeyboardHandler(this.EventManager)),this.setId("chart1000"+Math.floor(1e9*Math.random())),this.legend=null,this.xAxis=null,this.yAxis=null,this.y2Axis=null,this.overview=null,this.xScrollbar=null,this.yScrollbar=null,this.dragButtons=null,this.pieChart=null,this.pieCenterDiv=null,this.Peers=[],this.SeriesStyleArray=[],this._numFrontObjs=0,this._numSelectedObjsInFront=0,this._dataLabels=null,this._rawOptions=null},Ot.prototype.GetComponentDescription=function(){var t=this.getOptions(),e=t.translations.componentName,i="",a=r.AriaUtils.ARIA_LABEL_DESC_DELIMITER;return t.title.text&&(i+=this.Options.title.text,t.subtitle.text&&(i+=a+this.Options.subtitle.text)),t.footnote.text&&(i=0==i.length?this.Options.footnote.text:i.concat(a,this.Options.footnote.text)),i.length>0?r.ResourceUtils.format(this.Options.translations.labelAndValue,[e,i]):e},Ot.prototype.SetOptions=function(t){t?(this._rawOptions=t,this.Options=this.Defaults.calcOptions(t),this.getOptionsCache().clearCache(),Dt.processDataObject(this),(r.Agent.isEnvironmentTest()||u.isScatterBubble(this)&&c.getSeriesCount(this)*c.getGroupCount(this)>yt.FILTER_THRESHOLD_SCATTER_BUBBLE)&&(this.Options.animationOnDisplay="none",this.Options.animationOnDataChange="none")):this.Options||(this.Options=this.GetDefaults());var e=this.Options.selectionMode;this._selectionHandler="single"==e?new r.SelectionHandler(this.getCtx(),r.SelectionHandler.TYPE_SINGLE):"multiple"==e?new r.SelectionHandler(this.getCtx(),r.SelectionHandler.TYPE_MULTIPLE):null,this.EventManager.setSelectionHandler(this._selectionHandler)},Ot.prototype.render=function(t,e,i){this.getCache().clearCache();var a=this.getCtx(),s=this.Options?this.Options.animationOnDataChange:"none",n="none"!=s?new Et(this):null,o=this.__cacheChartFocus();this._container&&this.__cleanUp(),this.SetOptions(t),isNaN(e)||isNaN(i)||(this.Width=e,this.Height=i);var l=new r.Container(a);this.addChild(l),It.render(this,l,new r.Rectangle(0,0,this.Width,this.Height)),u.isSpark(this)&&this.EventManager.removeListeners(this),this.StopAnimation();var h=f.getAnimationOnDisplay(this),g=f.getAnimationDuration(this),d=new r.Rectangle(0,0,this.Width,this.Height),c=!1;if(this._container){if("none"!=s&&t)if(this.Animation=r.BlackBoxAnimationHandler.getCombinedAnimation(a,s,this._container,l,d,g),this.Animation)c=!0;else if("auto"==s&&this.getPlotArea()){var p=this.__getPlotAreaSpace();this._delContainer=yt.createClippedGroup(this,this._container,new r.Rectangle(0,0,p.w,p.h)),this.Animation=pt.createAnimation(n,this,s,g,this._delContainer),this._delContainer.getNumChildren()>0&&this.getPlotArea().addChild(this._delContainer)}}else"none"!=h&&(this.Animation=r.BlackBoxAnimationHandler.getInAnimation(a,h,l,d,g),this.Animation||"auto"!=h||(this.Animation=_t.createAnimation(this,h,g)));this.Animation?(this.EventManager.removeListeners(this),r.Playable.appendOnEnd(this.Animation,this._onAnimationEnd,this),this.Animation.play(),this._oldContainer=this._container,!c&&this._oldContainer&&this._oldContainer.removeFromParent()):this._container&&(this._container.removeFromParent(),this._container.destroy(),this._container=null),this._container=l,this._dataCursor=It.renderDataCursor(this),this.UpdateAriaAttributes(),this.__restoreChartFocus(o),this.Animation||this.RenderComplete()},Ot.prototype.__cleanUp=function(){this._dataCursor&&(this.removeChild(this._dataCursor),this._dataCursor=null),this.EventManager&&(this.EventManager.hideHoverFeedback(),this.EventManager.setPanZoomHandler(null),this.EventManager.setMarqueeZoomHandler(null),this.EventManager.setMarqueeSelectHandler(null),this.EventManager.panButton=null,this.EventManager.zoomButton=null,this.EventManager.selectButton=null),this.pieCenterDiv&&(this.getCtx().getContainer().removeChild(this.pieCenterDiv),this.pieCenterDiv=null),this.Peers=[],this.xScrollbar=null,this.yScrollbar=null,this.dragButtons&&(this.removeChild(this.dragButtons),this.dragButtons.destroy(),this.dragButtons=null),this._plotArea=null,this._areaContainer=null,this._dataLabels=null,this.getCache().clearCache()},Ot.prototype.__cleanUpAxisAndPlotArea=function(){this.EventManager.hideHoverFeedback(),this.Peers=[],this.xAxis&&(this._container.removeChild(this.xAxis),this.xAxis.destroy()),this.yAxis&&(this._container.removeChild(this.yAxis),this.yAxis.destroy()),this.y2Axis&&(this._container.removeChild(this.y2Axis),this.y2Axis.destroy()),this._plotArea&&this._plotArea==this._panZoomTarget?this._plotArea.setVisible(!1):this._plotArea&&(this._container.removeChild(this._plotArea),this._plotArea.destroy()),this._plotArea=null,this.getCache().clearCache()},Ot.prototype._onAnimationEnd=function(){this._oldContainer&&(this._oldContainer.removeFromParent(),this._oldContainer.destroy(),this._oldContainer=null),this._delContainer&&(this._delContainer.removeFromParent(),this._delContainer.destroy(),this._delContainer=null),this.AnimationStopped||this.RenderComplete(),this.EventManager.addListeners(this),this.Animation=null,this.AnimationStopped=!1},Ot.prototype.CreateKeyboardHandler=function(t){return new Z(t,this)},Ot.prototype.getAutomation=function(){return new X(this)},Ot.prototype.getValuesAt=function(t,e){var i=this.__getPlotAreaSpace(),r=t-i.x,a=e-i.y,s=u.isPolar(this),n=u.isHorizontal(this);if(s){r-=i.w/2,a-=i.h/2;var o=Math.sqrt(r*r+a*a),l=Math.atan2(r,-a);return l<0&&(l+=2*Math.PI),{x:this.xAxis?this.xAxis.getValueAt(l):null,y:this.yAxis?this.yAxis.getValueAt(o):null}}return{x:this.xAxis?this.xAxis.getValueAt(n?a:r):null,y:this.yAxis?this.yAxis.getValueAt(n?r:a):null,y2:this.y2Axis?this.y2Axis.getValueAt(n?r:a):null}},Ot.prototype.filter=function(t,e){var i="out"==e?"hidden":"visible";N.setVisibility(this,t,i),this.render(this.Options)},Ot.prototype.highlight=function(t){this.getOptions().highlightedCategories=r.JsonUtils.clone(t),r.CategoryRolloverHandler.highlight(t,this.getObjects(),"any"==this.getOptions().highlightMatch),this.legend&&this.legend.highlight(t),this.pieChart&&this.pieChart.highlight(t),this.overview&&this.overview.getBackgroundChart().highlight(t)},Ot.prototype.select=function(t){this.getOptions().selection=r.JsonUtils.clone(t);var e=c.getInitialSelection(this);N.setInitialSelection(this,e),this.pieChart&&this.pieChart.setInitialSelection()},Ot.prototype.positionDataCursor=function(t){var e=this.getEventManager().getDataCursorHandler();if(e){if(t){var i=this.xAxis&&null!=t.x?this.xAxis.getCoordAt(t.x):null,a=null;if(u.isBLAC(this)?this.yAxis&&null!=t.y?a=this.yAxis.getBoundedCoordAt(t.y):this.y2Axis&&null!=t.y2&&(a=this.yAxis.getBoundedCoordAt(t.y2)):a=this.yAxis&&null!=t.y?this.yAxis.getCoordAt(t.y):null,null!=i&&null!=a){var s=this.__getPlotAreaSpace(),n=g.convertAxisCoord(this,new r.Point(i,a),s);return void e.processMove(new r.Point(s.x+n.x,s.y+n.y),!0)}}e.processEnd(!0)}},Ot.prototype.processEvent=function(t,e){var i=t.type;if("categoryHide"==i||"categoryShow"==i)this.filter(t.category,"categoryHide"==i?"out":"in");else if("categoryHighlight"==i)this!=e&&this.highlight(t.categories),this.legend&&this.legend!=e&&this.legend.processEvent(t,e);else if("selection"==i)t=this._processSelectionEvent(t);else if("dvtPanZoom"==i)t=this._processPanZoomEvent(t);else if("dvtMarquee"==i)t=this._processMarqueeEvent(t);else if("overview"==i){var r=t.subtype;if("dropCallback"==r)return;var a="scrollTime"==r||"scrollEnd"==r||"rangeChange"==r;t=this._processScrollbarEvent(t.newX1,t.newX2,a,e)}else if("dvtSimpleScrollbar"==i)t=this._processScrollbarEvent(t.newMin,t.newMax,"end"==t.subtype,e);else if("ready"==i&&this!=e)return;if(t){if("selection"==(i=t.type)){var s,n,o=this.getOptions(),l=o.selection,h=c.getCurrentSelection(this);t.complete&&(o.selection=h),l=l||[],h=h||[];var u={};for(s=0;s<l.length;s++)u[l[s].id]=!0;var g={};for(n=0;n<h.length;n++)g[h[n].id]=!0;var d={};for(n=0;n<h.length;n++){var p=h[n].id;u[p]||(d[p]=!0)}var _={};for(s=0;s<l.length;s++){var f=l[s].id;g[f]||(_[f]=!0)}t.addedSet=d,t.removedSet=_;for(var v=0;v<t.selection.length;v++)N.addEventData(this,t.selection[v]);t.component=this.getOptions()._widgetConstructor}else if("drill"===i){if(t.subType||(t.subType="_dvtOther"===t.id?"multiSeries":"series",t.series=t.id),this._processDrillSubType(t),"multiSeries"===t.subType)return;N.addEventData(this,t),delete t.subType,t.component=this.getOptions()._widgetConstructor}this.dispatchEvent(t)}},Ot.prototype._processDrillSubType=function(t){var e,i=t.subType;"item"===i?e=N.addItemDrillEventData(this,t):"group"===i?e=N.addGroupDrillEventData(this,t):"series"===i?e=N.addSeriesDrillEventData(this,t):"multiSeries"===i&&(e=N.addMultiSeriesDrillEventData(this,t)),this.dispatchEvent(e)},Ot.prototype._processSelectionEvent=function(t){var e=N.processIds(this,t.selection);return this._updateOverviewSelection(),r.EventFactory.newChartSelectionEvent(e,!0)},Ot.prototype._processPanZoomEvent=function(t){var e=t.subtype;return"panStart"==e||"pinchStart"==e?(r.Agent.isTouchDevice()&&this._panZoomTarget!=this._plotArea&&(this._container.removeChild(this._panZoomTarget),this._panZoomTarget=this._plotArea),null):(this._lastPanZoomEvent?(t.dxMin+=this._lastPanZoomEvent.dxMin,t.dxMax+=this._lastPanZoomEvent.dxMax,t.dyMin+=this._lastPanZoomEvent.dyMin,t.dyMax+=this._lastPanZoomEvent.dyMax):r.Context.requestAnimationFrame(r.Obj.createCallback(this,this._animatePanZoomEvent)),this._lastPanZoomEvent=t,null)},Ot.prototype._animatePanZoomEvent=function(){var t=this._lastPanZoomEvent;this._lastPanZoomEvent=null;var e,i,a=t.subtype,s="panEnd"==a||"zoom"==a||"pinchEnd"==a;(L.isLiveScroll(this)?(e=N.getAxisBoundsByDelta(this,t.dxMin,t.dxMax,t.dyMin,t.dyMax),this._setScrollbarViewport(e),this._setViewport(e,s)):(e=N.getAxisBoundsByDelta(this,t.dxMinTotal,t.dxMaxTotal,t.dyMinTotal,t.dyMaxTotal),this._setScrollbarViewport(e),s&&this._setViewport(e,s)),s&&(It._setEventHandlers(this),this._panZoomTarget!=this._plotArea&&(this._container.removeChild(this._panZoomTarget),this._panZoomTarget=null)),s||!e.unchanged)&&(i=u.isBLAC(this)?r.EventFactory.newChartViewportChangeEvent(s,e.xMin,e.xMax,e.startGroup,e.endGroup,null,null):r.EventFactory.newChartViewportChangeEvent(s,e.xMin,e.xMax,null,null,e.yMin,e.yMax),this.dispatchEvent(i))},Ot.prototype._processMarqueeEvent=function(t){var e,i=t.subtype,a=this.EventManager;if(N.adjustBounds(t),a.getDragMode()==K.DRAG_MODE_SELECT){var s=a.getSelectionHandler();if("start"==i)this._initSelection=t.ctrlKey?s.getSelectedIds():[];else{var n=N.getBoundedObjects(this,t);s.processInitialSelections(this._initSelection,this.getChartObjPeers()),s.processGroupSelection(n,!0)}var o=s.getSelectedIds();e=N.getAxisBounds(this,t,!1);var l="end"==i,h=r.EventFactory.newChartSelectionEvent(o,l,e.xMin,e.xMax,e.startGroup,e.endGroup,e.yMin,e.yMax,e.y2Min,e.y2Max);return"end"==i&&this._updateOverviewSelection(),h}return a.getDragMode()==K.DRAG_MODE_ZOOM?"end"!=i?null:(e=N.getAxisBounds(this,t,!0),this._setViewport(e,!0),this._setScrollbarViewport(e),It._setEventHandlers(this),u.isBLAC(this)?r.EventFactory.newChartViewportChangeEvent(!0,e.xMin,e.xMax,e.startGroup,e.endGroup,null,null):r.EventFactory.newChartViewportChangeEvent(!0,e.xMin,e.xMax,null,null,e.yMin,e.yMax)):null},Ot.prototype._processScrollbarEvent=function(t,e,i,a){return this._lastScrollbarEvent||r.Context.requestAnimationFrame(r.Obj.createCallback(this,this._animateScrollbarEvent)),this._lastScrollbarEvent={start:t,end:e,actionDone:i,source:a},null},Ot.prototype._animateScrollbarEvent=function(){var t=this._lastScrollbarEvent.start,e=this._lastScrollbarEvent.end,i=this._lastScrollbarEvent.actionDone,a=this._lastScrollbarEvent.source;this._lastScrollbarEvent=null;var s=a==this.yScrollbar?this.yAxis:this.xAxis,n=N.getActualMinMax(s,t,e);if(t=n.min,e=n.max,(L.isLiveScroll(this)||i)&&(a==this.yScrollbar?this._setViewport({yMin:t,yMax:e},i):this._setViewport({xMin:t,xMax:e,unchanged:n.unchanged},i)),i||!n.unchanged){var o;if(a==this.yScrollbar)o=r.EventFactory.newChartViewportChangeEvent(i,null,null,null,null,t,e,null,null);else{var l=N.getAxisStartEndGroup(this.xAxis,t,e);o=r.EventFactory.newChartViewportChangeEvent(i,t,e,l.startGroup,l.endGroup,null,null,null,null)}this.dispatchEvent(o)}},Ot.prototype._updateOverviewSelection=function(){if(this.overview){var t=this.overview.getBackgroundChart();t.getOptions().selection=c.getCurrentSelection(this),t.render()}},Ot.prototype.changeOption=function(t,e,i){this.getOptions()[t]=e,this.dispatchEvent(r.EventFactory.newOptionChangeEvent(t,e,i))},Ot.prototype.registerObject=function(t){this.Peers.push(t)},Ot.prototype.getObjects=function(){return this.Peers},Ot.prototype.getChartObjPeers=function(){for(var t=[],e=0;e<this.Peers.length;e++)this.Peers[e]instanceof y&&t.push(this.Peers[e]);return t},Ot.prototype.getRefObjPeers=function(){for(var t=[],e=0;e<this.Peers.length;e++)this.Peers[e]instanceof C&&t.push(this.Peers[e]);return t},Ot.prototype.getObject=function(t,e){for(var i=0;i<this.Peers.length;i++)if(this.Peers[i]instanceof y&&this.Peers[i].getSeriesIndex()==t&&this.Peers[i].getGroupIndex()==e)return this.Peers[i];return null},Ot.prototype.getWidth=function(){return this.Width},Ot.prototype.getHeight=function(){return this.Height},Ot.prototype.getSeriesStyleArray=function(){return this.SeriesStyleArray},Ot.prototype.getPlotArea=function(){return this._plotArea},Ot.prototype.setPlotArea=function(t){this._plotArea=t},Ot.prototype.getType=function(){return this.getOptions().type},Ot.prototype.getSkin=function(){return this.getOptions().skin},Ot.prototype.getGapWidthRatio=function(){var t=this.getOptions();return null!==t.layout.gapWidthRatio?t.layout.gapWidthRatio:Math.min(this.Width/400,1)},Ot.prototype.getGapHeightRatio=function(){var t=this.getOptions();return null!==t.layout.gapHeightRatio?t.layout.gapHeightRatio:Math.min(this.Height/300,1)},Ot.prototype.getSelectionHandler=function(){return this._selectionHandler},Ot.prototype.isSelectionSupported=function(){return!!this._selectionHandler},Ot.prototype._setViewport=function(t,e){!e&&t.unchanged||(null!=t.xMax&&(this.Options.xAxis.viewportMax=t.xMax),null!=t.xMin&&(this.Options.xAxis.viewportMin=t.xMin),u.isBLAC(this)?(this.Options.xAxis.viewportStartGroup=null,this.Options.xAxis.viewportEndGroup=null,this.Options._initialZoomed=!1):(null!=t.yMax&&(this.Options.yAxis.viewportMax=t.yMax),null!=t.yMin&&(this.Options.yAxis.viewportMin=t.yMin)),this.Options._duringZoomAndScroll=!e,It.rerenderAxisAndPlotArea(this,this._container))},Ot.prototype._setScrollbarViewport=function(t){if(this.xAxis&&null!=t.xMin&&null!=t.xMax){var e=this.xAxis.actualToLinear(t.xMin),i=this.xAxis.actualToLinear(t.xMax);this.overview&&this.overview.setViewportRange(e,i),this.xScrollbar&&this.xScrollbar.setViewportRange(e,i)}if(this.yAxis&&null!=t.yMin&&null!=t.yMax){var r=this.yAxis.actualToLinear(t.yMin),a=this.yAxis.actualToLinear(t.yMax);this.yScrollbar&&this.yScrollbar.setViewportRange(r,a)}},Ot.prototype.__setAxisSpace=function(t){var e,i;this._axisSpace=t,R.isAxisRendered(this,"x")?(e=.8*t.w,i=t.h-4*R.getTickLabelHeight(this,"x")):R.isAxisRendered(this,"y")?(e=t.w,i=t.h-R.getTickLabelHeight(this,"y")):(e=t.w,i=t.h),this._radius=Math.min(e,i)/2},Ot.prototype.__getAxisSpace=function(){return this._axisSpace},Ot.prototype.__setPlotAreaSpace=function(t){this._plotAreaSpace=t},Ot.prototype.__getPlotAreaSpace=function(){return this._plotAreaSpace},Ot.prototype.__setAreaContainer=function(t){this._areaContainer=t},Ot.prototype.__getAreaContainer=function(){return this._areaContainer},Ot.prototype.getRadius=function(){return this._radius},Ot.prototype.showDragButtons=function(){this.dragButtons&&this.dragButtons.setVisible(!0)},Ot.prototype.hideDragButtons=function(){this.dragButtons&&this.dragButtons.setVisible(!1)},Ot.prototype.addDataLabel=function(t){this.getDataLabels().push(t)},Ot.prototype.getDataLabels=function(){return this._dataLabels||(this._dataLabels=[]),this._dataLabels},Ot.prototype.__cacheChartFocus=function(){var t=this.EventManager.getFocus();if(t)var e=t.isShowingKeyboardFocusEffect();if(this.xAxis){var i=this.xAxis.getKeyboardFocus();if(i)var r=i.isShowingKeyboardFocusEffect()}if(this.legend){var a=this.legend.getKeyboardFocus();if(a)var s=a.isShowingKeyboardFocusEffect()}return{chartFocus:t,chartShowingFocusEffect:e,axisFocus:i,axisShowingFocusEffect:r,legendFocus:a,legendShowingFocusEffect:s,sorting:this.getOptions().sorting}},Ot.prototype.__restoreChartFocus=function(t){if(!u.isOverview(this)&&!u.isSpark(this)){var e=[this];if(this.xAxis&&this.xAxis.isNavigable()&&e.push(this.xAxis),this.legend&&this.legend.isNavigable()&&e.push(this.legend),this.getCtx().setKeyboardFocusArray(e),t.legendFocus&&(this.legend.setKeyboardFocus(t.legendFocus,t.legendShowingFocusEffect),t.legendShowingFocusEffect&&this.getCtx().setCurrentKeyboardFocus(this.legend)),this.Options.sorting!=t.sorting){if(t.chartFocus){var i=N.getKeyboardNavigables(this);this.EventManager.setFocusObj(this.EventManager.getKeyboardHandler().getDefaultNavigable(i))}return t.axisFocus&&this.xAxis.setKeyboardFocus(this.xAxis.EventManager.getKeyboardHandler().getDefaultNavigable(this.xAxis.__getKeyboardObjects()),t.axisShowingFocusEffect),void(t.axisShowingFocusEffect&&this.getCtx().setCurrentKeyboardFocus(this.xAxis))}if(t.chartFocus){for(var r=N.getKeyboardNavigables(this),a=!1,s=0;s<r.length;s++){var n=r[s].getId();if(n instanceof h&&n.equals(t.chartFocus.getId())){this.EventManager.setFocusObj(r[s]),t.chartShowingFocusEffect&&r[s].showKeyboardFocusEffect(),a=!0;break}}a||this.EventManager.setFocusObj(this.EventManager.getKeyboardHandler().getDefaultNavigable(r))}t.axisFocus&&(this.xAxis.setKeyboardFocus(t.axisFocus,t.axisShowingFocusEffect),t.axisShowingFocusEffect&&this.getCtx().setCurrentKeyboardFocus(this.xAxis))}},Ot.prototype.getRawOptions=function(){return this._rawOptions};var Et=function(t){this.Options=t.Options,this.Peers=t.Peers,this.SeriesStyleArray=t.SeriesStyleArray,this.Cache=t.Cache,this.pieChart=t.pieChart,this._optionsCache=new r.BaseComponentCache,this._cache=new r.BaseComponentCache};r.Obj.createSubclass(Et,Ot),Et.prototype.getCache=function(){return this._cache},Et.prototype.getOptionsCache=function(){return this._optionsCache};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Pt=function(t){this._sparkChart=t};r.Obj.createSubclass(Pt,r.Automation),Pt.prototype.getDataItem=function(t){var e=this._sparkChart.__getChart().getAutomation().getDataItem(0,t);return e?{borderColor:e.borderColor,color:e.color,date:e.x,low:e.low,high:e.high,value:null==e.low||null==e.high?e.value:e.high-e.low}:null};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Lt=function t(e){this.Init({alta:t.SKIN_ALTA},e)};r.Obj.createSubclass(Lt,r.BaseComponentDefaults),Lt.SKIN_ALTA={skin:r.CSSStyle.SKIN_ALTA,type:"line",animationOnDisplay:"none",animationOnDataChange:"none",areaSvgClassName:"",emptyText:null,color:"#267db3",firstColor:"",lastColor:"",highColor:"",lowColor:"",visualEffects:"auto",baselineScaling:"min",barSpacing:"auto",lineWidth:1,lineStyle:"solid",lineType:"straight",markerSize:5,markerShape:"auto",barGapRatio:.25,referenceObjects:[],svgClassName:"",_statusMessageStyle:new r.CSSStyle("font-size: 12px; color: #404259;")},Lt.prototype.getAnimationDuration=function(t){return t.animationDuration};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var wt=function(t){this.Init(t.getCtx(),t.dispatchEvent,t,t),this._sparkChart=t};r.Obj.createSubclass(wt,r.EventManager),wt.prototype.ProcessKeyboardEvent=function(t){if(!this.KeyboardHandler)return!1;if(t.keyCode==r.KeyboardEvent.TAB){var e=this._sparkChart.getCtx().getStageAbsolutePosition();this.ProcessObjectTooltip(t,e.x,e.y,this._sparkChart.__getLogicalObject(),this._sparkChart)}return!1},wt.prototype.OnBlur=function(t){wt.superclass.OnBlur.call(this,t),this.hideTooltip()};
/**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Rt=new Object;r.Obj.createSubclass(Rt,r.Obj),Rt.render=function(t,e,i){var r=t.__getChart(),a=Rt._convertOptionsObj(t),s=t.getOptions();if("area"==s.type||"line"==s.type||"lineWithArea"==s.type){var n=Rt._getDataItems(t),o=!1;if(s.firstColor||s.lastColor||s.highColor||s.lowColor)o=!0;else for(var l=0;l<n.length;l++)if(n[l]&&"on"==n[l].markerDisplayed){o=!0;break}if(o&&n.length>0||"none"==s.lineType){var h=s.markerSize/2;e-=2*h,i-=2*h,r.setTranslate(h,h)}}r.render(a,e,i)},Rt._getDataItems=function(t){var e=t.getOptions();return e&&e.items?e.items:[]},Rt._convertOptionsObj=function(t){var e=t.getOptions(),i={styleDefaults:{},xAxis:{},yAxis:{},groups:[]};i.translations=e.translations;for(var a=[],s=-1,n=-1,o=-1/0,l=1/0,h=Rt._getDataItems(t),u=0;u<h.length;u++){var g=h[u],d={};g instanceof Object?(d.value=g.value,d.low=g.low,d.high=g.high,g.date&&(i.timeAxisType="enabled",i.groups.push(g.date)),"on"==g.markerDisplayed&&(d.markerDisplayed="on"),g.color&&(d.color=g.color),g.borderColor&&(d.borderColor=g.borderColor),g.markerShape&&(d.markerShape=g.markerShape),g.markerSize&&(d.markerSize=g.markerSize),(g.className||g.svgClassName)&&(d.svgClassName=g.className||g.svgClassName),(g.style||g.svgStyle)&&(d.svgStyle=g.style||g.svgStyle)):d.value=g,a.push(d);var c=null!=d.value?d.value:Math.max(d.low,d.high);o<c&&(o=c,s=u);var p=null!=d.value?d.value:Math.min(d.low,d.high);l>p&&(l=p,n=u)}e.highColor&&s>=0&&(a[s].markerDisplayed="on",a[s].color||(a[s].color=e.highColor)),e.lowColor&&n>=0&&(a[n].markerDisplayed="on",a[n].color||(a[n].color=e.lowColor)),e.firstColor&&a.length>0&&(a[0].markerDisplayed="on",a[0].color||(a[0].color=e.firstColor)),e.lastColor&&a.length>0&&(a[a.length-1].markerDisplayed="on",a[a.length-1].color||(a[a.length-1].color=e.lastColor)),i.series=[{items:a,areaColor:e.areaColor,svgClassName:e.className||e.svgClassName,svgStyle:e.style||e.svgStyle,areaSvgClassName:e.areaClassName||e.areaSvgClassName,areaStyle:e.areaStyle||e.areaSvgStyle}],e.referenceObjects&&e.referenceObjects.length>0&&(i.yAxis.referenceObjects=e.referenceObjects),i.__spark=!0;var _=e.barSpacing;"auto"==_&&(_=r.Agent.getDevicePixelRatio()>1?"subpixel":"pixel"),i.__sparkBarSpacing=_,i.type=e.type,i.animationOnDataChange=e.animationOnDataChange,i.animationOnDisplay=e.animationOnDisplay,i.emptyText=e.emptyText,e.color&&(i.styleDefaults.colors=[e.color]),i.styleDefaults.animationDuration=e.animationDuration,i.styleDefaults.animationIndicators="none",i.styleDefaults.lineWidth=e.lineWidth,i.styleDefaults.lineStyle=e.lineStyle,i.styleDefaults.lineType=e.lineType,i.styleDefaults.markerSize=e.markerSize,i.styleDefaults.markerShape=e.markerShape,i.styleDefaults.barGapRatio=e.barGapRatio,i.styleDefaults.dataItemGaps="0%",i.xAxis.rendered="off",i.yAxis.rendered="off";var f="zero"==e.baselineScaling,v=o!=l?.1*(o-l):.1*Math.abs(o);return i.yAxis.min=f&&l>=0?0:l-v,i.yAxis.max=f&&o<=0?0:o+v,"none"==e.visualEffects||"area"!=e.type&&"lineWithArea"!=e.type?i.styleDefaults.seriesEffect="color":i.styleDefaults.seriesEffect="gradient",i.layout={gapWidthRatio:0,gapHeightRatio:0},i.legend={rendered:"off"},i._statusMessageStyle=e._statusMessageStyle,i};
/**
   * @license
   * Copyright (c) 2008 2021, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
var Bt=function(){};r.Obj.createSubclass(Bt,r.BaseComponent),Bt.newInstance=function(t,e,i){var r=new Bt;return t.getStage().setCursor(""),r.Init(t,e,i),r},Bt.getDefaults=function(t){return(new Lt).getDefaults(t)},Bt.prototype.Init=function(t,e,i){Bt.superclass.Init.call(this,t,e,i),this.Defaults=new Lt(t),this.EventManager=new wt(this),this.EventManager.addListeners(this),this._chart=Ot.newInstance(t,this._onRenderEnd,this),this.addChild(this._chart),r.Agent.isTouchDevice()||this.EventManager.setKeyboardHandler(new r.KeyboardHandler(this.EventManager,this)),this._tooltipMask=new r.Rect(t),this.addChild(this._tooltipMask),this.setId("sparkChart1000"+Math.floor(1e9*Math.random()))},Bt.prototype.SetOptions=function(t){t?(this.Options=this.Defaults.calcOptions(t),r.Agent.isEnvironmentTest()&&(this.Options.animationOnDisplay="none",this.Options.animationOnDataChange="none")):this.Options||(this.Options=this.GetDefaults())},Bt.prototype.setId=function(t){Bt.superclass.setId.call(this,t),this._chart&&this._chart.setId(t+"chart")},Bt.prototype.render=function(t,e,i){this.SetOptions(t),isNaN(e)||isNaN(i)||(this.Width=e,this.Height=i),this._eventReceived=!1,this._isDoneRendering=!1,Rt.render(this,this.Width,this.Height);var a=this.Options.shortDesc;this._tooltipMask.setWidth(this.Width),this._tooltipMask.setHeight(this.Height),this._tooltipMask.setInvisibleFill();var s=this.Options.tooltip,n=s?s.renderer:null,o=this.Options.color;if(n){var l={component:this.Options._widgetConstructor,color:o};this._peer=new r.CustomDatatipPeer(this.getCtx().getTooltipManager(),n,o,l),this.EventManager.associate(this._tooltipMask,this._peer)}else a?(this._peer=new r.SimpleObjPeer(null,a,o),this.EventManager.associate(this._tooltipMask,this._peer)):this._peer=null;this.Options._selectingCursor&&this.setCursor(r.SelectionEffectUtils.getSelectingCursor()),this.UpdateAriaAttributes(),this._eventReceived&&this.RenderComplete(),this._isDoneRendering=!0},Bt.prototype._onRenderEnd=function(t){this._eventReceived=!0,"ready"==t.type&&this._isDoneRendering&&this.RenderComplete()},Bt.prototype.__getChart=function(){return this._chart},Bt.prototype.getAutomation=function(){return new Pt(this)},Bt.prototype.UpdateAriaAttributes=function(){var t=r.Displayable.generateAriaLabel(r.AriaUtils.processAriaLabel(this.GetComponentDescription()),this.Options.shortDesc?[this.Options.shortDesc]:null),e=this.Options.translations;this.IsParentRoot()?(this.getCtx().setAriaRole("img"),this.getCtx().setAriaLabel(r.ResourceUtils.format(e.labelAndValue,[e.labelDataVisualization,t]))):(this.setAriaRole("img"),this.setAriaProperty("label",t))},Bt.prototype.__getLogicalObject=function(){return this._peer},e.Chart=Ot,e.SparkChart=Bt,Object.defineProperty(e,"__esModule",{value:!0})})}();
//# sourceMappingURL=ojchart-toolkit.js.map