UNPKG

@lightningchart/lcjs

Version:

A high-performance charting library.

2 lines 1.67 MB
/* LightningChart JS v7.1.1 */ "use strict";Object.defineProperty(exports,"o",{value:!0});var t=require("immutable"),i=require("earcut");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function r(t){if(t&&t.o)return t;var i=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(i,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),i.default=t,Object.freeze(i)}var e,o,s,u=r(t),a=n(i),h=(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},e(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),f=function(){function t(){this.u=!0}return t.prototype.S=function(){return this.u},t}(),c=function(t){function i(i,n){var r=t.call(this)||this;return r.M=i,r.C=i,r.u=n,r}return h(i,t),i.prototype._=function(t){return t!==this.M&&(this.C=this.M,this.M=t,this.u=!0),this},i.prototype.T=function(){return this.M},i.prototype.S=function(){return t.prototype.S.call(this)},i}(f),l=function(t,i){return{x:t,y:i}},v=function(t,i){return{x:t,y:i}},d=function(t,i,n){return{position:t,high:i,low:n}},y=function(t,i,n){return{x:t,y:i,z:n}},A=function(t){var i=Array(0),n=Array(0);return t.length>0&&t.forEach((function(t){i.push(l(t.position,t.high)),n.push(l(t.position,t.low))})),[i,n]},p=function(t,i){return{min:t,max:i}},b=function(t,i,n,r){return{x:t,y:i,width:n,height:r}},m=function(t,i){return void 0===i&&(i=!0),new c(t,i)},x=function(t,i,n,r){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),{left:t,top:i,right:n,bottom:r}},g=x,S=function(t,i){return{left:void 0!==i.left?i.left:t.left,top:void 0!==i.top?i.top:t.top,right:void 0!==i.right?i.right:t.right,bottom:void 0!==i.bottom?i.bottom:t.bottom}},w=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(t){function i(i){return t.call(this,i)||this}return w(i,t),i.prototype.toUint32=function(){return void 0!==this.O||(this.O=D(this.getR(),this.getG(),this.getB(),this.getA())),this.O},i.prototype.toString=function(){return"color:".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.a)},i.prototype.setA=function(t){return this.set("a",t/255)},i.prototype.setR=function(t){return this.set("r",t/255)},i.prototype.setG=function(t){return this.set("g",t/255)},i.prototype.setB=function(t){return this.set("b",t/255)},i.prototype.getA=function(){return 255*this.get("a")},i.prototype.getR=function(){return 255*this.get("r")},i.prototype.getG=function(){return 255*this.get("g")},i.prototype.getB=function(){return 255*this.get("b")},i.prototype.getHighlight=function(){return this.F||(this.F=new i({r:this.r+.45*(1-this.r),g:this.g+.45*(1-this.g),b:this.b+.45*(1-this.b),a:this.a<1?this.a+.45*(1-this.a):1})),this.F},i.prototype.getLighter=function(){return this.I||(this.I=new i({r:this.r+.4*(1-this.r),g:this.g+.4*(1-this.g),b:this.b+.4*(1-this.b),a:this.a})),this.I},i.prototype.getDarker=function(){return this.j||(this.j=new i({r:this.r-.4*(1-this.r),g:this.g-.4*(1-this.g),b:this.b-.4*(1-this.b),a:this.a})),this.j},i.prototype.toRGBAString=function(){return"rgba(".concat((255*this.r).toFixed(0),",").concat((255*this.g).toFixed(0),",").concat((255*this.b).toFixed(0),",").concat(this.a,")")},i}(t.Record({type:"color",r:1,g:1,b:1,a:1})),C=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"color"!==t.type)},_=function(t,i,n,r){return void 0===r&&(r=255),new M({r:t/255,g:i/255,b:n/255,a:r/255})},T=function(t){var i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new M({r:Number("0x".concat(i.substring(0,2)))/255,g:Number("0x".concat(i.substring(2,4)))/255,b:Number("0x".concat(i.substring(4,6)))/255,a:Number("0x".concat(i.substring(6,8)))/255});case 6:return new M({r:Number("0x".concat(i.substring(0,2)))/255,g:Number("0x".concat(i.substring(2,4)))/255,b:Number("0x".concat(i.substring(4,6)))/255});case 4:return new M({r:Number("0x".concat(i.charAt(0)).concat(i.charAt(0)))/255,g:Number("0x".concat(i.charAt(1)).concat(i.charAt(1)))/255,b:Number("0x".concat(i.charAt(2)).concat(i.charAt(2)))/255,a:Number("0x".concat(i.charAt(3)).concat(i.charAt(3)))/255});case 3:return new M({r:Number("0x".concat(i.charAt(0)).concat(i.charAt(0)))/255,g:Number("0x".concat(i.charAt(1)).concat(i.charAt(1)))/255,b:Number("0x".concat(i.charAt(2)).concat(i.charAt(2)))/255});default:throw new Error("ColorHEX parsing error | input: ".concat(t))}},k=function(t,i,n){var r,e,o;void 0===i&&(i=1),void 0===n&&(n=1),t/=360;var s=Math.floor(6*t),u=6*t-s,a=n*(1-i),h=n*(1-u*i),f=n*(1-(1-u)*i);switch(s%6){case 0:r=n,e=f,o=a;break;case 1:r=h,e=n,o=a;break;case 2:r=a,e=n,o=f;break;case 3:r=a,e=h,o=n;break;case 4:r=f,e=a,o=n;break;default:r=n,e=a,o=h}return new M({r:r,g:e,b:o})},O=function(t){return _(255&t,255&(t>>=8),255&(t>>=8),255&(t>>=8))},F={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},I=new M({}),j=_(0,0,0,0),D=function(t,i,n,r){return void 0===r&&(r=255),(r<<24|n<<16|i<<8|t)>>>0},B=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return P=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},P.apply(this,arguments)},E=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s},L=function(t,i){return t.value-i.value},z=t.Record({type:"lut",steps:[],title:"",units:"",interpolate:!0,color:_(0,0,0,255),length:0,min:0,max:0,subranges:[],isValid:!1,percentageValues:!1}),R=function(t){var i=t.steps,n=i.length;i.sort(L);for(var r=E(n>0?[i[0].value,i[n-1].value]:[0,0],2),e=r[0],o=r[1],s=n>0?n-1:0,u=Array(s),a=0;a<s;a+=1)u[a]={min:i[a],max:i[a+1]};return{min:e,max:o,length:n,steps:i,subranges:u,isValid:n>0&&e!==o}},V=function(t){function i(i){var n=R(i);return t.call(this,function(t,i){return{steps:t.steps,title:t.title,units:t.units,interpolate:t.interpolate,percentageValues:t.percentageValues,color:t.color,length:i.length,min:i.min,max:i.max,subranges:i.subranges,isValid:i.isValid}}(i,n))||this}return B(i,t),i.prototype.toString=function(){return"LUT:interpolate=".concat(this.interpolate,",steps=").concat(this.steps.length,",percentage=").concat(this.percentageValues)},i.prototype.setSteps=function(t){return this.merge(R(P(P({},this),{steps:t})))},i.prototype.getSteps=function(){return this.get("steps")},i.prototype.setTitle=function(t){return this.set("title",t)},i.prototype.getTitle=function(){return this.get("title")},i.prototype.setUnits=function(t){return this.set("units",t)},i.prototype.getUnits=function(){return this.get("units")},i.prototype.setInterpolation=function(t){return this.set("interpolate",t)},i.prototype.getInterpolation=function(){return this.get("interpolate")},i.prototype.setFallbackColor=function(t){return this.set("color",t)},i.prototype.getFallbackColor=function(){return this.get("color")},i.prototype.setPercentageValues=function(t){return this.set("percentageValues",t)},i.prototype.getPercentageValues=function(){return this.get("percentageValues")},i.prototype.getColors=function(t,i){if(Array.isArray(t)){if(Array.isArray(t[0])){for(var n=t,r=n.length,e=n[0].length,o=function(t,i,n){if(n||2===arguments.length)for(var r,e=0,o=i.length;e<o;e++)!r&&e in i||(r||(r=Array.prototype.slice.call(i,0,e)),r[e]=i[e]);return t.concat(r||Array.prototype.slice.call(i))}([],E(Array(r)),!1).map((function(){return Array(e)})),s=0;s<r;s+=1)for(var u=0;u<e;u+=1)o[s][u]=this.D(n[s][u],i);return o}for(var a=t,h=a.length,f=Array(h),c=0;c<h;c+=1)f[c]=this.D(a[c],i);return f}return this.D(t,i)},i.prototype.D=function(t,i){var n,r,e,o=this.steps,s=o.length;if(0===s)return this.getFallbackColor();if(1===s)return o[0].color||this.color;if(this.percentageValues,this.percentageValues&&i&&(t=Math.max(Math.min((t-i.min)/(i.max-i.min),1),0)),this.interpolate){for(var u=0;u<s-1;u+=1){var a=o[u],h=o[u+1],f=Math.min(a.value,h.value),c=Math.max(a.value,h.value);if(t>=f&&t<=c){if(f===c)return a.color;var l=(t-a.value)/(h.value-a.value);return n=a.color,r=h.color,e=l,new M({r:n.r+(r.r-n.r)*e,g:n.g+(r.g-n.g)*e,b:n.b+(r.b-n.b)*e,a:n.a+(r.a-n.a)*e})}}return t<o[0].value?o[0].color:o[s-1].color}for(u=s-1;u>=0;u-=1)if(t>=o[u].value)return o[u].color;return o[0].color},i}(z),N=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G=function(){return G=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},G.apply(this,arguments)},U=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return N(i,t),i.prototype.toString=function(){return"emptyFill"},i}(t.Record({type:"fillstyle",fillType:"empty"})),Y=new U,W=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"empty"===t.fillType)},X=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return N(i,t),i}(t.Record({type:"fillstyle",fillType:"solid",color:_(255,255,255)})),H=function(t){function i(i){return t.call(this,G(G({},i),{fillType:"solid"}))||this}return N(i,t),i.prototype.toString=function(){return"solidFill:".concat(this.color.toString())},i.prototype.setColor=function(t){return C(t)?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getColor=function(){return this.get("color")},i.prototype.setA=function(t){return this.setColor(this.getColor().setA(t))},i.prototype.setR=function(t){return this.setColor(this.getColor().setR(t))},i.prototype.setG=function(t){return this.setColor(this.getColor().setG(t))},i.prototype.setB=function(t){return this.setColor(this.getColor().setB(t))},i}(X),Z=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"solid"===t.fillType)},Q=function(t){function i(i){return t.call(this,G(G({},i),{fillType:"individual"}))||this}return N(i,t),i.prototype.toString=function(){return"individualPointFill:".concat(this.color.toString())},i.prototype.setFallbackColor=function(t){return C(t)?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getFallbackColor=function(){return this.get("color")},i}(X),J=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"individual"===t.fillType)},K=function(t){function i(i){return t.call(this,G(G({},i),{fillType:"palette"}))||this}return N(i,t),i.prototype.toString=function(){return"palettedFill:lut=".concat(this.lut.toString(),",lookUpProperty=").concat(this.lookUpProperty)},i.prototype.getPalette=function(){return this.get("lut")},i.prototype.setLookUpProperty=function(t){return"function"==typeof t?this.set("lookUpProperty",t(this.get("lookUpProperty"))):this.set("lookUpProperty",t)},i.prototype.getLookUpProperty=function(){return this.get("lookUpProperty")},i}(t.Record({type:"fillstyle",fillType:"palette",lut:new V({steps:[]}),lookUpProperty:"value"})),q=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"palette"===t.fillType)},$=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();exports.GradientShape=void 0,(o=exports.GradientShape||(exports.GradientShape={})).circle="circle",o.ellipse="ellipse",exports.GradientExtent=void 0,(s=exports.GradientExtent||(exports.GradientExtent={})).closestSide="closest-side",s.closestCorner="closest-corner",s.farthestSide="farthest-side",s.farthestCorner="farthest-corner";var tt,it=function(t){function i(i){var n=t.call(this,i)||this;if(null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("RadialGradientFill requires minimum two color stops to be defined.");return n}return $(i,t),i.prototype.toString=function(){return"radialGradientFill:".concat(this.shape,",").concat(this.ditheringEnabled,",").concat(this.extent,",").concat(this.position.x,",").concat(this.position.y,",").concat(this.stops.map((function(t){return"".concat(t.offset,",").concat(t.color.toString())})).join(","))},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");return this.set("stops",t)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setPosition=function(t){return this.set("position",t)},i.prototype.getPosition=function(){return this.get("position")},i.prototype.setShape=function(t){return this.set("shape",t)},i.prototype.getShape=function(){return this.get("shape")},i.prototype.setExtent=function(t){return this.set("extent",t)},i.prototype.getExtent=function(){return this.get("extent")},i.prototype.setDitheringEnabled=function(t){return this.set("ditheringEnabled",t)},i.prototype.getDitheringEnabled=function(){return this.get("ditheringEnabled")},i}(t.Record({type:"fillstyle",fillType:"radial-gradient",ditheringEnabled:!0,stops:[{color:T("#f00"),offset:0},{color:T("#0f0"),offset:1}],position:l(.5,.5),shape:exports.GradientShape.ellipse,extent:exports.GradientExtent.farthestCorner})),nt=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"radial-gradient"===t.fillType)},rt=function(t){function i(i){var n=t.call(this,i)||this;if(null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("LinearGradientFill requires minimum two color stops to be defined.");return n}return $(i,t),i.prototype.toString=function(){return"linearGradientFill:".concat(this.angle,",").concat(this.stops.map((function(t){return"".concat(t.offset,",").concat(t.color.toString())})).join(","))},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");var i=t.sort((function(t,i){return t.offset-i.offset}));return this.set("stops",i)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setAngle=function(t,i){return this.set("angle",i?function(t){return 180*t/Math.PI}(t):t)},i.prototype.getAngle=function(t){return t?er(this.get("angle")):this.get("angle")},i}(t.Record({type:"fillstyle",fillType:"linear-gradient",stops:[{color:T("#f00"),offset:0},{color:T("#0f0"),offset:1}],angle:0})),et=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"linear-gradient"===t.fillType)},ot=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(){return st=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},st.apply(this,arguments)},ut=function(){function t(t,i,n,r){var e=this;this.P=new Ot,this.cellIndex=t,this.cellSpan=i,this.cellsAmount=n,this.observedAmount=r,this.x=new at,this.y=new at,this.z=new at;var o=st({},t),s=st({},i);if(r){var u=function(t){var i=t.value;e.cellsAmount.x=i.reduce(Dn,0),e.cellIndex.x=i.reduce((function(t,i,n){return n>=o.x?t:t+i}),0),e.cellSpan.x=i.reduce((function(t,i,n){return n>=o.x&&n<o.x+s.x?t+i:t}),0),e.P.L("cellresize",{})};r.x.R("change",u),u({value:r.x.T()});var a=function(t){var i=t.value;e.cellsAmount.y=i.reduce(Dn,0),e.cellIndex.y=i.reduce((function(t,i,n){return n>=o.y?t:t+i}),0),e.cellSpan.y=i.reduce((function(t,i,n){return n>=o.y&&n<o.y+s.y?t+i:t}),0),e.P.L("cellresize",{})};r.y.R("change",a),a({value:r.y.T()}),this.V=function(){r.x.N("change",u),r.y.N("change",a)}}}return t.prototype.G=function(){return this.V&&(this.V(),this.V=void 0),this},t.prototype.addEventListener=function(t,i,n){this.P.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.P.removeEventListener(t,i)},t}(),at=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.U=0,i.Y=10,i.W=1,i}return ot(i,t),i.prototype.X=function(){return this.u=!1,this},i.prototype.H=function(){return this.u=!0,this},i.prototype.getInnerStart=function(){return this.U},i.prototype.getInnerEnd=function(){return this.Y},i.prototype.getInnerInterval=function(){return Math.abs(this.getInnerEnd()-this.getInnerStart())},i.prototype.Z=function(t,i){return this.U=t,this.Y=i,this.J(),this},i.prototype.K=function(t){return this.W=t,this.J(),this},i.prototype.q=function(t){return t/this.W},i.prototype.J=function(){var t=this.q(this.Y-this.U),i=this.W;void 0!==this.$&&!1!==fi(t,this.$)||(this.u=!0,this.tt=i,this.$=t)},i.prototype.it=function(){return this.$},i.prototype.nt=function(){return this.tt},i.prototype.rt=function(){return this.Y<this.U},i.prototype.et=function(t,i){return!0},i}(f),ht=function(){return ht=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},ht.apply(this,arguments)},ft={d1:function(t){return new t.scale1DConstructor(0,1,1,void 0)},d2:function(t){return(new t.scaleXYConstructor).ot({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)},d3:function(){return new ut({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)}},ct=function(t,i,n){return i===n?t:n.st(i.ut(t))},lt=function(t,i,n){if(i===n)return t;var r=i instanceof _r?i.x:i.x instanceof _r?i.x.x:i.x.ht,e=i instanceof _r?i.y:i.y instanceof _r?i.y.y:i.y.ht,o=n instanceof _r?n.x:n.x instanceof _r?n.x.x:n.x.ht,s=n instanceof _r?n.y:n.y instanceof _r?n.y.y:n.y.ht;return ht(ht({},t),{x:ct(t.x,r,o),y:ct(t.y,e,s)})},vt=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(0===t.length)return{remove:hi};var n=!1,r=t.map((function(i){var r=function(r){!function(i,r,e){n||(n=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.ft(r,e,!1,i.getStopped(),"synchronizedAxis")})),n=!1)}(i,r.start,r.end)};return i.addEventListener("intervalchange",r),r})),e=!1,o=t.map((function(i){var n=function(n){!function(i,n){e||(e=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.setStopped(n)})),e=!1)}(i,n.isStopped)};return i.addEventListener("stoppedchange",n),n}));return{remove:function(){t.forEach((function(t,i){t.removeEventListener("intervalchange",r[i]),t.removeEventListener("stoppedchange",o[i])}))}}},dt=function(t){return t&&"object"==typeof t&&"column"in t&&"row"in t},yt=function(t){return t&&"object"==typeof t&&"z"in t&&"column"in t&&"row"in t},At=function(t){return t&&"object"==typeof t&&"annulus"in t&&"sector"in t},pt=function(t){return t&&"object"==typeof t&&"index"in t};!function(t){t[t.Nearest=0]="Nearest",t[t.NearestX=1]="NearestX",t[t.NearestY=2]="NearestY"}(tt||(tt={}));var bt,mt=function(t,i,n,r,e,o,s,u,a,h){var f=t.length;if(0!==f){var c=r?1:0,l=f-(e?2:1);if(n===tt.Nearest)return xt(t,i,o,s,c,l);if(n===tt.NearestX||n===tt.NearestY){if("boolean"==typeof h&&("x"===a&&n===tt.NearestX||"y"===a&&n===tt.NearestY))return wt(t,lt(i,s,o),a,h,c,l);if(n===tt.NearestX)return gt(t,lt(i,s,o),u,c,l);if(n===tt.NearestY)return St(t,lt(i,s,o),u,c,l)}}},xt=function(t,i,n,r,e,o){for(var s,u=Number.MAX_VALUE,a=e;a<=o;a+=1){var h=t[a];if(!Number.isNaN(h.x)&&!Number.isNaN(h.y)){var f=lt(h,n,r),c=Math.pow(f.x-i.x,2)+Math.pow(f.y-i.y,2);c<u&&(u=c,s=a)}}return s},gt=function(t,i,n,r,e){if(!(i.x<n.min.x||i.x>n.max.x)){for(var o,s=Number.MAX_VALUE,u=r;u<=e;u+=1){var a=t[u],h=a.x>i.x?a.x-i.x:i.x-a.x;h<s&&!Number.isNaN(a.x)&&!Number.isNaN(a.y)&&(s=h,o=u)}return o}},St=function(t,i,n,r,e){if(!(i.y<n.min.y||i.y>n.max.y)){for(var o,s=Number.MAX_VALUE,u=r;u<=e;u+=1){var a=t[u],h=a.y>i.y?a.y-i.y:i.y-a.y;h<s&&!Number.isNaN(a.x)&&!Number.isNaN(a.y)&&(s=h,o=u)}return o}},wt=function(t,i,n,r,e,o){var s="x"===n,u=s?i.x:i.y,a=t[e],h=t[o],f=a.x<h.x?a.x:h.x,c=a.y<h.y?a.y:h.y,l=a.x>h.x?a.x:h.x,v=a.y>h.y?a.y:h.y;if(!(s&&(u<f||u>l)||!s&&(u<c||u>v)))for(var d=e,y=Math.floor((e+o)/2),A=o,p=-1;;){var b=u-(s?t[y].x:t[y].y);if(b*(r?-1:1)>0)d=Math.min(y+1,A),p=Math.floor((d+A)/2);else{if(0===Math.abs(b))return y;A=Math.max(y-1,d),p=Math.floor((d+A)/2)}if(p===y){var m=y>e?Math.abs(u-(s?t[y-1].x:t[y-1].y)):Mn,x=y<o?Math.abs(u-(s?t[y+1].x:t[y+1].y)):Mn,g=Math.abs(b);switch(Math.min(g,m,x)){case m:return y-1;case x:return y+1;default:return y}}else y=p}},Mt=function(t,i,n,r,e,o){var s="x"===n,u=s?i.x:i.y,a=t[e],h=t[o],f=a.x<h.x?a.x:h.x,c=a.y<h.y?a.y:h.y,l=a.x>h.x?a.x:h.x,v=a.y>h.y?a.y:h.y;if(!(s&&(u<f||u>l)||!s&&(u<c||u>v)))for(var d=e,y=Math.floor((e+o)/2),A=o,p=-1;;){var b=u-(s?t[y].x:t[y].y);if(b*(r?-1:1)>0)d=Math.min(y+1,A),p=Math.floor((d+A)/2);else{if(0===Math.abs(b))return{a:y,b:y,lerpAmount:0};A=Math.max(y-1,d),p=Math.floor((d+A)/2)}if(p===y){if(b*(r?-1:1)<0&&y>e){var m=t[y-1],x=t[y];return{a:y-1,b:y,lerpAmount:s?(i.x-m.x)/(x.x-m.x):(i.y-m.y)/(x.y-m.y)}}return y<o?(m=t[y],x=t[y+1],{a:y,b:y+1,lerpAmount:s?(i.x-m.x)/(x.x-m.x):(i.y-m.y)/(x.y-m.y)}):{a:y,b:y,lerpAmount:0}}y=p}},Ct=0,_t=function(){function t(t,i,n){this.ct=m(!0),this.vt=!1,this.dt=!0,this.yt=!1,this.At=void 0,this.bt=0,this.P=new Ot,this.xt=t,this.St=i,this.wt=n,this.Mt=Ct,Ct+=1,this.Ct=t._t.highlightColorOffset}return t.prototype.Tt=function(){var t;return this.kt("DataPattern",(function(i){return t=i.pattern,!0})),"ProgressiveX"===t||"RegressiveX"===t?tt.NearestX:"ProgressiveY"===t||"RegressiveY"===t?tt.NearestY:tt.Nearest},t.prototype.Ot=function(){},t.prototype.addEventListener=function(t,i,n){this.P.addEventListener(t,i,n)},t.prototype.L=function(t,i,n,r){this.P.L(t,i,{collectionMember:n,info:r})},t.prototype.removeEventListener=function(t,i){this.P.removeEventListener(t,i)},t.prototype.Ft=function(t){return void 0!==this.wt.find((function(i){return i.type===t}))},t.prototype.kt=function(t,i){var n;return!!this.Ft(t)&&!0===i(null===(n=this.wt.find((function(i){return i.type===t})))||void 0===n?void 0:n.args)},t.prototype.dispose=function(){return this.vt||(this.xt.It(this),this.vt=!0,this.St(this),this.P.L("dispose",{})),this},t.prototype.isDisposed=function(){return this.vt},t.prototype.setVisible=function(t){var i=this.dt;return this.dt=t,!t&&i&&this.ct.T()&&this.xt.It(this),this},t.prototype.getVisible=function(){return this.dt},t.prototype.setPointerEvents=function(t){var i=this.ct.T();return this.ct._(t),t||i&&this.xt.It(this),this},t.prototype.getPointerEvents=function(){return this.ct.T()},t.prototype.jt=function(t){return this.At=t,this},t.prototype.Dt=function(){return this.At?this.At:Tt},t.prototype.Bt=function(t){return this.bt=t,this},t.prototype.Pt=function(){return this.bt},t.prototype.Et=function(t){return this.Ct=t,this},t.prototype.Lt=function(){return this.Ct},t}(),Tt=p(l(0,0),l(0,0)),kt={click:!0,contextmenu:!0,dblclick:!0,gotpointercapture:!0,lostpointercapture:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,wheel:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0},Ot=function(){function t(){this.zt=new Array,this.Rt=[],this.ct=!0,this.Vt=!1}return t.prototype.setPointerEvents=function(t){this.ct=t,this.Rt.forEach((function(i){return i.setPointerEvents(t)}))},t.prototype.getPointerEvents=function(){return this.ct},t.prototype.addEventListener=function(t,i,n){this.zt.push({listener:i,key:t,options:n||{}})},t.prototype.removeEventListener=function(t,i){var n=this.zt.findIndex((function(t){return t.listener===i}));n>=0&&this.zt.splice(n,1)},Object.defineProperty(t.prototype,"draggable",{get:function(){return this.Vt},set:function(t){this.Vt=t,this.Rt.forEach((function(i){i.yt=t}))},enumerable:!1,configurable:!0}),t.prototype.L=function(t,i,n){var r=this;void 0===n&&(n=void 0),this.zt.slice().reverse().forEach((function(e){e.key===t&&(e.listener(i,n),!0===e.options.once&&r.removeEventListener(t,e.listener))}))},t.prototype.Nt=function(t,i){var n=this;Object.keys(kt).forEach((function(r){t.addEventListener(r,(function(t,e){var o=Ft(t)?{clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY}:t,s=(null==i?void 0:i.getExtraData)&&void 0!==o.clientX?i.getExtraData(o,e.collectionMember,e.info):{};n.L(r,t,s),!t.defaultPrevented&&(null==i?void 0:i.continueIfNotPrevented)&&i.continueIfNotPrevented(r,t,s)}))})),this.Rt.push(t),t.addEventListener("dispose",(function(){var i=n.Rt.indexOf(t);i>=0&&n.Rt.splice(i,1)})),t.yt=this.Vt,t.setPointerEvents(this.ct)},t.prototype.Gt=function(t,i){var n=this;Object.keys(kt).forEach((function(r){t.addEventListener(r,(function(t,e){var o=i(e.collectionMember);o&&n.L(r,t,o)}))})),this.Rt.push(t),t.addEventListener("dispose",(function(){var i=n.Rt.indexOf(t);i>=0&&n.Rt.splice(i,1)})),t.setPointerEvents(this.ct),t.yt=this.Vt},t.prototype.Ut=function(t){var i=this;Object.keys(kt).forEach((function(n){t.addEventListener(n,(function(t,r){i.L(n,t,r)}))})),t.setPointerEvents(this.ct),t.draggable=this.Vt},t}(),Ft=function(t){return!(!t||"object"!=typeof t||!("touches"in t))},It={linear:function(t,i,n){var r=i-t;return function(e){return e<n?t+r/n*e:i}},easeIn:function(t,i,n){return function(r){return r<n?t+Math.abs(2*Math.pow(Math.sqrt(.5)*r/n,2))*(i-t):i}},easeOut:function(t,i,n){return function(r){return r<n?t+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-r/n),2))*(i-t):i}},ease:function(t,i,n){return function(r){return r<n?t+(r<n/2?.5*Math.pow(r/n*2,2.5):.5+.5*(1-Math.pow(1-2*(r/n-.5),2.5)))*(i-t):i}},logarithmic:function(t){var i=Vi(t);return function(n,r,e){var o=i(n),s=i(r);return function(i){return i<e?Math.pow(t,o+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-i/e),2))*(s-o)):r}}}},jt=function(){function t(t,i,n,r,e){void 0===r&&(r=It.linear);var o=this;this.delta=0,this.nextAnimations=new Array,this.Yt=!1,this.easing=It.linear,this.isOver=function(){return(o.delta===o.duration||o.Yt)&&0===o.nextAnimations.length},this.P=new Ot,this.values=t,this.action=i,this.duration=n,this.easing=r,this.Wt=e,this.eases=t.map((function(t){var i=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s}(t,2),e=i[0],o=i[1];return r(e,o,n)}))}return t.prototype.Xt=function(){this.P.L("start",{})},t.prototype.start=function(){return this.Wt.includes(this)||this.Wt.push(this),this},t.prototype.addNextAnimations=function(t){var i=this;return t instanceof Array?t.forEach((function(t){return i.nextAnimations.push(t)})):this.nextAnimations.push(t),this},t.prototype.NextAnimation=function(i,n,r,e){void 0===r&&(r=this.duration),void 0===e&&(e=this.easing);var o=new t(i,n,r,e,this.Wt);return this.nextAnimations.push(o),o},t.prototype.finish=function(t){if(void 0===t&&(t=!0),this.Yt=!0,this.Wt.splice(this.Wt.indexOf(this),1),this.nextAnimations.length>0){var i=this.nextAnimations[0];return t&&this.P.zt.forEach((function(t){"allAnimationEnd"===t.key&&i.addEventListener("allAnimationEnd",t.listener),"everyAnimationEnd"===t.key&&i.addEventListener("everyAnimationEnd",t.listener)})),i.addNextAnimations(this.nextAnimations.slice(1)),i.start(),t&&(this.P.L("end",{nextAnimation:i}),this.P.L("everyAnimationEnd",{nextAnimation:i})),i}t&&(this.P.L("end",{nextAnimation:void 0}),this.P.L("everyAnimationEnd",{nextAnimation:void 0}),this.P.L("allAnimationEnd",{}))},t.prototype.finishAll=function(t){void 0===t&&(t=!0);for(var i=this;i;)i=i.finish(t)},t.prototype.getFinalValues=function(){return this.nextAnimations.length>0?this.nextAnimations[this.nextAnimations.length-1].values.map(ui):this.values.map(ui)},t.prototype.getTimeUntilFinish=function(){for(var t=this.duration-this.delta,i=0;i<this.nextAnimations.length;i+=1)t+=this.nextAnimations[i].duration-this.nextAnimations[i].delta;return t},t.prototype.addEventListener=function(t,i,n){this.P.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.P.removeEventListener(t,i)},t}(),Dt=function(t,i){void 0===i&&(i=60),i>60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");var n,r,e=[],o=0,s=function(){n=void 0;var u=Date.now();(o=u-(r=r||u))/1e3>=1/i&&(r=Date.now()-o%(1e3/i),e.forEach((function(t){0===t.delta&&t.Xt(),t.delta+=o-o%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((function(i){return i(t.delta)}))),t.delta===t.duration&&t.finish()})),t()),e.length>0?n=ei.requestAnimationFrame(s):(n=void 0,r=void 0)};return function(t,i){return void 0===t&&(t=1e3),void 0===i&&(i=It.linear),function(r,o,u){void 0===u&&(u=t);var a=new jt(r,o,u,i,e).start();return n||(n=ei.requestAnimationFrame(s)),a}}},Bt=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();exports.ImageFitMode=void 0,(bt=exports.ImageFitMode||(exports.ImageFitMode={}))[bt.Fill=0]="Fill",bt[bt.Fit=1]="Fit",bt[bt.Stretch=2]="Stretch",bt[bt.Center=3]="Center",bt[bt.Tile=4]="Tile";var Pt,Et=function(t){function i(i){return t.call(this,i)||this}return Bt(i,t),i.prototype.setSource=function(t){return this.set("source",t)},i.prototype.getSource=function(){return this.get("source")},i.prototype.setSurroundingColor=function(t){return C(t)?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))},i.prototype.getSurroundingColor=function(){return this.get("surroundingColor")},i.prototype.setSourceMissingColor=function(t){return C(t)?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))},i.prototype.getSourceMissingColor=function(){return this.get("sourceMissingColor")},i.prototype.setFitMode=function(t){return this.set("fitMode",t)},i.prototype.getFitMode=function(){return this.get("fitMode")},i.prototype.toString=function(){return"imagefill:".concat(this.fitMode)},i}(t.Record({type:"fillstyle",fillType:"image",source:void 0,surroundingColor:_(0,0,0,0),sourceMissingColor:_(0,0,0,0),fitMode:exports.ImageFitMode.Fill})),Lt=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"image"===t.fillType)},zt=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rt=new(function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.thickness=0,i}return zt(i,t),i.prototype.setThickness=function(t){return this},i.prototype.getThickness=function(){return 0},i.prototype.Ht=function(){return 0},i.prototype.setFillStyle=function(t){return this},i.prototype.getFillStyle=function(){return Y},i}(t.Record({type:"linestyle",lineType:"empty"}))),Vt=function(t){return!(!t||"object"!=typeof t||!("lineType"in t)||"empty"!==t.lineType)},Nt=-34028234663852886e22,Gt="-340282346638528859811704183484516925440.0",Ut=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(t){function i(n,r){var e,o="ChartError: ".concat(n," ").concat(r?"in ".concat(r.constructor.name):"");return e=t.call(this,o)||this,Object.setPrototypeOf(e,i.prototype),e}return Ut(i,t),i}(Error);Pt=Error,Ut((function t(i,n){var r,e="Axis Error: ".concat(i," ").concat(n?"in ".concat(n.constructor.name):"");return r=Pt.call(this,e)||this,Object.setPrototypeOf(r,t.prototype),r}),Pt);var Wt,Xt,Ht,Zt,Qt=function(t){function i(n,r,e){void 0===e&&(e=!1);var o,s="EngineError: ".concat(n," ").concat(r?"in ".concat(r.constructor.name):"");return o=t.call(this,s)||this,e&&ei.alert(s),Object.setPrototypeOf(o,i.prototype),o}return Ut(i,t),i}(Error),Jt=function(t){function i(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,i.prototype),r}return Ut(i,t),i}(Qt);!function(t){Ut((function i(n){var r,e="UnImplemented Error: ".concat(n,"() is not implemented!");return r=t.call(this,e)||this,Object.setPrototypeOf(r,i.prototype),r}),t)}(Error),exports.UISpace=void 0,(Wt=exports.UISpace||(exports.UISpace={}))[Wt.Content=0]="Content",Wt[Wt.PaddedContent=1]="PaddedContent",Wt[Wt.PaddedBackground=2]="PaddedBackground",Wt[Wt.Everything=3]="Everything",exports.UIVisibilityModes=void 0,(Xt=exports.UIVisibilityModes||(exports.UIVisibilityModes={}))[Xt.never=0]="never",Xt[Xt.always=1]="always",Xt[Xt.whenHovered=2]="whenHovered",Xt[Xt.whenDragged=3]="whenDragged",Xt[Xt.whenNotDragged=4]="whenNotDragged",Xt[Xt.whenHoveredOrDragged=5]="whenHoveredOrDragged",exports.UIDraggingModes=void 0,(Ht=exports.UIDraggingModes||(exports.UIDraggingModes={}))[Ht.notDraggable=0]="notDraggable",Ht[Ht.draggable=1]="draggable",Ht[Ht.onlyHorizontal=2]="onlyHorizontal",Ht[Ht.onlyVertical=3]="onlyVertical",exports.UIDirections=void 0,(Zt=exports.UIDirections||(exports.UIDirections={}))[Zt.Up=0]="Up",Zt[Zt.Right=1]="Right",Zt[Zt.Down=2]="Down",Zt[Zt.Left=3]="Left";var Kt,qt,$t=function(){return $t=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},$t.apply(this,arguments)},ti=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s},ii=function(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},ni=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=function(t){return t&&"object"==typeof t&&!Array.isArray(t)};return t.reduce((function(t,i){return i?(Object.keys(i).forEach((function(r){var e=t[r],o=i[r];n(e)&&n(o)?t[r]=ni(e,o):t[r]=o})),t):t}),{})},ri=function(t){if(t.resourcesBaseUrl){var i=t.styleFactory(t.resourcesBaseUrl),n=Lt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;return null==r||r.addEventListener("error",(function(){fn(t.resourcesBaseUrl,r.src,"Theme resource",{shouldCrash:!1})})),i}var e="".concat(ei.location.origin,"/resources"),o=t.styleFactory(e);if(Lt(o)){var s=o.getSource();s instanceof Image&&s.addEventListener("error",(function(){var i=t.styleFactory("https://lcjs-resources.lightningchart.com/v1"),n=Lt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;ei.console.warn("LightningChart JS warning | fallbacking to publicly hosted asset resources.\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/warning-using-publicly-hosted-resources/"),null==r||r.addEventListener("load",(function(){t.apply(i)})),null==r||r.addEventListener("error",(function(){fn(t.resourcesBaseUrl,s.src,"Theme resource",{shouldCrash:!1})}))}))}return o},ei="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{},oi=function(t,i){return t.x===i.x&&t.y===i.y},si=function(t){return t!==Mn&&t!==Cn&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0},ui=function(t){return t[1]},ai=function(t){return t.dispose()},hi=function(){},fi=function(t,i){return t===i},ci=function(t,i,n){return n>i?Math.min(Math.max(t,i),n):Math.min(Math.max(t,n),i)},li=function(t){return Array.prototype.concat.apply([],t)},vi=function(t,i){var n=i&&void 0!==i.row.start?i.row.start:0,r=i&&void 0!==i.row.end?i.row.end:t.y,e=i&&void 0!==i.column.start?i.column.start:0,o=i&&void 0!==i.column.end?i.column.end:t.x;return[Math.min(n,r),Math.max(n,r),Math.min(e,o),Math.max(e,o)]},di=function(t,i){for(;i;)t.push(t.shift()),i-=1},yi=function(t){var i,n,r=[];try{for(var e=ii(t),o=e.next();!o.done;o=e.next()){var s=o.value;r.push(s.slice())}}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return r},Ai=function(t,i){return void 0===t||Number.isNaN(t)?i:t},pi=function(t){return t.Zt()},bi=function(t){return t.Qt()},mi=function(t){return t.Jt()},xi=function(t){return t.Kt()},gi=function(t){return t.min.x},Si=function(t){return t.max.x},wi=function(t){return t.min.y},Mi=function(t){return t.max.y},Ci=function(t,i,n,r,e){if(t.length>0){for(var o=e?r(e):void 0,s=0;s<t.length;s+=1){var u=i(t[s]);void 0!==u&&(o=void 0!==o?n(o,u):u)}return o}if(e)return r(e)},_i=function(t,i){return t.position===i.position&&t.high===i.high&&t.low===i.low},Ti=l(0,1),ki=l(1,0),Oi=l(0,-1),Fi=l(-1,0),Ii=l(0,0),ji=function(t){switch(t){case exports.UIDirections.Up:return Ti;case exports.UIDirections.Right:return ki;case exports.UIDirections.Down:return Oi;case exports.UIDirections.Left:return Fi;default:return Ii}},Di=function(t){return t===exports.UIDirections.Left||t===exports.UIDirections.Right},Bi=function(t){t.stopPropagation(),t.preventDefault()},Pi=function(t,i){if(!i)return t;for(var n=t.length,r=new Float32Array(2*n),e=0,o=0;o<n;o+=1){var s=t[o],u=Math.fround(s);r[e+0]=u,r[e+1]=s-u,e+=2}return r},Ei=function(t,i,n){if(void 0===n&&(n=Float32Array),!i){for(var r=t.length,e=new n(2*r),o=0,s=0;s<r;s+=1){var u=t[s];e[o+0]=u.x,e[o+1]=u.y,o+=2}return e}var a=t.length,h=new n(4*a),f=0;for(s=0;s<a;s+=1){u=t[s];var c=Math.fround(u.x),l=Math.fround(u.y);h[f+0]=c,h[f+1]=l,h[f+2]=u.x-c,h[f+3]=u.y-l,f+=4}return h},Li=function(t){for(var i=t.length,n=new Float32Array(3*i),r=0,e=0;e<i;e+=1){var o=t[e];n[r+0]=o.x,n[r+1]=o.y,n[r+2]=o.z,r+=3}return n},zi=function(t){return function(i){var n=t.indexOf(i);n>=0&&t.splice(n,1)}},Ri=function(t){for(var i=t.length,n=0;n<i-1;n+=1)t[n].x===t[n+1].x&&t[n].y===t[n+1].y&&(t.splice(n,1),n-=1,i-=1);return t},Vi=function(t){var i=Math.log(t);return function(t){return Math.log(t)/i}},Ni=Vi(Math.E),Gi=function(t,i){var n=i[t];return n?n():void 0},Ui=function(t,i){var n;if(i)n=i;else{for(var r={x:0,y:0},e=0;e<t.length;e+=1)r.x+=t[e].x/t.length,r.y+=t[e].y/t.length;n=r}return t.sort((function(t,i){return or(Kn(t,n))-or(Kn(i,n))}))},Yi=function(t,i,n){if(0===t.length)return!1===n.canReturnB?i.slice():i;var r=i.length;if(r<1e5)return t.push.apply(t,i),t;for(var e=0;e<r;e+=1)t.push(i[e]);return t},Wi=function(t,i,n){return n<0?t:n>1?i:_(t.getR()+n*(i.getR()-t.getR()),t.getG()+n*(i.getG()-t.getG()),t.getB()+n*(i.getB()-t.getB()),t.getA()+n*(i.getA()-t.getA()))},Xi=function(t){return 255===t.getA()?t:t.setA(255)},Hi=(Kt=_(0,0,0),function(t){return t=Xi(t),new rt({angle:180,stops:[{offset:0,color:t},{offset:1,color:Wi(t,Kt,.5)}]})}),Zi=(qt=function(t){var i;if(t){if(Z(t)){if(0===t.getColor().getA())return;return t.getColor()}if(nt(t)||et(t)){var n=t.getColorStops();return 3===n.length?n[1].color:null===(i=n[0])||void 0===i?void 0:i.color}q(t)}},function(t,i,n,r){var e,o,s,u,a=[];if(r.fill&&a.push(r.fill),r.fill2&&a.push(r.fill2),r.stroke){var h=r.stroke.getFillStyle();h!==Y&&("stroke"===(null===(e=r.behavior)||void 0===e?void 0:e.priority)?a.unshift(h):a.push(h))}if(r.point3D){var f=r.point3D;a.push(f.getFillStyle())}if(r.behavior&&!0===r.behavior.colorStep){var c=ti(a.reduce((function(t,i){if(t[0]&&t[1])return t;var n=qt(i);return n&&(void 0===t[0]?t[0]=n:t[1]=n),t}),[void 0,void 0]),2),l=c[0],v=c[1];o=l&&v?(s=l)===(u=v)||s.getR()===u.getR()&&s.getG()===u.getG()&&s.getB()===u.getB()?Hi(s):(s=Xi(s),u=Xi(u),new rt({angle:0,stops:[{offset:0,color:u},{offset:.5,color:u},{offset:.5,color:s},{offset:1,color:s}]})):i.uiButtonFillStyle}else{var d=a.reduce((function(t,i){return t||qt(i)}),void 0);o=d?n?new H({color:d}):Hi(d):i.uiButtonFillStyle}t.setButtonOnFillStyle(o)}),Qi=function(t,i){var n=t;if(q(n))return{lut:n.getPalette(),lookUpProperty:n.getLookUpProperty(),valueRange:i}},Ji=function(t){var i=0;return function(){return i+=1,"".concat(t,"-").concat(i)}},Ki=function(t,i){for(var n="string"==typeof t?t:String(t),r=n.indexOf("."),e=r>=0?r:n.length;e<i;e+=1)n="0".concat(n);return n},qi=function(t,i){return"function"==typeof t?t(i):t},$i=function(t,i){return i()},tn=function(){return new Error("LightningChart JS encountered an unexpected error.\nPlease report this issue to https://lightningchart.com/js-charts/docs/contact")};new H({color:_(255,255,255,1)});var nn=function(t){return t===_n||t.min.x===_n.min.x&&t.max.x===_n.max.x&&t.min.y===_n.min.y&&t.max.y===_n.max.y},rn=function(t){return Array.from(new Set(t))},en=function(t){return t.filter((function(t){return void 0!==t}))},on=function(t){return"boolean"==typeof t?t?1:0:t>1?1:t<0?0:t},sn=function(t,i,n){i.length<=0||(t.setText(n.label).setOn(i[0].getVisible()),n.style&&t.setButtonOnFillStyle(n.style),n.toggleVisibilityOnClick&&t.addEventListener("switch",(function(t){i.forEach((function(i){return i.setVisible(t.state)}))})),t.addEventListener("pointerenter",(function(){i.forEach((function(t){return t.setHighlight(!0)}))})),t.addEventListener("pointerleave",(function(){i.forEach((function(t){return t.setHighlight(!1)}))})),i.forEach((function(i){return i.addEventListener("pointerenter",(function(){return t.setHighlight(!0)}))})),i.forEach((function(i){return i.addEventListener("pointerleave",(function(){return t.setHighlight(!1)}))})))},un=function(t,i){throw new Error(i)},an=function(t){var i;return function(){return i||(i=t())}},hn=function(t){if(t===Rt)return 0;var i=t.getThickness();return i<0?1:1*i},fn=function(t,i,n,r){var e=r.shouldCrash,o='LightningChart JS Resources not found.\nresourcesBaseUrl: "'.concat(t,'"\ninitiator: ').concat(n,"\nresource url: ").concat(i,"\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/error-resources-not-found/");if(e)throw ei.alert(o),new Error(o);ei.console.warn(o)},cn=function(t,i,n,r){if(void 0===r&&(r=0),!(t<n(r)||n(i)<t)){for(var e=i;r!==i;){var o=Math.ceil((r+i)/2);t<n(o)?i=o-1:r=o}var s=Math.abs(t-n(r));return r<e&&Math.abs(t-n(r+1))<s?r+1:r}},ln=function(){var t=new Map;return{qt:function(i){return Object.keys(kt).forEach((function(n){i.addEventListener(n,(function(i,r){var e=r.collectionMember&&t.get(r.collectionMember);if(e){var o=Ft(i)?{clientX:i.changedTouches[0].clientX,clientY:i.changedTouches[0].clientY}:i,s=e.$t(r.info,o);e.P.L(n,i,s)}}))})),i},ti:function(i,n){t.set(i,n)},ii:function(){t.clear()}}},vn={left:0,right:0,top:0,bottom:0},dn=function(){return Math.round(Math.random()*Number.MAX_SAFE_INTEGER)},yn=function(t,i,n){i&&i.ni();var r=n();return Object.keys(r).forEach((function(i){var n=i,e=r[n];t.addEventListener(n,e)})),{ri:t,ni:function(){Object.entries(r).forEach((function(i){var n=ti(i,2),r=n[0],e=n[1];t.removeEventListener(r,e)}))}}},An=function(t,i,n){var r,e,o,s=function(){return o=n()},u=$t($t({},t),{resolve:function(){return o||s()}}),a=function(t){Object.defineProperty(u,t,{get:function(){return o?o[t]:s()[t]}})};try{for(var h=ii(Object.keys(i)),f=h.next();!f.done;f=h.next())a(f.value)}catch(t){r={error:t}}finally{try{f&&!f.done&&(e=h.return)&&e.call(h)}finally{if(r)throw r.error}}return u},pn=function(t){if(t)return"resolve"in t?t.resolve():t},bn=function(t){var i=t;return{ei:function(t){var n=i;return i=n+t,[n,t]}}},mn=function(t){ei.document.body.addEventListener(t,(function(t){t.stopPropagation(),t.preventDefault()}),{once:!0,capture:!0})},xn=function(){var t=ei.performance.now();ei.document.body.addEventListener("contextmenu",(function(i){ei.performance.now()-t>5e3||i.preventDefault()}),{once:!0})},gn=function(){var t=ei.performance.now();ei.document.body.addEventListener("touchstart",(function(i){ei.performance.now()-t>5e3||i.preventDefault()}),{once:!0})},Sn=function(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},wn={add:function(t,i){return y(t.x+i,t.y+i,t.z+i)},addVec:function(t){for(var i,n,r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];var o={x:t.x,y:t.y,z:t.z};try{for(var s=Sn(r),u=s.next();!u.done;u=s.next