Icard/angular-clarity-master(work.../node_modules/highcharts/modules/data-tools.js

9 lines
54 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Highcharts
*
* (c) 2010-2024 Highsoft AS
*
* License: www.highcharts.com/license
*/function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/data-tools",["highcharts"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function r(e,t,r,s){e.hasOwnProperty(t)||(e[t]=s.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}r(t,"Data/Modifiers/DataModifier.js",[t["Core/Utilities.js"]],function(e){var t;let{addEvent:r,fireEvent:s,merge:o}=e;class n{benchmark(e,t){let r=[],s=this,n=()=>{s.modifyTable(e),s.emit({type:"afterBenchmarkIteration"})},{iterations:i}=o({iterations:1},t);s.on("afterBenchmarkIteration",()=>{if(r.length===i){s.emit({type:"afterBenchmark",results:r});return}n()});let l={startTime:0,endTime:0};return s.on("modify",()=>{l.startTime=window.performance.now()}),s.on("afterModify",()=>{l.endTime=window.performance.now(),r.push(l.endTime-l.startTime)}),n(),r}emit(e){s(this,e.type,e)}modify(e,t){let r=this;return new Promise((s,o)=>{e.modified===e&&(e.modified=e.clone(!1,t));try{s(r.modifyTable(e,t))}catch(s){r.emit({type:"error",detail:t,table:e}),o(s)}})}modifyCell(e,t,r,s,o){return this.modifyTable(e)}modifyColumns(e,t,r,s){return this.modifyTable(e)}modifyRows(e,t,r,s){return this.modifyTable(e)}on(e,t){return r(this,e,t)}}return(t=n||(n={})).types={},t.registerType=function(e,r){return!!e&&!t.types[e]&&!!(t.types[e]=r)},n}),r(t,"Data/DataTable.js",[t["Core/Utilities.js"]],function(e){let{addEvent:t,fireEvent:r,uniqueKey:s}=e;class o{static isNull(e){if(e===o.NULL)return!0;if(e instanceof Array){if(!e.length)return!1;for(let t=0,r=e.length;t<r;++t)if(null!==e[t])return!1}else{let t=Object.keys(e);if(!t.length)return!1;for(let r=0,s=t.length;r<s;++r)if(null!==e[t[r]])return!1}return!0}constructor(e={}){this.aliases=e.aliases?JSON.parse(JSON.stringify(e.aliases)):{},this.autoId=!e.id,this.columns={},this.id=e.id||s(),this.modified=this,this.rowCount=0,this.versionTag=s();let t=e.columns||{},r=Object.keys(t),o=this.columns,n=0;for(let e=0,s=r.length,i,l;e<s;++e)i=t[l=r[e]].slice(),o[l]=i,n=Math.max(n,i.length);for(let e=0,t=r.length;e<t;++e)o[r[e]].length=n;this.rowCount=n;let i=e.aliases||{},l=Object.keys(i),a=this.aliases;for(let e=0,t=l.length,r;e<t;++e)a[r=l[e]]=i[r]}clone(e,t){let r={};this.emit({type:"cloneTable",detail:t}),e||(r.aliases=this.aliases,r.columns=this.columns),this.autoId||(r.id=this.id);let s=new o(r);return e||(s.versionTag=this.versionTag),this.emit({type:"afterCloneTable",detail:t,tableClone:s}),s}deleteColumnAlias(e){let t=this.aliases[e],r=this.modifier;return t&&(delete this.aliases[e],r&&r.modifyColumns(this,{[t]:Array(this.rowCount)},0)),t}deleteColumns(e,t){let r=this.columns,s={},o={},n=this.modifier,i=this.rowCount;if((e=e||Object.keys(r)).length){this.emit({type:"deleteColumns",columnNames:e,detail:t});for(let t=0,n=e.length,l,a;t<n;++t)(l=r[a=e[t]])&&(s[a]=l,o[a]=Array(i)),delete r[a];return Object.keys(r).length||(this.rowCount=0),n&&n.modifyColumns(this,o,0,t),this.emit({type:"afterDeleteColumns",columns:s,columnNames:e,detail:t}),s}}deleteRows(e,t=1,r){let s=[],o=[],n=this.modifier;if(this.emit({type:"deleteRows",detail:r,rowCount:t,rowIndex:e||0}),void 0===e&&(e=0,t=this.rowCount),t>0&&e<this.rowCount){let r=this.columns,n=Object.keys(r);for(let i=0,l=n.length,a,u;i<l;++i){u=(a=r[n[i]]).splice(e,t),i||(this.rowCount=a.length);for(let e=0,t=u.length;e<t;++e)s[e]=s[e]||[],s[e][i]=u[e];o.push(Array(l))}}return n&&n.modifyRows(this,o,e||0,r),this.emit({type:"afterDeleteRows",detail:r,rowCount:t,rowIndex:e||0,rows:s}),s}emit(e){switch(e.type){case"afterDeleteColumns":case"afterDeleteRows":case"afterSetCell":case"afterSetColumns":case"afterSetRows":this.versionTag=s()}r(this,e.type,e)}getCell(e,t){e=this.aliases[e]||e;let r=this.columns[e];if(r)return r[t]}getCellAsBoolean(e,t){e=this.aliases[e]||e;let r=this.columns[e];return!!(r&&r[t])}getCellAsNumber(e,t,r){e=this.aliases[e]||e;let s=this.co