scichart 3.0.280 → 3.0.284
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Builder/chartBuilder.d.ts +7 -7
- package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.d.ts +1 -1
- package/Charting/LayoutManager/CentralAxesLayoutManager.d.ts +1 -1
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +1 -1
- package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +2 -2
- package/Charting/Visuals/PointMarkers/SpritePointMarker.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/SciChartSurface.d.ts +2 -1
- package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +1 -1
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -1
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/README.md +8 -2
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +7 -7
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +1 -1
- package/_wasm/scichart3d.wasm +0 -0
- package/index.d.ts +958 -0
- package/index.js +1298 -2
- package/index.min.js +1 -0
- package/package.json +1 -1
package/index.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.SciChart=function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=441)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSafe=void 0,t.deleteSafe=function(e){null==e||e.delete()}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Guard=void 0;const r=i(51);t.Guard=class{static notNull(e,t){if(null==e)throw new Error("Argument "+t+" must not be undefined")}static isTrue(e,t){if(!e)throw new Error(t)}static arraysSameLength(e,t,i,r){if(this.notNull(e,t),this.notNull(i,r),e.length!==i.length)throw new Error(`Arrays ${t} and ${r} must have the same length`)}static arraysSameLengthArr(e=[]){if(e.forEach(e=>{this.notNull(e.arg,e.name)}),e.length>=0){const t=e[0].arg.length,i=e[0].name;e.forEach(e=>{if(e.arg.length!==t)throw new Error(`Arrays ${i} and ${e.name} must have the same length`)})}}static argumentIsRealNumber(e,t){if(!(0,r.isRealNumber)(e))throw new Error(`Argument ${t} must be a real number (not infinite, not NAN)`)}}},function(e,t,i){"use strict";function r(e,t){const i=s(e);return"0x"+n(t||i.opacity)+n(i.red)+n(i.green)+n(i.blue)}function n(e){const t=e.toString(16);return 1===t.length?"0"+t:t}function s(e){if(!e||!e.length||e.length>50)throw Error("'"+e+"' is not a valid color...");const i=e.match(/^#?([0-9a-f]{3})$/i);if(i){const e=i[1],t=255,r=17*parseInt(e.charAt(0),16),n=17*parseInt(e.charAt(1),16),s=17*parseInt(e.charAt(2),16);return o([r,n,s],["red","green","blue"]),{opacity:t,red:r,green:n,blue:s}}const r=e.match(/^#?([0-9a-f]{6})$/i);if(r){const e=r[1],t=255,i=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),s=parseInt(e.substr(4,2),16);return o([i,n,s],["red","green","blue"]),{opacity:t,red:i,green:n,blue:s}}const n=e.match(/^#?([0-9a-f]{8})$/i);if(n){const e=n[1],t=parseInt(e.substr(0,2),16),i=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16),s=parseInt(e.substr(6,2),16);return o([s,t,i,r],["opacity","red","green","blue"]),{opacity:s,red:t,green:i,blue:r}}const l=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d*\.?\d*)\s*\)$/i);if(l){const e=parseFloat(l[4]);!function(e){if(void 0===e)throw Error("parseColor error opacity should not be null");if(Number.isNaN(e))throw Error("parseColor error opacity should not be NaN");if(e<0||e>1)throw Error("parseColor error opacity should be within [0, 1] range")}(e);const t=a(e),i=parseInt(l[1],10),r=parseInt(l[2],10),n=parseInt(l[3],10);return o([i,r,n],["red","green","blue"]),{opacity:t,red:i,green:r,blue:n}}const h=t.webColors[e.toLowerCase()];if(h)return s(h);throw Error("'"+e+"' is not a valid color...")}Object.defineProperty(t,"__esModule",{value:!0}),t.webColors=t.parseTArgbToHtmlColor=t.parseArgbToHtmlColor=t.parseColorToTArgb=t.toHex=t.parseColorToUIntArgb=t.parseColorToHexStringAbgr=t.parseColorToHexStringArgb=void 0,t.parseColorToHexStringArgb=r,t.parseColorToHexStringAbgr=function(e,t){const i=s(e);return"0x"+n(t||i.opacity)+n(i.blue)+n(i.green)+n(i.red)},t.parseColorToUIntArgb=function(e,t){return parseInt(r(e,t),16)},t.toHex=n,t.parseColorToTArgb=s;t.parseArgbToHtmlColor=e=>{const t=e.toString(16);if(t.length>8)throw new Error("HTML color length cannot be greater than 8");const i=(e,t)=>{const i=t-e.length;return new Array(i+1).join("0")+e};return"#"+i(t.substr(-6),6)+i(t.substring(0,t.length-6),2)};function o(e,t){e.forEach((e,i)=>{const r=t[i];if(void 0===e)throw Error(`parseColor error ${r} color should not be null`);if(Number.isNaN(e))throw Error(`parseColor error ${r} color should not be NaN`);if(e<0||e>255)throw Error(`parseColor error ${r} color should be within [0, 255] range`)})}t.parseTArgbToHtmlColor=e=>("#"+e.red.toString(16)+e.green.toString(16)+e.blue.toString(16)+e.opacity.toString(16)).toUpperCase();const a=e=>e>=1?255:e<=0?0:Math.floor(256*e);t.webColors={transparent:"#00000000",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",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#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",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",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:"#db7093",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",slategrey:"#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"}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberRange=void 0;const r=i(51),n=i(103);class s{constructor(e=0,t=10){this.min=e,this.max=t}union(e){const t=Math.min(this.min,e.min),i=Math.max(this.max,e.max);return new s(t,i)}clip(e){const t=Math.max(this.min,e.min),i=Math.min(this.max,e.max);return new s(t,i)}growBy(e){const t=this.max-this.min;let i=this.min-e.min*(this.isZero()?this.min:t),r=this.max+e.max*(this.isZero()?this.max:t);if(i>r){const e=i;i=r,r=e}return new s(i,r)}growByLog(e,t){const i=this.min<0?-1:1,r=0!==this.min?(0,n.logToBase)(Math.abs(this.min),t):0,o=0!==this.max?(0,n.logToBase)(Math.abs(this.max),t):0,a=o-r,l=a*e.min,h=a*e.max;let u=i*(0!==this.min?Math.pow(t,r-l):0),d=i*(0!==this.max?Math.pow(t,o+h):0);if(u>d){const e=d;d=u,u=e}return new s(u,d)}isDefined(){return(0,r.isRealNumber)(this.max)&&(0,r.isRealNumber)(this.min)}equals(e){return!!e&&(e.min===this.min&&e.max===this.max)}toString(){return`NumberRange (${this.min}, ${this.max})`}get diff(){return this.max-this.min}isZero(){return this.min===this.max}static areEqual(e,t){return e===t||!!e&&e.equals(t)}}t.NumberRange=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocateFile=t.copyToCanvas=t.getMasterCanvas=t.createChartDestination=t.SciChartSurfaceBase=t.ESurfaceType=t.DebugForDpi=void 0;const r=i(14),n=i(125),s=i(0),o=i(18),a=i(1),l=i(244),h=i(69),u=i(70),d=i(71),c=i(17),p=i(45),g=i(22),f=i(100),y=i(128),v=i(6),m=i(170);t.DebugForDpi=!1,function(e){e.SciChartSurfaceType="SciChartSurfaceType",e.SciChart3DSurfaceType="SciChart3DSurfaceType"}(t.ESurfaceType||(t.ESurfaceType={}));class S{constructor(e,t={}){this.themeProviderProperty=S.DEFAULT_THEME,this.previousThemeProviderProperty=S.DEFAULT_THEME,this.isInitializedProperty=!1,this.isDeletedProperty=!1,this.backgroundProperty=S.DEFAULT_THEME.sciChartBackground,this.idProperty=(0,g.generateGuid)(),this.suspendableIdProperty=(0,g.generateGuid)(),this.isAlphaEnabledProperty=!0,this.deletables=[],a.Guard.notNull(e,"webAssemblyContext"),this.domChartRoot=t.domChartRoot,this.domCanvasWebGL=t.domCanvasWebGL,this.domCanvas2D=t.domCanvas2D,this.domSvgContainer=t.domSvgContainer,this.domSvgAdornerLayer=t.domSvgAdornerLayer,this.domDivContainer=t.domDivContainer,this.sharedWasmContext=e,this.propertyChanged=new o.EventHandler,e.TSRSetDrawRequestsEnabled(!0),this.detachChartModifier=this.detachChartModifier.bind(this),this.attachChartModifier=this.attachChartModifier.bind(this),this.chartModifiers=new h.ObservableArray,this.chartModifiers.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(e=>this.detachChartModifier(e)),null===(i=e.getNewItems())||void 0===i||i.forEach(e=>this.attachChartModifier(e))}),this.mouseManager=new l.MouseManager(this),t.domCanvasWebGL?this.mouseManager.subscribe(t.domCanvasWebGL):t.domCanvas2D&&this.mouseManager.subscribe(t.domCanvas2D),this.onDpiChanged=this.onDpiChanged.bind(this),v.DpiHelper.dpiChanged.subscribe(this.onDpiChanged)}static setRuntimeLicenseKey(e){n.licenseManager.setRuntimeLicenseKey(e)}static setServerLicenseEndpoint(e){n.licenseManager.setServerLicenseEndpoint(e)}static setLicenseCallback(e){n.licenseManager.setLicenseCallback(e)}static resolveOptions(e){if((null==e?void 0:e.theme)&&"type"in e.theme){if(!("applyOverrides"in e.theme)){const t=(0,r.createType)(c.EBaseType.ThemeProvider,e.theme.type,null,e.theme);"applyOverrides"in t&&t.applyOverrides(e.theme),e.theme=t}}else e?e.theme=S.DEFAULT_THEME:e={theme:S.DEFAULT_THEME};return(null==e?void 0:e.loader)&&("addChartLoader"in e.loader||(e.loader=(0,r.createType)(c.EBaseType.Loader,e.loader.type,null,e.loader))),e}get id(){return this.idProperty}set id(e){this.idProperty=e}get background(){return this.backgroundProperty}set background(e){this.backgroundProperty=e,this.applySciChartBackground(e,this.isAlphaEnabledProperty),this.notifyPropertyChanged("Background")}updateBackground(){this.applySciChartBackground(this.backgroundProperty,this.isAlphaEnabledProperty)}get isCopyCanvasSurface(){return!this.domCanvasWebGL&&this.domCanvas2D}get seriesViewRect(){return this.seriesViewRectProperty}get otherSurfaces(){return this.destinations?this.destinations.map(e=>e.sciChartSurface).filter(e=>e!==this):[]}get isInitialized(){return this.isInitializedProperty}get isDeleted(){return this.isDeletedProperty}get isSuspended(){return m.UpdateSuspender.getIsSuspended(this)}get suspendableId(){return this.suspendableIdProperty}decrementSuspend(){}resumeUpdates(e){e.shouldResumeTarget&&this.invalidateElement()}suspendUpdates(){return new m.UpdateSuspender(this)}applyTheme(e){this.previousThemeProviderProperty=this.themeProviderProperty,this.themeProviderProperty=e,this.applySciChartBackground(e.sciChartBackground),this.chartModifiers.asArray().forEach(t=>t.applyTheme(e)),this.invalidateElement()}get themeProvider(){return this.themeProviderProperty}get previousThemeProvider(){return this.previousThemeProviderProperty}delete(e=!0){var t;this.isDeletedProperty=!0;const i=null===(t=this.destinations)||void 0===t?void 0:t.findIndex(e=>e.sciChartSurface===this);i>=0&&this.destinations.splice(i,1),v.DpiHelper.dpiChanged.unsubscribe(this.onDpiChanged),this.mouseManager.unsubscribe();for(const e of this.deletables)(0,s.deleteSafe)(e);this.deletables=[]}addDeletable(e){this.deletables.push(e)}getMainCanvas(){return this.domCanvasWebGL||this.domCanvas2D}setSeriesViewRect(e){this.seriesViewRectProperty=e}setDestinations(e){this.destinations=e}setIsInitialized(){this.isInitializedProperty=!0}onDpiChanged(e){this.invalidateElement()}get chartModifierGroups(){const e=this.chartModifiers.asArray().filter(e=>void 0!==e.modifierGroup).map(e=>e.modifierGroup);return(0,p.getUniqueValues)(e)}applyOptions(e){var t;this.idProperty=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:this.idProperty,this.widthAspect=null==e?void 0:e.widthAspect,this.heightAspect=null==e?void 0:e.heightAspect,this.disableAspect=null==e?void 0:e.disableAspect}detachChartModifier(e){e.modifierType!==f.EModifierType.MultiChart2DModifier&&(e.invalidateParentCallback=void 0,e.onDetach(),e.setParentSurface(void 0),this.invalidateElement())}attachChartModifier(e){if(e.modifierType===f.EModifierType.MultiChart2DModifier){if(this.chartModifiers.asArray().filter(t=>t===e).length>1)throw Error("Invalid operation in sciChartSurface.attachChartModifier, this FinChartModifier has already been attached to this SciChartSurface.")}else if(e.invalidateParentCallback)throw Error("Invalid operation in sciChartSurface.attachChartModifier, this chartModifier has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.themeProviderProperty&&e.applyTheme(this.themeProviderProperty)}notifyPropertyChanged(e){var t;null===(t=this.propertyChanged)||void 0===t||t.raiseEvent(new u.PropertyChangedEventArgs(e)),this.invalidateElement()}changeMasterCanvasViewportSize(e,t,i){if(!S.domMasterCanvas)return;let r=t,n=i;const s=S.domMasterCanvas.width/v.DpiHelper.PIXEL_RATIO,o=S.domMasterCanvas.height/v.DpiHelper.PIXEL_RATIO;s>r&&(r=s),o>n&&(n=o),v.DpiHelper.setSize(S.domMasterCanvas,r,n);const a=S.domMasterCanvas.width,l=S.domMasterCanvas.height;e.TSRSetMainWindowSize(a,l)}changeWebGLCanvasViewportSize(e,t,i){if(!this.domCanvasWebGL)return;const r=t*v.DpiHelper.PIXEL_RATIO,n=i*v.DpiHelper.PIXEL_RATIO;v.DpiHelper.setSize(this.domCanvasWebGL,t,i),e.TSRSetMainWindowSize(r,n)}}t.SciChartSurfaceBase=S,S.DEFAULT_THEME=new y.SciChartJSDarkv2Theme,S.AntiAliasWebGlBackbuffer=!1;t.createChartDestination=e=>{if(e)return{canvas:e,GetHeight(){return this.canvas.height},GetWidth(){return this.canvas.width},GetID(){return this.canvas.id}}};t.getMasterCanvas=()=>{if(!S.domMasterCanvas){const e=document.createElement("canvas");e.id="SciChartMasterCanvas",e.style.display="none",e.style.position="absolute",e.style.left="0",e.style.top="0",t.DebugForDpi&&(e.style.background="#00000077",e.style.pointerEvents="none",e.style.left="",e.style.top="",e.style.display="inline"),e.addEventListener("webglcontextcreationerror",e=>{console.warn("WebGL Context creation error: ",e.statusMessage||"Unknown error")},!1),document.body.appendChild(e);d.WebGlHelper.getContext(e,{premultipliedAlpha:!0,antialias:S.AntiAliasWebGlBackbuffer});S.domMasterCanvas=e}return S.domMasterCanvas};t.copyToCanvas=(e,t)=>i=>{const r=t(i),n=null==r?void 0:r.sciChartSurface.domCanvas2D;if(n){const t=n.getContext("2d");t.clearRect(0,0,t.canvas.width,t.canvas.height),t.drawImage(e,0,0)}};t.getLocateFile=e=>(t,i)=>t.endsWith(".wasm")&&e.wasmUrl?e.wasmUrl:t.endsWith(".data")&&e.dataUrl?e.dataUrl:i+t},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Point=void 0;t.Point=class{constructor(e,t){this.x=e,this.y=t}toString(){return`Point (${this.x}, ${this.y})`}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DpiHelper=void 0;const r=i(13),n=i(18),s=i(52),o=i(4);class a{static initialize(){a.initialized||(a.PIXEL_RATIO=1,a.IsDpiScaleEnabled&&"undefined"!=typeof window&&window.devicePixelRatio&&(a.PIXEL_RATIO=window.devicePixelRatio),o.DebugForDpi&&console.log("Initializing Dpi Helper. Scaling factor = "+a.PIXEL_RATIO),a.IsDpiScaleEnabled&&!r.IS_TEST_ENV&&window.addEventListener("resize",()=>{const e=window.devicePixelRatio||1,t=a.PIXEL_RATIO;t!==e&&(o.DebugForDpi&&console.log(`Dpi Changing, was ${t}, now ${e}`),a.PIXEL_RATIO=e,a.dpiChanged.raiseEvent({newValue:e,oldValue:t}))}),a.initialized=!0)}static createCanvas(e=0,t=0){const i=document.createElement("canvas");return e&&t&&a.setSize(i,e,t),i}static setSize(e,t,i){a.setWidth(e,t),a.setHeight(e,i)}static setWidth(e,t){o.DebugForDpi&&console.log(`setWidth ${e.id} backBuffer=${t*a.PIXEL_RATIO} display=${t}`),e.width=t*a.PIXEL_RATIO}static setHeight(e,t){o.DebugForDpi&&console.log(`setHeight ${e.id} backBuffer=${t*a.PIXEL_RATIO} display=${t}`),e.height=t*a.PIXEL_RATIO}static adjustLineStyle(e,t=a.PIXEL_RATIO){const i=Object.assign({},e);return i.end*=t,i.start*=t,i.strokeThickness*=t,i}static adjustTextStyle(e,t=a.PIXEL_RATIO){const i=Object.assign({},e);return i.fontSize=Math.round(i.fontSize*t),e.padding&&(i.padding=a.adjustThickness(e.padding,t)),i}static adjustStrokeSize(e,t=a.PIXEL_RATIO){var i;const r=Object.assign({},e),n=Math.round(e.strokeThickness*t);return r.strokeDashArray=null===(i=e.strokeDashArray)||void 0===i?void 0:i.map(e=>e*t),r.strokeThickness=n>0||0===e.strokeThickness?n:1,r}static adjustThickness(e,t=a.PIXEL_RATIO){return new s.Thickness(Math.round(e.top*t),Math.round(e.right*t),Math.round(e.bottom*t),Math.round(e.left*t))}}t.DpiHelper=a,a.IsDpiScaleEnabled=!0,a.dpiChanged=new n.EventHandler},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.BRUSH_UP="BRUSH_UP",e.BRUSH_DOWN="BRUSH_DOWN",e.COLOR="COLOR",e.COLOR_MAP="COLOR_MAP",e.CONTOUR_DRAWING_MODE="CONTOUR_DRAWING_MODE",e.CONTOUR_MINORS_PER_MAJOR="CONTOUR_MINORS_PER_MAJOR",e.CONTOUR_MINOR_LINE_STYLE="CONTOUR_MINOR_LINE_STYLE",e.CONTOUR_MAJOR_LINE_STYLE="CONTOUR_MAJOR_LINE_STYLE",e.CONTOUR_COLOR_MAP_MODE="CONTOUR_COLOR_MAP_MODE",e.CORNER_RADIUS="CORNER_RADIUS",e.DATA_POINT_WIDTH="dataPointWidth",e.DATA_POINT_WIDTH_MODE="DATA_POINT_WIDTH_MODE",e.DATA_SERIES="dataSeries",e.DRAWING_PROVIDERS="DRAWING_PROVIDERS",e.DRAW_NAN_AS="drawNaNAs",e.DRAW_CONNECTOR="DRAW_CONNECTOR",e.DRAW_WHISKERS="DRAW_WHISKERS",e.EFFECT="EFFECT",e.ENABLE_DRAWING_OPTIMISATIONS="ENABLE_DRAWING_OPTIMISATIONS",e.ERROR_DIRECTION="ERROR_DIRECTION",e.ERROR_MODE="ERROR_MODE",e.FILL="fill",e.FILL_Y1="FILL_Y1",e.FILL_LINEAR_GRADIENT="FILL_LINEAR_GRADIENT",e.FILL_VALUES_OUT_OF_RANGE="FILL_VALUES_OUT_OF_RANGE",e.GRADIENT_STOPS="GRADIENT_STOPS",e.HOVERED="HOVERED",e.INTERPOLATION_POINTS="INTERPOLATION_POINTS",e.IS_DIGITAL_LINE="IS_DIGITAL_LINE",e.IS_ONE_HUNDRED_PERCENT="IS_ONE_HUNDRED_PERCENT",e.IS_SELECTED="IS_SELECTED",e.IS_VISIBLE="IS_VISIBLE",e.INTENSITY="INTENSITY",e.LINE_TYPE="LINE_TYPE",e.MAXIMUM="MAXIMUM",e.MINIMUM="MINIMUM",e.OFFSET="OFFSET",e.OPACITY="OPACITY",e.PALETTE_PROVIDER="PALETTE_PROVIDER",e.PARENT_SURFACE="PARENT_SURFACE",e.POINT_MARKER="pointMarker",e.RANGE="RANGE",e.RESAMPLING_MODE="RESAMPLING_MODE",e.RESAMPLING_PRECISION="RESAMPLING_PRECISION",e.SPACING="SPACING",e.STACKED_GROUP_ID="STACKED_GROUP_ID",e.STROKE="STROKE",e.STROKE_Y1="STROKE_Y1",e.STROKE_DASH_ARRAY="STROKE_DASH_ARRAY",e.STROKE_Y1_DASH_ARRAY="STROKE_Y1_DASH_ARRAY",e.STROKE_DOWN="STROKE_DOWN",e.STROKE_UP="STROKE_UP",e.STROKE_THICKNESS="STROKE_THICKNESS",e.USE_LINEAR_TEXTURE_FILTERING="USE_LINEAR_TEXTURE_FILTERING",e.XAXIS_ID="XAXIS_ID",e.YAXIS_ID="YAXIS_ID",e.ZERO_LINE_Y="ZERO_LINE_Y",e.Z_STEP="Z_STEP",e.Z_MAX="Z_MAX",e.Z_MIN="Z_MIN",e.Z_MULTIPLIER="Z_MULTIPLIER",e.Z_LABEL_PROVIDER="Z_LABEL_PROVIDER",e.SERIES_TEXT_PROVIDER="SERIES_TEXT_PROVIDER"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESeriesType=void 0,function(e){e.BandSeries="BandSeries",e.SplineBandSeries="SplineBandSeries",e.BubbleSeries="BubbleSeries",e.CandlestickSeries="CandlestickSeries",e.ColumnSeries="ColumnSeries",e.ImpulseSeries="ImpulseSeries",e.LineSeries="LineSeries",e.SplineLineSeries="SplineLineSeries",e.MountainSeries="MountainSeries",e.SplineMountainSeries="SplineMountainSeries",e.OhlcSeries="OhlcSeries",e.StackedColumnSeries="StackedColumnSeries",e.StackedMountainSeries="StackedMountainSeries",e.UniformContoursSeries="UniformContoursSeries",e.UniformHeatmapSeries="UniformHeatmapSeries",e.NonUniformHeatmapSeries="NonUniformHeatmapSeries",e.StackedMountainCollection="StackedMountainCollection",e.StackedColumnCollection="StackedColumnCollection",e.ScatterSeries="ScatterSeries",e.ErrorBarsSeries="ErrorBarsSeries",e.TextSeries="TextSeries",e.Custom="Custom"}(t.ESeriesType||(t.ESeriesType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToRelativeHtmlSize=t.convertToHtmlPx=t.translateDataValueRectToAbsolute=t.translateToNotScaled=t.translateFromSeriesViewRectToCanvasY=t.translateFromSeriesViewRectToCanvasX=t.translateFromCanvasToSeriesViewRectY=t.translateFromCanvasToSeriesViewRectX=t.translateFromSeriesViewRectToCanvas=t.translateFromCanvasToSeriesViewRect=void 0;const r=i(6),n=i(5),s=i(15);t.translateFromCanvasToSeriesViewRect=(e,t,i=!1)=>{if(!t)return;const r=e.x-t.x,s=e.y-t.y;return i||!(r<0||r>t.width||s<0||s>t.height)?new n.Point(r,s):void 0};t.translateFromSeriesViewRectToCanvas=(e,t,i=!1)=>{if(!t)return;const r=e.x+t.x,s=e.y+t.y;return i||!(r<0||r>t.width||s<0||s>t.height)?new n.Point(r,s):void 0};t.translateFromCanvasToSeriesViewRectX=(e,t,i=!1)=>{if(!t)return;const r=e-t.x;return i||!(r<0||r>t.width)?r:void 0};t.translateFromCanvasToSeriesViewRectY=(e,t,i=!1)=>{if(!t)return;const r=e-t.y;return i||!(r<0||r>t.height)?r:void 0};t.translateFromSeriesViewRectToCanvasX=(e,t,i=!1)=>{if(!t)return;const r=e+t.x;return i||!(r<0||r>t.width)?r:void 0};t.translateFromSeriesViewRectToCanvasY=(e,t,i=!1)=>{if(!t)return;const r=e+t.y;return i||!(r<0||r>t.height)?r:void 0};t.translateToNotScaled=e=>e/r.DpiHelper.PIXEL_RATIO;t.translateDataValueRectToAbsolute=(e,i,r,n)=>{const{x:o,y:a,width:l,height:h}=e,u=(0,t.translateToNotScaled)(n.left),d=(0,t.translateToNotScaled)(n.top),c=i.getCurrentCoordinateCalculator(),p=r.getCurrentCoordinateCalculator();let g=i.isVerticalChart?p.getCoordinate(o):c.getCoordinate(o),f=i.isVerticalChart?c.getCoordinate(a):p.getCoordinate(a);g=Math.max((0,t.translateToNotScaled)(g),0),f=Math.max((0,t.translateToNotScaled)(f),0);const y=i.flippedCoordinates?o-l:o+l,v=r.flippedCoordinates?a+h:a-h;let m=(0,t.translateToNotScaled)(i.isVerticalChart?c.getCoordinate(v):p.getCoordinate(v)),S=(0,t.translateToNotScaled)(i.isVerticalChart?p.getCoordinate(y):c.getCoordinate(y));return g+=u,f+=d,S+=u,m+=d,new s.Rect(g,f,Math.abs(S-g),Math.abs(f-m))};t.convertToHtmlPx=e=>e+"px";t.convertToRelativeHtmlSize=e=>100*e+"%"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDataSeriesValueType=t.EDataChangeType=t.EDataSeriesType=void 0,function(e){e.Xy="Xy",e.Xyy="Xyy",e.Xyz="Xyz",e.Ohlc="Ohlc",e.HeatmapUniform="UniformHeatmap",e.HeatmapNonUniform="NonUniformHeatmap",e.Hlc="Hlc",e.XyText="XyText"}(t.EDataSeriesType||(t.EDataSeriesType={})),function(e){e[e.Append=0]="Append",e[e.Insert=1]="Insert",e[e.Update=2]="Update",e[e.Remove=3]="Remove",e[e.Clear=4]="Clear",e[e.Property=5]="Property"}(t.EDataChangeType||(t.EDataChangeType={})),function(e){e.Default="Default",e.InitialAnimationValues="InitialAnimationValues",e.FinalAnimationValues="FinalAnimationValues"}(t.EDataSeriesValueType||(t.EDataSeriesValueType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcDistanceFromLineSegment=t.calcDotProduct=t.testIsInInterval=t.testIsInXBounds=t.calcAnnotationBordersForAxisMarker=t.testIsInBounds=t.calcDistance=t.calcCrossProduct=t.calcDistanceFromLine=void 0;const r=i(33);t.calcDistanceFromLine=(e,i,r,n,s,o)=>Math.abs((0,t.calcCrossProduct)(r,n,s,o,e,i)/(0,t.calcDistance)(r,n,s,o));t.calcCrossProduct=(e,t,i,r,n,s)=>(i-e)*(s-t)-(r-t)*(n-e);t.calcDistance=(e,t,i,r)=>{const n=e-i,s=t-r;return Math.sqrt(n*n+s*s)};t.testIsInBounds=(e,t,i,r,n,s,o=0)=>e>=i-o&&e<=n+o&&t<=r-o&&t>=s+o;t.calcAnnotationBordersForAxisMarker=(e,t,i,n,s,o,a,l,h,u,d,c,p,g)=>{const f={x1:0,x2:0,y1:0,y2:0};return e?t?n.axisAlignment===r.EAxisAlignment.Top?s.axisAlignment===r.EAxisAlignment.Left?(f.x1=o-a.y,f.y1=h-a.y,f.x2=0,f.y2=h+u-a.y):s.axisAlignment===r.EAxisAlignment.Right&&(f.x1=a.width-o+a.y,f.y1=h-a.y,f.x2=a.width,f.y2=h+u-a.y):s.axisAlignment===r.EAxisAlignment.Left?(f.x1=o-a.x+d,f.y1=h-a.y,f.x2=0,f.y2=h+u-a.y):s.axisAlignment===r.EAxisAlignment.Right&&(f.x1=l-d,f.y1=h-a.y,f.x2=a.width,f.y2=h+u-a.y):i&&(n.axisAlignment===r.EAxisAlignment.Top?(f.x1=l+o/2-a.x+c,f.y1=u-a.y+c,f.x2=l-o/2-a.x+c,f.y2=0):(f.x1=l-o/2-a.x+c,f.y1=h-c,f.x2=l+o/2-a.x+c,f.y2=a.height)):t?p?(f.x1=l-o/2+c,f.y1=h+u-a.y,f.x2=l+o/2,f.y2=h):g?(f.x1=l-o/2+d-a.x,f.y1=h-d,f.x2=l+o/2+d-a.x,f.y2=a.height):(f.x1=l-o/2-c,f.y1=h-d,f.x2=l+o/2-c,f.y2=h+u-a.y):i&&(g?(f.x1=o-a.x+c,f.y1=h-u/2,f.x2=0,f.y2=h+u/2):(f.x1=l-c,f.y1=h-u/2-d,f.x2=l+o,f.y2=h+u/2-d)),f};t.testIsInXBounds=(e,t,i)=>Math.abs(e-t)<i;t.testIsInInterval=(e,t,i,r=0)=>t<=i?t-r<=e&&e<=i+r:i-r<=e&&e<=t+r;t.calcDotProduct=(e,t,i,r,n,s)=>(i-e)*(n-i)+(r-t)*(s-r);t.calcDistanceFromLineSegment=(e,i,r,n,s,o)=>(0,t.calcDotProduct)(r,n,s,o,e,i)>0?(0,t.calcDistance)(s,o,e,i):(0,t.calcDotProduct)(s,o,r,n,e,i)>0?(0,t.calcDistance)(r,n,e,i):(0,t.calcDistanceFromLine)(e,i,r,n,s,o)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllFontKeys=t.getFontKey=t.getVector4=t.getNativeRect=t.getTextBounds=t.getVertex=t.getVectorColorVertex=t.getVectorRectVertex=t.freeCache=t.FontKey=void 0;const r=i(0),n=i(133),s=i(105);class o{constructor(e){this.firstLoadTime=Date.now(),this.nativeKey=e}delete(){(0,r.deleteSafe)(this.nativeKey)}}t.FontKey=o;const a=new Map,l=e=>{var t,i;const r=null!==(i=null===(t=null==e?void 0:e.canvas)||void 0===t?void 0:t.id)&&void 0!==i?i:"TEST";return a.has(r)||a.set(r,{vecRects:void 0,vecColorVertex:void 0,vertex:void 0,rect:void 0,vector4:void 0,textBounds:void 0,keyCache:new Map}),a.get(r)};t.freeCache=e=>({delete:()=>{if(!e.canvas)return;const t=e.canvas.id,i=a.get(t);i&&((0,r.deleteSafe)(i.vecRects),(0,r.deleteSafe)(i.vecColorVertex),(0,r.deleteSafe)(i.vertex),(0,r.deleteSafe)(i.rect),(0,r.deleteSafe)(i.vector4),(0,r.deleteSafe)(i.textBounds),i.keyCache.forEach(e=>(0,r.deleteSafe)(e))),a.delete(t)}});t.getVectorRectVertex=(e,t=100)=>{const i=l(e);if(!i)return;let r=i.vecRects;return r||(r=new e.VectorRectVertex,r.reserve(t),i.vecRects=r),r.clear(),r};t.getVectorColorVertex=(e,t=100)=>{const i=l(e);if(!i)return;let r=i.vecColorVertex;return r||(r=new e.VectorColorVertex,r.reserve(t),i.vecColorVertex=r),r.clear(),r};t.getVertex=(e,t,i,r)=>{const n=l(e);if(!n)return;let s=n.vertex;return s?(s.SetPosition(t,i),s.m_uiColor=null!=r?r:4294967295):(s=new e.SCRTColorVertex(t,i),n.vertex=s),s};t.getTextBounds=e=>{const t=l(e);if(!t)return;let i=t.textBounds;return i||(i=new e.TSRTextBounds,t.textBounds=i),i};t.getNativeRect=(e,t,i,r,n)=>{const s=l(e);let o=s.rect;return o?o.Assign(t,i,r-t,n-i):(o=new e.SCRTRectVertex(t,i,r-t,n-i),s.rect=o),o};t.getVector4=(e,t,i,r,n)=>{const s=l(e);let o=s.vector4;return o?o.Assign(t,i,r,n):(o=new e.TSRVector4(t,i,r,n),s.vector4=o),o};t.getFontKey=(e,t,i=!1,r=!1)=>{const a=l(e);if(!a)return;const h=a.keyCache,u={fontFamily:t.fontFamily,fontSize:t.fontSize,extras:(i?"advanced":"")+(r?"transformed":""),providerId:void 0},d=n.labelCache.getStyleId(u);if(!h.has(d)){const n=new o(new e.SCRTFontKey(t.fontFamily,t.fontSize,r,i));h.set(d,n)}const c=h.get(d);return Date.now()-c.firstLoadTime>s.SciChartDefaults.nativeFontTimeout&&(c.nativeKey.m_reload=!1),c.nativeKey};t.getAllFontKeys=e=>{const t=l(e);return Array.from(t.keyCache.values()).map(e=>e.nativeKey)}},function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.EPSILON=t.DEFAULT_HEIGHT=t.DEFAULT_WIDTH=t.IS_TEST_ENV=void 0;let i=!1;t.IS_TEST_ENV=i,void 0!==e&&(t.IS_TEST_ENV=i="1"===e.env.TEST_ENV),t.DEFAULT_WIDTH=900,t.DEFAULT_HEIGHT=600,t.EPSILON=1e-4}).call(this,i(124))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubTypes=t.createType=t.getFunction=t.registerFunction=t.registerWasmType=t.registerType=void 0;const r=new Map;t.registerType=(e,t,i,n=!1)=>{const s=e+":"+t;if(r.has(s)&&!n)throw new Error("Type "+s+" is already registered. Call with overWrite: true if you intended to replace it.");r.set(s,{func:i})};t.registerWasmType=(e,t,i,n=!1)=>{const s=e+":"+t;if(r.has(s)&&!n)throw new Error("Type "+s+" is already registered. Call with overWrite: true if you intended to replace it.");r.set(s,{wasm:!0,func:i})};t.registerFunction=(e,t,i,n=!1)=>{const s=e+":"+t;if(r.has(s)&&!n)throw new Error("Function "+s+" is already registered. Call with overWrite: true if you intended to replace it.");r.set(s,{func:i})};t.getFunction=(e,t)=>{const i=e+":"+t,n=r.get(i);if(n)return n.func;throw new Error("Nothing registered for "+i)};t.createType=(e,t,i,n)=>{const s=e+":"+t,o=r.get(s);if(o){const{wasm:e,func:t}=o;return e?t(i,n):t(n)}throw new Error("Nothing registered for "+s)};t.getSubTypes=e=>Array.from(r.keys()).map(e=>e.split(":")).filter(t=>t[0]===e).map(e=>e[1])},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rect=void 0;const r=i(5);class n{constructor(e,t,i,r){if(i<0||r<0)throw new Error("Can not create Rect with negative width/height");this.x=e,this.y=t,this.width=i,this.height=r}static create(e,t,i,r){if(i<0||r<0)throw new Error("Rect.create width and height cannot be less than zero");return new n(e,t,i,r)}static createWithCoords(e,t,i,r){return new n(e,t,i-e,r-t)}static createWithPoints(e,t){const i=Math.min(e.x,t.x),r=Math.min(e.y,t.y),s=Math.max(Math.max(e.x,t.x)-i,0),o=Math.max(Math.max(e.y,t.y)-r,0);return n.create(i,r,s,o)}static createCopy(e){return new n(e.x,e.y,e.width,e.height)}static createZero(){return new n(0,0,0,0)}static isEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}static clipPointToRect(e,t){const i=e.x<t.x?t.x:e.x>t.x+t.width?t.x+t.width:e.x,n=e.y<t.y?t.y:e.y>t.y+t.height?t.y+t.height:e.y;return new r.Point(i,n)}get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}}t.Rect=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testLayoutManager=t.getCoordinateWithCoordinateMode=t.getValueWithCoordinateMode=t.updateTopAndBottomChartLayoutState=t.updateLeftAndRightChartLayoutState=t.getVerticalAxisRequiredSize=t.getHorizontalAxisRequiredSize=t.layoutAxisPartsBottomStrategy=t.layoutAxisPartsTopStrategy=t.layoutAxisPartsRightStrategy=t.layoutAxisPartsLeftStrategy=t.layoutAxisParts=t.updateAxisLayoutState=void 0;const r=i(1),n=i(15),s=i(143);function o(e){const{axisRenderer:t,axisTitleRenderer:i,axisLayoutState:r,isHorizontalAxis:n,axisBorder:s}=e;r.clear(),r.axisSize=n?t.desiredHeight+i.desiredHeight:t.desiredWidth+i.desiredWidth,r.additionalBottomSize=s.borderBottom,r.additionalTopSize=s.borderTop,r.additionalRightSize=s.borderRight,r.additionalLeftSize=s.borderLeft}function a(e,t,i,r,s){return{axisTitleRendererViewRect:n.Rect.createWithCoords(s.left,s.top,s.left+i,s.bottom),axisRendererViewRect:n.Rect.createWithCoords(s.left+i,s.top,s.right,s.bottom)}}function l(e,t,i,r,s){return{axisRendererViewRect:n.Rect.createWithCoords(s.left,s.top,s.left+e,s.bottom),axisTitleRendererViewRect:n.Rect.createWithCoords(s.left+e,s.top,s.right,s.bottom)}}function h(e,t,i,r,s){return{axisTitleRendererViewRect:n.Rect.createWithCoords(s.left,s.top,s.right,s.top+r),axisRendererViewRect:n.Rect.createWithCoords(s.left,s.top+r,s.right,s.bottom)}}function u(e,t,i,r,s){return{axisRendererViewRect:n.Rect.createWithCoords(s.left,s.top,s.right,s.top+t),axisTitleRendererViewRect:n.Rect.createWithCoords(s.left,s.top+t,s.right,s.bottom)}}t.updateAxisLayoutState=o,t.layoutAxisParts=function(e,t){const{isHorizontalAxis:i,viewRect:r,axisRenderer:n,axisTitleRenderer:s,axisBorder:o}=e,a=i?r.width:n.desiredWidth,l=i?n.desiredHeight:r.height,h=s.desiredWidth,u=s.desiredHeight,{axisRendererViewRect:d,axisTitleRendererViewRect:c}=t(a,l,h,u,r,o);n.layout(d),s.layout(c)},t.layoutAxisPartsLeftStrategy=a,t.layoutAxisPartsRightStrategy=l,t.layoutAxisPartsTopStrategy=h,t.layoutAxisPartsBottomStrategy=u,t.getHorizontalAxisRequiredSize=function(e){return e.axisSize+e.additionalTopSize+e.additionalBottomSize},t.getVerticalAxisRequiredSize=function(e){return e.axisSize+e.additionalLeftSize+e.additionalRightSize},t.updateLeftAndRightChartLayoutState=function(e,t=0,i=0){e.leftOuterAreaSize=Math.max(e.leftOuterAreaSize,t),e.rightOuterAreaSize=Math.max(e.rightOuterAreaSize,i)},t.updateTopAndBottomChartLayoutState=function(e,t=0,i=0){e.topOuterAreaSize=Math.max(e.topOuterAreaSize,t),e.bottomOuterAreaSize=Math.max(e.bottomOuterAreaSize,i)};t.getValueWithCoordinateMode=(e,t,i)=>{switch(i){case s.EInnerAxisPlacementCoordinateMode.Pixel:return t.getDataValue(e);case s.EInnerAxisPlacementCoordinateMode.DataValue:return e;case s.EInnerAxisPlacementCoordinateMode.Relative:return(t.visibleMax-t.visibleMin)*e+t.visibleMin;default:throw new Error(`CoordinateMode ${i} is not supported`)}};t.getCoordinateWithCoordinateMode=(e,t,i)=>{switch(r.Guard.notNull(i,"coordinateMode"),r.Guard.notNull(t,"calculator"),i){case s.EInnerAxisPlacementCoordinateMode.Pixel:return e;case s.EInnerAxisPlacementCoordinateMode.DataValue:return t.getCoordinate(e);case s.EInnerAxisPlacementCoordinateMode.Relative:return e*t.viewportDimension;default:throw new Error(`CoordinateMode ${i} is not supported`)}},t.testLayoutManager={updateAxisLayoutState:o,layoutAxisPartsLeftStrategy:a,layoutAxisPartsRightStrategy:l,layoutAxisPartsTopStrategy:h,layoutAxisPartsBottomStrategy:u}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EBaseType=void 0,function(e){e.Axis="Axis",e.Annotation="Annotation",e.RenderableSeries="RenderableSeries",e.LayoutManager="LayoutManager",e.ThemeProvider="ThemeProvider",e.Chart2DModifier="Chart2DModifier",e.LabelProvider="LabelProvider",e.PointMarker="PointMarker",e.ShaderEffect="ShaderEffect",e.PaletteProvider="PaletteProvider",e.Animation="Animation",e.Loader="Loader",e.MetadataGenerator="MetadataGenerator",e.OptionFunction="OptionFunction",e.OnCreateFunction="OnCreateFunction",e.DataFilter="DataFilter",e.LayoutStrategy="LayoutStrategy",e.DataLabelProvider="DataLabelProvider"}(t.EBaseType||(t.EBaseType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandler=void 0;t.EventHandler=class{constructor(){this.handlers=[]}subscribe(e){this.handlers.includes(e)||this.handlers.push(e)}unsubscribe(e){this.handlers=this.handlers.filter(t=>t!==e)}unsubscribeAll(){this.handlers=[]}raiseEvent(e){this.handlers.slice(0).forEach(t=>t(e))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EChart3DModifierType=t.EChart2DModifierType=void 0,function(e){e.Cursor="Cursor",e.DataPointSelection="DataPointSelection",e.Legend="Legend",e.MouseWheelZoom="MouseWheelZoom",e.PinchZoom="PinchZoom",e.Rollover="Rollover",e.RubberBandXYZoom="RubberBandXYZoom",e.SeriesSelection="SeriesSelection",e.XAxisDrag="XAxisDrag",e.YAxisDrag="YAxisDrag",e.ZoomExtents="ZoomExtents",e.ZoomPan="ZoomPan",e.OverviewRangeSelection="OverviewRangeSelection",e.Custom="Custom"}(t.EChart2DModifierType||(t.EChart2DModifierType={})),function(e){e.MouseWheelZoom="MouseWheelZoom",e.Orbit="Orbit",e.ZoomExtents="ZoomExtents"}(t.EChart3DModifierType||(t.EChart3DModifierType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scaleAxes=t.getActiveAxes=t.testIsOverAxes=t.ChartModifierBase2D=void 0;const r=i(29),n=i(11),s=i(57),o=i(100),a=i(72);class l extends o.ChartModifierBase{constructor(e){var t,i,n,o,a;super(e),this.xyDirection=r.EXyDirection.XyDirection,this.changedPropertiesList=[],this.xAxisIdProperty=s.AxisCore.DEFAULT_AXIS_ID,this.yAxisIdProperty=s.AxisCore.DEFAULT_AXIS_ID,this.typeMap=new Map,this.executeOn=null!==(t=null==e?void 0:e.executeOn)&&void 0!==t?t:this.executeOn,this.xyDirection=null!==(i=null==e?void 0:e.xyDirection)&&void 0!==i?i:this.xyDirection,this.modifierGroup=null!==(n=null==e?void 0:e.modifierGroup)&&void 0!==n?n:this.modifierGroup,this.xAxisIdProperty=null!==(o=null==e?void 0:e.xAxisId)&&void 0!==o?o:this.xAxisIdProperty,this.yAxisIdProperty=null!==(a=null==e?void 0:e.yAxisId)&&void 0!==a?a:this.yAxisIdProperty}get modifierType(){return o.EModifierType.Chart2DModifier}get xAxisId(){return this.xAxisIdProperty}set xAxisId(e){this.xAxisIdProperty=e,this.notifyPropertyChanged(a.PROPERTY.X_AXIS_ID)}get yAxisId(){return this.yAxisIdProperty}set yAxisId(e){this.yAxisIdProperty=e,this.notifyPropertyChanged(a.PROPERTY.Y_AXIS_ID)}getAllSeries(){return this.parentSurface.renderableSeries.asArray()}toJSON(){const e={id:this.id,modifierGroup:this.modifierGroup,executeOn:this.executeOn,xyDirection:this.xyDirection,xAxisId:this.xAxisId,yAxisId:this.yAxisId};return{type:this.type,options:e}}testPropertyChanged(e){return this.changedPropertiesList.includes(e)}notifyPropertyChanged(e){this.changedPropertiesList.includes(e)||this.changedPropertiesList.push(e)}growBy(e,t,i){const{isHorizontalAxis:r,isAxisFlipped:n,viewRect:s,flippedCoordinates:o}=t,{seriesViewRect:a}=this.parentSurface;let l=r?s.width:s.height;t.isStackedAxis&&this.parentSurface&&(l=r?a.width:a.height);const h=r?e.x:e.y,u=h/l*i,d=(1-h/l)*i;n&&!o||!n&&o?t.zoomBy(d,u):t.zoomBy(u,d)}}t.ChartModifierBase2D=l;t.testIsOverAxes=(e,t)=>{let i=!1;return e.forEach(e=>{if(e.viewRect){const{left:r,right:s,top:o,bottom:a}=e.viewRect;(0,n.testIsInBounds)(t.x,t.y,r,a,s,o)&&(i=!0)}}),i};t.getActiveAxes=(e,t)=>{const i=[];return e.forEach(e=>{if(e.viewRect){const{left:r,right:s,top:o,bottom:a}=e.viewRect;(0,n.testIsInBounds)(t.x,t.y,r,a,s,o)&&i.push(e)}}),i};t.scaleAxes=(e,t,i,r)=>{e.forEach((e,n)=>{const s=t[n];e.scale(s,i,r)})}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsNaN=t.toScientific=t.toSuperScript=t.formatNumber=t.numericHashCode=t.formatNumber2Digits=void 0;const r=i(41),n=i(42),s=i(103);t.formatNumber2Digits=e=>(Math.round(100*(e+Number.EPSILON))/100).toFixed(2);t.numericHashCode=(e,t)=>(e=31*e-e+t,e|=0);t.formatNumber=(e,i,s)=>{if(void 0===e)return"";switch(i){case r.ENumericFormat.NoFormat:return e.toString();case r.ENumericFormat.Decimal:return e.toFixed(s);case r.ENumericFormat.SignificantFigures:return Number(e.toPrecision(s)).toString();case r.ENumericFormat.Exponential:return e.toExponential(s);case r.ENumericFormat.Scientific:return(0,t.toScientific)(e,s,10);case r.ENumericFormat.Date_DDMMYYYY:return(0,n.formatUnixDateToHumanString)(e);case r.ENumericFormat.Date_DDMMYY:return(0,n.formatUnixDateToHumanStringDDMMYY)(e);case r.ENumericFormat.Date_DDMMHHMM:return(0,n.formatUnixDateToHumanStringDDMMHHMM)(e);case r.ENumericFormat.Date_DDMM:return(0,n.formatUnixDateToHumanStringDDMM)(e);case r.ENumericFormat.Date_HHMM:return(0,n.formatUnixDateToHumanStringHHMM)(e);case r.ENumericFormat.Date_HHMMSS:return(0,n.formatUnixDateToHumanStringHHMMSS)(e)}};const o=["⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"];t.toSuperScript=e=>{let t="",i=e<0,r=Math.abs(e).toString();for(const e of r){const i=Number.parseInt(e);isNaN(i)||(t+=o[i])}return(i?"⁻":"")+t};t.toScientific=(e,i,r)=>{if(0===e)return"0";let n=(0,s.logToBase)(Math.abs(e),r);n=Math.floor(n);return(e/Math.pow(r,n)).toPrecision(i).toString()+"x"+r.toString()+(0,t.toSuperScript)(n)};t.checkIsNaN=e=>e!=e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64Id=t.generateGuid=void 0;t.generateGuid=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});t.base64Id=(e=22)=>{let t="";for(;t.length<e;){const e=Math.floor(64*Math.random());t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}return t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAnnotationType=t.EAnnotationLayer=void 0,function(e){e.AboveChart="AboveChart",e.BelowChart="BelowChart"}(t.EAnnotationLayer||(t.EAnnotationLayer={})),function(e){e.SVG="SVG",e.RenderContextBoxAnnotation="RenderContextBoxAnnotation",e.RenderContextLineAnnotation="RenderContextLineAnnotation",e.RenderContextHorizontalLineAnnotation="RenderContextHorizontalLineAnnotation",e.RenderContextVerticalLineAnnotation="RenderContextVerticalLineAnnotation",e.RenderContextAxisMarkerAnnotation="RenderContextAxisMarkerAnnotation",e.RenderContextNativeTextAnnotation="RenderContextNativeTextAnnotation",e.SVGTextAnnotation="SVGTextAnnotation",e.SVGCustomAnnotation="SVGCustomAnnotation"}(t.EAnnotationType||(t.EAnnotationType={}))},function(e,t,i){"use strict";var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.animationHelpers=void 0;const n=i(65),s=i(43),o=i(27),a=i(10),l=i(198),h=i(97),u=i(200),d=i(202),c=i(203),p=i(204);t.animationHelpers={checkCanDraw:e=>!e||e.is([n.EAnimationState.Running,n.EAnimationState.Completed]),checkIsAnimationRunning:(e,t)=>e.length>0||!!t&&!t.is([n.EAnimationState.Completed]),animationUpdate:(e,t,i,r,s)=>{const o=e.update(t);[n.EAnimationStateTransition.InitialState_Running,n.EAnimationStateTransition.Delayed_Running].includes(o)&&i(),e.is([n.EAnimationState.Running,n.EAnimationState.Completed])&&s(e.animationProgress,e),o===n.EAnimationStateTransition.Running_Completed&&r()},createPointMarker:(e,t)=>{if(t){if(t.type===s.EPointMarkerType.Sprite){const i=t,{type:n}=i,s=r(i,["type"]);return new u.SpritePointMarker(e,Object.assign({},s))}{const i=t,{type:n}=i,o=r(i,["type"]);switch(n){case s.EPointMarkerType.Cross:return new l.CrossPointMarker(e,Object.assign({},o));case s.EPointMarkerType.Ellipse:return new h.EllipsePointMarker(e,Object.assign({},o));case s.EPointMarkerType.X:return new p.XPointMarker(e,Object.assign({},o));case s.EPointMarkerType.Square:return new d.SquarePointMarker(e,Object.assign({},o));case s.EPointMarkerType.Triangle:return new c.TrianglePointMarker(e,Object.assign({},o))}}}},interpolateNumber:(e,t,i)=>i<0?e:i>1?t:e+(t-e)*i,interpolateColor:(e,t,i)=>i<0?e:i>1?t:(0,o.uintArgbColorLerp)(e,t,i),copyVector:(e,t)=>{const i=e.size();t.resize(i,0);for(let r=0;r<i;r++)t.set(r,e.get(r))},setSplineAnimationVectors:(e,i,r,n,s,o,a,l)=>{if(i.isOnStartAnimation)t.animationHelpers.copyVector(o,r.yFinalAnimationValues);else if(i.isDataSeriesAnimation){t.animationHelpers.copyVector(s,r.xInitialAnimationValues),t.animationHelpers.copyVector(o,r.yInitialAnimationValues);const{dataSeries:n}=i,h=a?n.getNativeIndexes():n.getNativeXValues();e.SCRTSplineHelperCubicSpline(h,n.getNativeYValues(),r.xFinalAnimationValues,r.yFinalAnimationValues,h.size(),l,n.dataDistributionCalculator.containsNaN)}},setSplineBandAnimationVectors:(e,i,r,n,s,o,l,h,u)=>{if(t.animationHelpers.setSplineAnimationVectors(e,i,r,n,s,o,h,u),i.isOnStartAnimation)t.animationHelpers.copyVector(l,r.y1FinalAnimationValues);else if(i.isDataSeriesAnimation){if(n.type!==a.EDataSeriesType.Xyy)throw Error("to animate band chart animation.dataSeries type should be Xyy, but the type is "+n.type);t.animationHelpers.copyVector(l,r.y1InitialAnimationValues);const i=h?n.getNativeIndexes():n.getNativeXValues();e.SCRTSplineHelperCubicSpline(i,n.getNativeY1Values(),r.xFinalAnimationValues,r.y1FinalAnimationValues,i.size(),u,n.dataDistributionCalculator.containsNaN),r.validateAnimationVectors()}},updateSplineAnimationProperties:(e,t,i,r,n,s)=>{t.isOnStartAnimation?t.calculateAnimationValues(e,r.yFinalAnimationValues,s,i):t.isDataSeriesAnimation&&(t.calculateDataSeriesAnimationValues(e,r.xInitialAnimationValues,r.xFinalAnimationValues,n,i),t.calculateDataSeriesAnimationValues(e,r.yInitialAnimationValues,r.yFinalAnimationValues,s,i))},updateSplineBandAnimationProperties:(e,i,r,n,s,o,a)=>{t.animationHelpers.updateSplineAnimationProperties(e,i,r,n,s,o),i.isOnStartAnimation?i.calculateAnimationValues(e,n.y1FinalAnimationValues,a,r):i.isDataSeriesAnimation&&i.calculateDataSeriesAnimationValues(e,n.y1InitialAnimationValues,n.y1FinalAnimationValues,a,r)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitTestInfo=void 0;class r{constructor(e,t=!1){this.isEmpty=t,this.associatedSeries=e}static empty(){return new r(void 0,!0)}}t.HitTestInfo=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stripAutoColor=t.ThemeProvider=t.AUTO_COLOR=void 0;const r=i(2),n=i(169);t.AUTO_COLOR="auto";t.ThemeProvider=class{constructor(){this.strokePalette=[],this.fillPalette=[]}getStrokeColor(e,t,i){return this.getPaletteColor(e,t,i,!0)}getFillColor(e,t,i){return this.getPaletteColor(e,t,i,!1)}applyOverrides(e){this.overrides=e,Object.assign(this,e)}toJSON(){return Object.assign({type:this.type},this.overrides)}getPaletteColor(e,t,i,s){const o=s?this.strokePalette:this.fillPalette;if(!o||0===o.length)throw new Error(`${s?"stroke":"fill"}Palette must not be empty to use get${s?"Stroke":"Fill"}Color`);if(o.length<2)return this.toColor(o[0]);if(e>t)throw new Error("index must be less than or equal to max");if(t<=o.length)return this.toColor(o[e]);let a=s?this.strokeGradient:this.fillGradient;if(!a){const e="string"==typeof o[0]?o.map((e,t)=>({color:e,offset:t/o.length-1})):o;a=n.PaletteFactory.createColorMap(i,e),s?this.strokeGradient=a:this.fillGradient=a}const l=e/t,h=a[i.NumberUtil.Constrain(Math.round(l*(a.length-1)),0,a.length-1)];return(0,r.parseArgbToHtmlColor)(h)}toColor(e){return"string"==typeof e?e:e.color}};t.stripAutoColor=e=>e===t.AUTO_COLOR?"#00000000":e&&e.startsWith(t.AUTO_COLOR)?e.substring(t.AUTO_COLOR.length):e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uintArgbColorIsTransparent=t.uintArgbColorOverrideOpacity=t.uintArgbColorMultiplyOpacity=t.uintArgbColorToAbgr=t.linearColorMapLerp=t.uintArgbColorLerp=t.uintArgbColorLerp24bit=void 0;const r=i(248),n=i(2);function s(e,t,i){const r=256*i,n=256-r;return(16711935&e)*n+(16711935&t)*r>>8&16711935|(4278255360&e)*n+(4278255360&t)*r>>8&4278255360}function o(e,t,i){const r=(65535&e)>>>0,n=(65535&t)>>>0;return(s(e>>>16,t>>>16,i)<<16>>>0)+s(r,n,i)}t.uintArgbColorLerp24bit=s,t.uintArgbColorLerp=o,t.linearColorMapLerp=function(e,t){if(t<e.Minimum)return(0,n.parseColorToUIntArgb)(e.GradientStops[0].color);const i=1/(e.Maximum-e.Minimum),s=(t-e.Minimum)*i,a=e.GradientStops,l=[];let h;for(h=1;h<a.length;h++)l.push(1/(a[h].offset-a[h-1].offset));for(h=0;h<a.length-1;h++){const t=a[h],i=a[h+1];if(s>=t.offset&&s<i.offset){if(e.Mode===r.EColorMapMode.Stepped)return(0,n.parseColorToUIntArgb)(t.color);const a=(s-t.offset)*l[h];return o((0,n.parseColorToUIntArgb)(t.color),(0,n.parseColorToUIntArgb)(i.color),a)}}return(0,n.parseColorToUIntArgb)(e.GradientStops[h].color)},t.uintArgbColorToAbgr=function(e){let t=e-(16777215&e);return t+=(255&e)<<16,t+=(65280&e)>>8<<8,t+=(16711680&e)>>16,t},t.uintArgbColorMultiplyOpacity=function(e,t){let i=e-(16777215&e);return i>>>=24,i*=t,i=Math.floor(i),i*=16777216,i+(16777215&e)},t.uintArgbColorOverrideOpacity=function(e,t){let i=255*t;return i=Math.floor(i),i*=16777216,i+(16777215&e)},t.uintArgbColorIsTransparent=function(e){return 4278190080!==e-(16777215&e)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationBase=t.ECoordinateMode=t.EDraggingGripPoint=void 0;const r=i(14),n=i(18),s=i(1),o=i(5),a=i(17),l=i(29),h=i(22),u=i(9),d=i(57),c=i(4),p=i(6),g=i(250),f=i(251),y=i(46),v=i(23);var m,S;!function(e){e.x1y1="x1y1",e.x2y2="x2y2",e.x2y1="x2y1",e.x1y2="x1y2",e.Body="Body"}(m=t.EDraggingGripPoint||(t.EDraggingGripPoint={})),function(e){e.DataValue="DataValue",e.Pixel="Pixel",e.Relative="Relative"}(S=t.ECoordinateMode||(t.ECoordinateMode={}));t.AnnotationBase=class{constructor(e){var t,i,s,o,u,p,g,f,P,C,A,x,b,T,E,w,R,D,L,M,I,O;this.showWarning=!0,this.prevIsSelected=!0,this.annotationBorders={x1:0,x2:0,y1:0,y2:0},this.typeMap=new Map,this.isHiddenProperty=!1,this.annotationsGripsStrokeProperty=c.SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBorderBrush,this.annotationsGripsFillProperty=c.SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBackroundBrush,this.annotationsGripsRadiusProperty=y.ADORNER_GRIP_RADIUS,this.selectionBoxStrokeProperty=c.SciChartSurfaceBase.DEFAULT_THEME.annotationSelectionStroke,this.selectionBoxDeltaProperty=1.5,this.selectionBoxThicknessProperty=6,this.dragPointsProperty=[m.Body,m.x1y1,m.x2y2,m.x2y1,m.x1y2],this.annotationLayerProperty=v.EAnnotationLayer.AboveChart,this.isEditableProperty=!1,this.xAxisIdProperty=d.AxisCore.DEFAULT_AXIS_ID,this.yAxisIdProperty=d.AxisCore.DEFAULT_AXIS_ID,this.xCoordinateModeProperty=S.DataValue,this.yCoordinateModeProperty=S.DataValue,this.isSelectedProperty=!1,this.resizeDirectionsProperty=l.EXyDirection.XyDirection,this.id=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:(0,h.generateGuid)(),this.dragStarted=new n.EventHandler,this.dragEnded=new n.EventHandler,this.dragDelta=new n.EventHandler,this.selectedChanged=new n.EventHandler,this.clicked=new n.EventHandler,this.annotationLayerProperty=null!==(i=null==e?void 0:e.annotationLayer)&&void 0!==i?i:this.annotationLayerProperty,this.resizeDirectionsProperty=null!==(s=null==e?void 0:e.resizeDirections)&&void 0!==s?s:this.resizeDirectionsProperty,this.isEditableProperty=null!==(o=null==e?void 0:e.isEditable)&&void 0!==o?o:this.isEditableProperty,this.isHiddenProperty=null!==(u=null==e?void 0:e.isHidden)&&void 0!==u?u:this.isHiddenProperty,this.x1Property=null!==(p=null==e?void 0:e.x1)&&void 0!==p?p:this.x1Property,this.y1Property=null!==(g=null==e?void 0:e.y1)&&void 0!==g?g:this.y1Property,this.x2Property=null!==(f=null==e?void 0:e.x2)&&void 0!==f?f:this.x2Property,this.y2Property=null!==(P=null==e?void 0:e.y2)&&void 0!==P?P:this.y2Property,this.xAxisIdProperty=null!==(C=null==e?void 0:e.xAxisId)&&void 0!==C?C:this.xAxisIdProperty,this.yAxisIdProperty=null!==(A=null==e?void 0:e.yAxisId)&&void 0!==A?A:this.yAxisIdProperty,this.xCoordinateModeProperty=null!==(x=null==e?void 0:e.xCoordinateMode)&&void 0!==x?x:this.xCoordinateModeProperty,this.yCoordinateModeProperty=null!==(b=null==e?void 0:e.yCoordinateMode)&&void 0!==b?b:this.yCoordinateModeProperty,this.isSelectedProperty=null!==(T=null==e?void 0:e.isSelected)&&void 0!==T?T:this.isSelectedProperty,this.opacityProperty=null!==(E=null==e?void 0:e.opacity)&&void 0!==E?E:1,this.annotationsGripsStrokeProperty=null!==(w=null==e?void 0:e.annotationsGripsStroke)&&void 0!==w?w:this.annotationsGripsStrokeProperty,this.annotationsGripsFillProperty=null!==(R=null==e?void 0:e.annotationsGripsFill)&&void 0!==R?R:this.annotationsGripsFillProperty,this.annotationsGripsRadiusProperty=null!==(D=null==e?void 0:e.annotationsGripsRadius)&&void 0!==D?D:this.annotationsGripsRadius,this.selectionBoxStroke=null!==(L=null==e?void 0:e.selectionBoxStroke)&&void 0!==L?L:this.selectionBoxStrokeProperty,this.selectionBoxDelta=null!==(M=null==e?void 0:e.selectionBoxDelta)&&void 0!==M?M:this.selectionBoxDeltaProperty,this.selectionBoxThickness=null!==(I=null==e?void 0:e.selectionBoxThickness)&&void 0!==I?I:this.selectionBoxThicknessProperty,this.dragPointsProperty=null!==(O=null==e?void 0:e.dragPoints)&&void 0!==O?O:this.dragPointsProperty,(null==e?void 0:e.onDragStarted)&&("string"==typeof e.onDragStarted?(this.typeMap.set("onDragStarted",e.onDragStarted),this.dragStarted.subscribe((0,r.getFunction)(a.EBaseType.OptionFunction,e.onDragStarted))):this.dragStarted.subscribe(e.onDragStarted)),(null==e?void 0:e.onDragEnded)&&("string"==typeof e.onDragEnded?(this.typeMap.set("onDragEnded",e.onDragEnded),this.dragEnded.subscribe((0,r.getFunction)(a.EBaseType.OptionFunction,e.onDragEnded))):this.dragEnded.subscribe(e.onDragEnded)),(null==e?void 0:e.onDrag)&&("string"==typeof e.onDrag?(this.typeMap.set("onDrag",e.onDrag),this.dragDelta.subscribe((0,r.getFunction)(a.EBaseType.OptionFunction,e.onDrag))):this.dragDelta.subscribe(e.onDrag)),(null==e?void 0:e.onClick)&&("string"==typeof e.onClick?(this.typeMap.set("onClick",e.onClick),this.clicked.subscribe((0,r.getFunction)(a.EBaseType.OptionFunction,e.onClick))):this.clicked.subscribe(e.onClick))}get annotationLayer(){return this.annotationLayerProperty}set annotationLayer(e){this.annotationLayerProperty!==e&&(this.annotationLayerProperty=e,this.notifyPropertyChanged(y.PROPERTY.ANNOTATION_CANVAS))}get parentSurface(){return this.parentSurfaceProperty}set parentSurface(e){this.parentSurfaceProperty!==e&&(this.parentSurfaceProperty=e,this.notifyPropertyChanged(y.PROPERTY.PARENT_SURFACE))}get isEditable(){return this.isEditableProperty}set isEditable(e){this.isEditableProperty!==e&&(this.isEditableProperty=e,this.notifyPropertyChanged(y.PROPERTY.IS_EDITABLE))}get isHidden(){return this.isHiddenProperty}set isHidden(e){this.isHiddenProperty!==e&&(this.isHiddenProperty=e,this.notifyPropertyChanged(y.PROPERTY.IS_HIDDEN))}get xCoordinateMode(){return this.xCoordinateModeProperty}set xCoordinateMode(e){this.xCoordinateModeProperty!==e&&(this.xCoordinateModeProperty=e,this.notifyPropertyChanged(y.PROPERTY.X_COORDINATE_MODE))}get yCoordinateMode(){return this.yCoordinateModeProperty}set yCoordinateMode(e){this.yCoordinateModeProperty!==e&&(this.yCoordinateModeProperty=e,this.notifyPropertyChanged(y.PROPERTY.Y_COORDINATE_MODE))}get x1(){return this.x1Property}set x1(e){this.x1Property!==e&&(this.x1Property=e,this.notifyPropertyChanged(y.PROPERTY.X1))}get x2(){return this.x2Property}set x2(e){this.x2Property!==e&&(this.x2Property=e,this.notifyPropertyChanged(y.PROPERTY.X2))}get y1(){return this.y1Property}set y1(e){this.y1Property!==e&&(this.y1Property=e,this.notifyPropertyChanged(y.PROPERTY.Y1))}get y2(){return this.y2Property}set y2(e){this.y2Property!==e&&(this.y2Property=e,this.notifyPropertyChanged(y.PROPERTY.Y2))}get xAxisId(){return this.xAxisIdProperty}set xAxisId(e){this.xAxisIdProperty!==e&&(this.xAxisIdProperty=e,this.notifyPropertyChanged(y.PROPERTY.XAXIS_ID))}get yAxisId(){return this.yAxisIdProperty}set yAxisId(e){this.yAxisIdProperty!==e&&(this.yAxisIdProperty=e,this.notifyPropertyChanged(y.PROPERTY.YAXIS_ID))}get isVerticalChart(){const e=this.parentSurface.getXAxisById(this.xAxisId);return null==e?void 0:e.isVerticalChart}set resizeDirections(e){this.resizeDirectionsProperty!==e&&(this.resizeDirectionsProperty=e,this.notifyPropertyChanged(y.PROPERTY.RESIZE_DIRECTIONS))}get resizeDirections(){return this.resizeDirectionsProperty}set isSelected(e){this.isSelectedProperty!==e&&(this.isSelectedProperty=e,this.selectedChanged.raiseEvent(this.isSelectedProperty),this.notifyPropertyChanged(y.PROPERTY.IS_SELECTED))}get isSelected(){return this.isSelectedProperty}get annotationsGripsStroke(){return this.annotationsGripsStrokeProperty}set annotationsGripsStroke(e){this.annotationsGripsStrokeProperty!==e&&(this.annotationsGripsStrokeProperty=e,this.notifyPropertyChanged(y.PROPERTY.ADORNER_STROKE))}get annotationsGripsFill(){return this.annotationsGripsFillProperty}set annotationsGripsFill(e){this.annotationsGripsFillProperty!==e&&(this.annotationsGripsFillProperty=e,this.notifyPropertyChanged(y.PROPERTY.ADORNER_FILL))}get annotationsGripsRadius(){return this.annotationsGripsRadiusProperty}set annotationsGripsRadius(e){this.annotationsGripsRadiusProperty!==e&&(this.annotationsGripsRadiusProperty=e,this.notifyPropertyChanged(y.PROPERTY.ADORNER_RADIUS))}get selectionBoxStroke(){return this.selectionBoxStrokeProperty}set selectionBoxStroke(e){this.selectionBoxStrokeProperty!==e&&(this.selectionBoxStrokeProperty=e,this.notifyPropertyChanged(y.PROPERTY.SELECTION_STROKE))}get selectionBoxDelta(){return this.selectionBoxDeltaProperty}set selectionBoxDelta(e){this.selectionBoxDeltaProperty!==e&&(this.selectionBoxDeltaProperty=e,this.notifyPropertyChanged(y.PROPERTY.SELECTION_DELTA))}get selectionBoxThickness(){return this.selectionBoxThicknessProperty}set selectionBoxThickness(e){this.selectionBoxThicknessProperty!==e&&(this.selectionBoxThicknessProperty=e,this.notifyPropertyChanged(y.PROPERTY.SELECTION_DELTA))}get isDraggingStarted(){return!!this.adornerDraggingPoint}get opacity(){return this.opacityProperty}set opacity(e){this.opacityProperty!==e&&(this.opacityProperty=e,this.notifyPropertyChanged(y.PROPERTY.OPACITY))}get svgAdornerRoot(){return this.svgAdornerRootProperty}onAttach(e){this.svgAdornerRootProperty=e.domSvgAdornerLayer}onDetach(){this.isSelected&&(this.isSelected=!1,this.parentSurface.adornerLayer.deselectAnnotation(this)),this.selectedChanged.unsubscribeAll(),this.deleteAdorner()}get dragPoints(){return this.dragPointsProperty}set dragPoints(e){this.dragPointsProperty=e,this.notifyPropertyChanged(y.PROPERTY.DRAGPOINTS)}click(e,t){const i=(0,u.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect,!0);if(!i)return!1;if(this.checkIsClickedOnAnnotationInternal(i.x,i.y)){const i=this.getAdornerAnnotationBorders(!0),r=e.mousePoint.x/p.DpiHelper.PIXEL_RATIO,n=e.mousePoint.y/p.DpiHelper.PIXEL_RATIO,s=new o.Point(r-i.x1,n-i.y1);return this.isSelected=t,this.clicked.raiseEvent(new g.AnnotationClickEventArgs(this,e,s)),this.isSelected}return this.isSelected=!1,this.isSelected}clickToSelect(e){const t=(0,u.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect,!0);return!!t&&(this.isSelected=this.checkIsClickedOnAnnotationInternal(t.x,t.y),this.isSelected)}calcDragDistance(e){}onDragStarted(e){var t;return null===(t=this.dragStarted)||void 0===t||t.raiseEvent(),!1}checkIsClickedOnAnnotation(e,t){const i=(0,u.translateFromCanvasToSeriesViewRect)(new o.Point(e*p.DpiHelper.PIXEL_RATIO,t*p.DpiHelper.PIXEL_RATIO),this.parentSurface.seriesViewRect,!0);return!!i&&this.checkIsClickedOnAnnotationInternal(i.x,i.y)}onDragAdorner(e){const t=this.getValuesFromCoordinates(e.mousePoint,!0);t&&this.calcDragDistance(t),this.dragDelta.raiseEvent(new f.AnnotationDragDeltaEventArgs)}onDragEnded(){var e;null===(e=this.dragEnded)||void 0===e||e.raiseEvent(),this.adornerDraggingPoint=void 0,this.prevValue=void 0}onDpiChanged(e){}suspendInvalidate(){this.invalidateState={isHidden:this.isHidden,x1:this.x1,y1:this.y1}}resumeInvalidate(){this.invalidateState&&(this.isHidden===this.invalidateState.isHidden&&this.x1===this.invalidateState.x1&&this.y1===this.invalidateState.y1||this.invalidateParentCallback&&this.invalidateParentCallback(),this.invalidateState=void 0)}toJSON(){const e={id:this.id,annotationLayer:this.annotationLayer,isEditable:this.isEditable,isHidden:this.isHidden,isSelected:this.isSelected,onDrag:this.typeMap.get("onDrag"),onDragEnded:this.typeMap.get("onDragEnded"),onDragStarted:this.typeMap.get("onDragStarted"),onClick:this.typeMap.get("onClick"),opacity:this.opacity,resizeDirections:this.resizeDirections,x1:this.x1Property,x2:this.x2Property,y1:this.y1Property,y2:this.y2Property,xAxisId:this.xAxisId,yAxisId:this.yAxisId,xCoordinateMode:this.xCoordinateMode,yCoordinateMode:this.yCoordinateMode,annotationsGripsStroke:this.annotationsGripsStroke,annotationsGripsFill:this.annotationsGripsFill,annotationsGripsRadius:this.annotationsGripsRadius,selectionBoxStroke:this.selectionBoxStroke,selectionBoxDelta:this.selectionBoxDelta,selectionBoxThickness:this.selectionBoxThickness,dragPoints:this.dragPointsProperty};return{type:this.type,options:e}}getAnnotationBorders(e=!1,t=!1){if(!e&&!t)return this.annotationBorders;let{x1:i,x2:r,y1:n,y2:s}=this.annotationBorders;const o=t?this.selectionBoxDelta:0;return e?(r<i?[i,r]=[r-o,i+o]:(i-=o,r+=o),s<n?[n,s]=[s-o,n+o]:(n-=o,s+=o)):(r<i?(i+=o,r-=o):(i-=o,r+=o),s<n?(n+=o,s-=o):(n-=o,s+=o)),{x1:i,x2:r,y1:n,y2:s}}getAdornerAnnotationBorders(e=!1,t=!1){const i=this.getAnnotationBorders(e,t),r=this.isSvgAnnotation?i.x1*p.DpiHelper.PIXEL_RATIO:i.x1,n=this.isSvgAnnotation?i.x2*p.DpiHelper.PIXEL_RATIO:i.x2,s=this.isSvgAnnotation?i.y1*p.DpiHelper.PIXEL_RATIO:i.y1,a=this.isSvgAnnotation?i.y2*p.DpiHelper.PIXEL_RATIO:i.y2,l=(0,u.translateFromSeriesViewRectToCanvas)(new o.Point(r,s),this.parentSurface.seriesViewRect,!0),h=(0,u.translateFromSeriesViewRectToCanvas)(new o.Point(n,a),this.parentSurface.seriesViewRect,!0);return{x1:l.x/p.DpiHelper.PIXEL_RATIO,x2:h.x/p.DpiHelper.PIXEL_RATIO,y1:l.y/p.DpiHelper.PIXEL_RATIO,y2:h.y/p.DpiHelper.PIXEL_RATIO}}getAnnotationGripSvg(e,t){return`<circle cx="${e}" cy="${t}" r="${this.annotationsGripsRadius}" fill="${this.annotationsGripsFill}" stroke="${this.annotationsGripsStroke}"/>`}canDragPoint(e){return this.dragPointsProperty.includes(e)}svgStringAdornerTemplate(e,t,i,r){return'<svg xmlns="http://www.w3.org/2000/svg"></svg>'}notifyPropertyChanged(e){this.invalidateParentCallback&&!this.invalidateState&&this.invalidateParentCallback()}getCoordinate(e,t,i){if(s.Guard.notNull(i,"coordinateMode"),s.Guard.notNull(t,"calculator"),void 0!==e)switch(i){case S.Pixel:return this.isSvgAnnotation?e:e*p.DpiHelper.PIXEL_RATIO;case S.DataValue:{const i=null!=e?t.getCoordinate(e):void 0;return this.isSvgAnnotation?i/p.DpiHelper.PIXEL_RATIO:i}case S.Relative:return this.isSvgAnnotation?e*t.viewportDimension/p.DpiHelper.PIXEL_RATIO:e*t.viewportDimension;default:throw new Error(`AnnotationBase.getCoordinate with CoordinateMode.${i} is not implemented`)}}getX1Coordinate(e,t){var i,r;return this.isVerticalChart?this.getCoordinate(null!==(i=this.y1)&&void 0!==i?i:0,t,this.yCoordinateMode):this.getCoordinate(null!==(r=this.x1)&&void 0!==r?r:0,e,this.xCoordinateMode)}getX2Coordinate(e,t){var i,r;return this.isVerticalChart?this.getCoordinate(null!==(i=this.y2)&&void 0!==i?i:0,t,this.yCoordinateMode):this.getCoordinate(null!==(r=this.x2)&&void 0!==r?r:0,e,this.xCoordinateMode)}getY1Coordinate(e,t){var i,r;return this.isVerticalChart?this.getCoordinate(null!==(i=this.x1)&&void 0!==i?i:0,e,this.xCoordinateMode):this.getCoordinate(null!==(r=this.y1)&&void 0!==r?r:0,t,this.yCoordinateMode)}getY2Coordinate(e,t){var i,r;return this.isVerticalChart?this.getCoordinate(null!==(i=this.x2)&&void 0!==i?i:0,e,this.xCoordinateMode):this.getCoordinate(null!==(r=this.y2)&&void 0!==r?r:0,t,this.yCoordinateMode)}getValue(e,t,i){switch(i){case S.Pixel:return this.isSvgAnnotation?t.getDataValue(e*p.DpiHelper.PIXEL_RATIO):t.getDataValue(e);case S.DataValue:return e;case S.Relative:return(t.visibleMax-t.visibleMin)*e+t.visibleMin;default:throw new Error("Not implemented")}}checkIsClickedOnAnnotationInternal(e,t){return!1}deleteAdorner(){this.svgAdorner&&this.parentSurface&&!this.parentSurface.isDeleted&&(this.svgAdornerRoot.removeChild(this.svgAdorner),this.svgAdorner=void 0)}getValuesFromCoordinates(e,t){const i=this.parentSurface.seriesViewRect,r=t?(0,u.translateFromCanvasToSeriesViewRect)(e,i,!0):e;if(!r)return;const n=this.parentSurface.getXAxisById(this.xAxisId),s=n.getCurrentCoordinateCalculator(),a=this.parentSurface.getYAxisById(this.yAxisId),l=a.getCurrentCoordinateCalculator(),h=this.convertFromCoordinate(n.isHorizontalAxis?r.x:r.y,s,this.xCoordinateMode),d=this.convertFromCoordinate(a.isHorizontalAxis?r.x:r.y,l,this.yCoordinateMode);return new o.Point(h,d)}getXYCoordinatesFromValues(e){const t=this.parentSurface.seriesViewRect,i=this.getAbsoluteCoordinates(e),r=(0,u.translateFromSeriesViewRectToCanvas)(i,t,!0);if(r)return new o.Point(r.x,r.y)}convertFromCoordinate(e,t,i){switch(i){case S.Pixel:return e/p.DpiHelper.PIXEL_RATIO;case S.DataValue:return null!=e?t.getDataValue(e):void 0;case S.Relative:return e/t.viewportDimension;default:throw new Error("Not implemented")}}getAbsoluteCoordinates(e){const t=this.parentSurface.getXAxisById(this.xAxisId).getCurrentCoordinateCalculator(),i=this.parentSurface.getYAxisById(this.yAxisId).getCurrentCoordinateCalculator(),r=this.getCoordinate(e.x,t,this.xCoordinateMode),n=this.getCoordinate(e.y,i,this.yCoordinateMode);return this.isVerticalChart?new o.Point(n,r):new o.Point(r,n)}getAbsoluteHorizontalCoordinate(e){const t=this.parentSurface.getXAxisById(this.xAxisId).getCurrentCoordinateCalculator(),i=this.parentSurface.getYAxisById(this.yAxisId).getCurrentCoordinateCalculator();return this.isVerticalChart?this.getCoordinate(e,i,this.yCoordinateMode):this.getCoordinate(e,t,this.xCoordinateMode)}getAbsoluteVerticalCoordinate(e){const t=this.parentSurface.getXAxisById(this.xAxisId).getCurrentCoordinateCalculator(),i=this.parentSurface.getYAxisById(this.yAxisId).getCurrentCoordinateCalculator();return this.isVerticalChart?this.getCoordinate(e,t,this.xCoordinateMode):this.getCoordinate(e,i,this.yCoordinateMode)}setAnnotationBorders(e,t,i,r){this.annotationBorders={x1:e,x2:t,y1:i,y2:r}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXyDirection=void 0,function(e){e.XDirection="XDirection",e.YDirection="YDirection",e.XyDirection="XyDirection"}(t.EXyDirection||(t.EXyDirection={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGlRenderContext2D=t.ELineDrawMode=t.calculateAbsoluteRenderLayer=void 0;const r=i(13),n=i(1),s=(i(2),i(86)),o=i(12);i(173),i(134);var a;t.calculateAbsoluteRenderLayer=(e,t,i)=>e+i*t,function(e){e[e.PolyLine=0]="PolyLine",e[e.DiscontinuousLine=1]="DiscontinuousLine"}(a=t.ELineDrawMode||(t.ELineDrawMode={}));class l{constructor(e,t,i){this.layers={},this.effects=[],this.webAssemblyContext=e,this.viewportSize=t,this.canvasId=i}getNativeContext(){return this.nativeContext||(this.nativeContext=this.webAssemblyContext.SCRTGetMainRenderContext2D()),this.nativeContext}drawLinesNative(e,t,i,r=0,n=0){const s=i===a.PolyLine,o=this.getNativeContext();o.PushMatrix(),o.Translate(r,n),o.DrawLinesBatchVec(s,e,t),o.PopMatrix()}drawRects(e,t,i=0,r=0){const n=(0,o.getVector4)(this.webAssemblyContext,0,0,0,0),s=this.getNativeContext();s.PushMatrix(),s.Translate(i,r),s.DrawRectsBatchVec(e,t,n),s.PopMatrix()}enqueueLayeredDraw(e,t){this.layers[t]||(this.layers[t]=[]),this.layers[t].push(e)}drawLayers(){Object.values(this.layers).forEach(e=>{e.forEach(e=>e())})}pushShaderEffect(e){e&&(this.effects.push(e),r.IS_TEST_ENV||this.getNativeContext().AddSeriesEffect(e.getNativeEffect()))}popShaderEffect(){const e=this.effects.pop();e&&!r.IS_TEST_ENV&&this.getNativeContext().RemoveSeriesEffect(e.getNativeEffect())}createPen(e,t,i=[],r=!0){throw new Error("Use Pen2DCache for creating pens instead!")}createSolidBrush(e,t){throw new Error("Use BrushCache for creating brushes instead!")}delete(){}drawLine(e,t,i,r,s,a){if(!(e||t||i||r))return;n.Guard.notNull(s,"pen"),n.Guard.isTrue("WasmPen"===s.getPenType(),"pen must be an instance of WasmPen to be used with the WasmRenderContext");const l=s.scrtPen;n.Guard.notNull(l,"WasmPen.scrtPen");const h=this.getNativeContext(),u=(0,o.getVectorColorVertex)(this.webAssemblyContext),d=(0,o.getVertex)(this.webAssemblyContext,e,t);u.push_back(d);const c=(0,o.getVertex)(this.webAssemblyContext,i,r);u.push_back(c),h.PushMatrix(),h.PushState(),h.Translate(a.x,a.y),h.SetClipRect(a.x,a.y,a.width,a.height),h.DrawLinesBatchVec(!1,u,l),h.PopMatrix(),h.PopState()}drawLines(e,t,i,r=a.PolyLine){n.Guard.notNull(t,"pen"),n.Guard.notNull(e,"xyValues"),n.Guard.isTrue("WasmPen"===t.getPenType(),"pen must be an instance of WasmPen to be used with the WasmRenderContext"),n.Guard.isTrue(e.length>0&&e.length%2==0,"xyValues length must be a multiple of 2, values arranged as x0y0 x1y1 x2y2...");const s=t.scrtPen;n.Guard.notNull(s,"WebGlPen.scrtPen");const l=r===a.PolyLine,h=this.getNativeContext(),u=(0,o.getVectorColorVertex)(this.webAssemblyContext);for(let t=0;t<e.length;t+=2){const i=(0,o.getVertex)(this.webAssemblyContext,e[t],e[t+1]);i.m_vPosition.z=0,u.push_back(i)}h.PushMatrix(),h.PushState(),h.Translate(i.x,i.y),h.SetClipRect(i.x,i.y,i.width,i.height),h.DrawLinesBatchVec(l,u,s),h.PopMatrix(),h.PopState()}drawRect(e,t,i,r){if(r){const i=this.getNativeContext(),a=r.scrtBrush;n.Guard.notNull(a,"WebGlBrush.scrtBrush");const l=(0,o.getVectorRectVertex)(this.webAssemblyContext),h=(0,o.getVector4)(this.webAssemblyContext,0,0,0,0),u=(0,s.createNativeRect)(this.webAssemblyContext,e.x,e.y,e.right,e.bottom);l.push_back(u),i.PushMatrix(),i.PushState(),i.Translate(t.x,t.y),i.SetClipRect(t.x,t.y,t.width,t.height),i.DrawRectsBatchVec(l,a,h),i.PopMatrix(),i.PopState()}i&&this.drawLines([e.right,e.top,e.right,e.bottom,e.left,e.bottom,e.left,e.top,e.right,e.top],i,t,a.PolyLine)}printBlendMode(){switch(this.getNativeContext().GetBlendMode()){case this.webAssemblyContext.eSCRTBlendMode.BlendDefault:console.log("BlendDefault");break;case this.webAssemblyContext.eSCRTBlendMode.BlendAdditiveOneAlpha:console.log("BlendAdditiveOneAlpha");break;case this.webAssemblyContext.eSCRTBlendMode.BlendAdditiveColor:console.log("BlendAdditiveColor");break;case this.webAssemblyContext.eSCRTBlendMode.BlendAdditiveAlpha:console.log("BlendAdditiveAlpha");break;case this.webAssemblyContext.eSCRTBlendMode.BlendDisabled:console.log("BlendDisabled");break;default:throw new Error("Unhandled blendmode ")}}getFont(e,t=!1,i=!1){const r=(0,o.getFontKey)(this.webAssemblyContext,e,t,i),n=this.getNativeContext().AquireFont(r);if(!n)throw new Error("Could not create font "+r.m_strName);n.m_isDrawing||n.Begin();const s=n.GetFaceName();return"SCRT_Loading"===s?setTimeout(()=>{var e;return this.webAssemblyContext.TSRRequestCanvasDraw(null!==(e=this.canvasId)&&void 0!==e?e:"undefinedCanvasId")},100):s!==r.m_strName&&(r.warned||(console.warn(`Font ${r.m_strName} could not be found on the server and has not been registered. Falling back to Arial.\n Use await scichartSurface.registerFont if you need to load the font from a remote url`),r.warned=!0)),n}endFonts(e=!1){const t=this.getNativeContext(),i=(0,o.getAllFontKeys)(this.webAssemblyContext);for(const e of i){const i=t.AquireFont(e);i&&i.m_isDrawing&&i.End()}}}t.WebGlRenderContext2D=l,l.webGlResourcesRefs=new Set},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseHitTestProvider=void 0;const r=i(1),n=i(5),s=i(9),o=i(32),a=i(25);class l{constructor(e,t){r.Guard.notNull(e,"parentSeries"),this.parentSeries=e,this.webAssemblyContext=t}update(e){this.currentRenderPassData=e}hitTestDataPoint(e,t,i=l.DEFAULT_HIT_TEST_RADIUS){const r=this.getTranslatedHitTestPoint(e,t);if(!r)return a.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:s,isVerticalChart:h}=this.currentRenderPassData,u=h?r.y:r.x,d=h?r.x:r.y,c=this.parentSeries.dataSeries;if(!c)return a.HitTestInfo.empty();const p=o.hitTestHelpers.getNearestXyPoint(n,s,c,u,d),g=c.getNativeXValues(),f=c.getNativeYValues(),y=o.hitTestHelpers.createHitTestInfo(this.parentSeries,n,s,h,c,g,f,u,d,p,i);return y.isHit=p>=0&&o.hitTestHelpers.testIsHitForPoint(n,s,g,f,p,u,d,i),y}hitTestForDataPointSelectionModifier(e,t,i=l.DEFAULT_HIT_TEST_RADIUS){return this.hitTestDataPoint(e,t,i)}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return a.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:n,isVerticalChart:s}=this.currentRenderPassData,l=s?i.y:i.x,h=s?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return a.HitTestInfo.empty();const d=o.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),p=u.getNativeYValues(),g=o.hitTestHelpers.createHitTestInfo(this.parentSeries,r,n,s,u,c,p,l,h,d,0);if(g.isHit=g.isWithinDataBounds,u.dataDistributionCalculator.isSortedAscending&&d>=0){const e=c.size(),t=c.get(d),i=r.getDataValue(l);if(!(d===e-1&&i>=t||0===d&&i<=t)){const e=o.hitTestHelpers.testIsHitForLine(r,n,c,p,d,l,h,0);g.point2dataSeriesIndex=e.secondPointIndex,g.point2xValue=c.get(e.secondPointIndex),g.point2xCoord=r.getCoordinate(g.point2xValue),g.point2yValue=p.get(e.secondPointIndex),g.point2yCoord=n.getCoordinate(g.point2yValue)}}return g}getTranslatedHitTestPoint(e,t){if(this.currentRenderPassData&&void 0!==e&&void 0!==t)return(0,s.translateFromCanvasToSeriesViewRect)(new n.Point(e,t),this.parentSeries.parentSurface.seriesViewRect)}}t.BaseHitTestProvider=l,l.DEFAULT_HIT_TEST_RADIUS=7.07},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hitTestHelpers=void 0;const r=i(5),n=i(117),s=i(11),o=i(25),a=(e,t,i,r,n)=>i+(n-i)*(e-t)/(r-t);t.hitTestHelpers={createHitTestInfo:(e,t,i,n,a,l,h,u,d,c,p)=>{const g=t.isCategoryCoordinateCalculator,f=new o.HitTestInfo(e);f.dataSeriesName=a.dataSeriesName,f.dataSeriesType=a.type,f.hitTestPoint=new r.Point(u,d);const y=t.getDataValue(u),v=i.getDataValue(d);if(f.hitTestPointValues=new r.Point(y,v),f.dataSeriesIndex=c,f.hitTestRadius=p,f.isCategoryAxis=g,c>=0){const e=g?c:l.get(c),r=h.get(c);f.xCoord=t.getCoordinate(e),f.yCoord=i.getCoordinate(r),f.xValue=e,g&&(f.xCategoryValue=l.get(c)),f.yValue=r;let n=g?0:l.get(0),o=g?l.size()-1:l.get(l.size()-1);if(!a.dataDistributionCalculator.isSortedAscending)for(let e=0;e<a.count();e++)l.get(e)<n&&(n=l.get(e)),l.get(e)>o&&(o=l.get(e));f.isWithinDataBounds=(0,s.testIsInInterval)(y,n,o),f.metadata=a.getMetadataAt(c)}else f.isWithinDataBounds=!1;return f.isHit=void 0,f},getNearestXPoint:(e,t,i,r,n)=>{const s=t.getDataValue(r),o=t.isCategoryCoordinateCalculator?i.getNativeIndexes():i.getNativeXValues();if(n)return e.NumberUtil.FindIndex(o,s,e.SCRTFindIndexSearchMode.Nearest,n);const a=i.count();let l=-1,h=Number.MAX_VALUE;for(let e=0;e<a;e++){const t=o.get(e),i=Math.abs(s-t);i<h&&(l=e,h=i)}return l},getNearestXyPoint:(e,t,i,r,n)=>{const o=i.count();let a=-1,l=Number.MAX_VALUE;const h=e.isCategoryCoordinateCalculator;for(let u=0;u<o;u++){const o=h?u:i.getNativeXValues().get(u),d=i.getNativeYValues().get(u),c=e.getCoordinate(o),p=t.getCoordinate(d),g=(0,s.calcDistance)(r,n,c,p);g<l&&(a=u,l=g)}return a},getNearestXyyPoint:(e,t,i,r,n)=>{const o=i.count();let a=-1,l=Number.MAX_VALUE;const h=e.isCategoryCoordinateCalculator;for(let u=0;u<o;u++){const o=h?u:i.getNativeXValues().get(u),d=i.getNativeYValues().get(u),c=i.getNativeY1Values().get(u),p=e.getCoordinate(o),g=t.getCoordinate(d),f=t.getCoordinate(c),y=(0,s.calcDistance)(r,n,p,g),v=(0,s.calcDistance)(r,n,p,f);y<l&&(a=u,l=y),v<l&&(a=u,l=v)}return a},getNearestUniformHeatmapPoint:(e,t,i,r,n)=>{const s=e.getDataValue(r),o=t.getDataValue(n),a=Math.floor((s-i.xStart)/i.xStep),l=Math.floor((o-i.yStart)/i.yStep);if(a<0||a>=i.arrayWidth||l<0||l>=i.arrayHeight)return{xIndex:-1,yIndex:-1,zValue:void 0};return{xIndex:a,yIndex:l,zValue:i.getZValue(l,a)}},getNearestNonUniformHeatmapPoint:(e,t,i,r,n)=>{const s=e.getDataValue(r),o=t.getDataValue(n),{xCellOffsets:a,yCellOffsets:l}=i;let h=-1;if(s>=a[0]&&s<=a[a.length-1])for(let e=0;e<a.length;e++){if(s>=a[e]&&s<=a[e+1]){h=e;break}}let u=-1;if(o>=l[0]&&o<=l[l.length-1])for(let e=0;e<l.length-1;e++){if(o>=l[e]&&o<=l[e+1]){u=e;break}}if(h<0||h>=i.arrayWidth||u<0||u>=i.arrayHeight)return{xIndex:-1,yIndex:-1,zValue:void 0};return{xIndex:h,yIndex:u,zValue:i.getZValue(u,h)}},testIsHitForPoint:(e,t,i,r,n,o,a,l)=>{const h=e.isCategoryCoordinateCalculator?n:i.get(n),u=r.get(n),d=e.getCoordinate(h),c=t.getCoordinate(u);return(0,s.calcDistance)(o,a,d,c)<l},testIsHitForLine:(e,t,i,r,n,o,a,l)=>{let h,u,d,c,p,g;const f=e.isCategoryCoordinateCalculator,y=f?n:i.get(n),v=r.get(n);y<=e.getDataValue(o)?(d=y,p=v,c=f?n+1:i.get(n+1),g=r.get(n+1),u=n+1):(d=f?n-1:i.get(n-1),p=r.get(n-1),u=n-1,c=y,g=v);const m=e.getCoordinate(d),S=e.getCoordinate(c),P=t.getCoordinate(p),C=t.getCoordinate(g),A=(0,s.calcDistance)(m,P,S,C),x=(0,s.calcDistance)(m,P,o,a),b=(0,s.calcDistance)(S,C,o,a);return h=!(x>A+l||b>A+l)&&(0,s.calcDistanceFromLine)(o,a,m,P,S,C)<l,{isHit:h,secondPointIndex:u}},testIsHitForBand:(e,t,i,r,n,s,o,l,h)=>{let u;const d=t.getDataValue(l),c=t.isCategoryCoordinateCalculator,p=c?o:r.get(o),g=p<=d,f=g?o+1:o-1;if(f<0||f>=r.size())return{isHit:!1,secondPointIndex:void 0};const y=c?f:r.get(f),v=g?p:y,m=n(g?o:f),S=s(g?o:f),P=g?y:p,C=n(g?f:o),A=s(g?f:o),x=t.getCoordinate(v),b=t.getCoordinate(P),T=i.getCoordinate(m),E=i.getCoordinate(C),w=i.getCoordinate(S),R=i.getCoordinate(A);if(e)u=T<w?h>=T&&h<=w:h>=w&&h<=T;else{const e=a(l,x,T,b,E),t=a(l,x,w,b,R);u=e<t?h>=e&&h<=t:h>=t&&h<=e}return{isHit:u,secondPointIndex:f}},testIsHitForColumn:(e,t,i,r,n,o,a,l)=>{const{getDataPointWidth:h,dataPointWidth:u,zeroLineY:d}=i,c=e.isCategoryCoordinateCalculator?o:r.get(o),p=n.get(o),g=e.getCoordinate(c),f=t.getCoordinate(p),y=h(e,u),v=t.getCoordinate(d),m=y/2,S=v>f?v:f,P=v>f?f:v;return(0,s.testIsInBounds)(a,l,g-m,S,g+m,P)},testIsHitForOHLC:(e,t,i,r,n,o,a,l)=>{const{getDataPointWidth:h,dataPointWidth:u}=i,d=e.isCategoryCoordinateCalculator?n:r.getNativeXValues().get(n),c=e.getCoordinate(d),p=r.getNativeOpenValues().get(n),g=t.getCoordinate(p),f=r.getNativeHighValues().get(n),y=t.getCoordinate(f),v=r.getNativeLowValues().get(n),m=t.getCoordinate(v),S=r.getNativeCloseValues().get(n),P=t.getCoordinate(S),C=h(e,u)/2,A=P>g?P:g,x=P>g?g:P,b=(0,s.testIsInBounds)(o,a,c-C,A,c+C,x),T=(0,s.calcDistanceFromLineSegment)(o,a,c,y,c,m);return{isHit:b||T<l,openValue:p,highValue:f,lowValue:v,closeValue:S}},testIsHitForMountain:(e,t,i,r,n,s,o,l)=>{let h;const u=r.getNativeXValues(),d=t.isCategoryCoordinateCalculator,c=d?s:u.get(s),p=r.getNativeYValues(),g=c<=t.getDataValue(o),f=g?s+1:s-1;if(f<0||f>=r.count())return{isHit:!1,secondPointIndex:void 0};const y=d?f:u.get(f),v=g?c:y,m=g?p.get(s):p.get(f),S=g?y:c,P=g?p.get(f):p.get(s),C=t.getCoordinate(v),A=t.getCoordinate(S),x=i.getCoordinate(m),b=i.getCoordinate(P),T=i.getCoordinate(n);if(e)h=x<T?l>=x&&l<=T:l>=T&&l<=x;else{const e=a(o,C,x,A,b);h=e<T?l>=e&&l<=T:l>=T&&l<=e}return{isHit:h,secondPointIndex:f}},testIsHitForErrorBars:(e,t,i,r,o,a,l,h)=>{const{getDataPointWidth:u,dataPointWidth:d,errorDirection:c}=i,p=e.isCategoryCoordinateCalculator,g=c===n.EErrorDirection.Vertical,f=p?a:r.get(a),y=o.get(a);let v=i.dataSeries.getNativeHighValues().get(a),m=i.dataSeries.getNativeLowValues().get(a);isNaN(v)&&(v=y),isNaN(m)&&(m=y);const S=e.getCoordinate(f),P=t.getCoordinate(y),C=g?t.getCoordinate(v):e.getCoordinate(v),A=g?t.getCoordinate(m):e.getCoordinate(m),x=u(g?e:t,d)/2;let b=!1;const T=C>A?C:A,E=C>A?A:C;return b=g?(0,s.testIsInBounds)(l,h,S-x,T,S+x,E):(0,s.testIsInBounds)(l,h,E,P+x,T,P-x),{isHit:b,highValue:v,lowValue:m}},testIsHitForImpulse:(e,t,i,r,n,o,a,l,h)=>{const{zeroLineY:u}=i,d=e.isCategoryCoordinateCalculator?o:r.get(o),c=n.get(o),p=e.getCoordinate(d),g=t.getCoordinate(c),f=t.getCoordinate(u),y=f>g?f:g,v=f>g?g:f;return(0,s.testIsInBounds)(a,l,p,y,p,v,h)}}},function(e,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.handleInvalidAxisAlignment=t.getIsVertical=t.getIsHorizontal=t.EAxisAlignment=void 0,function(e){e.Right="Right",e.Left="Left",e.Top="Top",e.Bottom="Bottom"}(r=t.EAxisAlignment||(t.EAxisAlignment={}));t.getIsHorizontal=e=>!![r.Bottom,r.Top].includes(e)||![r.Right,r.Left].includes(e)&&void 0;t.getIsVertical=e=>!1===(0,t.getIsHorizontal)(e)||!0!==(0,t.getIsHorizontal)(e)&&void 0;t.handleInvalidAxisAlignment=e=>{throw new Error(`Invalid Axis Alignment value: "${e}"!`)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.annotationHelpers=void 0;t.annotationHelpers={createSvg:(e,t)=>{const i=document.createRange().createContextualFragment(e);return t.appendChild(i),t.lastChild},calcNewApex:(e,t,i,r,n)=>({x1y1:{x:e,y:t},x2y1:n?{x:e,y:r}:{x:i,y:t},x1y2:n?{x:i,y:t}:{x:e,y:r},x2y2:{x:i,y:r}})}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPenInCache=t.getScrtPenFromCache=t.getWebGlPenFromCache=t.Pen2DCache=void 0;const r=i(0),n=i(1),s=i(45),o=i(2),a=i(254),l=i(6),h=i(132),u=i(134);class d extends h.BaseCache{get value(){if(!this.cachedEntity&&this.stroke){const{stroke:e,strokeThickness:t,strokeDashArray:i,antiAliased:r,opacity:n}=this;this.cachedEntity=this.create({stroke:e,strokeThickness:t,strokeDashArray:i,antiAliased:r,opacity:n})}return this.cachedEntity}create(e){const{stroke:t,strokeThickness:i=1,strokeDashArray:n,antiAliased:h=!0,opacity:d=1}=e,{strokeThickness:c,strokeDashArray:p}=l.DpiHelper.adjustStrokeSize({strokeThickness:i,strokeDashArray:n});if(this.cachedEntity&&t===this.stroke&&c===this.adjustedStrokeThickness&&h===this.antiAliased&&(0,s.areArraysEqual)(p,this.adjustedStrokeDashArray))return d!==this.opacity&&(this.opacity=d,this.cachedEntity.setOpacity(d)),this.strokeThickness=i,this.strokeDashArray=n,this.cachedEntity;(0,r.deleteSafe)(this.cachedEntity),this.stroke=t,this.opacity=d,this.antiAliased=h,this.strokeThickness=i,this.adjustedStrokeThickness=c,this.strokeDashArray=n,this.adjustedStrokeDashArray=p;const g=(0,a.createSCRTPen)(this.webAssemblyContext,t,c,d,p,h);return this.cachedEntity=new u.WebGlPen(g,(0,o.parseColorToUIntArgb)(t))}}t.Pen2DCache=d;t.getWebGlPenFromCache=e=>(n.Guard.notNull(e,"penCache"),e.value);t.getScrtPenFromCache=e=>{const i=(0,t.getWebGlPenFromCache)(e);return null==i?void 0:i.scrtPen};t.createPenInCache=(e,t,i,r,s)=>{n.Guard.notNull(e,"penCache");return e.create({stroke:t,strokeThickness:i,opacity:r,strokeDashArray:s}).scrtPen}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.chartBuilder=t.ensureRegistrations=t.configureChart=t.buildChart=t.chartReviver=void 0;const n=i(3),s=i(52),o=i(176),a=i(167),l=i(177),h=i(210),u=i(217),d=i(157),c=i(166),p=i(14);function g(e,t){switch(e){case"visibleRange":case"visibleRangeLimit":case"growBy":return new n.NumberRange(t.min,t.max);case"padding":const e=t;return new s.Thickness(e.top,e.right,e.bottom,e.left);default:return null===t?NaN:t}}t.chartReviver=g;t.buildChart=(e,t)=>r(void 0,void 0,void 0,(function*(){if("string"==typeof t&&(t=JSON.parse(t,g)),t||(t={}),"type"in t){if(t.type===o.ESciChartSurfaceType.Default2D)return yield(0,c.build2DChart)(e,t.options);if(t.type===o.ESciChartSurfaceType.Pie2D)return yield(0,c.buildPieChart)(e,t.options);throw new Error(`Surface type: ${t.type} is not yet supported by the builder api`)}return yield(0,c.build2DChart)(e,t)}));t.configureChart=(e,t,i)=>{if("string"==typeof i&&(i=JSON.parse(i,g)),i||(i={}),"type"in i){if(i.type===o.ESciChartSurfaceType.Default2D)(0,c.configure2DSurface)(i.options,e,t);else if(i.type!==o.ESciChartSurfaceType.Pie2D)throw new Error(`Surface type: ${i.type} is not yet supported by the builder api`)}else(0,c.configure2DSurface)(i,e,t)};t.ensureRegistrations=()=>{},t.chartBuilder={buildChart:t.buildChart,chartReviver:g,build2DChart:c.build2DChart,buildPieChart:c.buildPieChart,configureChart:t.configureChart,buildSeries:d.buildSeries,buildDataSeries:h.buildDataSeries,buildModifiers:u.buildModifiers,buildAxes:l.buildAxes,buildAnnotations:a.buildAnnotations,registerType:p.registerType,registerWasmType:p.registerWasmType,registerFunction:p.registerFunction}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ELayoutStrategyType=void 0,function(e){e.LeftOuter="LeftOuter",e.RightOuter="RightOuter",e.TopOuter="TopOuter",e.BottomOuter="BottomOuter",e.LeftInner="LeftInner",e.RightInner="RightInner",e.TopInner="TopInner",e.BottomInner="BottomInner",e.LeftStacked="LeftStacked",e.RightStacked="RightStacked",e.TopStacked="TopStacked",e.BottomStacked="BottomStacked",e.Custom="Custom"}(t.ELayoutStrategyType||(t.ELayoutStrategyType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAnimationType=void 0,function(e){e.Fade="Fade",e.Scale="Scale",e.Sweep="Sweep",e.Wave="Wave",e.Style="Style",e.Custom="Custom"}(t.EAnimationType||(t.EAnimationType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoReverseEasing=t.easing=void 0,t.easing={linear:e=>e,quadratic:e=>e*(-e*e*e+4*e*e-6*e+4),cubic:e=>e*(4*e*e-9*e+6),elastic:e=>e*(33*e*e*e*e-106*e*e*e+126*e*e-67*e+15),inQuad:e=>e*e,outQuad:e=>e*(2-e),inOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,inCubic:e=>e*e*e,outCubic:e=>--e*e*e+1,inOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,inQuart:e=>e*e*e*e,outQuart:e=>1- --e*e*e*e,inOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,inQuint:e=>e*e*e*e*e,outQuint:e=>1+--e*e*e*e*e,inOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,inSine:e=>1-Math.cos(e*(Math.PI/2)),outSine:e=>Math.sin(e*(Math.PI/2)),inOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,inExpo:e=>Math.pow(2,10*(e-1)),outExpo:e=>1===e?1:1-Math.pow(2,-10*e),inOutExpo:e=>(e/=.5)<1?Math.pow(2,10*(e-1))/2:(e--,(2-Math.pow(2,-10*e))/2),inCirc:e=>1-Math.sqrt(1-e*e),outCirc:e=>Math.sqrt(1-(e-=1)*e),inOutCirc:e=>(e/=.5)<1?-(Math.sqrt(1-e*e)-1)/2:(e-=2,(Math.sqrt(1-e*e)+1)/2)},t.autoReverseEasing={linear:e=>e<.5?2*e:2-2*e}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDelta=t.getDataPointWidth=t.BaseRenderableSeries=void 0;const r=i(14),n=i(65),s=i(0),o=i(18),a=i(38),l=i(17),h=i(101),u=i(43),d=i(8),c=i(22),p=i(30),g=i(301),f=i(302),y=i(303),v=i(304),m=i(305),S=i(10),P=i(73),C=i(306),A=i(148),x=i(307),b=i(114),T=i(26),E=i(57),w=i(105),R=i(4),D=i(6),L=i(24),M=i(7),I=i(205),O=i(309),k=i(310),V=i(311),_=i(44);t.BaseRenderableSeries=class{constructor(e,t){var i,n,s,d,g,f,y,v,m,S,C,A,T,w,D,L;if(this.rolloverModifierProps=new I.RolloverModifierRenderableSeriesProps(this),this.rolloverModifierProps1=new I.RolloverModifierRenderableSeriesProps(this,!0),this.selected=new o.EventHandler,this.hovered=new o.EventHandler,this.isVisibleChanged=new o.EventHandler,this.animationQueue=[],this.paletteProviderProperty=P.DefaultPaletteProvider.createEmpty(),this.typeMap=new Map,this.opacityProperty=1,this.drawingProvidersProperty=[],this.xAxisIdProperty=E.AxisCore.DEFAULT_AXIS_ID,this.yAxisIdProperty=E.AxisCore.DEFAULT_AXIS_ID,this.strokeThicknessProperty=2,this.strokeProperty=R.SciChartSurfaceBase.DEFAULT_THEME.lineSeriesColor,this.drawNaNAsProperty=p.ELineDrawMode.DiscontinuousLine,this.isVisibleProperty=!0,this.isDigitalLineProperty=!1,this.resamplingModeProperty=b.EResamplingMode.Auto,this.resamplingPrecisionProperty=0,this.isStacked=!1,this.webAssemblyContext=e,this.id=null!==(i=null==t?void 0:t.id)&&void 0!==i?i:(0,c.generateGuid)(),this.dataSeriesDataChanged=this.dataSeriesDataChanged.bind(this),this.effectPropertyChanged=this.effectPropertyChanged.bind(this),this.invalidateParent=this.invalidateParent.bind(this),this.getDataPointWidth=this.getDataPointWidth.bind(this),this.updateAnimationProperties=this.updateAnimationProperties.bind(this),this.beforeAnimationStart=this.beforeAnimationStart.bind(this),this.afterAnimationComplete=this.afterAnimationComplete.bind(this),this.dataSeries=null!==(n=null==t?void 0:t.dataSeries)&&void 0!==n?n:this.dataSeriesProperty,(null==t?void 0:t.pointMarker)&&("drawSprite"in t.pointMarker||(t.pointMarker.type===u.EPointMarkerType.Custom?t.pointMarker=(0,r.createType)(l.EBaseType.PointMarker,t.pointMarker.customType,e,t.pointMarker.options):t.pointMarker=(0,r.createType)(l.EBaseType.PointMarker,t.pointMarker.type,e,t.pointMarker.options))),this.pointMarkerProperty=null!==(s=null==t?void 0:t.pointMarker)&&void 0!==s?s:this.pointMarkerProperty,this.strokeProperty=null!==(d=null==t?void 0:t.stroke)&&void 0!==d?d:this.strokeProperty,this.strokeThicknessProperty=null!==(g=null==t?void 0:t.strokeThickness)&&void 0!==g?g:this.strokeThicknessProperty,this.opacityProperty=null!==(f=null==t?void 0:t.opacity)&&void 0!==f?f:this.opacityProperty,this.xAxisIdProperty=null!==(y=null==t?void 0:t.xAxisId)&&void 0!==y?y:this.xAxisIdProperty,this.yAxisIdProperty=null!==(v=null==t?void 0:t.yAxisId)&&void 0!==v?v:this.yAxisIdProperty,this.isVisibleProperty=null!==(m=null==t?void 0:t.isVisible)&&void 0!==m?m:this.isVisibleProperty,this.isDigitalLineProperty=null!==(S=null==t?void 0:t.isDigitalLine)&&void 0!==S?S:this.isDigitalLineProperty,this.resamplingModeProperty=null!==(C=null==t?void 0:t.resamplingMode)&&void 0!==C?C:this.resamplingModeProperty,this.resamplingPrecisionProperty=null!==(A=null==t?void 0:t.resamplingPrecision)&&void 0!==A?A:this.resamplingPrecisionProperty,(null==t?void 0:t.effect)&&("getNativeEffect"in t.effect||(t.effect=(0,r.createType)(l.EBaseType.ShaderEffect,t.effect.type,e,t.effect.options))),this.effectProperty=null==t?void 0:t.effect,(null==t?void 0:t.paletteProvider)&&("onAttached"in t.paletteProvider||(t.paletteProvider.type===h.EPaletteProviderType.Custom?t.paletteProvider=(0,r.createType)(l.EBaseType.PaletteProvider,t.paletteProvider.customType,e,t.paletteProvider.options):t.paletteProvider=(0,r.createType)(l.EBaseType.PaletteProvider,t.paletteProvider.type,e,t.paletteProvider.options))),this.paletteProviderProperty=null!==(T=null==t?void 0:t.paletteProvider)&&void 0!==T?T:this.paletteProviderProperty,this.drawNaNAsProperty=null!==(w=null==t?void 0:t.drawNaNAs)&&void 0!==w?w:this.drawNaNAsProperty,this.hitTestProvider=this.newHitTestProvider(),this.isSelected=null!==(D=null==t?void 0:t.isSelected)&&void 0!==D&&D,this.isHovered=null!==(L=null==t?void 0:t.isHovered)&&void 0!==L&&L,null==t?void 0:t.onIsVisibleChanged)if("string"==typeof t.onIsVisibleChanged){this.typeMap.set("onIsVisibleChanged",t.onIsVisibleChanged);const e=(0,r.getFunction)(l.EBaseType.OptionFunction,t.onIsVisibleChanged);this.isVisibleChanged.subscribe(t=>e(t.sourceSeries,t.isVisible))}else{const e=null==t?void 0:t.onIsVisibleChanged;this.isVisibleChanged.subscribe(t=>e(t.sourceSeries,t.isVisible))}if(null==t?void 0:t.onSelectedChanged)if("string"==typeof t.onSelectedChanged){this.typeMap.set("onSelectedChanged",t.onSelectedChanged);const e=(0,r.getFunction)(l.EBaseType.OptionFunction,t.onSelectedChanged);this.selected.subscribe(t=>e(t.sourceSeries,t.isSelected))}else{const e=null==t?void 0:t.onSelectedChanged;this.selected.subscribe(t=>e(t.sourceSeries,t.isSelected))}if(null==t?void 0:t.onHoveredChanged)if("string"==typeof t.onHoveredChanged){this.typeMap.set("onHoveredChanged",t.onHoveredChanged);const e=(0,r.getFunction)(l.EBaseType.OptionFunction,t.onHoveredChanged);this.hovered.subscribe(t=>e(t.sourceSeries,t.hovered))}else{const e=null==t?void 0:t.onHoveredChanged;this.hovered.subscribe(t=>e(t.sourceSeries,t.hovered))}(null==t?void 0:t.animation)&&("toJSON"in t.animation||(t.animation.type===a.EAnimationType.Custom?t.animation=(0,r.createType)(l.EBaseType.Animation,t.animation.customType,e,t.animation.options):t.animation=(0,r.createType)(l.EBaseType.Animation,t.animation.type,e,t.animation.options))),this.onDpiChanged=this.onDpiChanged.bind(this),this.resamplerHelper=new x.ExtremeResamplerHelper(e),(null==t?void 0:t.dataLabelProvider)&&("draw"in t.dataLabelProvider||(t.dataLabelProvider.type===_.EDataLabelProviderType.Custom?t.dataLabelProvider=(0,r.createType)(l.EBaseType.DataLabelProvider,t.dataLabelProvider.customType,e,t.dataLabelProvider.options):t.dataLabelProvider=(0,r.createType)(l.EBaseType.DataLabelProvider,t.dataLabelProvider.type,e,t.dataLabelProvider.options))),this.dataLabelProviderProperty=null==t?void 0:t.dataLabelProvider,this.dataLabelProviderProperty&&this.dataLabelProviderProperty.onAttach(e,this)}applyTheme(e){const t=this.parentSurface.previousThemeProvider;this.rolloverModifierProps.tooltipTextColor===t.textAnnotationForeground&&(this.rolloverModifierProps.tooltipTextColor=e.textAnnotationForeground),this.rolloverModifierProps.tooltipColor===t.textAnnotationBackground&&(this.rolloverModifierProps.tooltipColor=e.textAnnotationBackground),this.rolloverModifierProps.markerColor===t.textAnnotationBackground&&(this.rolloverModifierProps.markerColor=e.textAnnotationBackground)}get parentSurface(){return this.parentSurfaceProperty}set parentSurface(e){this.parentSurfaceProperty=e,this.notifyPropertyChanged(M.PROPERTY.PARENT_SURFACE)}get drawingProviders(){return this.drawingProvidersProperty}set drawingProviders(e){this.drawingProvidersProperty=e,this.notifyPropertyChanged(M.PROPERTY.DRAWING_PROVIDERS)}get isSelected(){return this.isSelectedProperty}set isSelected(e){var t;this.valueChanged(this.isSelectedProperty,e)&&(this.isSelectedProperty=e,null===(t=this.selected)||void 0===t||t.raiseEvent(new k.SeriesSelectedArgs(this,e)),this.notifyPropertyChanged(M.PROPERTY.IS_SELECTED))}get isHovered(){return this.isHoveredProperty}set isHovered(e){var t;this.valueChanged(this.isHoveredProperty,e)&&(this.isHoveredProperty=e,null===(t=this.hovered)||void 0===t||t.raiseEvent(new O.SeriesHoveredArgs(this,e)),this.notifyPropertyChanged(M.PROPERTY.HOVERED))}get paletteProvider(){return this.paletteProviderProperty}set paletteProvider(e){this.setPaletteProvider(e)}get isDigitalLine(){return this.isDigitalLineProperty}set isDigitalLine(e){this.isDigitalLineProperty=e,this.notifyPropertyChanged(M.PROPERTY.IS_DIGITAL_LINE)}get isVisible(){return this.isVisibleProperty}set isVisible(e){var t;this.valueChanged(this.isVisibleProperty,e)&&(this.isVisibleProperty=e,e||(this.rolloverModifierProps.marker&&this.rolloverModifierProps.tooltip&&(this.rolloverModifierProps.marker.suspendInvalidate(),this.rolloverModifierProps.tooltip.suspendInvalidate(),this.rolloverModifierProps.marker.isHidden=!0,this.rolloverModifierProps.tooltip.isHidden=!0,this.rolloverModifierProps.tooltip.x1=void 0,this.rolloverModifierProps.tooltip.y1=void 0),this.type===d.ESeriesType.BandSeries&&this.rolloverModifierProps1.marker&&this.rolloverModifierProps1.tooltip&&(this.rolloverModifierProps1.marker.suspendInvalidate(),this.rolloverModifierProps1.tooltip.suspendInvalidate(),this.rolloverModifierProps1.marker.isHidden=!0,this.rolloverModifierProps1.tooltip.isHidden=!0,this.rolloverModifierProps1.tooltip.x1=void 0,this.rolloverModifierProps1.tooltip.y1=void 0)),null===(t=this.isVisibleChanged)||void 0===t||t.raiseEvent(new V.SeriesVisibleChangedArgs(this,e)),this.notifyPropertyChanged(M.PROPERTY.IS_VISIBLE))}get pointMarker(){return this.pointMarkerProperty}set pointMarker(e){this.pointMarkerProperty&&(this.pointMarkerProperty.invalidateParentCallback=void 0),this.pointMarkerProperty=e,this.notifyPropertyChanged(M.PROPERTY.POINT_MARKER),this.pointMarkerProperty&&(this.pointMarkerProperty.invalidateParentCallback=this.invalidateParent)}get drawNaNAs(){return this.drawNaNAsProperty}set drawNaNAs(e){this.drawNaNAsProperty=e,this.notifyPropertyChanged(M.PROPERTY.DRAW_NAN_AS)}get stroke(){return(0,T.stripAutoColor)(this.strokeProperty)}set stroke(e){this.strokeProperty!==e&&(this.strokeProperty=e,this.notifyPropertyChanged(M.PROPERTY.STROKE))}get strokeThickness(){return this.strokeThicknessProperty}set strokeThickness(e){this.strokeThicknessProperty!==e&&(this.strokeThicknessProperty=e,this.notifyPropertyChanged(M.PROPERTY.STROKE_THICKNESS))}get opacity(){return this.opacityProperty}set opacity(e){this.opacityProperty!==e&&(this.opacityProperty=e,this.notifyPropertyChanged(M.PROPERTY.OPACITY))}get xAxisId(){return this.xAxisIdProperty}set xAxisId(e){this.xAxisIdProperty=e,this.notifyPropertyChanged(M.PROPERTY.XAXIS_ID)}get xAxis(){return this.parentSurface.xAxes.asArray().find(e=>e.id===this.xAxisId)}get yAxis(){return this.parentSurface.yAxes.asArray().find(e=>e.id===this.yAxisId)}get yAxisId(){return this.yAxisIdProperty}set yAxisId(e){this.yAxisIdProperty=e,this.notifyPropertyChanged(M.PROPERTY.YAXIS_ID)}get dataSeries(){return this.dataSeriesProperty}set dataSeries(e){var t,i,r;if(this.dataSeriesProperty){const e=null===(t=this.parentSurface)||void 0===t?void 0:t.getXAxisById(this.xAxisId);e&&e.isCategoryAxis&&e.clearCoordCalcCache()}null===(i=this.dataSeriesProperty)||void 0===i||i.dataChanged.unsubscribe(this.dataSeriesDataChanged),this.dataSeriesProperty=e,null===(r=this.dataSeriesProperty)||void 0===r||r.dataChanged.subscribe(this.dataSeriesDataChanged),this.notifyPropertyChanged(M.PROPERTY.DATA_SERIES)}get enableDrawingOptimisations(){return this.resamplingModeProperty!==b.EResamplingMode.None}get effect(){return this.effectProperty}set effect(e){var t,i;null===(t=this.effectProperty)||void 0===t||t.propertyChanged.unsubscribe(this.effectPropertyChanged),this.effectProperty=e,null===(i=this.effectProperty)||void 0===i||i.propertyChanged.subscribe(this.effectPropertyChanged),this.notifyPropertyChanged(M.PROPERTY.EFFECT)}get resamplingMode(){return this.resamplingModeProperty}set resamplingMode(e){this.resamplingModeProperty=e,this.notifyPropertyChanged(M.PROPERTY.RESAMPLING_MODE)}get resamplingPrecision(){return this.resamplingPrecisionProperty}set resamplingPrecision(e){this.resamplingPrecisionProperty=e,this.notifyPropertyChanged(M.PROPERTY.RESAMPLING_PRECISION)}get isSpline(){return[d.ESeriesType.SplineBandSeries,d.ESeriesType.SplineLineSeries,d.ESeriesType.SplineMountainSeries].includes(this.type)}draw(e,t){var i;if(this.currentRenderPassData=t,null===(i=this.hitTestProvider)||void 0===i||i.update(t),this.canDraw){try{e.pushShaderEffect(this.effect),this.drawingProviders.forEach(i=>i.draw(e,t))}finally{e.popShaderEffect()}this.dataLabelProvider&&this.dataLabelProvider.generateDataLabels(e,t)}}delete(){var e;this.drawingProviders.forEach(e=>e.delete()),this.drawingProviders=[],this.dataSeries=(0,s.deleteSafe)(this.dataSeries),this.effect=(0,s.deleteSafe)(this.effect),null===(e=this.pointMarker)||void 0===e||e.delete(),this.resamplerHelper=(0,s.deleteSafe)(this.resamplerHelper),this.pointSeries=(0,s.deleteSafe)(this.pointSeries)}getXRange(){return this.dataSeries.getXRange(S.EDataSeriesValueType.Default)}getYRange(e,t=!1){const i=this.isRunningDataAnimation?S.EDataSeriesValueType.FinalAnimationValues:S.EDataSeriesValueType.Default;return this.dataSeries.getWindowedYRange(e,!0,t,i)}notifyPropertyChanged(e){this.drawingProviders.forEach(t=>t.onSeriesPropertyChange(e)),this.invalidateParent()}getDataPointWidth(e,i){const r=this.dataSeries.getNativeXValues(),n=e.viewportDimension,s=e.isCategoryCoordinateCalculator;return(0,t.getDataPointWidth)(r,e,n,i,s,this.webAssemblyContext)}onDetach(){this.invalidateParentCallback=void 0,this.parentSurface=void 0,this.drawingProviders.forEach(e=>e.onDetachSeries()),this.rolloverModifierProps.setInvalidateParentCallback(void 0)}onAttach(e){if(this.parentSurface=e,this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=e.invalidateElement,this.drawingProviders.forEach(e=>e.onAttachSeries()),this.rolloverModifierProps.setInvalidateParentCallback(e.invalidateElement)}hasStrokePaletteProvider(){const e=this.paletteProvider;return void 0!==(null==e?void 0:e.overrideStrokeArgb)}hasFillPaletteProvider(){const e=this.paletteProvider;return void 0!==(null==e?void 0:e.overrideFillArgb)}hasPointMarkerPaletteProvider(){const e=this.paletteProvider;return void 0!==(null==e?void 0:e.overridePointMarkerArgb)}hasDataSeriesValues(){var e;return null===(e=this.dataSeries)||void 0===e?void 0:e.hasValues}hasDataSeries(){return!!this.dataSeries}getDataSeriesValuesCount(){return this.dataSeries.count()}getDataSeriesName(){var e;return null===(e=this.dataSeries)||void 0===e?void 0:e.dataSeriesName}getNativeXValues(){return this.dataSeries.getNativeXValues()}getNativeYValues(){return this.dataSeries.getNativeYValues()}checkIsOutOfDataRange(e,t){const i=this.getDataSeriesValuesCount(),r=this.xAxis.getCurrentCoordinateCalculator().isCategoryCoordinateCalculator,n=r?0:this.getNativeXValues().get(0),s=r?i-1:this.getNativeXValues().get(i-1);return e<n||e>s}pushPalettedColors(e,t){t.palettedColors.push_back(e)}getSeriesInfo(e){switch(e.dataSeriesType){case S.EDataSeriesType.Ohlc:return new y.OhlcSeriesInfo(this,e);case S.EDataSeriesType.Xyy:return new m.XyySeriesInfo(this,e);case S.EDataSeriesType.HeatmapUniform:return new g.HeatmapSeriesInfo(this,e);case S.EDataSeriesType.Hlc:return new f.HlcSeriesInfo(this,e);default:return new v.XySeriesInfo(this,e)}}onDpiChanged(e){var t,i;null===(t=this.drawingProviders)||void 0===t||t.forEach(t=>{t.onDpiChanged(e)}),null===(i=this.pointMarker)||void 0===i||i.onDpiChanged(e)}toJSON(e=!1){var t,i,r,n,s,o,a,l,h,u,d;let c;if(this.paletteProvider){if(!("toJSON"in this.paletteProvider))throw new Error("Series contains a palletProvider. This must implement toJSON to be correctly serialized");c=this.paletteProvider.toJSON()}const p={id:this.id,drawNaNAs:this.drawNaNAs,effect:null===(t=this.effect)||void 0===t?void 0:t.toJSON(),isDigitalLine:this.isDigitalLine,isHovered:this.isHovered,isSelected:this.isSelected,isVisible:this.isVisible,opacity:this.opacity,paletteProvider:c,pointMarker:null===(i=this.pointMarker)||void 0===i?void 0:i.toJSON(),stroke:this.stroke,strokeThickness:this.strokeThickness,xAxisId:this.xAxisId,yAxisId:this.yAxisId,animation:this.animation,resamplingMode:this.resamplingMode,resamplingPrecision:this.resamplingPrecision,dataLabelProvider:null===(r=this.dataLabelProvider)||void 0===r?void 0:r.toJSON()};return(null===(n=this.dataSeries)||void 0===n?void 0:n.type)===S.EDataSeriesType.Xy?{type:this.type,options:p,xyData:this.dataSeries.toJSON(e)}:(null===(s=this.dataSeries)||void 0===s?void 0:s.type)===S.EDataSeriesType.Xyy?{type:this.type,options:p,xyyData:this.dataSeries.toJSON(e)}:(null===(o=this.dataSeries)||void 0===o?void 0:o.type)===S.EDataSeriesType.Xyz?{type:this.type,options:p,xyzData:this.dataSeries.toJSON(e)}:(null===(a=this.dataSeries)||void 0===a?void 0:a.type)===S.EDataSeriesType.Ohlc?{type:this.type,options:p,ohlcData:this.dataSeries.toJSON(e)}:(null===(l=this.dataSeries)||void 0===l?void 0:l.type)===S.EDataSeriesType.Hlc?{type:this.type,options:p,hlcData:this.dataSeries.toJSON(e)}:(null===(h=this.dataSeries)||void 0===h?void 0:h.type)===S.EDataSeriesType.XyText?{type:this.type,options:p,xyTextData:this.dataSeries.toJSON(e)}:(null===(u=this.dataSeries)||void 0===u?void 0:u.type)===S.EDataSeriesType.HeatmapUniform||(null===(d=this.dataSeries)||void 0===d?void 0:d.type)===S.EDataSeriesType.HeatmapNonUniform?{type:this.type,options:p,heatmapData:this.dataSeries.toJSON(e)}:{type:this.type,options:p}}enqueueAnimation(e){this.animationQueue.push(e),this.invalidateParent()}runAnimation(e){var t;this.animationQueue=[],null===(t=this.animationFSM)||void 0===t||t.toCompleted(),this.enqueueAnimation(e)}set animation(e){e&&this.animationQueue.push(e),this.invalidateParent()}get isRunningAnimation(){return L.animationHelpers.checkIsAnimationRunning(this.animationQueue,this.animationFSM)}get isRunningDataAnimation(){return this.isRunningAnimation&&this.animationFSM&&(this.animationFSM.animation.isDataSeriesAnimation||this.animationFSM.animation.isOnStartAnimation)}onAnimate(e){var t;if(!this.animationFSM||(null===(t=this.animationFSM)||void 0===t?void 0:t.is([n.EAnimationState.Completed])))if(this.animationQueue.length>=1){const e=this.animationQueue.shift();this.animationFSM=new n.SeriesAnimationFiniteStateMachine(e,this)}else this.animationFSM=void 0;this.animationFSM&&L.animationHelpers.animationUpdate(this.animationFSM,e,this.beforeAnimationStart,this.afterAnimationComplete,this.updateAnimationProperties)}toPointSeries(e){return e?(this.pointSeries?this.pointSeries.xRange=e.xVisibleRange:this.pointSeries=new C.XyPointSeriesResampled(this.webAssemblyContext,e.xVisibleRange),this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,e,this.dataSeries.getNativeXValues(),this.dataSeries.getNativeYValues(),this.pointSeries.intIndexes,this.pointSeries.xValues,this.pointSeries.yValues,!1),this.pointSeries.updateIndexes(),this.pointSeries.clearIntIndexes(),this.pointSeries):new A.XyPointSeriesWrapped(this.dataSeries)}getIndicesRange(e,t=!1){var i;return null===(i=this.dataSeries)||void 0===i?void 0:i.getIndicesRange(e,t)}getCurrentRenderPassData(){return this.currentRenderPassData}get supportsResampling(){return![d.ESeriesType.UniformContoursSeries,d.ESeriesType.UniformHeatmapSeries,d.ESeriesType.NonUniformHeatmapSeries,d.ESeriesType.ScatterSeries,d.ESeriesType.ErrorBarsSeries].includes(this.type)&&w.SciChartDefaults.enableResampling&&this.enableDrawingOptimisations&&!this.isStacked&&this.dataSeries&&this.dataSeries.count()>0&&this.dataSeries.dataDistributionCalculator.isSortedAscending}needsResampling(e){return this.resamplerHelper.needsResampling(e,this.getNativeXValues())}get dataLabelProvider(){return this.dataLabelProviderProperty}set dataLabelProvider(e){this.dataLabelProviderProperty=e,e.onAttach(this.webAssemblyContext,this),this.notifyPropertyChanged(M.PROPERTY.SERIES_TEXT_PROVIDER)}resolveAutoColors(e,t,i){if(this.strokeProperty.startsWith(T.AUTO_COLOR)){const i=this.parentSurface.themeProvider.getStrokeColor(e,t,this.webAssemblyContext);this.stroke=T.AUTO_COLOR+this.adjustAutoColor("stroke",i)}this.pointMarker&&this.pointMarker.resolveAutoColors(e,t,i),this.dataLabelProvider&&this.dataLabelProvider.resolveAutoColors(e,t,i)}adjustAutoColor(e,t){return t}setAnimationVectors(e){const t=this.dataSeries;e.isOnStartAnimation?t.setFinalAnimationVectors(t):e.isDataSeriesAnimation&&(t.setInitialAnimationVectors(t),t.setFinalAnimationVectors(e.dataSeries),t.validateAnimationVectors())}beforeAnimationStart(){var e;const{animation:t}=this.animationFSM;this.setAnimationVectors(t);const i=null===(e=null==t?void 0:t.styles)||void 0===e?void 0:e.pointMarker;i&&(this.pointMarker=L.animationHelpers.createPointMarker(this.webAssemblyContext,i))}afterAnimationComplete(){if(this.dataSeries){const e=this.dataSeries;e.setInitialAnimationVectors(void 0),e.setFinalAnimationVectors(void 0)}}updateAnimationProperties(e,t){const{animation:i}=t;i.updateSeriesProperties(this,t.initialStyles,t.animationProgress);const r=this.dataSeries;r&&(r.updateAnimationProperties(e,i),this.currentRenderPassData=void 0),this.invalidateParentCallback&&this.invalidateParentCallback()}dataSeriesDataChanged(){this.invalidateParent()}valueChanged(e,t){return e!==t}setPaletteProvider(e){var t,i;(null===(t=this.paletteProviderProperty)||void 0===t?void 0:t.onDetached)&&this.paletteProviderProperty.onDetached(),this.paletteProviderProperty=e,(null===(i=this.paletteProviderProperty)||void 0===i?void 0:i.onAttached)&&this.paletteProviderProperty.onAttached(this),this.notifyPropertyChanged(M.PROPERTY.PALETTE_PROVIDER)}invalidateParent(){this.invalidateParentCallback&&this.invalidateParentCallback()}effectPropertyChanged(){this.invalidateParent()}get canDraw(){return L.animationHelpers.checkCanDraw(this.animationFSM)}};t.getDataPointWidth=(e,t,i,r,n,o)=>{if(r<0||r>1)throw new Error("WidthFraction should be between 0.0 and 1.0 inclusive");const a=e.size();let l=i;const h=a;if(h>1){let i=Number.MIN_VALUE,r=Number.MAX_VALUE;if(n)i=t.getCoordinate(a-1),r=t.getCoordinate(0);else{let n;try{n=o.NumberUtil.MinMax(e),r=n.minD,i=n.maxD}finally{(0,s.deleteSafe)(n)}i=t.getCoordinate(i),r=t.getCoordinate(r)}l=Math.abs(i-r)/(h-1)}else 1===h&&(l=Math.min(l,2*t.getCoordinate(e.get(0))));let u=Math.floor(l*r);return u%2!=0&&(u-=1),u<=1&&(u=1),u};t.getDelta=({pointSize:e,areaSize:t,range:i})=>{if(0===t)return 0;const r=t/(t-e*D.DpiHelper.PIXEL_RATIO);return Math.abs(i.diff)*(r-1)/2}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ENumericFormat=void 0,function(e){e.NoFormat="NoFormat",e.Decimal="Decimal",e.SignificantFigures="SignificantFigures",e.Date_DDMMYYYY="Date_DDMMYYYY",e.Date_DDMMYY="Date_DDMMYY",e.Date_DDMMHHMM="Date_DDMMHHMM",e.Date_DDMM="Date_DDMM",e.Date_HHMM="Date_HHMM",e.Date_HHMMSS="Date_HHMMSS",e.Exponential="Exponential",e.Scientific="Scientific"}(t.ENumericFormat||(t.ENumericFormat={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnixDateToHumanStringYYYY=t.formatUnixDateToHumanStringDD=t.formatUnixDateToHumanStringMMM=t.formatUnixDateToHumanStringMMMDD=t.formatUnixDateToHumanStringHHMM=t.formatUnixDateToHumanStringHHMMSS=t.formatUnixDateToHumanStringDDMM=t.formatUnixDateToHumanStringDDMMHHMM=t.formatUnixDateToHumanStringDDMMYY=t.formatUnixDateToHumanString=void 0;t.formatUnixDateToHumanString=(e,t="en-US")=>{const i=new Date(1e3*e).toLocaleDateString(t,{month:"numeric",year:"numeric",day:"numeric"});return"Invalid Date"===i?"":i};t.formatUnixDateToHumanStringDDMMYY=e=>{const t=new Date(1e3*e).toLocaleDateString("en-GB",{year:"2-digit",month:"2-digit",day:"2-digit"});return"Invalid Date"===t?"":t};t.formatUnixDateToHumanStringDDMMHHMM=e=>`${(0,t.formatUnixDateToHumanStringDDMM)(e)} ${(0,t.formatUnixDateToHumanStringHHMM)(e)}`;t.formatUnixDateToHumanStringDDMM=e=>{const t=new Date(1e3*e).toLocaleDateString("en-GB",{day:"numeric",month:"numeric"});return"Invalid Date"===t?"":t};t.formatUnixDateToHumanStringHHMMSS=e=>{const t=new Date(1e3*e),i=t.getUTCHours(),r=t.getUTCMinutes(),n=t.getUTCSeconds();if(isNaN(i)||isNaN(r)||isNaN(n))return"";return`${i<=9?"0"+i:i.toString(10)}:${r<=9?"0"+r:r.toString(10)}:${n<=9?"0"+n:n.toString(10)}`};t.formatUnixDateToHumanStringHHMM=e=>{const t=new Date(1e3*e),i=t.getUTCHours(),r=t.getUTCMinutes();if(isNaN(i)||isNaN(r))return"";return`${i<=9?"0"+i:i.toString(10)}:${r<=9?"0"+r:r.toString(10)}`};t.formatUnixDateToHumanStringMMMDD=e=>{const t=new Date(1e3*e),i=t.getUTCMonth(),n=t.getUTCDate();return isNaN(i)||isNaN(n)?"":`${r(i)} ${n}`};t.formatUnixDateToHumanStringMMM=e=>{const t=new Date(1e3*e).getUTCMonth();return isNaN(t)?"":r(t)};t.formatUnixDateToHumanStringDD=e=>{const t=new Date(1e3*e).getUTCDate();if(isNaN(t))return"";const i=t.toString();return 2===i.length?i:1===i.length?"0"+i:""};t.formatUnixDateToHumanStringYYYY=e=>{const t=new Date(1e3*e).getUTCFullYear();return isNaN(t)?"":t.toString(10)};const r=e=>{switch(e){case 0:return"Jan";case 1:return"Feb";case 2:return"Mar";case 3:return"Apr";case 4:return"May";case 5:return"Jun";case 6:return"Jul";case 7:return"Aug";case 8:return"Sep";case 9:return"Oct";case 10:return"Nov";case 11:return"Dec";default:throw Error("Not correct month")}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EPointMarkerType=void 0,function(e){e.Ellipse="Ellipse",e.Cross="Cross",e.Sprite="Sprite",e.Square="Square",e.Triangle="Triangle",e.X="X",e.Custom="Custom"}(t.EPointMarkerType||(t.EPointMarkerType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDataLabelProviderType=void 0,function(e){e.Default="Default",e.Line="Line",e.Column="Column",e.Text="Text",e.Heatmap="Heatmap",e.Band="Band",e.Bubble="Bubble",e.NonUniformHeatmap="NonUniformHeatmap",e.Contours="Contours",e.Custom="Custom"}(t.EDataLabelProviderType||(t.EDataLabelProviderType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeIncArray=t.isArraySorted=t.arrayRemove=t.areArraysEqual=t.countUnique=t.getUniqueValues=void 0,t.getUniqueValues=function(e){return e.filter((e,t,i)=>null!=e&&i.indexOf(e)===t)},t.countUnique=function(e){return new Set(e).size};t.areArraysEqual=(e,t)=>{if(e===t)return!0;if((null==e?void 0:e.length)!==(null==t?void 0:t.length))return!1;if(e&&t)for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0},t.arrayRemove=function(e,t){for(let i=0;i<e.length;i++)if(e[i]===t){e.splice(i,1);break}return e},t.isArraySorted=function(e,t=!0){let i=!0;const r=t?t=>e[t]>e[t+1]:t=>e[t]<e[t+1];for(let t=0;t<e.length-1;t++)if(r(t)){i=!1;break}return i},t.makeIncArray=function(e,t,i){const r=Array.from(Array(e)).map((e,i)=>(null!=t?t:1)*i);return i?r.map(i):r}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DISTANCE_TO_LINE=t.ADORNER_GRIP_RADIUS=t.PROPERTY=void 0,function(e){e.ADORNER_TEMPLATE="ADORNER_TEMPLATE",e.ANNOTATION_CANVAS="ANNOTATION_CANVAS",e.RESIZE_DIRECTIONS="RESIZE_DIRECTIONS",e.AXIS_LABELS_FILL="AXIS_LABELS_FILL",e.AXIS_LABELS_STROKE="AXIS_LABELS_STROKE",e.AXIS_FONT_FAMILY="AXIS_FONT_FAMILY",e.AXIS_FONT_SIZE="AXIS_FONT_SIZE",e.BACKGROUND_COLOR="BACKGROUND_COLOR",e.COLOR="COLOR",e.CONTAINER_BACKGROUND="CONTAINER_BACKGROUND",e.FILL="FILL",e.FONT_FAMILY="FONT_FAMILY",e.FONT_SIZE="FONT_SIZE",e.FONT_STYLE="FONT_STYLE",e.FONT_WEIGHT="FONT_WEIGHT",e.FORMATTED_VALUE="FORMATTED_VALUE",e.HORIZONTAL_ANCHOR_POINT="HORIZONTAL_ANCHOR_POINT",e.IMAGE="IMAGE",e.IMAGE_HEIGHT="IMAGE_HEIGHT",e.IMAGE_WIDTH="IMAGE_WIDTH",e.IS_EDITABLE="IS_EDITABLE",e.IS_HIDDEN="IS_HIDDEN",e.IS_SELECTED="IS_SELECTED",e.LABEL_PLACEMENT="LABEL_PLACEMENT",e.LABEL_VALUE="LABEL_VALUE",e.MINIMUM_WIDTH="MINIMUM_WIDTH",e.MINIMUM_HEIGHT="MINIMUM_HEIGHT",e.OPACITY="OPACITY",e.PADDING="PADDING",e.PARENT_SURFACE="PARENT_SURFACE",e.SERIES_INFO="SERIES_INFO",e.SERIES_INFOS="SERIES_INFOS",e.STROKE="STROKE",e.STROKE_THICKNESS="STROKE_THICKNESS",e.STROKE_DASH_ARRAY="STROKE_DASH_ARRAY",e.SHOW_LABEL="SHOW_LABEL",e.TEXT="TEXT",e.TEXT_STROKE="TEXT_STROKE",e.TITLE="TITLE",e.TOOLTIP_LEGEND_OFFSET_X="TOOLTIP_LEGEND_OFFSET_X",e.TOOLTIP_LEGEND_OFFSET_Y="TOOLTIP_LEGEND_OFFSET_Y",e.TOOLTIP_LEGEND_TEMPLATE="TOOLTIP_LEGEND_TEMPLATE",e.TOOLTIP_SVG_TEMPLATE="TOOLTIP_SVG_TEMPLATE",e.VERTICAL_ANCHOR_POINT="VERTICAL_ANCHOR_POINT",e.X1="X1",e.X2="X2",e.XAXIS_ID="XAXIS_ID",e.X_COORDINATE_MODE="X_COORDINATE_MODE",e.X_COORD_SHIFT="X_COORD_SHIFT",e.Y1="Y1",e.Y2="Y2",e.YAXIS_ID="YAXIS_ID",e.Y_COORDINATE_MODE="Y_COORDINATE_MODE",e.Y_COORD_SHIFT="Y_COORD_SHIFT",e.PLACEMENT_DIV_ID="PLACEMENT_DIV_ID",e.ROTATION="ROTATION",e.ADORNER_STROKE="ADORNER_STROKE",e.ADORNER_FILL="ADORNER_FILL",e.ADORNER_RADIUS="ADORNER_RADIUS",e.SELECTION_STROKE="SELECTION_STROKE",e.SELECTION_DELTA="SELECTION_DELTA",e.SELECTION_THICKNESS="SELECTION_THICKNESS",e.DRAGPOINTS="DRAGPOINTS",e.MULTILINE_ALIGNMENT="MULTILINE_ALIGNMENT",e.WRAP_TO="WRAP_TO",e.LINE_SPACING="LINE_SPACING",e.SCALE="SCALE",e.OUTLINE="OUTLINE"}(t.PROPERTY||(t.PROPERTY={})),t.ADORNER_GRIP_RADIUS=10,t.DISTANCE_TO_LINE=10},function(e,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.convertMultiLineAlignment=t.EMultiLineAlignment=t.EVerticalTextPosition=t.EHorizontalTextPosition=void 0,function(e){e.Left="Left",e.Center="Center",e.Right="Right"}(t.EHorizontalTextPosition||(t.EHorizontalTextPosition={})),function(e){e.Above="Above",e.Center="Center",e.Below="Below"}(t.EVerticalTextPosition||(t.EVerticalTextPosition={})),function(e){e.Left="Left",e.Right="Right",e.Center="Center"}(r=t.EMultiLineAlignment||(t.EMultiLineAlignment={}));t.convertMultiLineAlignment=(e,t)=>{let i=t.eTSRTextAlignMode.Left;switch(e){case r.Left:i=t.eTSRTextAlignMode.Left;break;case r.Right:i=t.eTSRTextAlignMode.Right;break;case r.Center:i=t.eTSRTextAlignMode.Center}return i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisBase2D=t.EClipMode=void 0;const r=i(14),n=i(39),s=i(107),o=i(0),a=i(3),l=i(52),h=i(33),u=i(17),d=i(181),c=i(104),p=i(29),g=i(2),f=i(35),y=i(262),v=i(30),m=i(263),S=i(86),P=i(182),C=i(12),A=i(4),x=i(6),b=i(57),T=i(264),E=i(265),w=i(267),R=i(171);!function(e){e[e.None=0]="None",e[e.StretchAtExtents=1]="StretchAtExtents",e[e.ClipAtMin=2]="ClipAtMin",e[e.ClipAtMax=3]="ClipAtMax",e[e.ClipAtExtents=4]="ClipAtExtents"}(t.EClipMode||(t.EClipMode={}));class D extends b.AxisCore{constructor(e,t){var i,n,s,o,a,h,d,p,g,v;super(t),this.axisLayoutState=new T.AxisLayoutState,this.labelStyleProperty={fontSize:14,fontFamily:"Arial",color:A.SciChartSurfaceBase.DEFAULT_THEME.tickTextBrush,fontWeight:"normal",fontStyle:"normal",padding:l.Thickness.fromString("2 4 0 4"),alignment:c.ELabelAlignment.Auto},this.isInnerAxisProperty=!1,this.isPrimaryAxisProperty=!1,this.axisBorderProperty={borderBottom:0,borderLeft:0,borderRight:0,borderTop:0,color:A.SciChartSurfaceBase.DEFAULT_THEME.axisBorder,border:0},this.offsetProperty=0,this.tickCache=void 0,this.webAssemblyContext2D=e,this.penCacheForMajorGridLines=new f.Pen2DCache(e),this.penCacheForMinorGridLines=new f.Pen2DCache(e),this.penCacheForMajorTickLines=new f.Pen2DCache(e),this.penCacheForMinorTickLines=new f.Pen2DCache(e),this.solidBrushCacheAxisBands=new y.SolidBrushCache(e),this.solidBrushCacheAxisBackground=new y.SolidBrushCache(e),this.axisRenderer=new E.AxisRenderer(e),this.axisRenderer.keepLabelsWithinAxis=null!==(i=null==t?void 0:t.keepLabelsWithinAxis)&&void 0!==i?i:this.axisRenderer.keepLabelsWithinAxis,this.axisRenderer.hideOverlappingLabels=null!==(n=null==t?void 0:t.hideOverlappingLabels)&&void 0!==n?n:this.axisRenderer.hideOverlappingLabels,this.axisRenderer.axisThickness=null!==(s=null==t?void 0:t.axisThickness)&&void 0!==s?s:this.axisRenderer.axisThickness,this.axisTitleRenderer=new w.AxisTitleRenderer(e),this.tickCoordinatesProvider=new m.DefaultTickCoordinatesProvider,this.visibleRangeLimit=null!==(o=null==t?void 0:t.visibleRangeLimit)&&void 0!==o?o:this.visibleRangeLimit,this.visibleRangeSizeLimit=null!==(a=null==t?void 0:t.visibleRangeSizeLimit)&&void 0!==a?a:this.visibleRangeSizeLimit,this.zoomExtentsRange=(null==t?void 0:t.zoomExtentsToInitialRange)?this.visibleRange:null==t?void 0:t.zoomExtentsRange,this.axisAlignment=null!==(h=null==t?void 0:t.axisAlignment)&&void 0!==h?h:this.axisAlignment,this.axisTitle=null!==(d=null==t?void 0:t.axisTitle)&&void 0!==d?d:this.axisTitle,this.labelStyle=Object.assign(Object.assign({},this.labelStyle),null==t?void 0:t.labelStyle),this.axisBorder=Object.assign(Object.assign({},this.axisBorder),null==t?void 0:t.axisBorder),this.isInnerAxis=null!==(p=null==t?void 0:t.isInnerAxis)&&void 0!==p?p:this.isInnerAxis,this.stackedAxisLength=null!==(g=null==t?void 0:t.stackedAxisLength)&&void 0!==g?g:this.stackedAxisLength,this.solidBrushCacheBorder=new y.SolidBrushCache(e),(null==t?void 0:t.labelProvider)&&("getLabels"in(null==t?void 0:t.labelProvider)||(t.labelProvider=(0,r.createType)(u.EBaseType.LabelProvider,t.labelProvider.type,e,t.labelProvider.options))),this.autoRangeAnimationProperty=null==t?void 0:t.autoRangeAnimation,this.backgroundColor=null!==(v=null==t?void 0:t.backgroundColor)&&void 0!==v?v:this.backgroundColor}get labelProvider(){return this.labelProviderProperty}set labelProvider(e){this.labelProviderProperty=e,this.notifyPropertyChanged(R.PROPERTY.LABEL_PROVIDER)}get axisRenderer(){return this.axisRendererProperty}set axisRenderer(e){this.axisRendererProperty=e,this.notifyPropertyChanged(R.PROPERTY.AXIS_RENDERER)}get isHorizontalAxis(){return(0,h.getIsHorizontal)(this.axisAlignment)}get isAxisFlipped(){return!this.isXAxis}get axisAlignment(){return this.axisAlignmentProperty}set axisAlignment(e){this.axisAlignmentProperty!==e&&(this.axisAlignmentProperty=e,this.notifyPropertyChanged(R.PROPERTY.AXIS_ALIGNMENT))}get visibleRangeLimit(){return this.visibleRangeLimitProperty}set visibleRangeLimit(e){a.NumberRange.areEqual(this.visibleRangeLimitProperty,e)||(this.visibleRangeLimitProperty=e,this.notifyPropertyChanged(R.PROPERTY.VISIBLE_RANGE_LIMIT))}get visibleRangeSizeLimit(){return this.visibleRangeSizeLimitProperty}set visibleRangeSizeLimit(e){if(!a.NumberRange.areEqual(this.visibleRangeSizeLimitProperty,e)){if(e.min<0)throw Error("visibleRangeSizeLimit min value must be more or equal 0");if(e.min>=e.max)throw Error("visibleRangeSizeLimit min value must be less than max value");this.visibleRangeSizeLimitProperty=e,this.notifyPropertyChanged(R.PROPERTY.VISIBLE_RANGE_SIZE_LIMIT)}}get zoomExtentsRange(){return this.zoomExtentsRangeProperty}set zoomExtentsRange(e){a.NumberRange.areEqual(this.zoomExtentsRangeProperty,e)||(this.zoomExtentsRangeProperty=e,this.notifyPropertyChanged(R.PROPERTY.ZOOMEXTENTS_RANGE))}get isInnerAxis(){return this.isInnerAxisProperty}set isInnerAxis(e){this.isInnerAxisProperty!==e&&(this.isInnerAxisProperty=e,this.notifyPropertyChanged(R.PROPERTY.IS_INNER_AXIS))}get isPrimaryAxis(){return this.isPrimaryAxisProperty}set isPrimaryAxis(e){if(this.isPrimaryAxisProperty!==e&&(this.isPrimaryAxisProperty=e,this.notifyPropertyChanged(R.PROPERTY.IS_PRIMARY_AXIS)),e&&!this.isStackedAxis){(this.isXAxis?this.parentSurface.xAxes:this.parentSurface.yAxes).asArray().forEach(e=>{e===this||e.isStackedAxis||(e.isPrimaryAxis=!1)})}}get isStackedAxis(){return this.parentSurface.layoutManager.getAxisLayoutStrategy(this.axisAlignment,this.isInnerAxis).isStacked}get backgroundColor(){return this.backgroundColorProperty}set backgroundColor(e){this.backgroundColorProperty=e,this.invalidateParentCallback&&this.invalidateParentCallback()}get stackedAxisLength(){return this.stackedAxisLengthProperty}set stackedAxisLength(e){this.stackedAxisLengthProperty!==e&&(this.stackedAxisLengthProperty=e,this.notifyPropertyChanged(R.PROPERTY.AXIS_LENGTH))}get axisLength(){var e,t;const{seriesViewRect:i}=this.parentSurface;if(!i)return null!==(e=this.axisLengthProperty)&&void 0!==e?e:0;const r=this.isHorizontalAxis?i.width:i.height;return null!==(t=this.axisLengthProperty)&&void 0!==t?t:r}set axisLength(e){this.axisLengthProperty!==e&&(this.axisLengthProperty=e,this.notifyPropertyChanged(R.PROPERTY.AXIS_LENGTH))}get offset(){return this.offsetProperty}set offset(e){this.offsetProperty!==e&&(this.clearCoordCalcCache(),this.offsetProperty=e,this.notifyPropertyChanged(R.PROPERTY.OFFSET))}get isVerticalChart(){return this.isXAxis?!![h.EAxisAlignment.Left,h.EAxisAlignment.Right].includes(this.axisAlignment):!![h.EAxisAlignment.Top,h.EAxisAlignment.Bottom].includes(this.axisAlignment)}get dpiAdjustedLabelStyle(){return this.dpiAdjustedLabelStyleCache||(this.dpiAdjustedLabelStyleCache=x.DpiHelper.adjustTextStyle(this.labelStyleProperty)),this.dpiAdjustedLabelStyleCache}get labelStyle(){return this.labelStyleProperty}set labelStyle(e){this.labelStyleProperty=Object.assign(Object.assign({},this.labelStyle),e),this.dpiAdjustedLabelStyleCache=void 0,this.notifyPropertyChanged(R.PROPERTY.TEXT_STYLE)}get axisBorder(){return this.axisBorderProperty}set axisBorder(e){var t,i,r,n,s,o;this.axisBorder.borderTop=null!==(t=e.borderTop)&&void 0!==t?t:this.axisBorder.borderTop,this.axisBorder.borderLeft=null!==(i=e.borderLeft)&&void 0!==i?i:this.axisBorder.borderLeft,this.axisBorder.borderBottom=null!==(r=e.borderBottom)&&void 0!==r?r:this.axisBorder.borderBottom,this.axisBorder.borderRight=null!==(n=e.borderRight)&&void 0!==n?n:this.axisBorder.borderRight,this.axisBorder.border=null!==(s=e.border)&&void 0!==s?s:this.axisBorder.border,this.axisBorder.color=null!==(o=e.color)&&void 0!==o?o:this.axisBorder.color,this.notifyPropertyChanged(R.PROPERTY.BORDER)}get autoRangeAnimation(){return this.autoRangeAnimationProperty}set autoRangeAnimation(e){this.autoRangeAnimationProperty=Object.assign(Object.assign({},this.autoRangeAnimation),e)}applyTheme(e){const t=this.parentSurface.previousThemeProvider;this.axisBandsFill===t.axisBandsFill&&(this.axisBandsFill=e.axisBandsFill),this.labelStyle.color===t.tickTextBrush&&(this.labelStyle={color:e.tickTextBrush}),this.minorGridLineStyle.color===t.minorGridLineBrush&&(this.minorGridLineStyle={color:e.minorGridLineBrush}),this.majorGridLineStyle.color===t.majorGridLineBrush&&(this.majorGridLineStyle={color:e.majorGridLineBrush}),this.minorTickLineStyle.color===t.minorGridLineBrush&&(this.minorTickLineStyle={color:e.minorGridLineBrush}),this.majorTickLineStyle.color===t.majorGridLineBrush&&(this.majorTickLineStyle={color:e.majorGridLineBrush}),this.axisTitleStyle.color===t.axisTitleColor&&(this.axisTitleStyle={color:e.axisTitleColor})}onAttach(e,t,i){this.parentSurface=e,this.setIsXAxis(t),this.isPrimaryAxisProperty=i}measure(){if(this.isVisible){const{majorTickLabels:e}=this.getTicks(!0),t=this.drawMinorTickLines||this.drawMajorTickLines;A.DebugForDpi&&console.log(`Measure. fontSize: ${this.labelStyle.fontSize}, dpiAdjusted: ${this.dpiAdjustedLabelStyle.fontSize}`),this.axisRenderer.measure(this.isHorizontalAxis,this.dpiAdjustedLabelStyle,e,this.getTicksMaxSize(),this.labelProvider,this.drawLabels,t),this.axisTitleRenderer.measure(this.dpiAdjustedAxisTitleStyle,this.isHorizontalAxis)}else this.axisRenderer.desiredHeight=0,this.axisRenderer.desiredWidth=0,this.axisTitleRenderer.desiredHeight=0,this.axisTitleRenderer.desiredWidth=0;this.isMeasured=!0}onDpiChanged(){this.dpiAdjustedLabelStyleCache=void 0}prepareRenderData(){this.getCurrentCoordinateCalculator()}getCurrentCoordinateCalculator(){return super.getCurrentCoordinateCalculator()}draw(e){if(!this.getIsValidForDrawing())return;const t=(0,v.calculateAbsoluteRenderLayer)(this.parentSurface.layersOffset,this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.AxisBordersLayer);e.enqueueLayeredDraw(()=>{(0,P.drawBorder)(e,this.webAssemblyContext2D,this.solidBrushCacheBorder,this.viewRect,this.axisBorder.borderLeft,this.axisBorder.borderTop,this.axisBorder.borderRight,this.axisBorder.borderBottom,this.axisBorder.color)},t);const i=this.getTicksWithCoords(),r=this.minorGridLineStyle,n=this.majorGridLineStyle,s=this.minorTickLineStyle,o=this.majorTickLineStyle,a=L(this.penCacheForMinorGridLines,r.color,r.strokeThickness,r.strokeDashArray),l=L(this.penCacheForMajorGridLines,n.color,n.strokeThickness,n.strokeDashArray),h=L(this.penCacheForMinorTickLines,s.color,s.strokeThickness),u=L(this.penCacheForMajorTickLines,o.color,o.strokeThickness);this.isPrimaryAxis&&this.drawAxisBandsAndGridLines(e,i,a,l);const c=(0,v.calculateAbsoluteRenderLayer)(this.parentSurface.layersOffset,this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.AxesLayer);e.enqueueLayeredDraw(()=>{if(this.backgroundColorProperty){const t=this.axisRenderer.viewRect,i=this.axisTitleRenderer.viewRect,r=this.solidBrushCacheAxisBackground.newBrush(this.backgroundColorProperty,!1);let n,s;if(n=(0,S.createNativeRect)(this.webAssemblyContext2D,0,0,t.width,t.height),n){const i=(0,C.getVectorRectVertex)(this.webAssemblyContext2D);i.push_back(n),e.drawRects(i,r,t.left,t.top)}if(s=(0,S.createNativeRect)(this.webAssemblyContext2D,0,0,i.width,i.height),s){const t=(0,C.getVectorRectVertex)(this.webAssemblyContext2D);t.push_back(s),e.drawRects(t,r,i.left,i.top)}}this.drawLabels&&(A.DebugForDpi&&console.log(`Draw. fontSize: ${this.labelStyle.fontSize}, dpiAdjusted: ${this.dpiAdjustedLabelStyle.fontSize}`),this.axisRenderer.drawLabels(e,this.axisAlignment,this.isInnerAxis,i.majorTickLabels,i.majorTickCoords,this.offset,this.dpiAdjustedLabelStyle,this.isVerticalChart,this.flippedCoordinates,this.labelProvider)),this.drawMinorTickLines&&this.axisRenderer.drawTicks(e,this.axisAlignment,this.isInnerAxis,i.minorTickCoords,this.offset,h,s),this.drawMajorTickLines&&this.axisRenderer.drawTicks(e,this.axisAlignment,this.isInnerAxis,i.majorTickCoords,this.offset,u,o),this.axisTitleRenderer.draw(e,this.dpiAdjustedAxisTitleStyle,this.axisAlignment,this.parentSurface.debugRendering),this.labelProvider.useNativeText&&this.parentSurface.renderNativeAxisLabelsImmediately&&e.endFonts(!0)},c)}drawDebug(e){this.axisRenderer.drawDebug=!0;(()=>{const t=this.axisRenderer.viewRect,i=(0,C.getVectorRectVertex)(this.webAssemblyContext2D),r=new this.webAssemblyContext2D.SCRTSolidBrush((0,g.parseColorToUIntArgb)("rgba(255,0,0,0.7)"),!1),n=(0,S.createNativeRect)(this.webAssemblyContext2D,0,0,t.width,t.height);i.push_back(n),e.drawRects(i,r,t.left,t.top),r.delete()})();(()=>{const t=this.axisTitleRenderer.viewRect,i=(0,C.getVectorRectVertex)(this.webAssemblyContext2D),r=new this.webAssemblyContext2D.SCRTSolidBrush((0,g.parseColorToUIntArgb)("rgba(0,255,0,0.7)"),!1),n=(0,S.createNativeRect)(this.webAssemblyContext2D,0,0,t.width,t.height);i.push_back(n),e.drawRects(i,r,t.left,t.top),r.delete()})()}getDefaultNonZeroRange(){return new a.NumberRange(0,10)}getMaximumRange(){if(this.zoomExtentsRange)return this.zoomExtentsRange;let e;this.parentSurface&&this.parentSurface.renderableSeries.size()>0&&(e=this.isXAxis?this.getMaxXRange():this.getWindowedYRange(void 0));const t=this.visibleRange||this.getDefaultNonZeroRange();return e||t}getWindowedYRange(e){if(this.zoomExtentsRange)return this.zoomExtentsRange;let t;if(this.parentSurface){this.parentSurface.renderableSeries.asArray().filter(e=>e.yAxisId===this.id&&e.isVisible&&e.hasDataSeriesValues()).forEach(i=>{const r=(null==e?void 0:e.containsKey(i.xAxisId))?e.item(i.xAxisId):this.getXVisibleRange(i.xAxisId),n=this.getIsXCategoryAxis(i.xAxisId);if(r){const e=i.getYRange(r,n);e&&(t=t?t.union(e):e)}})}return(null==t?void 0:t.isZero())&&(t=this.coerceZeroVisibleRange(t)),this.growBy&&t&&(t=t.growBy(this.growBy)),t=this.applyVisibleRangeLimit(t),t=this.applyVisibleRangeSizeLimit(t),t||new a.NumberRange}scroll(e,t){const i=this.visibleRange;if(void 0===i)return!1;let r=this.getCurrentCoordinateCalculator().translateBy(e,i);if(this.visibleRangeLimit){let e=0;r.min<this.visibleRangeLimit.min?e=this.visibleRangeLimit.min-r.min:this.visibleRangeLimit.max<r.max&&(e=this.visibleRangeLimit.max-r.max),e&&(r=new a.NumberRange(r.min+e,r.max+e))}return this.visibleRange=this.applyVisibleRangeSizeLimit(r),!0}zoomBy(e,t){const i=this.getCurrentCoordinateCalculator().zoomTranslateBy(e,t,this.visibleRange);if(i.max<i.min)return;const r=this.applyVisibleRangeLimit(i);this.visibleRange=this.applyVisibleRangeSizeLimit(r)}zoom(e,t,i=0,r=n.easing.outExpo){const s=this.getCurrentCoordinateCalculator(),o=s.getDataValue(e),l=s.getDataValue(t),h=o<l?o:l,u=o<l?l:o,d=this.applyVisibleRangeSizeLimit(new a.NumberRange(h,u));this.animateVisibleRange(d,i,r)}scale(e,t,i){const r=e.max-e.min;let n,s;const o=this.flippedCoordinates?!i:i,l=this.flippedCoordinates?-t:t;o?(n=e.min,s=l>0?n+r/(1+l):n+r*(1+Math.abs(l))):(s=e.max,n=l>0?s-r*(1+l):s-r/(1+Math.abs(l))),this.visibleRange=new a.NumberRange(n,s)}animateVisibleRange(e,t,i=n.easing.outCubic,r=(()=>{})){var o;return t<=0?(this.visibleRange=e||this.visibleRange,void r()):(null===(o=this.visibleRangeAnimationToken)||void 0===o||o.cancel(),this.visibleRangeAnimationToken=s.NumberRangeAnimator.animate(this.visibleRange,e,t,e=>{this.visibleRange=e},()=>{this.visibleRangeAnimationToken=void 0,r()},i),this.parentSurface.addAnimation(this.visibleRangeAnimationToken),this.visibleRangeAnimationToken)}delete(){super.delete(),this.penCacheForMajorGridLines=(0,o.deleteSafe)(this.penCacheForMajorGridLines),this.penCacheForMinorGridLines=(0,o.deleteSafe)(this.penCacheForMinorGridLines),this.penCacheForMajorTickLines=(0,o.deleteSafe)(this.penCacheForMajorTickLines),this.penCacheForMinorTickLines=(0,o.deleteSafe)(this.penCacheForMinorTickLines),this.solidBrushCacheBorder=(0,o.deleteSafe)(this.solidBrushCacheBorder),this.solidBrushCacheAxisBands=(0,o.deleteSafe)(this.solidBrushCacheAxisBands),this.solidBrushCacheAxisBackground=(0,o.deleteSafe)(this.solidBrushCacheAxisBackground),this.labelProviderProperty=(0,o.deleteSafe)(this.labelProvider),this.axisRendererProperty=(0,o.deleteSafe)(this.axisRenderer)}toJSON(){const e={autoRange:this.autoRange,autoTicks:this.autoTicks,axisAlignment:this.axisAlignment,axisBandsFill:this.axisBandsFill,axisBorder:this.axisBorder,axisTitle:this.axisTitle,axisTitleStyle:this.axisTitleStyle,drawLabels:this.drawLabels,drawMajorBands:this.drawMajorBands,drawMajorGridLines:this.drawMajorGridLines,drawMajorTickLines:this.drawMajorTickLines,drawMinorGridLines:this.drawMinorGridLines,drawMinorTickLines:this.drawMinorTickLines,flippedCoordinates:this.flippedCoordinates,growBy:this.growBy,id:this.id,isInnerAxis:this.isInnerAxis,isVisible:this.isVisible,labelStyle:this.labelStyle,majorGridLineStyle:this.majorGridLineStyle,majorTickLineStyle:this.majorTickLineStyle,maxAutoTicks:this.maxAutoTicks,minorGridLineStyle:this.minorGridLineStyle,minorTickLineStyle:this.minorTickLineStyle,visibleRange:this.hasDefaultVisibleRange()?void 0:this.visibleRange,visibleRangeLimit:this.visibleRangeLimit,zoomExtentsRange:this.zoomExtentsRange,minorsPerMajor:this.minorsPerMajor,majorDelta:this.majorDelta,minorDelta:this.minorDelta,labelProvider:this.labelProvider.toJSON(),keepLabelsWithinAxis:this.axisRenderer.keepLabelsWithinAxis};return{type:this.type,options:e}}getTicksMaxSize(){var e,t,i,r;const n=null!==(t=(null===(e=this.majorTickLineStyle)||void 0===e?void 0:e.tickSize)*x.DpiHelper.PIXEL_RATIO)&&void 0!==t?t:0,s=null!==(r=(null===(i=this.minorTickLineStyle)||void 0===i?void 0:i.tickSize)*x.DpiHelper.PIXEL_RATIO)&&void 0!==r?r:0;return Math.max(n,s)}getIsValidForDrawing(){return this.isVisible}drawAxisBandsAndGridLines(e,t,i,r){if(this.drawMajorBands){const i=this.solidBrushCacheAxisBands.newBrush(this.axisBandsFill,!0),r=(0,v.calculateAbsoluteRenderLayer)(this.parentSurface.layersOffset,this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.AxisBandsLayer);e.enqueueLayeredDraw(()=>{this.drawAxisBands(e,t.majorTicks,t.majorTickCoords,i)},r)}if(this.drawMinorGridLines){const r=(0,v.calculateAbsoluteRenderLayer)(this.parentSurface.layersOffset,this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.MinorGridLinesLayer);e.enqueueLayeredDraw(()=>{this.drawGridLines(e,t.minorTickCoords,i)},r)}if(this.drawMajorGridLines){const i=(0,v.calculateAbsoluteRenderLayer)(this.parentSurface.layersOffset,this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.MajorGridLinesLayer);e.enqueueLayeredDraw(()=>{this.drawGridLines(e,t.majorTickCoords,r)},i)}}drawAxisBands(e,t,i,r){if(!t||0===t.length)return;const{seriesViewRect:n}=this.parentSurface,s=this.isHorizontalAxis?p.EXyDirection.XDirection:p.EXyDirection.YDirection;let o=this.offset,a=this.axisLength+this.offset;if(this.isAxisFlipped!==this.flippedCoordinates){const e=a;a=o,o=e}let l=this.getMajorTickIndex(t[0])%2==0;const h=(0,C.getVectorRectVertex)(this.webAssemblyContext2D),u=(e,t,i)=>{if(!i)return;const r=(0,S.createNativeRect)(this.webAssemblyContext2D,s===p.EXyDirection.YDirection?0:e,s===p.EXyDirection.YDirection?e:0,s===p.EXyDirection.YDirection?n.width:t,s===p.EXyDirection.YDirection?t:n.height);h.push_back(r)};t.forEach((e,t)=>{const r=0===t?o:i[t-1],n=i[t];u(r,n,l),l=!l}),u(a,i[t.length-1],l),e.drawRects(h,r,n.left,n.top)}drawGridLines(e,t,i){if(!t||0===t.length)return;const{seriesViewRect:r}=this.parentSurface,n=(0,C.getVectorColorVertex)(this.webAssemblyContext2D);t.forEach(e=>{const t=this.isHorizontalAxis?e:0,i=this.isHorizontalAxis?e:r.width,s=this.isHorizontalAxis?0:e,o=this.isHorizontalAxis?r.height:e,a=(0,C.getVertex)(this.webAssemblyContext2D,t,s);n.push_back(a);const l=(0,C.getVertex)(this.webAssemblyContext2D,i,o);n.push_back(l)}),e.drawLinesNative(n,i,v.ELineDrawMode.DiscontinuousLine,r.left,r.top)}getXVisibleRange(e){return this.parentSurface.getXAxisById(e).visibleRange}getIsXCategoryAxis(e){return this.parentSurface.getXAxisById(e).isCategoryAxis}getLabels(e){return this.labelProvider.getLabels(e)}getXDataRange(){let e;if(this.parentSurface){this.parentSurface.renderableSeries.asArray().filter(e=>e.xAxisId===this.id&&e.isVisible&&e.hasDataSeriesValues()).forEach(t=>{const i=t.getXRange();i&&(e=e?e.union(i):i)})}return e}notifyPropertyChanged(e){e===R.PROPERTY.AXIS_TITLE&&this.axisTitleRenderer&&(this.axisTitleRenderer.text=this.axisTitle),e===R.PROPERTY.IS_XAXIS&&void 0===this.axisAlignmentProperty&&(this.axisAlignmentProperty=this.isXAxisProperty?h.EAxisAlignment.Bottom:h.EAxisAlignment.Right),e===R.PROPERTY.AXIS_RENDERER&&this.axisRendererProperty.attachedToAxis(this),super.notifyPropertyChanged(e)}getMaxXRange(){let e=this.getXDataRange();if(e)return this.growBy&&(e=e.growBy(this.growBy)),e=this.applyVisibleRangeLimit(null!=e?e:this.visibleRange),e=this.applyVisibleRangeSizeLimit(e),e}getAxisSize(){return this.axisLength}getMajorTickIndex(e){const t=e/this.majorDeltaProperty;return Math.round(t)}getTicks(e){var t,i;if(e||!this.tickCache){const e=this.getMaxAutoTicks();if(this.autoTicks){const t=this.deltaCalculator.getDeltaFromRange(this.visibleRange.min,this.visibleRange.max,this.minorsPerMajor,e);this.minorDeltaProperty=t.min,this.majorDeltaProperty=t.max}let r=this.drawLabels||this.drawMajorGridLines||this.drawMajorTickLines?this.tickProvider.getMajorTicks(null!==(t=this.minorDeltaProperty)&&void 0!==t?t:this.majorDeltaProperty/this.minorsPerMajor,this.majorDeltaProperty,this.visibleRange):[],n=this.drawMinorGridLines||this.drawMinorTickLines?this.tickProvider.getMinorTicks(null!==(i=this.minorDeltaProperty)&&void 0!==i?i:this.majorDeltaProperty/this.minorsPerMajor,this.majorDeltaProperty,this.visibleRange):[];const{min:s,max:o}=this.visibleRange;r=r.filter(e=>e>=s&&e<=o),n=n.filter(e=>e>=s&&e<=o);let a=[];r.length>1e3&&this.drawLabels?console.warn("Axis settings result in more than 1000 labels. Label drawing is disabled. If using autoTicks: false, check that you have set sensible deltas."):a=this.drawLabels?this.getLabels(r):[],this.tickCache={majorTicks:r,majorTickLabels:a,majorTickCoords:null,minorTicks:n,minorTickCoords:null}}return this.tickCache}getTicksWithCoords(){this.tickCache||this.getTicks(!0);const{majorTickCoords:e,minorTickCoords:t}=this.tickCoordinatesProvider.getTickCoordinates(this.tickCache.majorTicks,this.tickCache.minorTicks);return this.tickCache.majorTickCoords=e,this.tickCache.minorTickCoords=t,this.tickCache}applyVisibleRangeLimit(e){if(!e)return;if(!this.visibleRangeLimit)return e;const t=e.clip(this.visibleRangeLimit);return t.min>=t.max?(console.warn(`Can not apply visibleRangeLimit for the ${this.isXAxis?"xAxis":"yAxis"} with ID ${this.id}`),e):t}applyVisibleRangeSizeLimit(e){if(!e)return;if(!this.visibleRangeSizeLimit)return e;const t=e.max-e.min;if(t<0)return console.warn(`Can not apply applyVisibleRangeSizeLimit for the ${this.isXAxis?"xAxis":"yAxis"} with ID ${this.id}`),e;{let i=e;const{min:r,max:n}=this.visibleRangeSizeLimit,s=e.min+t/2;return t<r?i=new a.NumberRange(s-r/2,s+r/2):t>n&&(i=new a.NumberRange(s-n/2,s+n/2)),i}}}t.AxisBase2D=D;const L=(e,t,i,r)=>(0,f.createPenInCache)(e,t,i,1,r)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseSeriesDrawingProvider=void 0;const r=i(0),n=i(1),s=i(27),o=i(21),a=i(2),l=i(451),h=i(73),u=i(172),d=i(7);t.BaseSeriesDrawingProvider=class{constructor(e,t,i,r){var s;n.Guard.notNull(e,"webAssemblyContext"),n.Guard.notNull(t,"parentSeries"),this.webAssemblyContext=e,this.parentSeries=t,this.ySelector=null!=i?i:e=>e.yValues,this.xSelector=null!=r?r:e=>e.xValues,this.palettingState={palettedColors:void 0,palettedColorsHashCode:0,gradientPaletting:!1,paletteTextureCache:new l.PaletteCache(e)},this.seriesHasDataChanges=this.seriesHasDataChanges.bind(this),this.parentDataSeries=this.parentSeries.dataSeries,null===(s=this.parentDataSeries)||void 0===s||s.dataChanged.subscribe(this.seriesHasDataChanges)}applyStrokePaletting(e){var t,i,n;if(this.parentSeries.hasStrokePaletteProvider()){const n=(0,s.uintArgbColorMultiplyOpacity)((0,a.parseColorToUIntArgb)(this.parentSeries.stroke),this.parentSeries.opacity);if(isNaN(n))throw Error("applyStrokePaletting(): renderSeries.stroke "+this.parentSeries.stroke+" cannot be converted to a valid color");const o=this.parentSeries.paletteProvider,l=this.parentSeries.dataSeries,u=this.parentSeries.getCurrentRenderPassData(),d=null==u?void 0:u.pointSeries,c=null!==(t=null==d?void 0:d.xValues)&&void 0!==t?t:l.getNativeXValues(),p=null!==(i=null==d?void 0:d.yValues)&&void 0!==i?i:l.getNativeYValues(),g=d?d.indexes.size():c.size();this.palettingState.palettedColors&&this.palettingState.palettedColors.size()===l.count()||((0,r.deleteSafe)(this.palettingState.palettedColors),this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector,this.palettingState.palettedColors.reserve(l.count())),e.m_bGradient=o.strokePaletteMode===h.EStrokePaletteMode.GRADIENT,e.m_uiColor=4294967295;for(let e=0;e<g;e++){const t=d?d.indexes.get(e):e,i=o.overrideStrokeArgb(c.get(e),p.get(e),e,this.parentSeries.opacity,l.getMetadataAt(t));this.parentSeries.pushPalettedColors(i||n,this.palettingState)}}else this.palettingState.originalPenColor&&(e.m_uiColor=this.palettingState.originalPenColor,this.palettingState.originalPenColor=void 0),null===(n=this.palettingState.palettedColors)||void 0===n||n.clear();this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector)}applyStrokeFillPaletting(e,t,i,n,l,u=!1,d=!0){var c,p,g,f,y;const v=this.parentSeries.hasStrokePaletteProvider(),m=this.parentSeries.hasFillPaletteProvider(),S=this.parentSeries.hasPointMarkerPaletteProvider(),P=this.parentSeries.paletteProvider,C=this.parentSeries.paletteProvider;this.parentSeries.paletteProvider;if(v||m||S){let y,m;if(u)y=m=this.webAssemblyContext.SCRTPalette.GetNoOverrideColorCode();else{const t=void 0!==l;y=e&&t?(0,s.uintArgbColorMultiplyOpacity)((0,a.parseColorToUIntArgb)(e),1):4294967295,m=i&&t?(0,s.uintArgbColorMultiplyOpacity)((0,a.parseColorToUIntArgb)(i),1):4294967295}if(isNaN(y))throw Error("updatePalette(): parentSeries.stroke "+e+" cannot be converted to a valid color");if(isNaN(m))throw Error("updatePalette(): fillColor "+m+" cannot be converted to a valid color");const A=this.parentSeries.dataSeries,x=this.parentSeries.getCurrentRenderPassData(),b=null==x?void 0:x.pointSeries,T=null!==(c=null==b?void 0:b.xValues)&&void 0!==c?c:A.getNativeXValues(),E=null!==(p=null==b?void 0:b.yValues)&&void 0!==p?p:A.getNativeYValues(),w=b?b.indexes.size():T.size();this.palettingState.palettedColors&&this.palettingState.palettedColors.size()===w||((0,r.deleteSafe)(this.palettingState.palettedColors),this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector,this.palettingState.palettedColors.reserve(2*w),this.palettingState.paletteTextureCache.reset()),d&&(t&&(this.palettingState.originalPenColor=t.m_uiColor,t.m_uiColor=4294967295,this.palettingState.originalPenGradient=t.m_bGradient,v?t.m_bGradient=P.strokePaletteMode===h.EStrokePaletteMode.GRADIENT:S&&(t.m_bGradient=C.strokePaletteMode===h.EStrokePaletteMode.GRADIENT)),n&&(this.palettingState.originalBrushColor=n.GetColor(),n.SetColor(4294967295)));let R=0;for(let e=0;e<w;e++){const t=b?b.indexes.get(e):e,i=T.get(e),r=E.get(e),n=this.overridePaletteProviderColors(this.parentSeries,i,r,e,l,A.getMetadataAt(t)),s=null!==(g=n.stroke)&&void 0!==g?g:y,a=null!==(f=n.fill)&&void 0!==f?f:m;this.palettingState.palettedColors.push_back(s),this.palettingState.palettedColors.push_back(a),R=(0,o.numericHashCode)(R,s),R=(0,o.numericHashCode)(R,a)}u&&(this.palettingState.palettedColorsHashCode!==R&&this.palettingState.paletteTextureCache.reset(),this.palettingState.paletteTextureCache.create(this.palettingState.palettedColors),this.palettingState.palettedColorsHashCode=R)}else this.palettingState.paletteTextureCache.reset(),null===(y=this.palettingState.palettedColors)||void 0===y||y.clear(),t&&(this.palettingState.originalPenColor&&(t.m_uiColor=this.palettingState.originalPenColor,this.palettingState.originalPenColor=void 0),this.palettingState.originalPenGradient&&(t.m_bGradient=this.palettingState.originalPenGradient,this.palettingState.originalPenGradient=void 0)),n&&this.palettingState.originalBrushColor&&(n.SetColor(this.palettingState.originalBrushColor),this.palettingState.originalBrushColor=void 0);this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector),this.palettingState.gradientPaletting=this.isGradientFillPaletting(this.parentSeries)}createSolidBrush(e,t){return(0,u.createSolidBrush)(this.webAssemblyContext,e,t)}delete(){this.palettingState.palettedColors&&(this.palettingState.palettedColors=(0,r.deleteSafe)(this.palettingState.palettedColors)),this.palettingState.paletteTextureCache=(0,r.deleteSafe)(this.palettingState.paletteTextureCache)}onSeriesPropertyChange(e){var t,i;e===d.PROPERTY.DATA_SERIES&&(null===(t=this.parentDataSeries)||void 0===t||t.dataChanged.unsubscribe(this.seriesHasDataChanges),this.parentDataSeries=this.parentSeries.dataSeries,null===(i=this.parentDataSeries)||void 0===i||i.dataChanged.subscribe(this.seriesHasDataChanges))}onDpiChanged(e){}onAttachSeries(){}onDetachSeries(){}seriesHasDataChanges(){}overridePaletteProviderColors(e,t,i,r,n,s){let o,a;if(e.hasStrokePaletteProvider()){o=e.paletteProvider.overrideStrokeArgb(t,i,r,n,s)}if(e.hasFillPaletteProvider()){a=e.paletteProvider.overrideFillArgb(t,i,r,n,s)}return{stroke:o,fill:a}}isGradientFillPaletting(e){if(e.hasFillPaletteProvider()){return e.paletteProvider.fillPaletteMode===h.EFillPaletteMode.GRADIENT}return!1}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesAnimation=void 0;const r=i(39),n=i(2),s=i(24),o=i(63),a=i(96);t.SeriesAnimation=class{constructor(e){var t,i,n,s;this.delay=0,this.duration=3e3,this.ease=r.easing.linear,this.isFadeEffectAnimation=!1,this.isOnStartAnimation=!1,this.delay=null!==(t=null==e?void 0:e.delay)&&void 0!==t?t:this.delay,this.duration=null!==(i=null==e?void 0:e.duration)&&void 0!==i?i:this.duration,this.isFadeEffectAnimation=null!==(n=null==e?void 0:e.fadeEffect)&&void 0!==n?n:this.isFadeEffectAnimation,(null==e?void 0:e.ease)&&"string"==typeof e.ease&&(e.ease=r.easing[e.ease]),this.ease=null!==(s=null==e?void 0:e.ease)&&void 0!==s?s:this.ease}toJSON(){const e={delay:this.delay,duration:this.duration,ease:this.ease.name,fadeEffect:this.isFadeEffectAnimation};return{type:this.type,options:e}}calculateAnimationValues(e,t,i,r,n=!1){}calculateDataSeriesAnimationValues(e,t,i,r,n){const o=t.size();if(o!==i.size())throw new Error("DoubleVectors with initialValues and finalValues must have the same length");r.resize(o,0);for(let e=0;e<o;e++)r.set(e,s.animationHelpers.interpolateNumber(t.get(e),i.get(e),n))}getSeriesStyle(e){var t,i;const r=e;if(!r.isStacked)return new o.BaseAnimationStyle({stroke:r.stroke,strokeThickness:r.strokeThickness,opacity:r.opacity,pointMarker:null!==(i=null===(t=r.pointMarker)||void 0===t?void 0:t.getPointMarkerStyle())&&void 0!==i?i:new a.PointMarkerStyle})}updateSeriesProperties(e,t,i){var r,o,a,l,h;const u=e,d=u.pointMarker;if(this.isStyleAnimation){if(void 0!==this.styles.strokeThickness){const e=null==t?void 0:t.strokeThickness,r=this.styles.strokeThickness;u.strokeThickness=e+(r-e)*i}if(void 0!==this.styles.stroke){const e=s.animationHelpers.interpolateColor(t.strokeARGB,this.styles.strokeARGB,i);u.stroke=(0,n.parseArgbToHtmlColor)(e)}if(void 0!==this.styles.opacity&&(u.opacity=s.animationHelpers.interpolateNumber(t.opacity,this.styles.opacity,i)),void 0!==this.styles.pointMarker){u.pointMarker.suspendUpdates();const e=null!==(o=null===(r=t.pointMarker)||void 0===r?void 0:r.width)&&void 0!==o?o:0,d=null!==(l=null===(a=t.pointMarker)||void 0===a?void 0:a.height)&&void 0!==l?l:0;if(u.pointMarker.width=s.animationHelpers.interpolateNumber(e,this.styles.pointMarker.width,i),u.pointMarker.height=s.animationHelpers.interpolateNumber(d,this.styles.pointMarker.height,i),!this.styles.pointMarker.isCustomPointMarker){const e=t.pointMarker,r=this.styles.pointMarker,o=null!==(h=null==e?void 0:e.strokeThickness)&&void 0!==h?h:0;u.pointMarker.strokeThickness=s.animationHelpers.interpolateNumber(o,r.strokeThickness,i);const a=s.animationHelpers.interpolateColor(e.fillARGB,r.fillARGB,i);u.pointMarker.fill=(0,n.parseArgbToHtmlColor)(a);const l=s.animationHelpers.interpolateColor(e.strokeARGB,r.strokeARGB,i);u.pointMarker.stroke=(0,n.parseArgbToHtmlColor)(l)}u.pointMarker.resumeUpdates()}}if(this.isFadeEffectAnimation){const e=t.opacity*i;u.opacity=e,d&&(d.opacity=e)}}get isStyleAnimation(){return!!this.styles}get isDataSeriesAnimation(){return!!this.dataSeries}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRealNumber=void 0,t.isRealNumber=function(e){return!isNaN(e)&&isFinite(e)&&e!==Number.MAX_VALUE&&e!==Number.MIN_VALUE}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thickness=void 0;const r=i(1);class n{constructor(e,t,i,r){this.top=e,this.right=t,this.bottom=i,this.left=r}static fromString(e){r.Guard.notNull(e,"str");const t=e.split(" ").map(e=>parseFloat(e));if(4!==t.length)throw new Error("Expected string in the format '1 2 3 4' where values are top, right bottom and left");return new n(t[0],t[1],t[2],t[3])}static fromNumber(e){return new n(e,e,e,e)}equals(e){return this.top===e.top&&this.right===e.right&&this.bottom===e.bottom&&this.left===e.left}}t.Thickness=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkBuildStamp=t.libraryVersion=void 0;let r;t.libraryVersion="3.0.284";t.checkBuildStamp=e=>void 0!==r?r:!!e&&(e.SCRTCredentials.GetBuildStamp&&"2023-02-02T00:00:00"===e.SCRTCredentials.GetBuildStamp()?(r=!0,r):(console.warn("The SciChart webassembly module is from a different version than the javascript that is calling it.\n Ensure that your build process is copying the correct wasm and data files."),r=!1,r))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrushInCache=t.getScrtBrushFromCache=t.getWebGlBrushFromCache=t.BrushCache=void 0;const r=i(0),n=i(1),s=i(172),o=i(75),a=i(132),l=i(173);class h extends a.BaseCache{get value(){return this.cachedEntity||!this.fill&&!this.fillLinearGradient||(this.cachedEntity=this.create(this.fill,this.opacity,this.textureHeightRatio,this.textureWidthRatio,this.fillLinearGradient)),this.cachedEntity}create(e,t,i,r,n){if(this.cachedEntity&&e===this.fill&&t===this.opacity&&i===this.textureHeightRatio&&r===this.textureWidthRatio&&n===this.fillLinearGradient)return this.cachedEntity;this.invalidateCache(),this.fill=e,this.opacity=t,this.textureHeightRatio=i,this.textureWidthRatio=r,this.fillLinearGradient=n;const s=n?this.createGradientBrush():this.createSolidBrush(e,t);return this.cachedEntity=new l.WebGlBrush(s)}invalidateCache(){super.invalidateCache(),this.canvasTexture=(0,r.deleteSafe)(this.canvasTexture)}reset(){this.invalidateCache(),this.fill=void 0,this.opacity=void 0,this.fillLinearGradient=void 0}delete(){this.invalidateCache()}createSolidBrush(e,t){return(0,s.createSolidBrush)(this.webAssemblyContext,e,t)}createGradientBrush(){const e=this.createGradientTexture().getTexture();return new this.webAssemblyContext.SCRTTextureBrush(e,this.webAssemblyContext.eSCRTBrushMappingMode.PerPrimitive,1)}createGradientTexture(){n.Guard.notNull(this.fillLinearGradient,"fillLinearGradient");const{startPoint:e,endPoint:t,gradientStops:i}=this.fillLinearGradient;this.canvasTexture=new o.CanvasTexture(this.webAssemblyContext,256,256),this.canvasTexture.clear();const r=this.canvasTexture.getContext(),s=u(e.x,256*this.textureWidthRatio),a=u(e.y,256*this.textureHeightRatio),l=u(t.x,256*this.textureWidthRatio),h=u(t.y,256*this.textureHeightRatio),d=r.createLinearGradient(s,a,l,h);return i.forEach(e=>{d.addColorStop(e.offset,e.color)}),r.fillStyle=d,r.fillRect(0,0,256,256),this.canvasTexture.copyTexture(),this.canvasTexture}}t.BrushCache=h;t.getWebGlBrushFromCache=e=>(n.Guard.notNull(e,"cache"),e.value);t.getScrtBrushFromCache=e=>{const i=(0,t.getWebGlBrushFromCache)(e);return null==i?void 0:i.scrtBrush};t.createBrushInCache=(e,t,i,r,s,o)=>{n.Guard.notNull(e,"brushCache");return e.create(t,i,r,s,o).scrtBrush};const u=(e,t)=>e*t},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendDoubleVectorFromJsArray=t.memCopyFloat32=t.insertDoubleVectorFromJsArray=t.SIZEOF_FLOAT32=t.SIZEOF_NUMBER=void 0;const r=i(1);t.SIZEOF_NUMBER=8,t.SIZEOF_FLOAT32=4,t.insertDoubleVectorFromJsArray=function(e,i,n,s){r.Guard.notNull(e,"wasmContext"),r.Guard.notNull(i,"source"),r.Guard.notNull(n,"dest"),r.Guard.isTrue(s>=0,"destIndex must be greater than or equal to zero"),r.Guard.isTrue(s<=n.size(),"destIndex must be less than or equal to dest.size()");const o=i.length;if(0===o)return;const a=n.size();n.resizeFast(a+o),s<a&&e.SCRTMemMove(n.dataPtr(s+o),n.dataPtr(s),a*t.SIZEOF_NUMBER),e.HEAPF64.set(i,n.dataPtr(s)/t.SIZEOF_NUMBER)},t.memCopyFloat32=function(e,i,n,s){r.Guard.notNull(e,"wasmContext"),r.Guard.notNull(i,"source"),r.Guard.notNull(n,"dest"),r.Guard.isTrue(s>=0,"destIndex must be greater than or equal to zero"),r.Guard.isTrue(s<=n.size()+i.length,"destIndex must be less than or equal to dest.size() + source.Length"),0!==i.length&&e.HEAPF32.set(i,n.dataPtr(s)/t.SIZEOF_FLOAT32)},t.appendDoubleVectorFromJsArray=function(e,i,r,n=!0){let s;try{if(n){const n=i.size(),s=r.length,o=n,a=o+s;i.resizeFast(a);const l=i.dataPtr(o);e.HEAPF64.set(r,l/t.SIZEOF_NUMBER)}else{const n=i.size(),o=r.length,a=n,l=a+o;e.SCRTSetActiveDoubleVector(i,n),s=e._malloc(8*o),e.HEAPF64.set(r,s/t.SIZEOF_NUMBER),e.ccall("SCRTFillActiveDoubleVector",null,["number","number","number"],[s,a,l])}}catch(e){console.log(e)}finally{s&&e._free(s)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDataFilterType=void 0,function(e){e.XyLinearTrend="XyLinearTrend",e.XyMovingAverage="XyMovingAverage",e.XyRatio="XyRatio",e.XyScaleOffset="XyScaleOffset",e.XyyScaleOffset="XyyScaleOffset",e.XyzScaleOffset="XyzScaleOffset",e.HlcScaleOffset="HlcScaleOffset",e.OhlcScaleOffset="OhlcScaleOffset"}(t.EDataFilterType||(t.EDataFilterType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisCore=void 0;const r=i(0),n=i(18),s=i(1),o=i(3),a=i(52),l=i(74),h=i(104),u=i(51),d=i(4),c=i(6),p=i(171),g=i(249);class f{constructor(e){var t,i,r,s,u,c,p,g,y,v,m,S,P,C,A,x,b,T,E,w,R,D,L,M;this.visibleRangeChanged=new n.EventHandler,this.isMeasured=!1,this.idProperty=f.DEFAULT_AXIS_ID,this.isXAxisProperty=!0,this.minorsPerMajorProperty=5,this.drawMajorGridLinesProperty=!0,this.drawMinorGridLinesProperty=!0,this.drawMajorTickLinesProperty=!0,this.drawMinorTickLinesProperty=!0,this.drawMajorBandsProperty=!0,this.drawLabelsProperty=!0,this.flippedCoordinatesProperty=!1,this.tickTextBrushProperty=d.SciChartSurfaceBase.DEFAULT_THEME.tickTextBrush,this.axisBandsFillProperty=d.SciChartSurfaceBase.DEFAULT_THEME.axisBandsFill,this.autoRangeProperty=l.EAutoRange.Once,this.majorTickLineStyleProperty={tickSize:5,strokeThickness:1,color:d.SciChartSurfaceBase.DEFAULT_THEME.majorGridLineBrush},this.minorTickLineStyleProperty={tickSize:3,strokeThickness:1,color:d.SciChartSurfaceBase.DEFAULT_THEME.minorGridLineBrush},this.majorGridLineStyleProperty={strokeThickness:1,color:d.SciChartSurfaceBase.DEFAULT_THEME.majorGridLineBrush,strokeDashArray:void 0},this.minorGridLineStyleProperty={strokeThickness:1,color:d.SciChartSurfaceBase.DEFAULT_THEME.minorGridLineBrush,strokeDashArray:void 0},this.axisTitleStyleProperty={fontSize:24,fontFamily:"Arial",color:d.SciChartSurfaceBase.DEFAULT_THEME.axisTitleColor,fontStyle:"normal",fontWeight:"normal",padding:a.Thickness.fromNumber(6),alignment:h.ELabelAlignment.Center},this.isVisibleProperty=!0,this.autoTicksProperty=!0,this.maxAutoTicksProperty=10,this.defaultVisibleRange=new o.NumberRange(0,10),this.allowFastMathProperty=!1,this.visibleRange=(null==e?void 0:e.visibleRange)||this.defaultVisibleRange,this.id=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:this.id,this.growBy=null!==(i=null==e?void 0:e.growBy)&&void 0!==i?i:this.growBy,this.autoRange=null!==(r=null==e?void 0:e.autoRange)&&void 0!==r?r:this.autoRange,this.isVisible=null!==(s=null==e?void 0:e.isVisible)&&void 0!==s?s:this.isVisible,this.axisTitle=null!==(u=null==e?void 0:e.axisTitle)&&void 0!==u?u:this.axisTitle,this.axisTitleStyle=null!==(c=null==e?void 0:e.axisTitleStyle)&&void 0!==c?c:this.axisTitleStyle,this.allowFastMath=null!==(p=null==e?void 0:e.allowFastMath)&&void 0!==p?p:this.allowFastMathProperty,this.autoTicksProperty=null!==(g=null==e?void 0:e.autoTicks)&&void 0!==g?g:this.autoTicksProperty,this.maxAutoTicksProperty=null!==(y=null==e?void 0:e.maxAutoTicks)&&void 0!==y?y:this.maxAutoTicksProperty,this.minorsPerMajorProperty=null!==(v=null==e?void 0:e.minorsPerMajor)&&void 0!==v?v:this.minorsPerMajorProperty,this.majorDeltaProperty=null!==(m=null==e?void 0:e.majorDelta)&&void 0!==m?m:this.majorDeltaProperty,this.minorDeltaProperty=null!==(S=null==e?void 0:e.minorDelta)&&void 0!==S?S:this.minorDeltaProperty,this.drawLabelsProperty=null!==(P=null==e?void 0:e.drawLabels)&&void 0!==P?P:this.drawLabelsProperty,this.drawMajorTickLinesProperty=null!==(C=null==e?void 0:e.drawMajorTickLines)&&void 0!==C?C:this.drawMajorTickLinesProperty,this.drawMinorTickLinesProperty=null!==(A=null==e?void 0:e.drawMinorTickLines)&&void 0!==A?A:this.drawMinorTickLinesProperty,this.drawMinorGridLinesProperty=null!==(x=null==e?void 0:e.drawMinorGridLines)&&void 0!==x?x:this.drawMinorGridLinesProperty,this.drawMajorGridLinesProperty=null!==(b=null==e?void 0:e.drawMajorGridLines)&&void 0!==b?b:this.drawMajorGridLinesProperty,this.majorGridLineStyleProperty=null!==(T=null==e?void 0:e.majorGridLineStyle)&&void 0!==T?T:this.majorGridLineStyleProperty,this.minorGridLineStyleProperty=null!==(E=null==e?void 0:e.minorGridLineStyle)&&void 0!==E?E:this.minorGridLineStyleProperty,this.majorTickLineStyleProperty=null!==(w=null==e?void 0:e.majorTickLineStyle)&&void 0!==w?w:this.majorTickLineStyleProperty,this.minorTickLineStyleProperty=null!==(R=null==e?void 0:e.minorTickLineStyle)&&void 0!==R?R:this.minorTickLineStyleProperty,this.drawMajorBandsProperty=null!==(D=null==e?void 0:e.drawMajorBands)&&void 0!==D?D:this.drawMajorBandsProperty,this.axisBandsFillProperty=null!==(L=null==e?void 0:e.axisBandsFill)&&void 0!==L?L:this.axisBandsFillProperty,this.flippedCoordinatesProperty=null!==(M=null==e?void 0:e.flippedCoordinates)&&void 0!==M?M:this.flippedCoordinatesProperty,this.getCurrentCoordinateCalculator=this.getCurrentCoordinateCalculator.bind(this)}get isCategoryAxis(){return!1}get isXAxis(){return this.isXAxisProperty}get allowFastMath(){return this.allowFastMathProperty}set allowFastMath(e){this.allowFastMathProperty=e,this.notifyPropertyChanged(p.PROPERTY.ALLOW_FAST_MATH)}hasValidVisibleRange(){if(void 0===this.visibleRange)return!1;return!(0===this.visibleRange.diff)&&(0,u.isRealNumber)(this.visibleRange.max)&&(0,u.isRealNumber)(this.visibleRange.min)}hasDefaultVisibleRange(){return this.visibleRange.equals(this.getDefaultNonZeroRange())}get id(){return this.idProperty}set id(e){this.idProperty=e,this.notifyPropertyChanged(p.PROPERTY.ID)}get isVisible(){return this.isVisibleProperty}set isVisible(e){this.isVisibleProperty=e,this.notifyPropertyChanged(p.PROPERTY.IS_VISIBLE)}get growBy(){return this.growByProperty}set growBy(e){this.growByProperty=e,this.notifyPropertyChanged(p.PROPERTY.GROW_BY)}get visibleRange(){return this.visibleRangeProperty}set visibleRange(e){var t;(null===(t=this.visibleRangeProperty)||void 0===t?void 0:t.equals(e))||(this.visibleRangeProperty=e,this.clearCoordCalcCache(),this.visibleRangeChanged.raiseEvent(new g.VisibleRangeChangedArgs(e)),this.notifyPropertyChanged(p.PROPERTY.VISIBLE_RANGE))}get animatedVisibleRange(){if(!this.visibleRangeAnimationToken)return this.visibleRange;return this.visibleRangeAnimationToken.to}get majorDelta(){return this.majorDeltaProperty}set majorDelta(e){this.majorDeltaProperty=e,this.notifyPropertyChanged(p.PROPERTY.MAJOR_DELTA)}get minorDelta(){return this.minorDeltaProperty}set minorDelta(e){this.minorDeltaProperty=e,this.notifyPropertyChanged(p.PROPERTY.MINOR_DELTA)}get minorsPerMajor(){return this.minorsPerMajorProperty}set minorsPerMajor(e){this.minorsPerMajorProperty=e,this.notifyPropertyChanged(p.PROPERTY.MINORS_PER_MAJOR)}get textFormatting(){return this.textFormattingProperty}set textFormatting(e){this.textFormattingProperty=e,this.notifyPropertyChanged(p.PROPERTY.TEXT_FORMATTING)}get cursorTextFormatting(){return this.cursorTextFormattingProperty}set cursorTextFormatting(e){this.cursorTextFormattingProperty=e,this.notifyPropertyChanged(p.PROPERTY.CURSOR_TEXT_FORMATTING)}get drawMajorGridLines(){return this.drawMajorGridLinesProperty}set drawMajorGridLines(e){this.drawMajorGridLinesProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_MAJOR_GRID_LINES)}get drawMinorGridLines(){return this.drawMinorGridLinesProperty}set drawMinorGridLines(e){this.drawMinorGridLinesProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_MINOR_GRID_LINES)}get drawMajorTickLines(){return this.drawMajorTickLinesProperty}set drawMajorTickLines(e){this.drawMajorTickLinesProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_MAJOR_TICK_LINES)}get drawMinorTickLines(){return this.drawMinorTickLinesProperty}set drawMinorTickLines(e){this.drawMinorTickLinesProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_MINOR_TICK_LINES)}get drawMajorBands(){return this.drawMajorBandsProperty}set drawMajorBands(e){this.drawMajorBandsProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_MAJOR_BANDS)}get drawLabels(){return this.drawLabelsProperty}set drawLabels(e){this.drawLabelsProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_LABELS)}get flippedCoordinates(){return this.flippedCoordinatesProperty}set flippedCoordinates(e){this.flippedCoordinatesProperty!==e&&(this.flippedCoordinatesProperty=e,this.clearCoordCalcCache(),this.notifyPropertyChanged(p.PROPERTY.FLIPPED_COORDINATES))}get axisBandsFill(){return this.axisBandsFillProperty}set axisBandsFill(e){this.axisBandsFillProperty=e,this.notifyPropertyChanged(p.PROPERTY.AXIS_BANDS_FILL)}get autoRange(){return this.autoRangeProperty}set autoRange(e){this.autoRangeProperty=e,this.notifyPropertyChanged(p.PROPERTY.AUTO_RANGE)}get majorTickLineStyle(){return this.majorTickLineStyleProperty}set majorTickLineStyle(e){this.majorTickLineStyleProperty=Object.assign(Object.assign({},this.majorTickLineStyle),e),this.notifyPropertyChanged(p.PROPERTY.MAJOR_TICK_LINE_STYLE)}get minorTickLineStyle(){return this.minorTickLineStyleProperty}set minorTickLineStyle(e){this.minorTickLineStyleProperty=Object.assign(Object.assign({},this.minorTickLineStyle),e),this.notifyPropertyChanged(p.PROPERTY.MINOR_TICK_LINE_STYLE)}get majorGridLineStyle(){return this.majorGridLineStyleProperty}set majorGridLineStyle(e){this.majorGridLineStyleProperty=Object.assign(Object.assign({},this.majorGridLineStyle),e),this.notifyPropertyChanged(p.PROPERTY.MAJOR_GRID_LINE_STYLE)}get minorGridLineStyle(){return this.minorGridLineStyleProperty}set minorGridLineStyle(e){this.minorGridLineStyleProperty=Object.assign(Object.assign({},this.minorGridLineStyle),e),this.notifyPropertyChanged(p.PROPERTY.MINOR_GRID_LINE_STYLE)}get dpiAdjustedAxisTitleStyle(){return c.DpiHelper.adjustTextStyle(this.axisTitleStyleProperty)}get axisTitleStyle(){return this.axisTitleStyleProperty}set axisTitleStyle(e){this.axisTitleStyleProperty=Object.assign(Object.assign({},this.axisTitleStyle),e),this.notifyPropertyChanged(p.PROPERTY.TEXT_STYLE)}get axisTitle(){return this.axisTitleProperty}set axisTitle(e){this.axisTitleProperty=e,this.notifyPropertyChanged(p.PROPERTY.AXIS_TITLE)}get tickProvider(){return this.tickProviderProperty}set tickProvider(e){this.tickProviderProperty=e,this.notifyPropertyChanged(p.PROPERTY.TICK_PROVIDER)}get labelProvider(){return this.labelProviderProperty}set labelProvider(e){this.labelProviderProperty=e,this.notifyPropertyChanged(p.PROPERTY.LABEL_PROVIDER)}get deltaCalculator(){return this.deltaCalculatorProperty}set deltaCalculator(e){this.deltaCalculatorProperty=e,this.notifyPropertyChanged(p.PROPERTY.DELTA_CALCULATOR)}get tickCoordinatesProvider(){return this.tickCoordinatesProviderProperty}set tickCoordinatesProvider(e){this.tickCoordinatesProviderProperty=e,this.notifyPropertyChanged(p.PROPERTY.TICK_COORDINATES_CALCULATOR)}get maxAutoTicks(){return this.maxAutoTicksProperty}set maxAutoTicks(e){this.maxAutoTicksProperty=e,this.notifyPropertyChanged(p.PROPERTY.MAX_AUTO_TICKS)}get autoTicks(){return this.autoTicksProperty}set autoTicks(e){this.autoTicksProperty=e,this.notifyPropertyChanged(p.PROPERTY.AUTO_TICKS)}getCurrentCoordinateCalculator(){return this.coordCalcCache&&this.coordCalcCache.viewportDimension!==this.getAxisSize()&&this.clearCoordCalcCache(),this.coordCalcCache||(this.coordCalcCache=this.getCurrentCoordinateCalculatorInternal()),this.coordCalcCache}clearCoordCalcCache(){this.coordCalcCache=(0,r.deleteSafe)(this.coordCalcCache)}delete(){this.coordCalcCache=(0,r.deleteSafe)(this.coordCalcCache)}isValidRange(e){return!(!e||!e.isDefined()||e.min>e.max)}setIsXAxis(e){this.isXAxisProperty=e,this.notifyPropertyChanged(p.PROPERTY.IS_XAXIS)}coerceZeroVisibleRange(e){return s.Guard.notNull(e,"range"),e.isZero()?e.growBy(new o.NumberRange(.01,.01)):e}notifyPropertyChanged(e){var t,i,r,n;e===p.PROPERTY.DELTA_CALCULATOR&&(null===(t=this.deltaCalculator)||void 0===t||t.attachedToAxis(this)),e===p.PROPERTY.TICK_PROVIDER&&(null===(i=this.tickProvider)||void 0===i||i.attachedToAxis(this)),e===p.PROPERTY.LABEL_PROVIDER&&(null===(r=this.labelProvider)||void 0===r||r.attachedToAxis(this)),e===p.PROPERTY.TICK_COORDINATES_CALCULATOR&&(null===(n=this.tickCoordinatesProvider)||void 0===n||n.attachedToAxis(this)),this.isMeasured&&this.invalidateParentCallback&&this.invalidateParentCallback()}getMaxAutoTicks(){return Math.max(1,this.maxAutoTicks)}}t.AxisCore=f,f.DEFAULT_AXIS_ID="DefaultAxisId"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAxisType=void 0,function(e){e.CategoryAxis="CategoryAxis",e.NumericAxis="NumericAxis",e.LogarithmicAxis="LogarithmicAxis",e.NumericAxis3D="NumericAxis3D",e.DateTimeNumericAxis="DateTimeNumericAxis"}(t.EAxisType||(t.EAxisType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAxisLayoutStrategy=void 0;const r=i(15),n=i(16);t.BaseAxisLayoutStrategy=class{constructor(){this.isStacked=!1}toJSON(){return{type:this.type}}layoutAxesFromBottomToTop(e,t,i,s,o){let a=s;o.forEach(t=>{const{axisLayoutState:{axisSize:s,additionalTopSize:o,additionalBottomSize:l}}=t,h=a-s-l-o;t.viewRect=r.Rect.createWithCoords(e,h+o,i,a-l),a=h,(0,n.layoutAxisParts)(t,this.layoutAxisPartsStrategy)})}layoutAxesFromTopToBottom(e,t,i,s,o){let a=t;o.forEach(t=>{const{axisLayoutState:{axisSize:s,additionalTopSize:o,additionalBottomSize:l}}=t,h=a+s+l+o;t.viewRect=r.Rect.createWithCoords(e,a+o,i,h-l),a=h,(0,n.layoutAxisParts)(t,this.layoutAxisPartsStrategy)})}layoutAxesFromLeftToRight(e,t,i,s,o){let a=e;o.forEach(e=>{const{axisLayoutState:{axisSize:i,additionalLeftSize:o,additionalRightSize:l}}=e,h=a+i+o+l;e.viewRect=r.Rect.createWithCoords(a+o,t,h-l,s),a=h,(0,n.layoutAxisParts)(e,this.layoutAxisPartsStrategy)})}layoutAxesFromRightToLeft(e,t,i,s,o){let a=i;o.forEach(e=>{const{axisLayoutState:{axisSize:i,additionalLeftSize:o,additionalRightSize:l}}=e,h=a-i-o-l;e.viewRect=r.Rect.createWithCoords(h+o,t,a-l,s),a=h,(0,n.layoutAxisParts)(e,this.layoutAxisPartsStrategy)})}calculateTotalAxisHeight(e,t){return s(e.stackedAxisLength,t)+e.axisLayoutState.additionalBottomSize+e.axisLayoutState.additionalTopSize}calculateTotalAxisWidth(e,t){return s(e.stackedAxisLength,t)+e.axisLayoutState.additionalRightSize+e.axisLayoutState.additionalLeftSize}};const s=(e,t)=>{if("number"==typeof e){if(e<0)throw new Error("stackedAxisLength must be a positive value!");return e}if(e.includes("%"))return o(e,t);const i=parseFloat(e);if(!isNaN(i))return i;throw new Error("stackedAxisLength must be a number or a percentage")},o=(e,t)=>{const i=parseFloat(e);if(i<0||i>100)throw new Error("stackedAxisLength percentage must be from 0 to 100");return Math.round(t*i/10)/10}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowedYRange=t.getIndicesRange=t.BaseDataSeries=void 0;const r=i(14),n=i(0),s=i(18),o=i(3),a=i(17),l=i(313),h=i(22),u=i(51),d=i(24),c=i(314),p=i(10),g=i(115);t.BaseDataSeries=class{constructor(e,t){var i,n,o,l,u,d,p;this.dataChanged=new s.EventHandler,this.dataDistributionCalculator=new c.DataDistributionCalculator,this.minXSpacing=0,this.isSortedProperty=void 0,this.containsNaNProperty=void 0,this.isEvenlySpacedProperty=!1,this.metadataGeneratorProperty=void 0,this.changeCountProperty=0,this.webAssemblyContext=e,this.id=null!==(i=null==t?void 0:t.id)&&void 0!==i?i:(0,h.generateGuid)(),this.xValues=new e.SCRTDoubleVector,this.yValues=new e.SCRTDoubleVector,this.indexes=new e.SCRTDoubleVector,this.xInitialAnimationValues=new e.SCRTDoubleVector,this.yInitialAnimationValues=new e.SCRTDoubleVector,this.xFinalAnimationValues=new e.SCRTDoubleVector,this.yFinalAnimationValues=new e.SCRTDoubleVector,this.dataSeriesNameProperty=null!==(n=null==t?void 0:t.dataSeriesName)&&void 0!==n?n:this.dataSeriesNameProperty,this.isSorted=null!==(l=null!==(o=null==t?void 0:t.dataIsSortedInX)&&void 0!==o?o:null==t?void 0:t.isSorted)&&void 0!==l?l:this.isSortedProperty,this.containsNaN=null!==(u=null==t?void 0:t.containsNaN)&&void 0!==u?u:this.containsNaNProperty,this.isEvenlySpaced=null!==(d=null==t?void 0:t.dataEvenlySpacedInX)&&void 0!==d?d:this.isEvenlySpacedProperty,(null==t?void 0:t.metadata)&&("type"in t.metadata?(this.metadataGeneratorProperty=(0,r.createType)(a.EBaseType.MetadataGenerator,t.metadata.type,e,t.metadata.data),t.metadata=null===(p=this.metadataGeneratorProperty)||void 0===p?void 0:p.getMetadata()):Array.isArray(null==t?void 0:t.metadata)||(this.metadataGeneratorProperty=new g.TemplateMetadataGenerator(null==t?void 0:t.metadata),t.metadata=void 0))}clear(){var e;null===(e=this.indexes)||void 0===e||e.clear(),this.dataDistributionCalculator.clear(this.isSorted,this.containsNaN)}get containsNaN(){return this.containsNaNProperty}set containsNaN(e){this.containsNaNProperty=e,void 0!==e&&this.dataDistributionCalculator.setContainsNaN(e),this.notifyDataChanged(p.EDataChangeType.Property,void 0,void 0,"containsNaN")}get isSorted(){return this.isSortedProperty}set isSorted(e){this.isSortedProperty=e,void 0!==e&&this.dataDistributionCalculator.setIsSortedAscending(e),this.notifyDataChanged(p.EDataChangeType.Property,void 0,void 0,"isSorted")}get isEvenlySpaced(){return this.isEvenlySpacedProperty}set isEvenlySpaced(e){this.isEvenlySpacedProperty=e,this.notifyDataChanged(p.EDataChangeType.Property,void 0,void 0,"isEvenlySpaced")}get dataSeriesName(){return this.dataSeriesNameProperty}set dataSeriesName(e){this.dataSeriesNameProperty=e,this.notifyDataChanged(p.EDataChangeType.Property,void 0,void 0,"dataSeriesName")}count(){return this.xValues?this.xValues.size():0}getIsDeleted(){return this.isDeleted}getNativeIndexes(){if(!this.indexes)return;return this.indexes.size()<this.count()&&this.webAssemblyContext.SCRTFillVectorSequential(this.indexes,this.count()),this.indexes}getNativeXValues(){return this.xValues}getNativeYValues(){return this.yValues}delete(){this.xValues=(0,n.deleteSafe)(this.xValues),this.yValues=(0,n.deleteSafe)(this.yValues),this.indexes=(0,n.deleteSafe)(this.indexes),this.xInitialAnimationValues=(0,n.deleteSafe)(this.xInitialAnimationValues),this.yInitialAnimationValues=(0,n.deleteSafe)(this.yInitialAnimationValues),this.xFinalAnimationValues=(0,n.deleteSafe)(this.xFinalAnimationValues),this.yFinalAnimationValues=(0,n.deleteSafe)(this.yFinalAnimationValues),this.setMetadata(void 0),this.isDeleted=!0}notifyDataChanged(e,t,i,r){this.changeCountProperty++,this.dataChanged.raiseEvent({changeType:e,index:t,count:i})}get xRange(){return this.getXRange()}getXRange(e){const t=this.getXValues(e);let i;if(1===this.count()){const e=t.get(0)-1,i=t.get(0)+1;return new o.NumberRange(e,i)}if(this.count()>1){let e=t.get(0),r=t.get(this.count()-1);if(!this.dataDistributionCalculator.isSortedAscending){let t;try{if(t=this.webAssemblyContext.NumberUtil.MinMax(this.getNativeXValues()),!(0,u.isRealNumber)(t.minD)||!(0,u.isRealNumber)(t.maxD))return new o.NumberRange(0,0);e=t.minD,r=t.maxD}finally{(0,n.deleteSafe)(t)}}return e===r?new o.NumberRange(e-1,r+1):(e>r&&(i=e,e=r,r=i),new o.NumberRange(e,r))}return new o.NumberRange(0,0)}getWindowedYRange(e,i,r=!1,n=p.EDataSeriesValueType.Default){const s=this.getXValues(n),o=this.getYValues(n);return(0,t.getWindowedYRange)(this.webAssemblyContext,s,o,e,i,r,this.dataDistributionCalculator.isSortedAscending)}getIndicesRange(e,i=!1,r=l.ESearchMode.RoundDown,n=l.ESearchMode.RoundUp){const s=i?this.getNativeIndexes():this.xValues;return(0,t.getIndicesRange)(this.webAssemblyContext,s,e,this.dataDistributionCalculator.isSortedAscending)}get hasValues(){return this.count()>0}hasMetadataGenerator(){return void 0!==this.metadataGeneratorProperty}setMetadataGenerator(e){const t=!this.hasMetadataGenerator();if(this.metadataGeneratorProperty=e,t&&!this.metadataProperty){const e=Array(this.xValues.size()).fill(1).map(e=>this.metadataGeneratorProperty.getSingleMetadata());this.metadataProperty=e}}getMetadataAt(e){if(this.validateIndex(e),this.metadataProperty)return this.metadataProperty[e]}getMetadataLength(){return this.metadataProperty?this.metadataProperty.length:this.count()}setInitialAnimationVectors(e){if(!e)return this.xInitialAnimationValues.resize(0,0),void this.yInitialAnimationValues.resize(0,0);d.animationHelpers.copyVector(e.getNativeXValues(),this.xInitialAnimationValues),d.animationHelpers.copyVector(e.getNativeYValues(),this.yInitialAnimationValues)}setFinalAnimationVectors(e){if(!e)return this.xFinalAnimationValues.resize(0,0),void this.yFinalAnimationValues.resize(0,0);d.animationHelpers.copyVector(e.getNativeXValues(),this.xFinalAnimationValues),d.animationHelpers.copyVector(e.getNativeYValues(),this.yFinalAnimationValues)}validateAnimationVectors(){const e=this.xInitialAnimationValues.size();if(e!==this.yInitialAnimationValues.size()||e!==this.xFinalAnimationValues.size()||e!==this.yFinalAnimationValues.size())throw Error("initialAnimationValues and finalAnimationValues must have the same length")}updateAnimationProperties(e,t){t.isOnStartAnimation?t.calculateAnimationValues(this.webAssemblyContext,this.yFinalAnimationValues,this.getNativeYValues(),e):t.isDataSeriesAnimation&&(t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.xInitialAnimationValues,this.xFinalAnimationValues,this.getNativeXValues(),e),t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.yInitialAnimationValues,this.yFinalAnimationValues,this.getNativeYValues(),e))}toJSON(e=!1){return Object.assign({containsNaN:this.containsNaN,dataIsSortedInX:this.isSorted,dataSeriesName:this.dataSeriesName,metadata:this.metadataGeneratorProperty?this.metadataGeneratorProperty.toJSON():this.metadataProperty},this.dataIds)}get changeCount(){return this.changeCountProperty}validateIndex(e,t){if(Math.round(e)!==e)throw Error("Index must be an integer");const i=null!=t?t:"Index is out of range";if(e<0||e>=this.count())throw new Error(i)}setMetadataAt(e,t){t&&(this.validateIndex(e),this.fillMetadataIfUndefined(),this.metadataProperty[e]=t)}appendMetadata(e){if(!e){if(!this.metadataGeneratorProperty)return;e=this.metadataGeneratorProperty.getSingleMetadata()}this.fillMetadataIfUndefined(),this.metadataProperty.push(e)}appendMetadataRange(e,t){if(!e){if(!this.metadataGeneratorProperty)return;e=Array(t).fill(1).map(e=>this.metadataGeneratorProperty.getSingleMetadata())}this.fillMetadataIfUndefined(),this.metadataProperty.push(...e)}insertMetadata(e,t){if(!t){if(!this.metadataGeneratorProperty)return;t=this.metadataGeneratorProperty.getSingleMetadata()}this.fillMetadataIfUndefined(),this.metadataProperty.splice(e,0,t)}insertMetadataRange(e,t){if(!t){if(!this.metadataGeneratorProperty)return;t=Array(length).fill(1).map(e=>this.metadataGeneratorProperty.getSingleMetadata())}this.fillMetadataIfUndefined(),this.metadataProperty.splice(e,0,...t)}removeMetadataAt(e){this.metadataProperty&&this.metadataProperty.splice(e,1)}removeMetadataRange(e,t){this.metadataProperty&&this.metadataProperty.splice(e,t)}setMetadata(e){this.metadataProperty=e}getXValues(e){let t;switch(e){case p.EDataSeriesValueType.FinalAnimationValues:t=this.xFinalAnimationValues;break;case p.EDataSeriesValueType.InitialAnimationValues:t=this.xInitialAnimationValues;break;default:t=this.xValues}return t}fillMetadataIfUndefined(){if(void 0===this.metadataProperty){const e=this.count();this.metadataProperty=Array(e).fill(void 0)}}getYValues(e){let t;switch(e){case p.EDataSeriesValueType.FinalAnimationValues:t=this.yFinalAnimationValues;break;case p.EDataSeriesValueType.InitialAnimationValues:t=this.yInitialAnimationValues;break;default:t=this.yValues}return t}};t.getIndicesRange=(e,t,i,r)=>{const n=t.size();let s=new o.NumberRange(0,-1);if(n>0){if(!r)return new o.NumberRange(0,n-1);const a=e.NumberUtil.FindIndex(t,i.min,e.SCRTFindIndexSearchMode.RoundDown,!0),l=e.NumberUtil.FindIndex(t,i.max,e.SCRTFindIndexSearchMode.RoundUp,!0);s=new o.NumberRange(a,l)}return s};t.getWindowedYRange=(e,i,r,s,a,l,h)=>{const d=i.size();if(1===d){const e=r.get(0)-1,t=r.get(0)+1;return new o.NumberRange(e,t)}const c=l?s:(0,t.getIndicesRange)(e,i,s,h),p=Math.max(Math.floor(c.min),0),g=Math.min(Math.ceil(c.max),d-1);if(g<p)return;let f;try{if(f=e.NumberUtil.MinMaxWithIndex(r,p,g-p+1),!(0,u.isRealNumber)(f.minD)||!(0,u.isRealNumber)(f.maxD))return;return f.minD===f.maxD?new o.NumberRange(f.minD-1,f.minD+1):new o.NumberRange(f.minD,f.maxD)}finally{(0,n.deleteSafe)(f)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PointMarkerDrawingProvider=void 0;const r=i(0),n=i(49);class s extends n.BaseSeriesDrawingProvider{constructor(e,t,i,r,n){super(e,t,i,n),this.ySplineValuesSelector=void 0===r?e=>e.ySplineValues:r,this.nativeDrawingProvider=new this.webAssemblyContext.SCRTScatterSeriesDrawingProvider,this.xAnimationPointMarkerValues=new this.webAssemblyContext.SCRTDoubleVector,this.yAnimationPointMarkerValues=new this.webAssemblyContext.SCRTDoubleVector,this.args=new this.webAssemblyContext.SCRTPointDrawingParams}onSeriesPropertyChange(e){}getProperties(e){return e}draw(e,t){var i;const r=null===(i=this.getProperties(this.parentSeries))||void 0===i?void 0:i.pointMarker;if(void 0===r)return;let n,s;this.parentSeries.hasPointMarkerPaletteProvider()?(n=r.getFillMask(),s=r.getStrokeMask()):(n=r.getSprite(),s=void 0);const o=t.pointSeries,a=t.xCoordinateCalculator.isCategoryCoordinateCalculator;let l=this.xSelector(o),h=this.ySelector(o);if(this.parentSeries.isSpline){const e=this.parentSeries;e.xSplineValues.size()>0&&e.ySplineValues.size()>0&&(this.pointMarkerXYValuesFromSpline(l.size(),e.xSplineValues,this.ySplineValuesSelector(e),e.interpolationPoints),l=this.xAnimationPointMarkerValues,h=this.yAnimationPointMarkerValues)}this.args.Reset(),this.args.count=h.size(),this.args.verticalChart=t.isVerticalChart,this.args.forceShaderMethod=!0,this.args.SetSpriteTexture(n.getTexture()),s&&this.args.SetStrokeMask(s.getTexture()),super.applyStrokeFillPaletting(r.stroke,void 0,r.fill,void 0,this.parentSeries.opacity),this.args.SetPalettedColors(this.palettingState.palettedColors);const u=e.getNativeContext();this.drawPoints(u,a?o.indexes:l,h,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect)}delete(){this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),this.xAnimationPointMarkerValues=(0,r.deleteSafe)(this.xAnimationPointMarkerValues),this.yAnimationPointMarkerValues=(0,r.deleteSafe)(this.yAnimationPointMarkerValues),this.args=(0,r.deleteSafe)(this.args),super.delete()}overridePaletteProviderColors(e,t,i,r,n,s){if(e.hasPointMarkerPaletteProvider()){const o=e.paletteProvider.overridePointMarkerArgb(t,i,r,n,s);if(o)return o}return{stroke:void 0,fill:void 0}}isGradientFillPaletting(e){return!1}drawPoints(e,t,i,r,n,s,o){this.nativeDrawingProvider.DrawPointsVec(e,t,i,r,n,s)}pointMarkerXYValuesFromSpline(e,t,i,r){this.xAnimationPointMarkerValues.resize(e,0),this.yAnimationPointMarkerValues.resize(e,0);for(let n=0;n<e-1;n++){const e=t.get((r+1)*n);this.xAnimationPointMarkerValues.set(n,e);const s=i.get((r+1)*n);this.yAnimationPointMarkerValues.set(n,s)}const n=i.size()-1;this.xAnimationPointMarkerValues.set(e-1,t.get(n)),this.yAnimationPointMarkerValues.set(e-1,i.get(n))}}t.PointMarkerDrawingProvider=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchData=t.XyFilterBase=t.EDataSeriesField=void 0;const r=i(10),n=i(212);var s;!function(e){e.X="x",e.Open="open",e.High="high",e.Low="low",e.Close="close",e.Y="y",e.Y1="y1",e.Z="z"}(s=t.EDataSeriesField||(t.EDataSeriesField={}));class o extends n.XyDataSeries{constructor(e,t){var i,n;switch(super(e.webAssemblyContext,t),this.field=s.Y,this.xField=s.X,this.originalSeries=e,this.field=null!==(i=null==t?void 0:t.field)&&void 0!==i?i:this.field,this.xField=null!==(n=null==t?void 0:t.xField)&&void 0!==n?n:this.xField,this.onBaseDataChanged=this.onBaseDataChanged.bind(this),e.dataChanged.subscribe(this.onBaseDataChanged),this.originalSeries.type){case r.EDataSeriesType.Xy:this.xField===s.Y&&(this.getOriginalXValues=()=>this.originalSeries.getNativeYValues()),this.field===s.X&&(this.getOriginalYValues=()=>this.originalSeries.getNativeXValues());break;case r.EDataSeriesType.Ohlc:this.getOriginalXValues=()=>this.getValuesFromOHLC(this.xField,this.originalSeries),this.getOriginalYValues=()=>this.getValuesFromOHLC(this.field,this.originalSeries);break;case r.EDataSeriesType.Xyy:this.getOriginalXValues=()=>this.getValuesFromXyy(this.xField,this.originalSeries),this.getOriginalYValues=()=>this.getValuesFromXyy(this.field,this.originalSeries);break;case r.EDataSeriesType.Xyz:this.getOriginalXValues=()=>this.getValuesFromXyz(this.xField,this.originalSeries),this.getOriginalYValues=()=>this.getValuesFromXyz(this.field,this.originalSeries);break;case r.EDataSeriesType.Hlc:this.getOriginalXValues=()=>this.getValuesFromHlc(this.xField,this.originalSeries),this.getOriginalYValues=()=>this.getValuesFromHlc(this.field,this.originalSeries)}}getOriginalXValues(){return this.originalSeries.getNativeXValues()}getOriginalYValues(){return this.originalSeries.getNativeYValues()}getOriginalCount(){return this.originalSeries.count()}onOriginalPropertyChanged(e){}filterOnAppend(e){this.filterAll()}filterOnUpdate(e){this.filterAll()}filterOnInsert(e,t){this.filterAll()}filterOnRemove(e,t){this.filterAll()}onClear(){this.clear()}onBaseDataChanged(e){const{changeType:t,name:i,index:n,count:s}=e;switch(t){case r.EDataChangeType.Property:return void this.onOriginalPropertyChanged(i);case r.EDataChangeType.Append:this.filterOnAppend(s);break;case r.EDataChangeType.Clear:this.onClear();break;case r.EDataChangeType.Insert:this.filterOnInsert(n,s);break;case r.EDataChangeType.Remove:this.filterOnRemove(n,s);break;case r.EDataChangeType.Update:this.filterOnUpdate(n)}}getValuesFromOHLC(e,i){return(0,t.switchData)(e,i.getNativeXValues(),i.getNativeYValues(),i.getNativeOpenValues(),i.getNativeHighValues(),i.getNativeLowValues())}getValuesFromXyy(e,i){return(0,t.switchData)(e,i.getNativeXValues(),i.getNativeYValues(),i.getNativeY1Values())}getValuesFromXyz(e,i){return(0,t.switchData)(e,i.getNativeXValues(),i.getNativeYValues(),i.getNativeZValues())}getValuesFromHlc(e,i){return(0,t.switchData)(e,i.getNativeXValues(),i.getNativeYValues(),void 0,i.getNativeHighValues(),i.getNativeLowValues())}}t.XyFilterBase=o;t.switchData=(e,t,i,r,n,o)=>{let a;switch(e){case s.X:a=t;break;case s.Close:case s.Y:a=i;break;case s.Open:case s.Y1:case s.Z:a=r;break;case s.High:a=n;break;case s.Low:a=o}if(!a)throw new Error(e+" does not exist");return a}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAnimationStyle=void 0;const r=i(43),n=i(2),s=i(201),o=i(96);t.BaseAnimationStyle=class{constructor(e){var t,i,n;this.opacity=void 0,this.strokeProperty=void 0,this.strokeThickness=null!==(t=null==e?void 0:e.strokeThickness)&&void 0!==t?t:this.strokeThickness,this.stroke=null!==(i=null==e?void 0:e.stroke)&&void 0!==i?i:this.strokeProperty,(null==e?void 0:e.pointMarker)&&(this.pointMarker=e.pointMarker.type===r.EPointMarkerType.Sprite?new s.CustomPointMarkerStyle(e.pointMarker):new o.PointMarkerStyle(e.pointMarker)),this.opacity=null!==(n=null==e?void 0:e.opacity)&&void 0!==n?n:this.opacity}set stroke(e){this.strokeProperty=e,e&&(this.strokeARGBProperty=(0,n.parseColorToUIntArgb)(e))}get stroke(){return this.strokeProperty}get strokeARGB(){return this.strokeARGBProperty}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLabelCoordinates=t.drawAxisMarkerAnnotation=t.drawLineAnnotation=t.drawModifiersAxisLabel=void 0;const r=i(15),n=i(33),s=i(102);t.drawModifiersAxisLabel=(e,t,i,r,n)=>{if(!e.isVisible)return;const s=a(e,i),o=Object.assign(Object.assign({},e.dpiAdjustedLabelStyle),{color:n});return e.axisRenderer.drawModifiersAxisLabel(t,s,i,e.axisAlignment,o,r)};t.drawLineAnnotation=(e,i,l,h,u,d,c,p,g,f,y,v,m,S,P,C)=>{const A=i.getNativeContext(),{axisAlignment:x}=e,b=(x===n.EAxisAlignment.Top||x===n.EAxisAlignment.Bottom)&&![s.ELabelPlacement.Top,s.ELabelPlacement.Bottom,s.ELabelPlacement.Auto,s.ELabelPlacement.Axis].includes(l),T=[s.ELabelPlacement.Right,s.ELabelPlacement.TopRight,s.ELabelPlacement.BottomRight].includes(l),E=x===n.EAxisAlignment.Top||x===n.EAxisAlignment.Bottom?u:c,w=h||a(e,E),R=l===s.ELabelPlacement.Auto||l===s.ELabelPlacement.Axis,D=R?f:null,L=R?g:Object.assign(Object.assign({},g),{color:f});let M,I=0,O=0;const{x1LineCoord:k,y1LineCoord:V,x2LineCoord:_,y2LineCoord:N}=o(u,c,d,p,I,O,l,e);if(i.drawLine(k,V,_,N,y,v),m){const{bitmapTexture:i,textureHeight:n,textureWidth:s}=e.axisRenderer.createAnnotationLabelTexture(w,L,D,b,T,S),{xPosition:o,yPosition:a}=(0,t.getLabelCoordinates)(e,l,u,d,c,p,n,s,P,C);I=n,O=s,M=new r.Rect(o,a,s,n),A.DrawTexture(i,Math.round(o),Math.round(a),s,n),i.delete()}return M};t.drawAxisMarkerAnnotation=(e,i,r,n,o,l,h,u,d,c,p,g)=>{const f=i.getNativeContext(),{axisAlignment:y}=e,v=r||a(e,n),{bitmapTexture:m,textureHeight:S,textureWidth:P}=c?e.axisRenderer.createAxisMarkerFromImage(c,p,g):e.axisRenderer.createAxisMarker(y,v,h,u,d),{xPosition:C,yPosition:A}=(0,t.getLabelCoordinates)(e,s.ELabelPlacement.Axis,o,o,l,l,S,P);return m&&(f.DrawTexture(m,Math.round(C),Math.round(A),P,S),m.delete()),{xPosition:C,yPosition:A,textureWidth:P,textureHeight:S}};t.getLabelCoordinates=(e,t,i,r,o,a,l,h,u,d)=>{const{axisAlignment:c,parentSurface:{seriesViewRect:p},viewRect:g}=e;let f=0,y=0;const v=()=>{switch(c){case n.EAxisAlignment.Right:case n.EAxisAlignment.Left:y=p.top+o-l/2;break;case n.EAxisAlignment.Top:y=p.top+a/2-l/2;break;case n.EAxisAlignment.Bottom:y=p.top+o+(a-o)/2-l/2}},m=()=>{switch(c){case n.EAxisAlignment.Right:f=p.left+r+(i-r)/2-h/2;break;case n.EAxisAlignment.Left:f=p.left+r/2-h/2;break;case n.EAxisAlignment.Top:case n.EAxisAlignment.Bottom:f=p.left+r-h/2}},S=()=>{switch(c){case n.EAxisAlignment.Right:f=p.left+i-h;break;case n.EAxisAlignment.Left:f=p.left+r-h;break;case n.EAxisAlignment.Top:case n.EAxisAlignment.Bottom:f=p.left+i}},P=()=>{switch(c){case n.EAxisAlignment.Right:f=p.left+r;break;case n.EAxisAlignment.Left:f=p.left;break;case n.EAxisAlignment.Top:case n.EAxisAlignment.Bottom:f=p.left+i-h}},C=()=>{switch(c){case n.EAxisAlignment.Right:case n.EAxisAlignment.Left:y=p.top+o-l;break;case n.EAxisAlignment.Top:y=p.top;break;case n.EAxisAlignment.Bottom:y=p.top+a}},A=()=>{switch(c){case n.EAxisAlignment.Right:case n.EAxisAlignment.Left:y=p.top+o;break;case n.EAxisAlignment.Top:y=p.top+a-l;break;case n.EAxisAlignment.Bottom:y=p.top+o-l}};switch(t){case s.ELabelPlacement.Right:v(),S();break;case s.ELabelPlacement.TopRight:C(),S();break;case s.ELabelPlacement.BottomRight:A(),S();break;case s.ELabelPlacement.Bottom:A(),m();break;case s.ELabelPlacement.Left:v(),P();break;case s.ELabelPlacement.TopLeft:C(),P();break;case s.ELabelPlacement.BottomLeft:A(),P();break;case s.ELabelPlacement.Top:C(),m();break;case s.ELabelPlacement.Axis:case s.ELabelPlacement.Auto:(()=>{switch(c){case n.EAxisAlignment.Right:v(),f=u===s.EHorizontalAlignment.Left?p.left:g.width<h?f=g.right-h:g.left;break;case n.EAxisAlignment.Left:v(),f=u===s.EHorizontalAlignment.Right?p.left+p.width-h:g.width<h?f=g.left:g.right-h;break;case n.EAxisAlignment.Top:y=d===s.EVerticalAlignment.Bottom?p.top+p.height-l:g.height<l?g.top:g.bottom-l,m();break;case n.EAxisAlignment.Bottom:y=d===s.EVerticalAlignment.Top?p.top:g.height<l?g.bottom-l:g.top,m()}})();break;default:throw Error("Unexpected LabelPlacement "+t)}return t!==s.ELabelPlacement.Auto&&t!==s.ELabelPlacement.Axis&&(y<p.top&&(y=p.top),y+l>p.bottom&&(y=p.bottom-l),f<p.left&&(f=p.left),f+h>p.right&&(f=p.right-h)),{xPosition:f,yPosition:y}};const o=(e,t,i,r,o,a,l,h)=>{const{axisAlignment:u,parentSurface:{seriesViewRect:d},viewRect:c}=h;let p=e,g=t,f=i,y=r;switch(l){case s.ELabelPlacement.Right:switch(u){case n.EAxisAlignment.Right:p=Math.abs(e-i)<a?f:e-a;break;case n.EAxisAlignment.Left:f=i>d.width?d.width-a:i-a}break;case s.ELabelPlacement.Bottom:switch(u){case n.EAxisAlignment.Top:y=r>d.height?d.height-o:r-o;break;case n.EAxisAlignment.Bottom:g=Math.abs(t-r)<o?y:t-o}break;case s.ELabelPlacement.Left:switch(u){case n.EAxisAlignment.Right:f=i<0?a:i+a;break;case n.EAxisAlignment.Left:p=Math.abs(e-i)<a?f:e+a}break;case s.ELabelPlacement.Top:switch(u){case n.EAxisAlignment.Top:g=Math.abs(t-r)<o?y:t+o;break;case n.EAxisAlignment.Bottom:y=r<0?o:r+o}break;case s.ELabelPlacement.Auto:case s.ELabelPlacement.Axis:switch(u){case n.EAxisAlignment.Right:p=c.width<a?d.width+c.width-a:d.width,f>p&&(f=p);break;case n.EAxisAlignment.Left:p=c.width<a?a-c.width:0,f<p&&(f=p);break;case n.EAxisAlignment.Top:g=c.height<o?o-c.height:0,y<g&&(y=g);break;case n.EAxisAlignment.Bottom:g=c.height<o?c.bottom-o:d.bottom,y>g&&(y=g)}}return{x1LineCoord:p,y1LineCoord:g,x2LineCoord:f,y2LineCoord:y}},a=(e,t)=>{let i;const r=e.getCurrentCoordinateCalculator();if(e.isCategoryAxis){const e=r.getDataValue(t);i=r.transformIndexToData(e)}else i=r.getDataValue(t);return e.labelProvider.formatCursorLabel(i)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesAnimationFiniteStateMachine=t.AnimationFiniteStateMachine=t.EAnimationStateTransition=t.EAnimationState=void 0;const r=i(180);var n,s;!function(e){e.InitialState="InitialState",e.Delayed="Delayed",e.Running="Running",e.Completed="Completed"}(n=t.EAnimationState||(t.EAnimationState={})),function(e){e.NoChange="NoChange",e.InitialState_Delayed="InitialState_Delayed",e.InitialState_Running="InitialState_Running",e.InitialState_Completed="InitialState_Completed",e.Delayed_Running="Delayed_Running",e.Running_Completed="Running_Completed"}(s=t.EAnimationStateTransition||(t.EAnimationStateTransition={}));class o{constructor(e){this.stateProperty=n.InitialState,this.animationProperty=e}get state(){return this.stateProperty}get animation(){return this.animationProperty}is(e){return e.includes(this.stateProperty)}update(e){return this.stateProperty===n.InitialState?this.animationProperty.delay?(this.toDelayed(),s.InitialState_Delayed):this.animationProperty.duration?(this.toRunning(),s.InitialState_Running):(this.toCompleted(),s.InitialState_Completed):this.stateProperty===n.Delayed?this.updateDelayedState(e):this.stateProperty===n.Running?this.updateRunningState(e):s.NoChange}get animationProgress(){if(this.stateProperty===n.Running){const e=r.NumberUtil.constrain(this.animationElapsed/this.animationProperty.duration,0,1);return this.animationProperty.ease(e)}return this.stateProperty===n.Completed?1:0}toCompleted(){this.stateProperty=n.Completed}validate(e,t){if(!e.includes(this.stateProperty))throw Error(`Transition from state ${this.stateProperty} to ${t} if forbidden`)}toDelayed(){this.animationDelayStartTimestamp=Date.now(),this.animationDelayElapsed=0,this.stateProperty=n.Delayed}toRunning(){this.animationStartTimestamp=Date.now(),this.animationElapsed=0,this.stateProperty=n.Running}updateDelayedState(e){return this.animationDelayElapsed+=e,this.animationDelayElapsed>=this.animationProperty.delay?(this.toRunning(),s.Delayed_Running):s.NoChange}updateRunningState(e){return this.animationElapsed+=e,this.animationElapsed>=this.animationProperty.duration?(this.toCompleted(),s.Running_Completed):s.NoChange}}t.AnimationFiniteStateMachine=o;t.SeriesAnimationFiniteStateMachine=class extends o{constructor(e,t){super(e),t&&(this.initialStylesProperty=e.getSeriesStyle(t))}get animation(){return this.animationProperty}get initialStyles(){return this.initialStylesProperty}}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartSubSurface=t.SciChartSurface=t.sciChartConfig=void 0;const n=i(36),s=i(14),o=i(13),a=i(188),l=i(39),h=i(53),u=i(0),d=i(99),c=i(18),p=i(69),g=i(15),f=i(52),y=i(291),v=i(17),m=i(8),S=i(80),P=i(189),C=i(81),A=i(2),x=i(9),b=i(100),T=i(292),E=i(54),w=i(293),R=i(447),D=i(262),L=i(112),M=i(295),I=i(137),O=i(299),k=i(28),V=i(48),_=i(57),N=i(288),F=i(195),B=i(86),H=i(182),Y=i(12),z=i(196),j=i(206),G=i(92),X=i(4),W=i(6),U=i(170),$=i(5);t.sciChartConfig={};I.textureWorker;class Z extends X.SciChartSurfaceBase{constructor(e,t){var i,r,n,s,a;super(e,null==t?void 0:t.canvases),this.rendered=new c.EventHandler,this.preRender=new c.EventHandler,this.layersOffset=0,this.stepBetweenLayers=10,this.isSubSurface=!1,this.svgClippingMode=P.ESvgClippingMode.SeriesViewRect,this.renderNativeAxisLabelsImmediately=!1,this.animationList=[],this.paddingProperty=f.Thickness.fromNumber(10),this.zoomStateProperty=C.EZoomState.AtExtents,this.viewportBorderProperty={borderBottom:void 0,borderLeft:void 0,borderRight:void 0,borderTop:void 0,color:"#00000000",border:void 0},this.canvasBorderProperty={borderBottom:void 0,borderLeft:void 0,borderRight:void 0,borderTop:void 0,color:"#00000000",border:void 0},this.subChartsProperty=[],this.drawSeriesBehindAxisProperty=!1,this.autoColorModeProperty=y.EAutoColorMode.OnAddRemoveSeries,this.autoColorRequired=!0,this.xCoordSvgTrans=0,this.yCoordSvgTrans=0,this.subChartCounter=0;const l=null!==(r=null===(i=this.domCanvas2D)||void 0===i?void 0:i.width)&&void 0!==r?r:o.DEFAULT_WIDTH,h=null!==(s=null===(n=this.domCanvas2D)||void 0===n?void 0:n.height)&&void 0!==s?s:o.DEFAULT_HEIGHT;if(this.webAssemblyContext2D=e,!o.IS_TEST_ENV){const t=l/W.DpiHelper.PIXEL_RATIO,i=h/W.DpiHelper.PIXEL_RATIO;this.isCopyCanvasSurface?this.changeMasterCanvasViewportSize(e,t,i):this.changeWebGLCanvasViewportSize(e,t,i)}this.invalidateElement=this.invalidateElement.bind(this),this.onRenderSurfaceDraw=this.onRenderSurfaceDraw.bind(this);const u=this.domCanvas2D?new S.Size(l,h):new S.Size(o.DEFAULT_WIDTH,o.DEFAULT_HEIGHT);this.renderSurface=new R.RenderSurface(e,u,null===(a=this.domCanvas2D)||void 0===a?void 0:a.id),this.renderSurface.handleDraw=this.onRenderSurfaceDraw,this.sciChartRenderer=new M.SciChartRenderer(this),this.layoutManager=new L.LayoutManager,this.domCanvas2D&&(this.renderContext2D=new w.RenderContext2D(this.domCanvas2D)),this.detachSeries=this.detachSeries.bind(this),this.attachSeries=this.attachSeries.bind(this),this.renderableSeries=new p.ObservableArray,this.renderableSeries.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(this.detachSeries),null===(i=e.getNewItems())||void 0===i||i.forEach(this.attachSeries)}),this.detachAxis=this.detachAxis.bind(this),this.attachAxis=this.attachAxis.bind(this),this.xAxes=new p.ObservableArray,this.yAxes=new p.ObservableArray;const d=(e,t)=>{var i,r;null===(i=e.getOldItems())||void 0===i||i.forEach(e=>{e.visibleRangeChanged.unsubscribeAll(),this.detachAxis(e)}),null===(r=e.getNewItems())||void 0===r||r.forEach(e=>this.attachAxis(e,t))};this.xAxes.collectionChanged.subscribe(e=>d(e,!0)),this.yAxes.collectionChanged.subscribe(e=>d(e,!1)),this.detachAnnotation=this.detachAnnotation.bind(this),this.attachAnnotation=this.attachAnnotation.bind(this),this.annotations=new p.ObservableArray,this.modifierAnnotations=new p.ObservableArray,this.annotations.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(e=>this.detachAnnotation(e)),null===(i=e.getNewItems())||void 0===i||i.forEach(e=>this.attachAnnotation(e))}),this.modifierAnnotations.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(e=>this.detachAnnotation(e)),null===(i=e.getNewItems())||void 0===i||i.forEach(e=>this.attachAnnotation(e))}),this.adornerLayer=new O.AdornerLayer(this),this.solidBrushCacheViewportBorder=new D.SolidBrushCache(e),this.solidBrushCacheCanvasBorder=new D.SolidBrushCache(e),o.IS_TEST_ENV||(this.watermarkProperties=new e.SCRTWaterMarkProperties,this.watermarkPropertyPosition=new e.TSRVector2(0,0),this.watermarkProperties.SetPosition(this.watermarkPropertyPosition),this.watermarkProperties.SetOpacity(.5),e.SCRTSetWaterMarkProperties(this.watermarkProperties))}static create(e,t){return(0,n.ensureRegistrations)(),t=Z.resolveOptions(t),o.IS_TEST_ENV?this.createTest(e,t):(0,N.createMultichart)(e,t).then(e=>(e.sciChartSurface.applyOptions(t),e))}static createSingle(e,t){return(0,n.ensureRegistrations)(),t=Z.resolveOptions(t),o.IS_TEST_ENV?this.createTest(e,t):(0,F.createSingleInternal)(e,t).then(e=>(e.sciChartSurface.applyOptions(t),e))}static configure(e){var i,r;t.sciChartConfig.dataUrl=null!==(i=null==e?void 0:e.dataUrl)&&void 0!==i?i:void 0,t.sciChartConfig.wasmUrl=null!==(r=null==e?void 0:e.wasmUrl)&&void 0!==r?r:void 0}static useWasmFromCDN(){t.sciChartConfig.dataUrl=`https://cdn.jsdelivr.net/npm/scichart@${h.libraryVersion}/_wasm/scichart2d.data`,t.sciChartConfig.wasmUrl=`https://cdn.jsdelivr.net/npm/scichart@${h.libraryVersion}/_wasm/scichart2d.wasm`}static useWasmLocal(){Z.configure(void 0)}static createTest(e,i){var r,n;const s=G.default.initCanvas(e,null!==(r=null==i?void 0:i.widthAspect)&&void 0!==r?r:0,null!==(n=null==i?void 0:i.heightAspect)&&void 0!==n?n:0,G.default.ECanvasType.canvas2D),o=new Z(t.sciChartConfig.testWasm,{canvases:s});return o.applyTheme(null==i?void 0:i.theme),o.applyOptions(i),new Promise(e=>e({wasmContext:o.webAssemblyContext2D,sciChartSurface:o}))}addSubChart(e){const t=Z.resolveOptions(e);e=Object.assign(Object.assign({},e),t),this.subChartCounter++;const i=this.domChartRoot.id+"_"+this.subChartCounter.toString(),r=this.domChartRoot,n=r.clientWidth,s=r.clientHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.id=i+"_SVG",o.setAttribute("width",n.toString()),o.setAttribute("height",s.toString()),o.setAttribute("role","img"),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.display="block",o.style.pointerEvents="none",r.appendChild(o);const a={domChartRoot:this.domChartRoot,domCanvasWebGL:this.domCanvasWebGL,domCanvas2D:this.domCanvas2D,domSvgContainer:o,domSvgAdornerLayer:this.domSvgAdornerLayer,domDivContainer:this.domDivContainer},l=new K(this.webAssemblyContext2D,{canvases:a,parentSurface:this,subSurfaceOptions:e});return(null==e?void 0:e.theme)&&l.applyTheme(e.theme),l.mouseManager.unsubscribe(),this.subChartsProperty.push(l),this.onAttachSubSurface(l),l}removeSubChart(e){const t=this.subChartsProperty.findIndex(t=>t===e);t>-1&&(this.subChartsProperty.splice(t,1),e.delete())}get subCharts(){return this.subChartsProperty}get surfaceType(){return X.ESurfaceType.SciChartSurfaceType}get layoutManager(){return this.layoutManagerProperty}set layoutManager(e){this.layoutManagerProperty=e,this.layoutManagerProperty.sciChartSurface=this,this.invalidateElement()}get dataLabelLayoutManager(){return this.dataLabelLayoutManagerProperty}set dataLabelLayoutManager(e){this.dataLabelLayoutManagerProperty=e,this.invalidateElement()}get padding(){return this.paddingProperty}set padding(e){this.paddingProperty.equals(e)||(this.paddingProperty=e,this.invalidateElement())}get adjustedPadding(){return W.DpiHelper.adjustThickness(this.padding)}get debugRendering(){return this.debugRenderingProperty}set debugRendering(e){this.debugRenderingProperty=e,this.invalidateElement()}get autoColorMode(){return this.autoColorModeProperty}set autoColorMode(e){this.autoColorModeProperty=e,e===y.EAutoColorMode.Never||this.autoColorRequired?e===y.EAutoColorMode.Never&&(this.autoColorRequired=!1):this.autoColorRequired=!0,this.invalidateElement()}applyTheme(e){super.applyTheme(e),this.renderableSeries.asArray().forEach(t=>t.applyTheme(e)),this.xAxes.asArray().forEach(t=>t.applyTheme(e)),this.yAxes.asArray().forEach(t=>t.applyTheme(e))}changeViewportSize(e,t){if(!e||!t)return;const i=e*W.DpiHelper.PIXEL_RATIO,r=t*W.DpiHelper.PIXEL_RATIO;this.renderSurface.viewportSize=new S.Size(i,r),this.isCopyCanvasSurface?(this.changeMasterCanvasViewportSize(this.webAssemblyContext2D,e,t),this.domCanvas2D&&W.DpiHelper.setSize(this.domCanvas2D,e,t)):this.changeWebGLCanvasViewportSize(this.webAssemblyContext2D,e,t),this.domSvgAdornerLayer&&(this.domSvgAdornerLayer.setAttribute("width",e.toString()),this.domSvgAdornerLayer.setAttribute("height",t.toString()));for(const e of this.subChartsProperty)e.updateSubLayout();this.invalidateElement()}invalidateElement(){if(this.isSuspended)return;const e=this.domCanvas2D?this.domCanvas2D.id:"undefinedCanvasId";this.renderSurface.invalidateElement(e)}doDrawingLoop(e){e=null!=e?e:this.renderSurface.getRenderContext();try{const t=new U.UpdateSuspender(this,!1);try{this.autoColorRequired&&(this.themeProvider.strokePalette&&this.themeProvider.strokePalette.length>0||this.themeProvider.fillPalette&&this.themeProvider.fillPalette.length>0)&&(this.resolveAutoColors(),this.autoColorMode!==y.EAutoColorMode.Always&&(this.autoColorRequired=!1)),this.preRender.raiseEvent(e)}catch(e){console.error(e)}finally{t.resume()}this.sciChartRenderer.render(e)}catch(e){if("BindingError"===e.name)console.error(e),console.warn("Binding errors can occur if a previous chart using the same div id was not deleted correctly, or if you try to share data or series between charts that use different webassembly contexts."),(0,Y.freeCache)(this.webAssemblyContext2D);else{if(!this.domChartRoot)throw e;console.error("Error from chart in div "+this.domChartRoot.id,e)}}}delete(e=!0){super.delete();for(const e of this.subChartsProperty)e.delete();if(this.subChartsProperty=[],this.renderableSeries.asArray().forEach(e=>e.delete()),this.renderableSeries.clear(),this.xAxes.asArray().forEach(e=>e.delete()),this.yAxes.asArray().forEach(e=>e.delete()),this.modifierAnnotations.asArray().forEach(e=>e.delete()),this.annotations.asArray().forEach(e=>e.delete()),this.solidBrushCacheViewportBorder=(0,u.deleteSafe)(this.solidBrushCacheViewportBorder),this.solidBrushCacheCanvasBorder=(0,u.deleteSafe)(this.solidBrushCacheCanvasBorder),this.watermarkProperties=(0,u.deleteSafe)(this.watermarkProperties),this.watermarkPropertyPosition=(0,u.deleteSafe)(this.watermarkPropertyPosition),this.chartModifiers.asArray().forEach(e=>e.delete()),e&&this.domChartRoot){const e=this.domChartRoot.style;e&&(e.background="",e.position=""),this.domChartRoot.hasOwnProperty("replaceChildren")?this.domChartRoot.replaceChildren():this.domChartRoot.innerHTML=""}}onDpiChanged(e){var t,i;this.renderableSeries.asArray().forEach(t=>t.onDpiChanged(e)),this.annotations.asArray().forEach(t=>t.onDpiChanged(e)),this.modifierAnnotations.asArray().forEach(t=>t.onDpiChanged(e)),this.xAxes.asArray().forEach(e=>e.onDpiChanged()),this.yAxes.asArray().forEach(e=>e.onDpiChanged()),this.changeViewportSize(null===(t=this.getMainCanvas())||void 0===t?void 0:t.clientWidth,null===(i=this.getMainCanvas())||void 0===i?void 0:i.clientHeight),super.onDpiChanged(e)}getXAxisById(e){let t=this.xAxes.getById(e);return!t&&e===_.AxisCore.DEFAULT_AXIS_ID&&this.xAxes.size()>0&&(t=this.xAxes.get(0)),t}getYAxisById(e){let t=this.yAxes.getById(e);return!t&&e===_.AxisCore.DEFAULT_AXIS_ID&&this.yAxes.size()>0&&(t=this.yAxes.get(0)),t}updateStackedCollectionAccumulatedVectors(){this.renderableSeries.asArray().filter(e=>e.isStacked&&"size"in e).forEach(e=>e.updateAccumulatedVectors())}zoomExtents(e=0,t=l.easing.outExpo,i=(()=>{})){this.updateStackedCollectionAccumulatedVectors();const r=void 0===this.xAxes?0:this.xAxes.size(),n=void 0===this.yAxes?0:this.yAxes.size();if(0===r||0===n)throw new Error("Cannot ZoomExtents when XAxes or YAxes is undefined or empty");const s=this.zoomExtentsXInternal(e,t,i);this.zoomExtentsYInternal(s,e,t,i)}zoomExtentsX(e=0,t=l.easing.outExpo){this.zoomExtentsXInternal(e,t)}zoomExtentsY(e=0,t=l.easing.outExpo){this.zoomExtentsYInternal(void 0,e,t)}updateWatermark(e,t){var i;if(!o.IS_TEST_ENV){this.watermarkPropertyPosition.x=e,this.watermarkPropertyPosition.y=t,this.watermarkProperties.m_fCanvasWidth=this.renderSurface.viewportSize.width,this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);const r=null===(i=this.themeProvider)||void 0===i?void 0:i.isLightBackground;this.watermarkProperties.m_bIsDarkBackground=void 0!==r&&!r,this.webAssemblyContext2D.SCRTSetWaterMarkProperties(this.watermarkProperties)}}setZoomState(e){this.zoomStateProperty=e}get zoomState(){return this.zoomStateProperty}get viewportBorder(){return this.viewportBorderProperty}set viewportBorder(e){this.viewportBorderProperty=Object.assign(Object.assign({},this.viewportBorderProperty),e),this.notifyPropertyChanged("ViewportBorder")}get canvasBorder(){return this.canvasBorderProperty}set canvasBorder(e){this.canvasBorderProperty=Object.assign(Object.assign({},this.canvasBorderProperty),e),this.notifyPropertyChanged("Border")}drawBorder(e){(0,H.drawBorder)(e,this.webAssemblyContext2D,this.solidBrushCacheViewportBorder,this.seriesViewRect,this.leftViewportBorder,this.topViewportBorder,this.rightViewportBorder,this.bottomViewportBorder,this.viewportBorder.color);const t=e.viewportSize,i=g.Rect.create(this.leftCanvasBorder,this.topCanvasBorder,t.width-this.leftCanvasBorder-this.rightCanvasBorder,t.height-this.topCanvasBorder-this.bottomCanvasBorder);(0,H.drawBorder)(e,this.webAssemblyContext2D,this.solidBrushCacheCanvasBorder,i,this.leftCanvasBorder,this.topCanvasBorder,this.rightCanvasBorder,this.bottomCanvasBorder,this.canvasBorder.color)}get leftViewportBorder(){var e,t;return null!==(t=null!==(e=this.viewportBorder.borderLeft)&&void 0!==e?e:this.viewportBorder.border)&&void 0!==t?t:0}get rightViewportBorder(){var e,t;return null!==(t=null!==(e=this.viewportBorder.borderRight)&&void 0!==e?e:this.viewportBorder.border)&&void 0!==t?t:0}get topViewportBorder(){var e,t;return null!==(t=null!==(e=this.viewportBorder.borderTop)&&void 0!==e?e:this.viewportBorder.border)&&void 0!==t?t:0}get bottomViewportBorder(){var e,t;return null!==(t=null!==(e=this.viewportBorder.borderBottom)&&void 0!==e?e:this.viewportBorder.border)&&void 0!==t?t:0}get leftCanvasBorder(){var e,t;return null!==(t=null!==(e=this.canvasBorder.borderLeft)&&void 0!==e?e:this.canvasBorder.border)&&void 0!==t?t:0}get rightCanvasBorder(){var e,t;return null!==(t=null!==(e=this.canvasBorder.borderRight)&&void 0!==e?e:this.canvasBorder.border)&&void 0!==t?t:0}get topCanvasBorder(){var e,t;return null!==(t=null!==(e=this.canvasBorder.borderTop)&&void 0!==e?e:this.canvasBorder.border)&&void 0!==t?t:0}get bottomCanvasBorder(){var e,t;return null!==(t=null!==(e=this.canvasBorder.borderBottom)&&void 0!==e?e:this.canvasBorder.border)&&void 0!==t?t:0}onAnimate(e){if(e){this.renderableSeries.asArray().forEach(t=>t.onAnimate(e));const t=[];for(let i=0;i<this.animationList.length;i++){const r=this.animationList[i];r.isComplete||(r.update(e),r.isComplete||t.push(r))}this.animationList=t}}getAnimations(){return this.animationList}addAnimation(...e){void 0!==e&&(e.forEach(e=>this.animationList.push(e)),this.invalidateElement())}get isRunningAnimation(){for(let e=0;e<this.renderableSeries.size();e++)if(this.renderableSeries.get(e).isRunningAnimation)return!0;return this.animationList.some(e=>!e.isComplete)}getSeriesViewRectPadding(e=!0){const t=e?1:W.DpiHelper.PIXEL_RATIO,i=this.seriesViewRect,r=i.left/t,n=i.top/t,s=(this.domCanvas2D.width-i.right)/t,o=(this.domCanvas2D.height-i.bottom)/t;return new f.Thickness(n,s,o,r)}resolveAutoColors(e){if(!e){const t=this.renderableSeries.asArray().filter(e=>e.isStacked&&"size"in e);e=this.renderableSeries.size()-t.length;for(const i of t)e+=i.size()}let t=0;for(let i=0;i<this.renderableSeries.size();i++){const r=this.renderableSeries.get(i);r&&r.resolveAutoColors(t,e,this.themeProvider),r.isStacked&&"size"in r?t+=r.size():t+=1}}registerFont(e,t){return r(this,void 0,void 0,(function*(){return e.includes(".")||(e+=".ttf"),new Promise((i,r)=>{const n=this.webAssemblyContext2D.SCRTFileLoadCallbackInterface.implement({OnLoadComplete(r,n){r?i(!0):(console.error(`Failed to load ${e} from ${t}. Error: ${n}`),i(!1))}});this.webAssemblyContext2D.SCRTRegisterFile(e,t,n)})}))}setCoordSvgTranslation(e,t){this.xCoordSvgTrans=e,this.yCoordSvgTrans=t}getCoordSvgTranslation(){return new $.Point(this.xCoordSvgTrans,this.yCoordSvgTrans)}toJSON(e=!1){var t;let i;i="toJSON"in this.themeProvider?this.themeProvider.toJSON():this.themeProvider;return{surface:{id:this.id,canvasBorder:this.canvasBorder,heightAspect:this.heightAspect,widthAspect:this.widthAspect,layoutManager:null===(t=this.layoutManager)||void 0===t?void 0:t.toJSON(),padding:this.padding,theme:i,viewportBorder:this.viewportBorder,loader:this.loaderJson,drawSeriesBehindAxis:this.drawSeriesBehindAxis,disableAspect:this.disableAspect,autoColorMode:this.autoColorMode},xAxes:this.xAxes.asArray().map(e=>e.toJSON()),yAxes:this.yAxes.asArray().map(e=>e.toJSON()),series:this.renderableSeries.asArray().map(t=>t.toJSON(e)),modifiers:this.chartModifiers.asArray().map(e=>e.toJSON()),annotations:this.annotations.asArray().map(e=>e.toJSON()),onCreated:this.onCreatedName,subCharts:this.subCharts.map(e=>e.toJSON()),createSingle:"SciChartMasterCanvas"!==this.webAssemblyContext2D.canvas.id}}applyOptions(e){super.applyOptions(e),(null==e?void 0:e.layoutManager)&&("layoutChart"in e.layoutManager||(e.layoutManager=(0,s.createType)(v.EBaseType.LayoutManager,e.layoutManager.type,null,e.layoutManager.options)),this.layoutManager=e.layoutManager),(null==e?void 0:e.padding)&&(this.padding=e.padding),(null==e?void 0:e.viewportBorder)&&(this.viewportBorder=e.viewportBorder),(null==e?void 0:e.canvasBorder)&&(this.canvasBorder=e.canvasBorder),(null==e?void 0:e.loader)&&"toJSON"in e.loader&&(this.loaderJson=e.loader.toJSON()),(null==e?void 0:e.drawSeriesBehindAxis)&&(this.drawSeriesBehindAxisProperty=e.drawSeriesBehindAxis),(null==e?void 0:e.autoColorMode)&&(this.autoColorMode=e.autoColorMode)}detachChartModifier(e){super.detachChartModifier(e),this.subCharts.forEach(t=>{e.onDetachSubSurface(t)})}attachChartModifier(e){super.attachChartModifier(e),e.modifierType!==b.EModifierType.MultiChart2DModifier&&(e.setParentSurface(this),e.invalidateParentCallback=this.invalidateElement,e.onAttach(),this.subCharts.forEach(t=>{e.onAttachSubSurface(t)}),this.invalidateElement())}applySciChartBackground(e,t=!0){this.backgroundProperty=e;const i=this.webAssemblyContext2D.SCRTGetMainRenderContext2D();this.domChartRoot&&(this.domChartRoot.style.background=e),i&&(i.SetClearColor(0,0,0,0),i.Clear())}setClearAlphaParams(e,t){this.webAssemblyContext2D.SCRTSetClearAlphaParams(e,t)}zoomExtentsYInternal(e,t=0,i=l.easing.outExpo,r=(()=>{})){this.yAxes.asArray().forEach(n=>{const s=n.getWindowedYRange(e);s&&n.animateVisibleRange(s,t,i,r)})}zoomExtentsXInternal(e=0,t=l.easing.outExpo,i=(()=>{})){const r=new d.Dictionary;return this.xAxes.asArray().forEach(n=>{const s=n.getMaximumRange();n.animateVisibleRange(s,e,t,i),r.add(n.id,s)}),r}onRenderSurfaceDraw(){var e;if(this.subChartsProperty.length>0){const t=new T.BatchRenderContext(this.webAssemblyContext2D,this.renderSurface.viewportSize,null===(e=this.domCanvas2D)||void 0===e?void 0:e.id),i=this.subChartsProperty.filter(e=>e.isVisible);0===i.length&&(t.doDraw=!0),this.doDrawingLoop(t);const r=100;i.forEach((e,n)=>{e.layersOffset=r*(n+1),n===i.length-1&&(t.doDraw=!0),e.doDrawingLoop(t)})}else this.doDrawingLoop()}detachSeries(e){e.type!==m.ESeriesType.StackedColumnSeries&&e.type!==m.ESeriesType.StackedMountainSeries&&(this.chartModifiers.asArray().forEach(t=>{t.onDetachSeries(e)}),e.onDetach(),this.autoColorMode===y.EAutoColorMode.OnAddRemoveSeries&&(this.autoColorRequired=!0),this.invalidateElement())}attachSeries(e){if(e.type===m.ESeriesType.StackedColumnSeries){let t=this.renderableSeries.asArray().find(e=>e.type===m.ESeriesType.StackedColumnCollection);if(!t){t=new z.StackedColumnCollection(this.webAssemblyContext2D);const i=this.renderableSeries.asArray().findIndex(t=>t===e);this.renderableSeries.insert(i,t)}return t.add(e),void this.renderableSeries.remove(e)}if(e.type===m.ESeriesType.StackedMountainSeries){let t=this.renderableSeries.asArray().find(e=>e.type===m.ESeriesType.StackedMountainCollection);if(!t){t=new j.StackedMountainCollection(this.webAssemblyContext2D);const i=this.renderableSeries.asArray().findIndex(t=>t===e);this.renderableSeries.insert(i,t)}t.add(e),this.renderableSeries.remove(e)}e.isStacked&&!("size"in e)||e.onAttach(this),this.themeProviderProperty&&e.applyTheme(this.themeProviderProperty),this.chartModifiers.asArray().forEach(t=>{t.onAttachSeries(e)}),this.autoColorMode===y.EAutoColorMode.OnAddRemoveSeries&&(this.autoColorRequired=!0),this.invalidateElement()}detachAxis(e){e.invalidateParentCallback=void 0,e.parentSurface=void 0,this.invalidateElement()}attachAxis(e,t){if(e.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachAxis, this axis has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");let i=!1;t&&!this.xAxes.asArray().some(e=>e.isPrimaryAxis)&&(i=!0),t||this.yAxes.asArray().some(e=>e.isPrimaryAxis)||(i=!0),e.onAttach(this,t,i),this.themeProviderProperty&&e.applyTheme(this.themeProviderProperty),e.invalidateParentCallback=this.invalidateElement,this.invalidateElement()}detachAnnotation(e){e.onDetach(),e.invalidateParentCallback=void 0,e.parentSurface=void 0,this.invalidateElement()}attachAnnotation(e){if(e.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachAnnotation, this annotation has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");e.parentSurface=this,e.invalidateParentCallback=this.invalidateElement,e.onAttach(this),this.invalidateElement()}onAttachSubSurface(e){this.chartModifiers.asArray().forEach(t=>{t.onAttachSubSurface(e)})}onDetachSubSurface(e){this.chartModifiers.asArray().forEach(t=>{t.onDetachSubSurface(e)})}get drawSeriesBehindAxis(){return this.drawSeriesBehindAxisProperty}set drawSeriesBehindAxis(e){this.drawSeriesBehindAxisProperty=e,this.invalidateElement()}}t.SciChartSurface=Z;class K extends Z{constructor(e,t){var i,r,n,s,o,a,l,h,u,d,c,p,f,y,v;super(e,t),this.isSubSurface=!0,this.topSectionClass="top-section",this.leftSectionClass="left-section",this.bottomSectionClass="bottom-section",this.rightSectionClass="right-section",this.backgroundProperty="transparent",this.isTransparentProperty=!0,this.subPositionProperty=new g.Rect(0,0,1,1),this.coordinateModeProperty=k.ECoordinateMode.Relative,this.parentXAxisIdProperty=V.AxisBase2D.DEFAULT_AXIS_ID,this.parentYAxisIdProperty=V.AxisBase2D.DEFAULT_AXIS_ID,this.isVisibleProperty=!0,this.sectionScaleProperty=1,this.parentSurfaceProperty=t.parentSurface,this.subChartContainerId=null===(i=t.subSurfaceOptions)||void 0===i?void 0:i.subChartContainerId,this.subPaddingProperty=null===(r=null==t?void 0:t.subSurfaceOptions)||void 0===r?void 0:r.subChartPadding,this.isTransparentProperty=null!==(s=null===(n=null==t?void 0:t.subSurfaceOptions)||void 0===n?void 0:n.isTransparent)&&void 0!==s?s:this.isTransparent,this.coordinateModeProperty=null!==(a=null===(o=null==t?void 0:t.subSurfaceOptions)||void 0===o?void 0:o.coordinateMode)&&void 0!==a?a:this.coordinateMode,this.parentXAxisIdProperty=null!==(h=null===(l=null==t?void 0:t.subSurfaceOptions)||void 0===l?void 0:l.parentXAxisId)&&void 0!==h?h:this.parentXAxisId,this.parentYAxisIdProperty=null!==(d=null===(u=null==t?void 0:t.subSurfaceOptions)||void 0===u?void 0:u.parentYAxisId)&&void 0!==d?d:this.parentYAxisId,this.sectionScaleProperty=null!==(p=null===(c=null==t?void 0:t.subSurfaceOptions)||void 0===c?void 0:c.sectionScale)&&void 0!==p?p:this.sectionScaleProperty,this.isVisible=null!==(y=null===(f=null==t?void 0:t.subSurfaceOptions)||void 0===f?void 0:f.isVisible)&&void 0!==y?y:this.isVisible,this.subChartContainerId&&(this.subChartContainer="string"==typeof this.subChartContainerId?document.getElementById(this.subChartContainerId):this.subChartContainerId),this.applyOptions(t.subSurfaceOptions),this.subPosition=null!==(v=t.subSurfaceOptions.position)&&void 0!==v?v:this.subPositionProperty,this.backgroundFillBrushCache=new E.BrushCache(e),this.preRender.subscribe(e=>{this.coordinateMode===k.ECoordinateMode.DataValue&&this.updateSubLayout(!0)})}get isTransparent(){return this.isTransparentProperty}set isTransparent(e){this.isTransparentProperty!==e&&(this.isTransparentProperty=e,this.updateBackground())}get subChartPadding(){return this.subPaddingProperty}set subChartPadding(e){this.subPaddingProperty=e,this.updateSubLayout()}get coordinateMode(){return this.coordinateModeProperty}set coordinateMode(e){this.coordinateModeProperty=e,this.updateSubLayout()}get parentXAxisId(){return this.parentXAxisIdProperty}set parentXAxisId(e){this.parentXAxisIdProperty=e,this.updateSubLayout()}get parentYAxisId(){return this.parentYAxisIdProperty}set parentYAxisId(e){this.parentYAxisIdProperty=e,this.updateSubLayout()}get subPosition(){return this.subPositionProperty}set subPosition(e){if(!this.parentSurface)throw new Error("subPosition can only be changed for subCharts.");g.Rect.isEqual(this.subPositionProperty,e)||(this.subPositionProperty=e,this.updateSubLayout())}get isVisible(){return this.isVisibleProperty}set isVisible(e){this.isVisibleProperty=e,this.invalidateElement()}get sectionScale(){return this.sectionScaleProperty}set sectionScale(e){this.sectionScaleProperty=e,this.updateSubLayout()}updateSubLayout(e=!1){this.updateWrapper(this.subPosition);const t=this.getOffsets(this.subChartContainer);this.padding=this.calcPadding(this.parentSurface.renderSurface.viewportSize,this.subPositionProperty,t,e)}get parentSurface(){return this.parentSurfaceProperty}get surfaceType(){return X.ESurfaceType.SciChartSurfaceType}changeViewportSize(e,t){}getSubChartContainer(){return this.subChartContainer}getSubChartRect(){const{width:e,height:t}=this.renderSurface.viewportSize,{top:i,left:r,bottom:n,right:s}=this.padding;return new g.Rect(r,i,e-r-s,t-i-n)}delete(e=!0){super.delete(!1),e&&this.domChartRoot.contains(this.domSvgContainer)&&this.domChartRoot.removeChild(this.domSvgContainer),this.backgroundFillBrushCache=(0,u.deleteSafe)(this.backgroundFillBrushCache)}toJSON(e=!1){var t;let i;i="toJSON"in this.themeProvider?this.themeProvider.toJSON():this.themeProvider;const r=super.toJSON();return{surface:Object.assign(Object.assign({},r.surface),{isTransparent:this.isTransparent,isVisible:this.isVisible,sectionScale:this.sectionScale,subChartPadding:this.subPaddingProperty,position:this.subPosition,subChartContainerId:"string"==typeof this.subChartContainerId?this.subChartContainerId:null===(t=this.subChartContainerId)||void 0===t?void 0:t.id,coordinateMode:this.coordinateMode,parentXAxisId:this.parentXAxisId,parentYAxisId:this.parentYAxisId}),xAxes:this.xAxes.asArray().map(e=>e.toJSON()),yAxes:this.yAxes.asArray().map(e=>e.toJSON()),series:this.renderableSeries.asArray().map(t=>t.toJSON(e)),modifiers:this.chartModifiers.asArray().map(e=>e.toJSON()),annotations:this.annotations.asArray().map(e=>e.toJSON())}}calcPadding(e,t,i,r=!1){var n,s,o,a,l,h,u,d;const{width:c,height:p}=e,g=(0,x.translateToNotScaled)(c),y=(0,x.translateToNotScaled)(p),{x:v,y:m,width:S,height:P}=t;let C=v,A=m,b=y-m-P,T=g-v-S;if(this.coordinateMode===k.ECoordinateMode.Relative)C=g*v+i.left,A=y*m+i.top,T=g-g*v-g*S+i.right,b=y-y*m-y*P+i.bottom;else if(this.coordinateMode===k.ECoordinateMode.DataValue&&r){const e=this.parentSurface.getXAxisById(this.parentXAxisId);if(!e)throw new Error(`No x axis with id ${this.parentXAxisId} found on parent surface`);const t=e.getCurrentCoordinateCalculator(),i=this.parentSurface.getYAxisById(this.parentYAxisId);if(!i)throw new Error(`No y axis with id ${this.parentYAxisId} found on parent surface`);const{seriesViewRect:r}=this.parentSurface,n=(0,x.translateToNotScaled)(r.left),s=(0,x.translateToNotScaled)(r.top),o=(0,x.translateToNotScaled)(r.bottom),a=(0,x.translateToNotScaled)(r.right),l=i.getCurrentCoordinateCalculator();C=e.isVerticalChart?l.getCoordinate(v):t.getCoordinate(v),A=e.isVerticalChart?t.getCoordinate(m):l.getCoordinate(m),C=Math.max((0,x.translateToNotScaled)(C),0),A=Math.max((0,x.translateToNotScaled)(A),0),C+=n,A+=s;const h=e.flippedCoordinates?v-S:v+S,u=i.flippedCoordinates?m+P:m-P;b=Math.max(y-s-(0,x.translateToNotScaled)(e.isVerticalChart?t.getCoordinate(u):l.getCoordinate(u)),y-o),T=Math.max(g-n-(0,x.translateToNotScaled)(e.isVerticalChart?l.getCoordinate(h):t.getCoordinate(h)),g-a)}return C+=null!==(s=null===(n=this.subPaddingProperty)||void 0===n?void 0:n.left)&&void 0!==s?s:0,A+=null!==(a=null===(o=this.subPaddingProperty)||void 0===o?void 0:o.top)&&void 0!==a?a:0,T+=null!==(h=null===(l=this.subPaddingProperty)||void 0===l?void 0:l.right)&&void 0!==h?h:0,b+=null!==(d=null===(u=this.subPaddingProperty)||void 0===u?void 0:u.bottom)&&void 0!==d?d:0,new f.Thickness(A,T,b,C)}applySciChartBackground(e,t=!0){if(this.backgroundProperty=e,!this.isTransparent){const t=this.renderSurface.getRenderContext(),i=t.getNativeContext(),{width:r,height:n}=this.parentSurface.renderSurface.viewportSize;i.SetClipRect(this.adjustedPadding.left,this.adjustedPadding.top,r-this.adjustedPadding.right-this.adjustedPadding.left,n-this.adjustedPadding.bottom-this.adjustedPadding.top),i.SetClearColor(0,0,0,0),i.Clear(),i.SetClipRect(0,0,r,n);try{(0,A.parseColorToUIntArgb)(e);const i=(0,Y.getVectorRectVertex)(this.webAssemblyContext2D);i.push_back((0,B.createNativeRect)(this.webAssemblyContext2D,this.adjustedPadding.left,this.adjustedPadding.top,this.renderSurface.viewportSize.width-this.adjustedPadding.right,this.renderSurface.viewportSize.height-this.adjustedPadding.bottom));const r=(0,E.createBrushInCache)(this.backgroundFillBrushCache,e,1);t.drawRects(i,r,0,0)}catch(e){a.performanceWarnings.subchartBackgroundNotSimpleColor.warn()}}}updateWrapper(e){if(!this.parentSurface||!this.subChartContainer)return;const{seriesViewRect:t}=this.parentSurface;if(!t&&this.coordinateMode!==k.ECoordinateMode.Relative)return;this.subChartContainer.style.pointerEvents="none",this.subChartContainer.style.position="absolute";const i=(e=>{if(this.coordinateMode===k.ECoordinateMode.DataValue){const i=this.parentSurface.getXAxisById(this.parentXAxisId);if(!i)throw new Error(`No x axis with id ${this.parentXAxisId} found on parent surface`);const r=this.parentSurface.getYAxisById(this.parentYAxisId);if(!r)throw new Error(`No y axis with id ${this.parentYAxisId} found on parent surface`);const n=(0,x.translateDataValueRectToAbsolute)(e,i,r,t);return{left:(0,x.convertToHtmlPx)(n.x),top:(0,x.convertToHtmlPx)(n.y),width:(0,x.convertToHtmlPx)(n.width),height:(0,x.convertToHtmlPx)(n.height)}}if(this.coordinateMode===k.ECoordinateMode.Relative){return{left:(0,x.convertToRelativeHtmlSize)(e.x),top:(0,x.convertToRelativeHtmlSize)(e.y),width:(0,x.convertToRelativeHtmlSize)(e.width),height:(0,x.convertToRelativeHtmlSize)(e.height)}}return{left:(0,x.convertToHtmlPx)(e.x),top:(0,x.convertToHtmlPx)(e.y),width:(0,x.convertToHtmlPx)(e.width),height:(0,x.convertToHtmlPx)(e.height)}})(e);this.subChartContainer.style.left=i.left,this.subChartContainer.style.top=i.top,this.subChartContainer.style.width=i.width,this.subChartContainer.style.height=i.height}getOffsets(e){var t,i,r,n;if(!e)return{left:0,top:0,right:0,bottom:0};const s=e.getElementsByClassName(this.leftSectionClass)[0],o=e.getElementsByClassName(this.topSectionClass)[0],a=e.getElementsByClassName(this.rightSectionClass)[0],l=e.getElementsByClassName(this.bottomSectionClass)[0],h=null!==(t=null==s?void 0:s.clientWidth)&&void 0!==t?t:0,u=null!==(i=null==o?void 0:o.clientHeight)&&void 0!==i?i:0,d=null!==(r=null==a?void 0:a.clientWidth)&&void 0!==r?r:0,c=null!==(n=null==l?void 0:l.clientHeight)&&void 0!==n?n:0;return{left:h*this.sectionScaleProperty,top:u*this.sectionScaleProperty,right:d*this.sectionScaleProperty,bottom:c*this.sectionScaleProperty}}}t.SciChartSubSurface=K},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNumberArray=t.isTypedArray=void 0,t.isTypedArray=function(e){return e instanceof Float64Array},t.isNumberArray=function(e){return Array.isArray(e)&&!e.some(e=>"number"!=typeof e)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrianglePointMarker3D=t.EllipsePointMarker3D=t.QuadPointMarker=t.PixelPointMarker3D=t.CylinderPointMarker3D=t.PyramidPointMarker3D=t.CubePointMarker3D=t.SpherePointMarker3D=void 0;const r=i(480),n=i(121),s=i(481);class o extends r.BaseMeshPointMarker3D{constructor(e,t){super(e,t)}get pointsMesh(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_SPHERE)}}t.SpherePointMarker3D=o;class a extends r.BaseMeshPointMarker3D{constructor(e,t){super(e,t)}get pointsMesh(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_CUBE)}}t.CubePointMarker3D=a;class l extends r.BaseMeshPointMarker3D{constructor(e,t){super(e,t)}get pointsMesh(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_PYRAMID)}}t.PyramidPointMarker3D=l;class h extends r.BaseMeshPointMarker3D{constructor(e,t){super(e,t)}get pointsMesh(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_CYLINDER)}}t.CylinderPointMarker3D=h;class u extends n.BasePointMarker3D{constructor(e,t){super(e,t),this.size=0}get markerType(){return n.EMarkerType.Pixel}}t.PixelPointMarker3D=u;class d extends s.BaseTexturePointMarker3D{constructor(e,t){super(e,t)}get pointsTexture(){return this.webAssemblyContext.SCRTGetTemplateTexture(this.webAssemblyContext.eSCRTTexture.SCRT_TEXTURE_SOLIDWHITE)}}t.QuadPointMarker=d;class c extends s.BaseTexturePointMarker3D{constructor(e,t){super(e,t)}get pointsTexture(){return this.webAssemblyContext.SCRTGetTemplateTexture(this.webAssemblyContext.eSCRTTexture.SCRT_TEXTURE_CIRCLE)}}t.EllipsePointMarker3D=c;class p extends s.BaseTexturePointMarker3D{constructor(e,t){super(e,t)}get pointsTexture(){return this.webAssemblyContext.SCRTGetTemplateTexture(this.webAssemblyContext.eSCRTTexture.SCRT_TEXTURE_TRIANGLE)}}t.TrianglePointMarker3D=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableArray=void 0;const r=i(18),n=i(168);t.ObservableArray=class{constructor(){this.items=[],this.collectionChanged=new r.EventHandler}size(){return this.items.length}add(...e){e.forEach(e=>this.items.push(e)),this.collectionChanged.raiseEvent(new n.ObservableArrayChangedArgs(n.EObservableArrayChangedAction.Add,e,void 0))}asArray(){return this.items}insert(e,t){e<0&&(e=0),e>=this.items.length?this.add(t):(this.items.splice(e,0,t),this.collectionChanged.raiseEvent(new n.ObservableArrayChangedArgs(n.EObservableArrayChangedAction.Add,[t],void 0)))}contains(e){return this.items.includes(e)}removeAt(e){if(e<0||e>=this.items.length)return;const t=this.items[e];this.items.splice(e,1),this.collectionChanged.raiseEvent(new n.ObservableArrayChangedArgs(n.EObservableArrayChangedAction.Remove,void 0,[t]))}remove(e){for(let t=0;t<this.size();t++)if(this.items[t]===e){this.removeAt(t);break}}clear(){const e=this.items;this.items=[],this.collectionChanged.raiseEvent(new n.ObservableArrayChangedArgs(n.EObservableArrayChangedAction.Reset,void 0,e))}get(e){return this.items[e]}getById(e){return this.items.find(t=>t.id===e)}set(e,t){this.items[e]=t,this.collectionChanged.raiseEvent(new n.ObservableArrayChangedArgs(n.EObservableArrayChangedAction.Replace,[t],void 0))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyChangedEventArgs=void 0;t.PropertyChangedEventArgs=class{constructor(e){this.propertyName=e}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGlHelper=t.EWebGLSupport=void 0;const r=i(13);var n;!function(e){e.WebGL2="WebGL 2",e.WebGL1="WebGL 1",e.NoWebGL="No WebGL support"}(n=t.EWebGLSupport||(t.EWebGLSupport={}));class s{static initialize(){if(!s.initialized){if(!s.webGlSupport&&!r.IS_TEST_ENV){const e=document.createElement("canvas");e.getContext("webgl2")?s.webGlSupport=n.WebGL2:e.getContext("webgl")?s.webGlSupport=n.WebGL1:s.webGlSupport=n.NoWebGL}s.initialized=!0}}static getWebGlSupport(){return s.webGlSupport}static getContext(e,t){if(e&&!r.IS_TEST_ENV){if(s.webGlSupport===n.WebGL1)return e.getContext("webgl",t);if(s.webGlSupport===n.WebGL2)return e.getContext("webgl2",t);throw new Error("SciChart: WebGL not supported!")}}}t.WebGlHelper=s,s.webGlSupport=void 0,s.initialized=!1},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.ALLOWS_MULTI_SELECTION="ALLOWS_MULTI_SELECTION",e.ALLOW_TOOLTIP_OVERLAPPING="ALLOW_TOOLTIP_OVERLAPPING",e.CROSSHAIR_STROKE="CROSSHAIR_STROKE",e.EXECUTE_ON="EXECUTE_ON",e.FILL="FILL",e.HIT_TEST_RADIUS="HIT_TEST_RADIUS",e.IS_ATTACHED="IS_ATTACHED",e.IS_ENABLED="IS_ENABLED",e.PARENT_SURFACE="PARENT_SURFACE",e.RECEIVE_HANDLED_EVENTS="RECEIVE_HANDLED_EVENTS",e.SHOW_ROLLOVER_LINE="SHOW_ROLLOVER_LINE",e.SHOW_TOOLTIP="SHOW_TOOLTIP",e.SELECTED_AREA="SELECTED_AREA",e.SELECTION_FILL="SELECTION_FILL",e.SELECTION_STROKE="SELECTION_STROKE",e.SELECTION_STROKE_THICKNESS="SELECTION_STROKE_THICKNESS",e.STROKE="STROKE",e.STROKE_THICKNESS="STROKE_THICKNESS",e.STROKE_DASH_ARRAY="STROKE_DASH_ARRAY",e.TOOLTIP_DATA_TEMPLATE="TOOLTIP_DATA_TEMPLATE",e.X_AXIS_ID="X_AXIS_ID",e.Y_AXIS_ID="Y_AXIS_ID",e.PLACEMENT_DIV_ID="PLACEMENT_DIV_ID",e.X_LINE="X_LINE",e.Y_LINE="Y_LINE",e.AXIS_LABELS="AXIS_LABELS"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultPaletteProvider=t.EFillPaletteMode=t.EStrokePaletteMode=void 0,function(e){e.GRADIENT="GRADIENT",e.SOLID="SOLID"}(r=t.EStrokePaletteMode||(t.EStrokePaletteMode={})),function(e){e.GRADIENT="GRADIENT",e.SOLID="SOLID"}(n=t.EFillPaletteMode||(t.EFillPaletteMode={}));class s{constructor(){this.strokePaletteMode=r.GRADIENT,this.fillPaletteMode=n.GRADIENT}static createEmpty(){const e=new s;return e.onAttached=void 0,e.onDetached=void 0,e.overrideFillArgb=void 0,e.overrideStrokeArgb=void 0,e.overridePointMarkerArgb=void 0,e}onAttached(e){}onDetached(){}overrideFillArgb(e,t,i,r,n){}overrideStrokeArgb(e,t,i,r,n){}overridePointMarkerArgb(e,t,i,r,n){}toJSON(){}}t.DefaultPaletteProvider=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAutoRange=void 0,function(e){e.Once="Once",e.Always="Always",e.Never="Never"}(t.EAutoRange||(t.EAutoRange={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasTexture=void 0;const r=i(13),n=i(0),s=i(27),o=i(131),a=i(1);t.CanvasTexture=class{constructor(e,t,i){this.width=Math.floor(t),this.height=Math.floor(i),a.Guard.isTrue(this.width>0,"CanvasTexture.width must be greater than zero"),a.Guard.isTrue(this.height>0,"CanvasTexture.height must be greater than zero"),r.IS_TEST_ENV||(this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height),this.wasmContext=e,this.intermediateVector=new this.wasmContext.UIntVector,this.intermediateVector.resize(this.height*this.width,0),this.originalIntermediateVector=new this.wasmContext.UIntVector,this.originalIntermediateVector.resize(this.height*this.width,0);const n=this.wasmContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8;this.tsrTextureCache=new o.TextureCache(e),this.tsrTextureCache.create(this.width,this.height,n)}getContext(){return this.canvas.getContext("2d",{willReadFrequently:!0})}getTexture(){return this.tsrTextureCache.value}clear(){this.getContext().clearRect(0,0,this.width,this.height),this.intermediateVector.fill(0),this.originalIntermediateVector.fill(0)}delete(){this.intermediateVector=(0,n.deleteSafe)(this.intermediateVector),this.originalIntermediateVector=(0,n.deleteSafe)(this.originalIntermediateVector),this.tsrTextureCache=(0,n.deleteSafe)(this.tsrTextureCache)}copyTexture(){var e;const t=this.width*this.height;if(!this.intermediateVector||this.intermediateVector.size()!==t)throw new Error(`CanvasTexture.ts: IntermediateVector size is ${null===(e=this.intermediateVector)||void 0===e?void 0:e.size()} and expected ${t}`);const i=this.getContext().getImageData(0,0,this.width,this.height).data,r=this.width*this.height;for(let e=0;e<r;e++){const t=4*e,r=i[t+3];if(0!==r){const n=r<<24|i[t]<<16|i[t+1]<<8|i[t+2];this.intermediateVector.set(e,n>>>0),this.originalIntermediateVector.set(e,n>>>0)}}const n=this.tsrTextureCache.value;this.wasmContext.SCRTFillTextureAbgr(n,this.width,this.height,this.intermediateVector)}applyOpacity(e){const t=this.width*this.height;for(let i=0;i<t;i++){const t=this.originalIntermediateVector.get(i),r=(0,s.uintArgbColorMultiplyOpacity)(t,e);this.intermediateVector.set(i,r)}const i=this.tsrTextureCache.value;this.wasmContext.SCRTFillTextureAbgr(i,this.width,this.height,this.intermediateVector)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureTextWidth=t.measureTextHeight=t.TextureManager=void 0;const r=i(13),n=i(33),s=i(104),o=i(266),a=i(2),l=i(12),h=i(6);t.TextureManager=class{constructor(e){this.webAssemblyContext=e,r.IS_TEST_ENV||(this.canvas=document.createElement("canvas"),this.canvas.width=1920,this.canvas.height=1080,this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}))}createSimpleTextTexture(e,t,i,r,n,s){let o=0;return r&&(o=n?90:-90),this.createTextTexture([e],t,o,void 0,i,s)}createTextTextureNative(e,t,i,r,n,s){const{fontStyle:o,fontWeight:h,fontFamily:u,fontSize:d,padding:c,alignment:p,color:g}=t,f=this.webAssemblyContext.SCRTGetMainRenderContext2D(),y=(0,l.getFontKey)(this.webAssemblyContext,{fontFamily:u,fontSize:null!=d?d:12}),v=n?(0,a.parseColorToUIntArgb)(n):0;let m=f.CreateTextTextureColored(y,e.join("\n"),(0,a.parseColorToUIntArgb)(g),v);this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(m,!1);const S=m.GetWidth(),P=m.GetHeight();return{bitmapTexture:m,textureWidth:S,textureHeight:P}}createTextTexture(e,i,n,a,l,h){if(r.IS_TEST_ENV)return{bitmapTexture:void 0,textureWidth:1,textureHeight:1};const{fontStyle:u,fontWeight:d,fontFamily:c,fontSize:p,padding:g,alignment:f,color:y}=i;this.ctx.globalAlpha=null!=h?h:1,this.ctx.textBaseline="top",this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),l&&(this.ctx.fillStyle=l,this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)),this.ctx.fillStyle=y,this.ctx.font=(0,o.getFontString)(u,d,p,c);let v=0;const m=(0,t.measureTextHeight)(p),S=m*(null!=a?a:1.1);let P=m+g.top+g.bottom;for(let i=0;i<e.length;i++){const r=e[i],n=(0,t.measureTextWidth)(this.ctx,r)+g.left+g.right;n>v&&(v=n),i>0&&(P+=S)}let C=g.top,A=g.left;if(!v||!P)return{bitmapTexture:void 0,textureWidth:v,textureHeight:P};let x=v,b=P;if(this.ctx.save(),n){const e=n*Math.PI/180;x=Math.ceil(v*Math.abs(Math.cos(e))+P*Math.abs(Math.sin(e))),b=Math.ceil(v*Math.abs(Math.sin(e))+P*Math.abs(Math.cos(e))),this.ctx.translate(x/2,b/2),this.ctx.rotate(e),this.ctx.translate(-v/2,-P/2)}for(const i of e){if(f===s.ELabelAlignment.Center||f===s.ELabelAlignment.Right){const e=(0,t.measureTextWidth)(this.ctx,i);A=f===s.ELabelAlignment.Right?v-e-g.right:(v-e)/2}this.ctx.fillText(i,Math.round(A),Math.round(C)),C+=S}return this.ctx.strokeStyle=y,this.ctx.restore(),this.createTextureFromCtxBuffer(x,b)}createAxisMarkerTexture(e,i,r,s,a,l,h,d=0,c,p){this.ctx.globalAlpha=null!=p?p:1,this.ctx.textBaseline="top",this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.font=(0,o.getFontString)(r,s,a,l);const g=(0,t.measureTextWidth)(this.ctx,i)+4*d,f=(0,t.measureTextHeight)(a)+2*d,{angle:y,alignmentLeft:v,alignmentTop:m,finalTextureWidth:S,finalTextureHeight:P,halfHeight:C}=u(f,g,i,e);if(this.ctx.save(),this.ctx.translate((g+C)/2,f/2),this.ctx.rotate(y),this.ctx.translate(v,m),c){const e=new Path2D,t=f,i=g;e.moveTo(0,0),e.lineTo(i,0),e.lineTo(C+i,C),e.lineTo(i,t),e.lineTo(0,t),e.closePath(),this.ctx.fillStyle=c,this.ctx.fill(e)}return e!==n.EAxisAlignment.Right&&(this.ctx.fillStyle=h,this.ctx.fillText(i,2*d,d)),this.ctx.restore(),e===n.EAxisAlignment.Right&&(this.ctx.fillStyle=h,this.ctx.fillText(i,2*d+C,d)),this.createTextureFromCtxBuffer(S,P)}createTextureFromImage(e,t,i){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const r=(null!=t?t:e.width)*h.DpiHelper.PIXEL_RATIO,n=(null!=i?i:e.height)*h.DpiHelper.PIXEL_RATIO;return this.ctx.drawImage(e,0,0,r,n),this.createTextureFromCtxBuffer(r,n)}getTextureContext(e,t){if(!r.IS_TEST_ENV)return e>this.canvas.width&&(this.canvas.width=e),t>this.canvas.height&&(this.canvas.height=t),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx}createTextureFromCtxBuffer(e,t){const i=this.ctx.getImageData(0,0,e,t);return this.createTextureFromImageData(i,e,t)}createTextureFromImageData(e,t,i){const r=this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8,n=this.webAssemblyContext.SCRTCreateBitmapTexture(t,i,r);let s;try{const r=e.data;this.webAssemblyContext.SCRTSetActiveTexture(n),s=this.webAssemblyContext._malloc(r.length),this.webAssemblyContext.HEAP8.set(r,s);this.webAssemblyContext.ccall("SCRTFillActiveTextureCharArray",null,["number","number","number"],[t,i,s])}catch(e){console.error(e)}finally{this.webAssemblyContext._free(s),this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(n,!1)}return{bitmapTexture:n,textureWidth:t,textureHeight:i}}delete(){this.canvas=void 0,this.ctx=void 0}createTextureFromCtx(e,t){const i=this.ctx.getImageData(0,0,e,t).data,r=e*t,n=new this.webAssemblyContext.UIntVector;n.resize(r,0);for(let e=0;e<r;e++){const t=4*e,r=i[t+3];if(0!==r){const s=i[t],o=i[t+1],a=r<<24|i[t+2]<<16|o<<8|s;n.set(e,a>>>0)}}const s=this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8,o=this.webAssemblyContext.SCRTCreateBitmapTexture(e,t,s);return this.webAssemblyContext.SCRTFillTextureAbgr(o,e,t,n),n.delete(),{bitmapTexture:o,textureWidth:e,textureHeight:t}}};t.measureTextHeight=e=>e;t.measureTextWidth=(e,t)=>{if(r.IS_TEST_ENV)return 1;const i=e.measureText(t);return Math.ceil(i.width)};const u=(e,t,i,r)=>{const s=Math.ceil(e/2);let o=0,a=0,l=0,h=t+s,u=e;switch(r){case n.EAxisAlignment.Left:o=0,a=-(t+s)/2,l=-e/2;break;case n.EAxisAlignment.Top:o=.5*Math.PI,a=-e/2,l=(t+s)/2-e,h=e,u=t+s;break;case n.EAxisAlignment.Right:o=Math.PI,a=-(t+s)/2,l=-e/2;break;case n.EAxisAlignment.Bottom:o=1.5*Math.PI,a=-t,l=-(t+s)/2,h=e,u=t+s}return{angle:o,alignmentLeft:a,alignmentTop:l,finalTextureWidth:h,finalTextureHeight:u,halfHeight:s}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ELabelProviderType=void 0,function(e){e.Numeric="Numeric",e.Logarithmic="Logarithmic",e.Date="Date",e.SmartDate="SmartDate",e.Text="Text",e.Pie="Pie"}(t.ELabelProviderType||(t.ELabelProviderType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addEventListenerToPieSegment=t.SciChartPieSurface=t.EPieValueMode=t.EPieType=t.ESizingMode=void 0;const r=i(36),n=i(14),s=i(273),o=i(13),a=i(39),l=i(0),h=i(69),u=i(15),d=i(17),c=i(176),p=i(129),g=i(34),f=i(139),y=i(288),v=i(195),m=i(318),S=i(92),P=i(4),C=i(452),A=i(319),x=Math.PI/180;var b,T,E;!function(e){e.Absolute="Absolute",e.Relative="Relative"}(b=t.ESizingMode||(t.ESizingMode={})),function(e){e.Pie="Pie",e.Donut="Donut"}(T=t.EPieType||(t.EPieType={})),function(e){e[e.Percentage=0]="Percentage",e[e.Raw=1]="Raw"}(E=t.EPieValueMode||(t.EPieValueMode={}));class w{constructor(e={},t){var i,r,s,o,a,l,c,g,y,v,C,A,x,w;this.animate=!0,this.animationFrames=30,this.pieTypeProperty=T.Pie,this.holeRadiusProperty=.5,this.holeRadiusSizingModeProperty=b.Relative,this.seriesSpacingProperty=0,this.labelRadiusProperty=1,this.titleDivs=[],this.sweepAnimationDone=!1,this.suspendUpdate=!1,this.themeProviderProperty=new p.SciChartJSDarkTheme,this.previousThemeProviderProperty=new p.SciChartJSDarkTheme,this.deletables=[],this.valueModeProperty=E.Percentage,this.labelStyleProperty={fontSize:14,fontFamily:"Arial",color:"#1e323d",fontWeight:"bold"},this.domChartRoot=e.domChartRoot,this.domCanvas2D=e.domCanvas2D,this.domSvgContainer=e.domSvgContainer,this.domSvgAdornerLayer=e.domSvgAdornerLayer,this.domDivContainer=e.domDivContainer;const R=this.domCanvas2D.width,D=this.domCanvas2D.height;this.viewRect=new u.Rect(0,0,R,D),this.resizeSubscriptionToken=S.default.subscribeToResize(e.domChartRoot,e.aspect,this),this.drawChart=this.drawChart.bind(this),this.deleteInternals=this.deleteInternals.bind(this),this.invalidateElement=this.invalidateElement.bind(this),this.detachPieSegment=this.detachPieSegment.bind(this),this.attachPieSegment=this.attachPieSegment.bind(this),this.pieSegments=new h.ObservableArray,this.pieSegments.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(this.detachPieSegment),null===(i=e.getNewItems())||void 0===i||i.forEach(this.attachPieSegment),this.invalidateElement()}),this.applySciChartBackground(P.SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground),this.legend=new m.SciChartPieLegend,this.legend.setRootDiv(this.domDivContainer),this.legend.setPieSegmentArray(this.pieSegments.asArray()),this.legend.setInvalidateParentSurface(this.invalidateElement),this.legend.setParentSurface(this),this.heightAspect=null!==(i=null==t?void 0:t.heightAspect)&&void 0!==i?i:0,this.widthAspect=null!==(r=null==t?void 0:t.widthAspect)&&void 0!==r?r:0,this.pieTypeProperty=null!==(s=null==t?void 0:t.pieType)&&void 0!==s?s:this.pieType,this.holeRadiusProperty=null!==(o=null==t?void 0:t.holeRadius)&&void 0!==o?o:this.holeRadius,this.animate=null!==(a=null==t?void 0:t.animate)&&void 0!==a?a:this.animate,this.holeRadiusSizingModeProperty=null!==(l=null==t?void 0:t.holeRadiusSizingMode)&&void 0!==l?l:this.holeRadiusSizingModeProperty,this.seriesSpacingProperty=null!==(c=null==t?void 0:t.seriesSpacing)&&void 0!==c?c:this.seriesSpacingProperty,this.legend.showLegend=null!==(g=null==t?void 0:t.showLegend)&&void 0!==g?g:this.legend.showLegend,this.legend.animate=null!==(y=null==t?void 0:t.animateLegend)&&void 0!==y?y:this.legend.animate,this.legend.showCheckboxes=null!==(v=null==t?void 0:t.showLegendCheckBoxes)&&void 0!==v?v:this.legend.showCheckboxes,this.legend.showSeriesMarkers=null!==(C=null==t?void 0:t.showLegendSeriesMarkers)&&void 0!==C?C:this.legend.showSeriesMarkers,this.paddingProperty=null!==(A=null==t?void 0:t.padding)&&void 0!==A?A:this.paddingProperty,(null==t?void 0:t.labelProvider)&&("getSegmentText"in(null==t?void 0:t.labelProvider)||(t.labelProvider=(0,n.createType)(d.EBaseType.LabelProvider,t.labelProvider.type,void 0,t.labelProvider.options))),this.labelProvider=null!==(x=null==t?void 0:t.labelProvider)&&void 0!==x?x:new f.PieLabelProvider,this.valueModeProperty=null!==(w=null==t?void 0:t.valueMode)&&void 0!==w?w:this.valueModeProperty}static create(e,t){var i,n;(0,r.ensureRegistrations)();const o=S.default.initCanvas(e,null!==(i=null==t?void 0:t.widthAspect)&&void 0!==i?i:0,null!==(n=null==t?void 0:t.heightAspect)&&void 0!==n?n:0,S.default.ECanvasType.svg);return new Promise(e=>{[...y.sciChartDestinations,...s.sciChartDestinations,...v.sciChartSingleDestinations].filter(e=>e.sciChartSurface.domChartRoot.id===o.domChartRoot.id).forEach(e=>e.sciChartSurface.delete()),t=P.SciChartSurfaceBase.resolveOptions(t);const i=new w(o,t);i.applyTheme(null==t?void 0:t.theme),setTimeout(()=>e(i),0)})}get labelProvider(){return this.labelProviderProperty}set labelProvider(e){e&&this.labelProviderProperty!==e&&(this.labelProviderProperty=e,this.notifyPropertyChanged(C.PROPERTY.LABEL_PROVIDER))}get labelStyle(){return this.labelStyleProperty}set labelStyle(e){this.labelStyleProperty=Object.assign(Object.assign({},this.labelStyle),e),this.notifyPropertyChanged(C.PROPERTY.TEXT_STYLE)}applyTheme(e){this.previousThemeProviderProperty=this.themeProviderProperty,this.themeProviderProperty=e,this.applySciChartBackground(e.sciChartBackground),this.labelStyle.color===this.previousThemeProvider.tickTextBrush&&(this.labelStyle={color:e.tickTextBrush}),this.invalidateElement()}get themeProvider(){return this.themeProviderProperty}get previousThemeProvider(){return this.previousThemeProviderProperty}invalidateElement(e){this.isValidToDraw()&&(e===A.PROPERTY.VALUE&&(this.sweepAnimationDone=!1),this.update())}update(){this.suspendUpdate||(this.draw(),this.legend.setSeriesViewRect(this.viewRect),this.legend.update())}delete(e){this.deleteInternals(),this.resizeSubscriptionToken=(0,l.deleteSafe)(this.resizeSubscriptionToken)}deleteInternals(e){this.svg&&(this.domSvgContainer.removeChild(this.svg),this.svg=void 0),e||(this.titleDivs.forEach(e=>{this.domDivContainer.removeChild(e)}),this.titleDivs=[]);for(const e of this.deletables)(0,l.deleteSafe)(e);this.deletables=[]}addDeletable(e){this.deletables.push(e)}changeViewportSize(e,t){const i=e,r=t;this.viewRect=new u.Rect(0,0,e,t),this.changeDomViewportSize(i,r),this.invalidateElement()}get pieType(){return this.pieTypeProperty}set pieType(e){this.pieTypeProperty=e,this.notifyPropertyChanged(C.PROPERTY.PIE_TYPE)}get holeRadius(){return this.holeRadiusProperty}set holeRadius(e){this.holeRadiusProperty=e,this.notifyPropertyChanged(C.PROPERTY.HOLE_RADIUS)}get holeRadiusSizingMode(){return this.holeRadiusSizingModeProperty}set holeRadiusSizingMode(e){this.holeRadiusSizingModeProperty=e,this.notifyPropertyChanged(C.PROPERTY.HOLE_RADIUS_SIZING_MODE)}get padding(){return this.paddingProperty}set padding(e){this.paddingProperty!==e&&(this.paddingProperty=e,this.updateLegendMargin(),this.notifyPropertyChanged(C.PROPERTY.PADDING))}get canvasBorder(){return this.canvasBorderProperty}set canvasBorder(e){this.canvasBorderProperty!==e&&(this.canvasBorderProperty=e,this.updateLegendMargin(),this.notifyPropertyChanged(C.PROPERTY.PADDING))}get seriesSpacing(){return this.seriesSpacingProperty}set seriesSpacing(e){this.seriesSpacingProperty!==e&&(this.seriesSpacingProperty=e,this.notifyPropertyChanged(C.PROPERTY.SERIES_SPACING))}get valueMode(){return this.valueModeProperty}set valueMode(e){this.valueModeProperty=e,this.notifyPropertyChanged(C.PROPERTY.VALUE_MODE)}get labelRadiusAdjustment(){return this.labelRadiusProperty}set labelRadiusAdjustment(e){this.labelRadiusProperty=e,this.notifyPropertyChanged(C.PROPERTY.VALUE_MODE)}toJSON(e=!1){let t;t="toJSON"in this.themeProvider?this.themeProvider.toJSON():this.themeProvider;const i={surface:{animate:this.animate,animateLegend:this.legend.animate,heightAspect:this.heightAspect,widthAspect:this.widthAspect,holeRadius:this.holeRadius,holeRadiusSizingMode:this.holeRadiusSizingMode,pieType:this.pieType,showLegend:this.legend.showLegend,showLegendCheckBoxes:this.legend.showCheckboxes,showLegendSeriesMarkers:this.legend.showSeriesMarkers,padding:this.padding,canvasBorder:this.canvasBorder,seriesSpacing:this.seriesSpacing,labelProvider:this.labelProvider.toJSON(),valueMode:this.valueMode,labelRadiusAdjustment:this.labelRadiusAdjustment,animationFrames:this.animationFrames,theme:t},onCreated:this.onCreatedName};return e||(i.segments=this.pieSegments.asArray().map(e=>e.toJSON())),{type:c.ESciChartSurfaceType.Pie2D,options:i}}calcTitlePosition(e,t,i,r,n,s,o,a,l){const h=r<i/2?2*i/3+r/6:(i+r)/2,u=(n+s)/2;return{left:e+Math.cos(x*u)*(h*this.labelRadiusProperty+o)-a/2,top:t+Math.sin(x*u)*(h*this.labelRadiusProperty+o)-l/2}}changeDomViewportSize(e,t){this.domSvgContainer&&(this.domSvgContainer.setAttribute("width",e.toString()),this.domSvgContainer.setAttribute("height",t.toString())),this.domSvgAdornerLayer&&(this.domSvgAdornerLayer.setAttribute("width",e.toString()),this.domSvgAdornerLayer.setAttribute("height",t.toString()))}notifyPropertyChanged(e){this.invalidateElement(),e===C.PROPERTY.LABEL_PROVIDER&&this.labelProviderProperty&&this.labelProviderProperty.attachedToSurface(this)}isValidToDraw(){return!0}detachPieSegment(e){e.onDetach()}attachPieSegment(e){e.onAttach(this)}updateLegendMargin(){var e,t,i;const r=(null===(e=this.padding)||void 0===e?void 0:e.top)||0,n=(null===(t=this.canvasBorder)||void 0===t?void 0:t.border)||(null===(i=this.canvasBorder)||void 0===i?void 0:i.borderTop)||0;this.legend.margin=r+n+10}calculateViewRectWidth(e){var t,i,r,n,s;return(null===(t=this.padding)||void 0===t?void 0:t.left)&&(e-=this.padding.left),(null===(i=this.padding)||void 0===i?void 0:i.right)&&(e-=this.padding.right),(null===(r=this.canvasBorder)||void 0===r?void 0:r.border)?e-=2*this.canvasBorder.border:((null===(n=this.canvasBorder)||void 0===n?void 0:n.borderLeft)&&(e-=this.canvasBorder.borderLeft),(null===(s=this.canvasBorder)||void 0===s?void 0:s.borderRight)&&(e-=this.canvasBorder.borderRight)),e}calculateViewRectHeight(e){var t,i,r,n,s;return(null===(t=this.padding)||void 0===t?void 0:t.top)&&(e-=this.padding.top),(null===(i=this.padding)||void 0===i?void 0:i.bottom)&&(e-=this.padding.bottom),(null===(r=this.canvasBorder)||void 0===r?void 0:r.border)?e-=2*this.canvasBorder.border:((null===(n=this.canvasBorder)||void 0===n?void 0:n.borderTop)&&(e-=this.canvasBorder.borderTop),(null===(s=this.canvasBorder)||void 0===s?void 0:s.borderBottom)&&(e-=this.canvasBorder.borderBottom)),e}draw(){if(0!==this.pieSegments.size()){if(this.sweepAnimationDone||!this.animate)this.deleteInternals(),this.drawChart();else{const e=this.animationFrames;this.suspendUpdate=!0;const t=()=>this.suspendUpdate=!1,i=()=>this.sweepAnimationDone=!0,r=this.invalidateElement,n=this.drawChart,s=this.deleteInternals;!function o(a){setTimeout(()=>{const l=a/e;s(!0),n(l),a===e&&(t(),i(),r()),++a<=e&&o(a)},20)}(1)}o.IS_TEST_ENV||this.pieSegments.asArray().forEach(e=>{const i=this.domChartRoot.querySelector(`[id='${e.id}']`);if(i){const r=(0,t.addEventListenerToPieSegment)(e,i,this.animate);this.addDeletable(r)}})}}drawChart(e=1){const t=this.themeProviderProperty.sciChartBackground,i=this.pieSegments.asArray(),r=this.pieSegmentsTotalValue(),n=this.pieSegmentsTotalOldValue(),s=.8*Math.min(this.calculateViewRectWidth(this.viewRect.width),this.calculateViewRectHeight(this.viewRect.height))/2;let o=0;this.pieType===T.Donut&&(o=this.holeRadiusSizingMode===b.Absolute?this.holeRadius:s*this.holeRadius);const l=this.calculateViewRectWidth(this.viewRect.width)/2,h=this.calculateViewRectHeight(this.viewRect.height)/2;let u="<defs>",d="",c=0,p=0;i.forEach((i,g)=>{var f;const y=null!==(f=i.oldValue)&&void 0!==f?f:0,v=360*c/r-90,m=360*(c+i.value)/r-90,S=360*p/n-90,P=360*(p+y)/n-90;c+=i.value,p+=y;const C=S+(v-S)*a.easing.inOutCubic(e),A=P+(m-P)*a.easing.inOutCubic(e),x=!!i.colorLinearGradient,b="grad"+i.id;if(x){let e=`<linearGradient id="${b}" x1="${100*i.colorLinearGradient.startPoint.x}%" y1="${100*i.colorLinearGradient.startPoint.y}%" x2="${100*i.colorLinearGradient.endPoint.x}%" y2="${100*i.colorLinearGradient.endPoint.y}%">`;i.colorLinearGradient.gradientStops.forEach(t=>{const i=100*t.offset;e+=`<stop offset="${i}%" style="stop-color:${t.color};stop-opacity:1" />`}),e+="</linearGradient>",u+=e}const E=this.pieType===T.Donut?D(l,h,s*i.radiusAdjustment,o,C,A,i.shift+this.seriesSpacing):R(l,h,s*i.radiusAdjustment,C,A,i.shift+this.seriesSpacing),w=x?`<g fill="url(#${b})"><path id="${i.id}" stroke="${t}" stroke-width="2" d="${E}" /></g>`:`<path id="${i.id}" stroke="${t}" stroke-width="2" d="${E}" fill="${i.color}" />`;d+=w,(1===e||i.oldValue)&&this.drawSegmentLabel(i,g,r,C,A,l,h,s*i.radiusAdjustment,o)}),u+="</defs>",this.adjustDomContainer();const f=`<svg width="${this.calculateViewRectWidth(this.viewRect.width)}" height="${this.calculateViewRectHeight(this.viewRect.height)}">${u}${d}</svg>`,y=g.annotationHelpers.createSvg(f,this.domSvgContainer);this.svg=y}adjustDomContainer(){var e,t,i,r,n,s;this.padding&&this.padding.left&&(this.domSvgContainer.style.paddingLeft=this.padding.left+"px"),this.padding&&this.padding.right&&(this.domSvgContainer.style.paddingRight=this.padding.right+"px"),this.padding&&this.padding.top&&(this.domSvgContainer.style.paddingTop=this.padding.top+"px"),this.padding&&this.padding.bottom&&(this.domSvgContainer.style.paddingBottom=this.padding.bottom+"px"),this.canvasBorder&&(this.domSvgContainer.style.borderStyle="solid"),(null===(e=this.canvasBorder)||void 0===e?void 0:e.border)&&(this.domSvgContainer.style.borderWidth=this.canvasBorder.border+"px"),(null===(t=this.canvasBorder)||void 0===t?void 0:t.color)&&(this.domSvgContainer.style.borderColor=this.canvasBorder.color),(null===(i=this.canvasBorder)||void 0===i?void 0:i.borderBottom)&&(this.domSvgContainer.style.borderBottomWidth=this.canvasBorder.borderBottom+"px"),(null===(r=this.canvasBorder)||void 0===r?void 0:r.borderTop)&&(this.domSvgContainer.style.borderTopWidth=this.canvasBorder.borderTop+"px"),(null===(n=this.canvasBorder)||void 0===n?void 0:n.borderLeft)&&(this.domSvgContainer.style.borderLeftWidth=this.canvasBorder.borderLeft+"px"),(null===(s=this.canvasBorder)||void 0===s?void 0:s.borderRight)&&(this.domSvgContainer.style.borderRightWidth=this.canvasBorder.borderRight+"px")}drawSegmentLabel(e,t,i,r,n,s,o,a,l){var h,u,d,c,p,g,f,y,v,m,S;if(!1===e.showLabel)return;const P="segment"+t;let C=this.titleDivs.find(e=>e.id===P);if(!C){C=document.createElement("div");e.labelStyle;C.className="scichart-pie-text-container",C.id=P,C.style.position="absolute",C.style.pointerEvents="none",C.style.padding="5px",C.style.borderRadius="3px",this.titleDivs.push(C),this.domDivContainer.appendChild(C),C.style.display="block"}C.style.color=e.labelStyle.color,C.style.fontWeight=e.labelStyle.fontWeight,C.style.fontFamily=e.labelStyle.fontFamily,C.style.fontSize=e.labelStyle.fontSize.toString()+"px",C.innerHTML=e.getLabelText(i);const A=C.offsetWidth,x=C.offsetHeight;let b=0,T=0;(null===(h=this.padding)||void 0===h?void 0:h.left)&&(b+=null===(u=this.padding)||void 0===u?void 0:u.left),(null===(d=this.padding)||void 0===d?void 0:d.top)&&(T+=null===(c=this.padding)||void 0===c?void 0:c.top),(null===(p=this.canvasBorder)||void 0===p?void 0:p.border)?(b+=null===(g=this.canvasBorder)||void 0===g?void 0:g.border,T+=null===(f=this.canvasBorder)||void 0===f?void 0:f.border):((null===(y=this.canvasBorder)||void 0===y?void 0:y.borderLeft)&&(b+=null===(v=this.canvasBorder)||void 0===v?void 0:v.borderLeft),(null===(m=this.canvasBorder)||void 0===m?void 0:m.borderTop)&&(b+=null===(S=this.canvasBorder)||void 0===S?void 0:S.borderTop));const E=this.calcTitlePosition(s+b,o+T,a,l,r,n,e.shift+this.seriesSpacing,A,x);C.style.left=E.left+e.labelOffset.x+"px",C.style.top=E.top+e.labelOffset.y+"px"}pieSegmentsTotalValue(){return this.pieSegments.asArray().reduce((e,t)=>e+t.value,0)}pieSegmentsTotalOldValue(){const e=this.pieSegments.asArray().reduce((e,t)=>{var i;return e+(null!==(i=t.oldValue)&&void 0!==i?i:0)},0);return e>0?e:1}applySciChartBackground(e){this.domCanvas2D.style.background=e}}t.SciChartPieSurface=w;const R=(e,t,i,r,n,s)=>{const o=Math.abs(n-r)>180?1:0,a=(r+n)/2,l=Math.cos(x*a)*s,h=Math.sin(x*a)*s,u=Math.cos(x*n)*i+e+l,d=Math.sin(x*n)*i+t+h;let c=Math.cos(x*r)*i+e+l;const p=Math.sin(x*r)*i+t+h;return Math.abs(u-c)<1e-4&&(c+=.001),`M${e+l} ${t+h} ${u} ${d} A${i} ${i} 0 ${o} 0 ${c} ${p}Z`},D=(e,t,i,r,n,s,o)=>{const a=Math.abs(s-n)>180?1:0,l=(n+s)/2,h=Math.cos(x*l)*o,u=Math.sin(x*l)*o,d=Math.cos(x*s)*i+e+h,c=Math.sin(x*s)*i+t+u,p=Math.cos(x*n)*i+e+h,g=Math.sin(x*n)*i+t+u,f=Math.cos(x*s)*r+e+h,y=Math.sin(x*s)*r+t+u;return`M${d} ${c} A${i} ${i} 0 ${a} 0 ${p} ${g} L${Math.cos(x*n)*r+e+h} ${Math.sin(x*n)*r+t+u} A${r} ${r} 0 ${a} 1 ${f} ${y}Z`};let L=!1;t.addEventListenerToPieSegment=(e,t,i)=>{const r=t=>{if(i){if(!L){const t=10,i=e.isSelected,r=i?e.delta:0,n=i?-e.delta/t:e.delta/t;L=!0,e.isSelected=!e.isSelected,function i(s){setTimeout(()=>{e.shift=r+n*s,s===t&&(L=!1),++s<=t&&i(s)},20)}(1)}}else e.isSelected=!e.isSelected};return t.addEventListener("click",r),{eventListener:r,eventType:"click",element:t,delete:()=>t.removeEventListener("click",r)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESceneEntityType=void 0,function(e){e[e.AxisCubeEntity=0]="AxisCubeEntity",e[e.GizmoEntity=1]="GizmoEntity",e[e.RootSceneEntity=2]="RootSceneEntity",e[e.ScatterPointsSceneEntity=3]="ScatterPointsSceneEntity",e[e.SCRTSceneEntity=4]="SCRTSceneEntity",e[e.SurfaceMeshSceneEntity=5]="SurfaceMeshSceneEntity"}(t.ESceneEntityType||(t.ESceneEntityType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Size=void 0;class r{constructor(e,t){this.width=e,this.height=t}}t.Size=r,r.EMPTY=new r(0,0)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EZoomState=void 0,function(e){e[e.AtExtents=0]="AtExtents",e[e.UserZooming=1]="UserZooming"}(t.EZoomState||(t.EZoomState={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesInfo=void 0;const r=i(8);t.SeriesInfo=class{constructor(e,t){var i;this.renderableSeries=e,this.seriesName=null===(i=e.dataSeries)||void 0===i?void 0:i.dataSeriesName,this.stroke=e.stroke,this.dataSeriesType=t.dataSeriesType,this.dataSeriesIndex=t.dataSeriesIndex,this.isHit=t.isHit,this.isWithinDataBounds=t.isWithinDataBounds,this.hitTestPointValues=t.hitTestPointValues,this.xValue=t.isCategoryAxis?t.xCategoryValue:t.xValue,this.point2xValue=t.point2xValue,this.yValue=t.yValue,this.point2yValue=t.point2yValue,this.xCoordinate=t.xCoord,this.yCoordinate=t.yCoord,this.point2xCoordinate=t.point2xCoord,this.point2yCoordinate=t.point2yCoord,this.pointMetadata=t.metadata,(e.type===r.ESeriesType.ColumnSeries||e.type===r.ESeriesType.MountainSeries||e.type===r.ESeriesType.BandSeries)&&(this.fill=e.fill)}get isVisible(){return this.renderableSeries.isVisible}get formattedYValue(){return this.getYCursorFormattedValue(this.yValue)}get formattedXValue(){return this.getXCursorFormattedValue(this.xValue)}getYCursorFormattedValue(e){return this.renderableSeries.yAxis.labelProvider.formatCursorLabel(e)}getXCursorFormattedValue(e){return this.renderableSeries.xAxis.labelProvider.formatCursorLabel(e)}equals(e){return!!e&&(this.renderableSeries.id===e.renderableSeries.id&&(this.isHit===e.isHit&&(this.xValue===e.xValue&&(this.yValue===e.yValue&&this.pointMetadata===e.pointMetadata))))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataLabelProvider=void 0;const r=i(1),n=i(5),s=i(15),o=i(47),a=i(44),l=i(315),h=i(41),u=i(21),d=i(12),c=i(150),p=i(151),g=i(188);class f extends c.BaseDataLabelProvider{constructor(e){var t,i,r,n,s,u,d,c,p,g;super(e),this.type=a.EDataLabelProviderType.Default,this.dataLabels=[],this.updateTextInAnimation=!1,this.pointGapThresholdProperty=0,this.pointCountThresholdProperty=1/0,this.numericFormatProperty=h.ENumericFormat.Decimal,this.precisionProperty=1,this.skipModeProperty=l.EDataLabelSkipMode.SkipIfOverlapPrevious,this.skipNumberProperty=0,this.horizontalTextPositionProperty=o.EHorizontalTextPosition.Right,this.verticalTextPositionProperty=o.EVerticalTextPosition.Above,this.pointGapThresholdProperty=null!==(t=null==e?void 0:e.pointGapThreshold)&&void 0!==t?t:this.pointGapThresholdProperty,this.pointCountThresholdProperty=null!==(i=null==e?void 0:e.pointCountThreshold)&&void 0!==i?i:this.pointCountThresholdProperty,this.numericFormatProperty=null!==(r=null==e?void 0:e.numericFormat)&&void 0!==r?r:this.numericFormatProperty,this.precision=null!==(n=null==e?void 0:e.precision)&&void 0!==n?n:this.precisionProperty,this.skipNumberProperty=null!==(s=null==e?void 0:e.skipNumber)&&void 0!==s?s:this.skipNumberProperty,this.skipModeProperty=null!==(u=null==e?void 0:e.skipMode)&&void 0!==u?u:this.skipModeProperty,this.metaDataSelector=null==e?void 0:e.metaDataSelector,this.ySelector=null!==(d=null==e?void 0:e.ySelector)&&void 0!==d?d:e=>e.yValues,this.updateTextInAnimation=null!==(c=null==e?void 0:e.updateTextInAnimation)&&void 0!==c?c:this.updateTextInAnimation,this.horizontalTextPositionProperty=null!==(p=null==e?void 0:e.horizontalTextPosition)&&void 0!==p?p:this.horizontalTextPosition,this.verticalTextPositionProperty=null!==(g=null==e?void 0:e.verticalTextPosition)&&void 0!==g?g:this.verticalTextPosition}onAttach(e,t){r.Guard.notNull(e,"webAssemblyContext"),r.Guard.notNull(t,"parentSeries"),this.webAssemblyContext=e,this.parentSeries=t}get pointGapThreshold(){return this.pointGapThresholdProperty}set pointGapThreshold(e){this.pointGapThresholdProperty=e,this.invalidateParent()}get pointCountThreshold(){return this.pointCountThresholdProperty}set pointCountThreshold(e){this.pointCountThresholdProperty=e,this.invalidateParent()}get skipMode(){return this.skipModeProperty}set skipMode(e){this.skipModeProperty=e,this.invalidateParent()}get skipNumber(){return this.skipNumberProperty}set skipNumber(e){this.skipNumberProperty=e,this.invalidateParent()}get numericFormat(){return this.numericFormatProperty}set numericFormat(e){this.numericFormatProperty=e,this.invalidateParent()}get precision(){return this.precisionProperty}set precision(e){this.precisionProperty=e,this.invalidateParent()}get horizontalTextPosition(){return this.horizontalTextPositionProperty}set horizontalTextPosition(e){this.horizontalTextPositionProperty=e,this.invalidateParent()}get verticalTextPosition(){return this.verticalTextPositionProperty}set verticalTextPosition(e){this.verticalTextPositionProperty=e,this.invalidateParent()}getText(e){var t,i;if(this.metaDataSelector)return this.metaDataSelector(e.getMetaData());const r=!this.updateTextInAnimation&&e.parentSeries.isRunningAnimation?e.yValAfterAnimation():e.yVal();return r==r?(0,u.formatNumber)(r,null!==(t=this.numericFormat)&&void 0!==t?t:h.ENumericFormat.Decimal,null!==(i=this.precision)&&void 0!==i?i:1):void 0}shouldGenerate(e){var t,i;if(e.pointCount>this.pointCountThresholdProperty)return!1;const r=this.getText(e),n=(0,d.getTextBounds)(this.webAssemblyContext);return e.font.CalculateStringBounds(null!=r?r:"",n,null!==(i=null===(t=this.style)||void 0===t?void 0:t.lineSpacing)&&void 0!==i?i:2),e.pointGap>n.m_fWidth*this.pointGapThreshold}getPosition(e,t){var i,r,s,a,l,h,u,d;let c=e.xCoord();this.horizontalTextPosition===o.EHorizontalTextPosition.Center?c-=t.m_fWidth/2:this.horizontalTextPosition===o.EHorizontalTextPosition.Left?c-=t.m_fWidth+(null!==(r=null===(i=this.style.padding)||void 0===i?void 0:i.right)&&void 0!==r?r:0):c+=null!==(a=null===(s=this.style.padding)||void 0===s?void 0:s.left)&&void 0!==a?a:0;const p=t.m_fHeight-t.GetLineBounds(0).m_fHeight;let g=e.yCoord()-p;return this.verticalTextPosition===o.EVerticalTextPosition.Center?g+=t.m_fHeight/2:this.verticalTextPosition===o.EVerticalTextPosition.Below?g+=t.m_fHeight+(null!==(h=null===(l=this.style.padding)||void 0===l?void 0:l.top)&&void 0!==h?h:0):g-=null!==(d=null===(u=this.style.padding)||void 0===u?void 0:u.bottom)&&void 0!==d?d:0,new n.Point(c,g)}getColor(e,t){return e.color}shouldSkipLabel(e,t){var i;const r=e.parentSeries.parentSurface.seriesViewRect;if(t.rect.y<0||t.rect.bottom>r.height)return!0;if(t.rect.x<0||t.rect.right>r.width)return!0;switch(this.skipModeProperty){case l.EDataLabelSkipMode.SkipIfOverlapPrevious:return this.skipIfOverlapPrevious(e,t);case l.EDataLabelSkipMode.SkipIfOverlapNext:return this.skipIfOverlapNext(e,t);case l.EDataLabelSkipMode.SkipIfSame:return(null===(i=e.lastLabel)||void 0===i?void 0:i.text)===t.text;case l.EDataLabelSkipMode.ShowAll:default:return!1}}generateDataLabels(e,t){var i,r;if(this.dataLabels=[],!this.style||!this.style.fontFamily||!this.style.fontSize)return;const n=this.ySelector(t.pointSeries);if(!n||0===n.size())return;this.state=new p.DataLabelState(e,t,this.style,this.color,n,this.parentSeries);const o=(0,d.getTextBounds)(this.webAssemblyContext);if(!this.shouldGenerate(this.state))return;let a=0;const h=Math.max(0,this.skipNumberProperty);for(let e=this.state.indexStart;e<=this.state.indexEnd;e+=h+1){this.state.index=this.skipModeProperty===l.EDataLabelSkipMode.SkipIfOverlapNext?this.state.indexEnd-(e-this.state.indexStart):e;const t=this.getText(this.state);if(!t)continue;this.state.font.CalculateStringBounds(null!=t?t:"",o,null!==(r=null===(i=this.style)||void 0===i?void 0:i.lineSpacing)&&void 0!==r?r:2);const n=this.getPosition(this.state,o),h=this.getColor(this.state,t),u=o.GetLineBounds(0).m_fHeight,d={text:t,position:n,rect:new s.Rect(n.x,n.y-u,o.m_fWidth,o.m_fHeight),color:h,dataX:this.state.xCoord(),dataY:this.state.yCoord()};this.shouldSkipLabel(this.state,d)?a++:this.state.dataLabels.push(d)}a>100&&a/(this.state.indexEnd-this.state.indexStart)>.8&&g.performanceWarnings.dataLabelsSkippingMany.warn(),this.dataLabels=this.state.dataLabels}toJSON(){const e=super.toJSON(),t={numericFormat:this.numericFormat,pointGapThreshold:this.pointGapThreshold,precision:this.precision,pointCountThreshold:this.pointCountThreshold,skipNumber:this.skipNumber,skipMode:this.skipMode,updateTextInAnimation:this.updateTextInAnimation,horizontalTextPosition:this.horizontalTextPosition,verticalTextPosition:this.verticalTextPosition};return Object.assign(e.options,t),e}skipIfOverlapPrevious(e,t){const i=e.lastLabel;return!!i&&(!(i.rect.right+e.xPadding<t.rect.left)&&!(Math.abs(i.rect.y-t.rect.y)>t.rect.height+e.yPadding))}skipIfOverlapNext(e,t){const i=e.lastLabel;return!!i&&(!(t.rect.right+e.xPadding<i.rect.left)&&!(Math.abs(i.rect.y-t.rect.y)>t.rect.height+e.yPadding))}}t.DataLabelProvider=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLegendContainerHtml=t.getLegendItemHtml=t.SciChartLegendBase=t.ELegendType=t.ELegendPlacement=t.ELegendOrientation=void 0;const r=i(13),n=i(208);var s,o;!function(e){e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal"}(s=t.ELegendOrientation||(t.ELegendOrientation={})),function(e){e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight"}(o=t.ELegendPlacement||(t.ELegendPlacement={})),function(e){e.SciChartLegend="SciChartLegend",e.SciChartPieLegend="SciChartPieLegend"}(t.ELegendType||(t.ELegendType={}));t.SciChartLegendBase=class{constructor(){this.orientationProperty=s.Vertical,this.showLegendProperty=!0,this.placementProperty=o.TopLeft,this.marginProperty=10,this.isDirty=!0,this.eventListenersCollection=new Map,this.removeEventListenerFromSeries=e=>{var t;null===(t=this.eventListenersCollection.get(e))||void 0===t||t.forEach(({element:e,eventListener:t,eventType:i})=>{e.removeEventListener(i,t)}),this.eventListenersCollection.delete(e)}}setInvalidateParentSurface(e){this.invalidateParentSurface=e}setRootDiv(e){this.rootDiv=e}setSeriesViewRect(e){this.seriesViewRect!==e&&(this.seriesViewRect=e,this.notifyPropertyChanged())}setParentSurface(e){this.parentSurfaceProperty=e}update(){!this.isDirty&&this.div||(this.delete(),this.showLegend&&this.create(),this.isDirty=!1)}invalidateLegend(){this.isDirty=!0}get orientation(){return this.orientationProperty}set orientation(e){this.orientationProperty=e,this.notifyPropertyChanged()}get showLegend(){return this.showLegendProperty}set showLegend(e){this.showLegendProperty=e,this.notifyPropertyChanged()}get placement(){return this.placementProperty}set placement(e){this.placementProperty=e,this.notifyPropertyChanged()}get margin(){return this.marginProperty}set margin(e){this.marginProperty=e,this.notifyPropertyChanged()}get placementDivId(){return this.placementDivIdProperty}set placementDivId(e){this.delete(),this.placementDivIdProperty=e,this.notifyPropertyChanged()}delete(){var e;this.div&&(this.removeEventListeners(),null===(e=this.parentDiv)||void 0===e||e.removeChild(this.div),this.div=void 0,this.parentDiv=void 0)}isExternal(){return!!this.placementDivId}getLegendHTML(e,i,r,n,s,o,a,l){const h=l.reduce((e,t)=>e+this.getLegendItemHTML(s,o,a,t),"");return(0,t.getLegendContainerHtml)(e,i,r,n,h)}getLegendItemHTML(e,i,r,n){return(0,t.getLegendItemHtml)(e,i,r,n)}notifyPropertyChanged(){this.isDirty=!0,this.invalidateParentSurface&&this.invalidateParentSurface()}create(){const e=this.getInnerHTML();if(e){const t=(0,n.htmlToElement)(e);this.parentDiv=this.getParentDiv(),this.parentDiv.appendChild(t),this.div=t,r.IS_TEST_ENV||this.addEventListeners()}}getParentDiv(){return this.placementDivId?"string"==typeof this.placementDivId?document.getElementById(this.placementDivId):this.placementDivId:this.rootDiv}};t.getLegendItemHtml=(e,t,i,r)=>{let n=`<span class="scichart__legend-item" style="display: ${e===s.Vertical?"flex":"inline-flex"}; align-items: center; margin-right: 4px; white-space: nowrap;">`;if(t){n+=`<input ${r.checked?"checked":""} type="checkbox" id="${r.id}">`}if(i)if(r.gradient){let e="";r.gradient.gradientStops.forEach(t=>{e+=","+t.color}),n+=`<label for="${r.id}" style="background-image: linear-gradient(to right${e}); margin: 4px; width: 30px; height: 13px;"></label>`}else n+=`<label for="${r.id}" style="background-color: ${r.color}; margin: 4px; width: 30px; height: 13px;"></label>`;return n+=`<label for="${r.id}" style="margin-left: 4px;">${r.name}</label>`,n+="</span>",n};t.getLegendContainerHtml=(e,t,i,r,n)=>{if(!n)return"";let s=`<div class="scichart__legend" style="height: 100%; display: flex; float: ${[o.TopLeft,o.BottomLeft].includes(e)?"left":"right"}; text-align: center;">`;const a=[o.TopLeft,o.TopRight].includes(e)?"flex-start":"flex-end",{left:l,right:h,bottom:u,top:d}=r;return s+=`<div style="display: block; align-self: ${a}; width: fit-content; pointer-events: auto; ${`margin-left: ${l}px; margin-top: ${d}px; margin-right: ${h}px; margin-bottom: ${u}px;`} padding: 5px; border-radius: 3px; background-color: ${i}; color: ${t}">`,s+=n,s+="</div></div>",s}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EThemeProviderType=void 0,function(e){e.Light="Light",e.Dark="Dark",e.DarkV2="DarkV2",e.Navy="Navy",e.Custom="Custom"}(t.EThemeProviderType||(t.EThemeProviderType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNativeRect=void 0;const r=i(12);t.createNativeRect=(e,t,i,n,s)=>(0,r.getNativeRect)(e,t,i,n,s)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SvgAnnotationBase=void 0;const r=i(5),n=i(135),s=i(11),o=i(9),a=i(6),l=i(28),h=i(34),u=i(46);class d extends l.AnnotationBase{constructor(e){var t,i,r,s;super(e),this.isSvgAnnotation=!0,this.xCoordShiftProperty=0,this.yCoordShiftProperty=0,this.verticalAnchorPointProperty=n.EVerticalAnchorPoint.Top,this.horizontalAnchorPointProperty=n.EHorizontalAnchorPoint.Left,this.prevX1Coordinate=0,this.prevY1Coordinate=0,this.xCoordShiftProperty=null!==(t=null==e?void 0:e.xCoordShift)&&void 0!==t?t:this.xCoordShiftProperty,this.yCoordShiftProperty=null!==(i=null==e?void 0:e.yCoordShift)&&void 0!==i?i:this.yCoordShiftProperty,this.verticalAnchorPointProperty=null!==(r=null==e?void 0:e.verticalAnchorPoint)&&void 0!==r?r:this.verticalAnchorPointProperty,this.horizontalAnchorPointProperty=null!==(s=null==e?void 0:e.horizontalAnchorPoint)&&void 0!==s?s:this.horizontalAnchorPointProperty}onAttach(e){super.onAttach(e),this.svgRootProperty=e.domSvgContainer}onDetach(){super.onDetach(),this.delete()}get xCoordShift(){return this.xCoordShiftProperty}set xCoordShift(e){this.xCoordShiftProperty!==e&&(this.xCoordShiftProperty=e,this.notifyPropertyChanged(u.PROPERTY.X_COORD_SHIFT))}get yCoordShift(){return this.yCoordShiftProperty}set yCoordShift(e){this.yCoordShiftProperty!==e&&(this.yCoordShiftProperty=e,this.notifyPropertyChanged(u.PROPERTY.Y_COORD_SHIFT))}get verticalAnchorPoint(){return this.verticalAnchorPointProperty}set verticalAnchorPoint(e){this.verticalAnchorPointProperty!==e&&(this.verticalAnchorPointProperty=e,this.notifyPropertyChanged(u.PROPERTY.VERTICAL_ANCHOR_POINT))}get horizontalAnchorPoint(){return this.horizontalAnchorPointProperty}set horizontalAnchorPoint(e){this.horizontalAnchorPointProperty!==e&&(this.horizontalAnchorPointProperty=e,this.notifyPropertyChanged(u.PROPERTY.HORIZONTAL_ANCHOR_POINT))}update(e,t,i,r){var s,o;this.create(e,t,i,r);let a=null!==(s=this.xCoordShift)&&void 0!==s?s:0,l=null!==(o=this.yCoordShift)&&void 0!==o?o:0;const h=this.svg.getBBox(),u=h.width,d=h.height;this.horizontalAnchorPointProperty===n.EHorizontalAnchorPoint.Center?a-=u/2:this.horizontalAnchorPointProperty===n.EHorizontalAnchorPoint.Right&&(a-=u),this.verticalAnchorPointProperty===n.EVerticalAnchorPoint.Center?l-=d/2:this.verticalAnchorPointProperty===n.EVerticalAnchorPoint.Bottom&&(l-=d),this.svg.style.visibility=this.isHidden?"hidden":"visible",this.svg.style.opacity=this.opacity.toString();const c=a+this.getX1Coordinate(e,t)+i,p=l+this.getY1Coordinate(e,t)+r;isNaN(c)||isNaN(p)||!isFinite(c)||!isFinite(p)?this.svg.style.display="none":(this.setSvgAttribute("x",c),this.setSvgAttribute("y",p))}calcDragDistance(e){if(!this.prevValue)return void(this.prevValue=e);let{x1:t,x2:i,y1:r,y2:n}=this.getAnnotationBorders();this.adornerDraggingPoint!==l.EDraggingGripPoint.Body&&this.adornerDraggingPoint!==l.EDraggingGripPoint.x1y1||(t=this.x1-(this.prevValue.x-e.x),r=this.y1-(this.prevValue.y-e.y),this.x1=t,this.y1=r,i-=this.prevValue.x-e.x,n-=this.prevValue.y-e.y),this.prevValue=e,this.setAnnotationBorders(t,i,r,n)}onDragStarted(e){super.onDragStarted(e);const{x1:t,x2:i,y1:a,y2:h}=this.getAnnotationBorders(),u=new r.Point(t,a);let d=t,c=a;const p=Math.abs((a-h)/2),g=Math.abs((t-i)/2);this.verticalAnchorPoint===n.EVerticalAnchorPoint.Center&&(c+=p),this.horizontalAnchorPoint===n.EHorizontalAnchorPoint.Center&&(d+=g);const f=(0,o.translateFromCanvasToSeriesViewRect)(new r.Point(e.mousePoint.x,e.mousePoint.y),this.parentSurface.seriesViewRect);if(!f)return!1;if(u&&this.canDragPoint(l.EDraggingGripPoint.x1y1)){if((0,s.calcDistance)(d,c,(0,o.translateToNotScaled)(f.x),(0,o.translateToNotScaled)(f.y))<this.annotationsGripsRadius)return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y1,!0}return!(!this.canDragPoint(l.EDraggingGripPoint.Body)||!this.clickToSelect(e))&&(this.adornerDraggingPoint=l.EDraggingGripPoint.Body,!0)}delete(){this.parentSurface&&!this.parentSurface.isDeleted&&this.svg&&(this.svgRoot.removeChild(this.svg),this.setSvg(void 0))}toJSON(){const e=super.toJSON(),t={xCoordShift:this.xCoordShift,yCoordShift:this.yCoordShift,verticalAnchorPoint:this.verticalAnchorPoint,horizontalAnchorPoint:this.horizontalAnchorPoint};return Object.assign(e.options,t),e}get svg(){return this.svgProperty}checkIsClickedOnAnnotationInternal(e,t){const{x1:i,x2:r,y1:n,y2:o}=this.getAnnotationBorders(!0),l=e/a.DpiHelper.PIXEL_RATIO,h=t/a.DpiHelper.PIXEL_RATIO;return(0,s.testIsInBounds)(l,h,i,o,r,n)}updateAdornerInner(){const{x1:e,x2:t,y1:i,y2:r}=this.getAdornerAnnotationBorders(!0,!0),n=this.parentSurface.domSvgAdornerLayer;if(this.deleteAdorner(),this.isSelected){const s=this.svgStringAdornerTemplate(e,i,t,r);this.svgAdorner=h.annotationHelpers.createSvg(s,n)}}get svgRoot(){return this.svgRootProperty}setSvgAttribute(e,t){const i=t.toString(10);this.svg.setAttribute(e,i)}setSvg(e){this.svgProperty=e}calcAndSetAnnotationBorders(e,t){if(!this.svg)return;let i=this.getX1Coordinate(e,t)+this.xCoordShift,r=this.getY1Coordinate(e,t)+this.yCoordShift;this.svgDOMRect=this.svg.getBoundingClientRect();let s=i+this.svgDOMRect.width,o=r+this.svgDOMRect.height;this.verticalAnchorPoint===n.EVerticalAnchorPoint.Bottom&&(o=r-this.svgDOMRect.height),this.verticalAnchorPoint===n.EVerticalAnchorPoint.Center&&(o=r+this.svgDOMRect.height/2,r-=this.svgDOMRect.height/2),this.horizontalAnchorPoint===n.EHorizontalAnchorPoint.Right&&(s=i-this.svgDOMRect.width),this.horizontalAnchorPoint===n.EHorizontalAnchorPoint.Center&&(s=i+this.svgDOMRect.width/2,i-=this.svgDOMRect.width/2),this.setAnnotationBorders(i,s,r,o)}svgStringAdornerTemplate(e,t,i,r){let s=e,o=t;const a=Math.abs((t-r)/2),h=Math.abs((e-i)/2);return this.verticalAnchorPoint===n.EVerticalAnchorPoint.Center&&(o+=a),this.horizontalAnchorPoint===n.EHorizontalAnchorPoint.Center&&(s+=h),`<svg xmlns="http://www.w3.org/2000/svg">\n <rect x="${e}" y="${t}" width="${Math.abs(e-i)}" height="${Math.abs(t-r)}" stroke="${this.selectionBoxStroke}" stroke-width="${this.selectionBoxThickness}px" fill="none" />\n ${this.canDragPoint(l.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(s,o):""}\n </svg>`}}t.SvgAnnotationBase=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineAnnotation=void 0;const r=i(0),n=i(1),s=i(5),o=i(102),a=i(29),l=i(11),h=i(35),u=i(64),d=i(6),c=i(28),p=i(34),g=i(46),f=i(23),y=i(130);class v extends y.RenderContextAnnotationBase{constructor(e){var t,i,r,n,s,a,l,h,u,d;super(e),this.type=f.EAnnotationType.RenderContextLineAnnotation,this.axisFontSizeProperty=14,this.axisFontFamilyProperty="Arial",this.strokeThicknessProperty=1,this.strokeDashArrayProperty=[],this.strokeProperty="#FFFFFF",this.showLabelProperty=!1,this.axisLabelStrokeProperty="#ffffff",this.axisLabelFillProperty="#b36200",this.labelPlacementProperty=o.ELabelPlacement.Auto,this.labelValueProperty="",this.stroke=null!==(t=null==e?void 0:e.stroke)&&void 0!==t?t:this.strokeProperty,this.strokeThickness=null!==(i=null==e?void 0:e.strokeThickness)&&void 0!==i?i:this.strokeThicknessProperty,this.strokeDashArray=null!==(r=null==e?void 0:e.strokeDashArray)&&void 0!==r?r:this.strokeDashArrayProperty,this.showLabelProperty=null!==(n=null==e?void 0:e.showLabel)&&void 0!==n?n:this.showLabelProperty,this.axisLabelStrokeProperty=null!==(s=null==e?void 0:e.axisLabelStroke)&&void 0!==s?s:this.axisLabelStrokeProperty,this.axisLabelFillProperty=null!==(a=null==e?void 0:e.axisLabelFill)&&void 0!==a?a:this.axisLabelFillProperty,this.axisFontSizeProperty=null!==(l=null==e?void 0:e.axisFontSize)&&void 0!==l?l:this.axisFontSizeProperty,this.axisFontFamilyProperty=null!==(h=null==e?void 0:e.axisFontFamily)&&void 0!==h?h:this.axisFontFamilyProperty,this.labelPlacementProperty=null!==(u=null==e?void 0:e.labelPlacement)&&void 0!==u?u:this.labelPlacementProperty,this.labelValueProperty=null!==(d=null==e?void 0:e.labelValue)&&void 0!==d?d:this.labelValueProperty}get stroke(){return this.strokeProperty}set stroke(e){this.strokeProperty=e,this.notifyPropertyChanged(g.PROPERTY.STROKE)}get strokeThickness(){return this.strokeThicknessProperty}set strokeThickness(e){this.strokeThicknessProperty=e,this.notifyPropertyChanged(g.PROPERTY.STROKE_THICKNESS)}get strokeDashArray(){return this.strokeDashArrayProperty}set strokeDashArray(e){this.strokeDashArrayProperty=e,this.notifyPropertyChanged(g.PROPERTY.STROKE_DASH_ARRAY)}get showLabel(){return this.showLabelProperty}set showLabel(e){this.showLabelProperty=e,this.notifyPropertyChanged(g.PROPERTY.SHOW_LABEL)}get axisLabelStroke(){return this.axisLabelStrokeProperty}set axisLabelStroke(e){this.axisLabelStrokeProperty=e,this.notifyPropertyChanged(g.PROPERTY.AXIS_LABELS_STROKE)}get axisLabelFill(){return this.axisLabelFillProperty}set axisLabelFill(e){this.axisLabelFillProperty=e,this.notifyPropertyChanged(g.PROPERTY.AXIS_LABELS_FILL)}get axisFontSize(){return this.axisFontSizeProperty}set axisFontSize(e){this.axisFontSizeProperty=e,this.notifyPropertyChanged(g.PROPERTY.AXIS_FONT_SIZE)}get axisFontFamily(){return this.axisFontFamilyProperty}set axisFontFamily(e){this.axisFontFamilyProperty=e,this.notifyPropertyChanged(g.PROPERTY.AXIS_FONT_FAMILY)}get labelPlacement(){return this.labelPlacementProperty}set labelPlacement(e){this.labelPlacementProperty=e,this.notifyPropertyChanged(g.PROPERTY.LABEL_PLACEMENT)}get labelValue(){return this.labelValueProperty}set labelValue(e){this.labelValueProperty=e,this.notifyPropertyChanged(g.PROPERTY.LABEL_VALUE)}delete(){this.strokePenCache=(0,r.deleteSafe)(this.strokePenCache)}onAttach(e){super.onAttach(e),this.strokePenCache||(this.strokePenCache=new h.Pen2DCache(e.webAssemblyContext2D)),(0,h.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity,this.strokeDashArray)}drawWithContext(e,t,i,r){n.Guard.notNull(e,"renderContext"),n.Guard.notNull(t,"xCalc"),n.Guard.notNull(i,"yCalc");const s=this.stroke&&this.strokeThickness?(0,h.getWebGlPenFromCache)(this.strokePenCache):void 0,o=this.getX1Coordinate(t,i),a=this.getX2Coordinate(t,i),l=this.getY1Coordinate(t,i),d=this.getY2Coordinate(t,i);if(this.setAnnotationBorders(o,a,l,d),e.drawLine(o,l,a,d,s,r),this.showLabel){let t,i=[],r=[];o===a?(i=this.parentSurface.xAxes.asArray().filter(e=>!e.isVerticalChart),r=this.parentSurface.yAxes.asArray().filter(e=>e.isVerticalChart),t=o):l===d&&(i=this.parentSurface.yAxes.asArray().filter(e=>!e.isVerticalChart),r=this.parentSurface.xAxes.asArray().filter(e=>e.isVerticalChart),t=l),(i.length>0||r.length>0)&&[...i,...r].forEach(i=>(0,u.drawModifiersAxisLabel)(i,e,t,this.axisLabelFill,this.axisLabelStroke))}this.updateAdornerInner()}onDragStarted(e){super.onDragStarted(e);const t=this.x1,i=this.type===f.EAnnotationType.RenderContextHorizontalLineAnnotation||this.type===f.EAnnotationType.RenderContextVerticalLineAnnotation?this.x1:this.x2,r=this.y1,n=this.type===f.EAnnotationType.RenderContextHorizontalLineAnnotation||this.type===f.EAnnotationType.RenderContextVerticalLineAnnotation?this.y1:this.y2,o=this.getXYCoordinatesFromValues(new s.Point(t,r)),a=this.getXYCoordinatesFromValues(new s.Point(i,n)),h=new s.Point(e.mousePoint.x,e.mousePoint.y);if(o&&this.canDragPoint(c.EDraggingGripPoint.x1y1)){if((0,l.calcDistance)(o.x,o.y,e.mousePoint.x,e.mousePoint.y)<this.annotationsGripsRadius*d.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=c.EDraggingGripPoint.x1y1,!0}if(a&&this.canDragPoint(c.EDraggingGripPoint.x2y2)){if((0,l.calcDistance)(a.x,a.y,e.mousePoint.x,e.mousePoint.y)<this.annotationsGripsRadius*d.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=c.EDraggingGripPoint.x2y2,!0}return!!(h&&this.canDragPoint(c.EDraggingGripPoint.Body)&&this.clickToSelect(e))&&(this.adornerDraggingPoint=c.EDraggingGripPoint.Body,!0)}calcDragDistance(e){if(!this.prevValue)return void(this.prevValue=e);const t=this.parentSurface.getYAxisById(this.yAxisId).isVerticalChart;this.adornerDraggingPoint===c.EDraggingGripPoint.Body?this.type===f.EAnnotationType.RenderContextHorizontalLineAnnotation?t?this.x1=this.x1-(this.prevValue.x-e.x):this.y1=this.y1-(this.prevValue.y-e.y):this.type===f.EAnnotationType.RenderContextVerticalLineAnnotation?t?this.y1=this.y1-(this.prevValue.y-e.y):this.x1=this.x1-(this.prevValue.x-e.x):this.type===f.EAnnotationType.RenderContextLineAnnotation&&(this.x1=this.x1-(this.prevValue.x-e.x),this.x2=this.x2-(this.prevValue.x-e.x),this.y1=this.y1-(this.prevValue.y-e.y),this.y2=this.y2-(this.prevValue.y-e.y)):this.adornerDraggingPoint===c.EDraggingGripPoint.x1y1?this.resizeDirections===a.EXyDirection.XDirection?this.x1-=this.prevValue.x-e.x:(this.resizeDirections===a.EXyDirection.YDirection||(this.x1-=this.prevValue.x-e.x),this.y1-=this.prevValue.y-e.y):this.adornerDraggingPoint===c.EDraggingGripPoint.x2y2&&(this.resizeDirections===a.EXyDirection.XDirection?this.x2-=this.prevValue.x-e.x:(this.resizeDirections===a.EXyDirection.YDirection||(this.x2-=this.prevValue.x-e.x),this.y2-=this.prevValue.y-e.y)),this.prevValue=e}onDpiChanged(e){super.onDpiChanged(e),this.notifyPropertyChanged(g.PROPERTY.STROKE)}toJSON(){const e=super.toJSON(),t={axisFontFamily:this.axisFontFamily,axisFontSize:this.axisFontSize,axisLabelFill:this.axisLabelFill,axisLabelStroke:this.axisLabelStroke,labelPlacement:this.labelPlacement,labelValue:this.labelValue,showLabel:this.showLabel,stroke:this.stroke,strokeDashArray:this.strokeDashArray,strokeThickness:this.strokeThickness};return Object.assign(e.options,t),e}checkIsClickedOnAnnotationInternal(e,t){const{x1:i,x2:r,y1:n,y2:s}=this.getAnnotationBorders();return(0,l.calcDistanceFromLineSegment)(e,t,i,n,r,s)<=g.DISTANCE_TO_LINE*d.DpiHelper.PIXEL_RATIO}notifyPropertyChanged(e){super.notifyPropertyChanged(e);[g.PROPERTY.STROKE,g.PROPERTY.STROKE_THICKNESS,g.PROPERTY.STROKE_DASH_ARRAY,g.PROPERTY.OPACITY].includes(e)&&this.strokePenCache&&(0,h.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity,this.strokeDashArray)}updateAdornerInner(){const e=this.parentSurface.domSvgAdornerLayer;if(this.deleteAdorner(),this.isSelected){const{x1:t,x2:i,y1:r,y2:n}=this.getAdornerAnnotationBorders(),s=this.svgStringAdornerTemplate(t,r,i,n);this.svgAdorner=p.annotationHelpers.createSvg(s,e)}}svgStringAdornerTemplate(e,t,i,r){return`<svg xmlns="http://www.w3.org/2000/svg">\n <line x1="${e}" y1="${t}" x2="${i}" y2="${r}" stroke="${this.selectionBoxStroke}" stroke-width="6" />\n ${this.canDragPoint(c.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(e,t):""}\n ${this.canDragPoint(c.EDraggingGripPoint.x2y2)?this.getAnnotationGripSvg(i,r):""}\n </svg>`}}t.LineAnnotation=v},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericAxis=void 0;const r=i(58),n=i(184),s=i(185),o=i(136),a=i(48),l=i(108),h=i(90);class u extends a.AxisBase2D{constructor(e,t){var i;super(e,t),this.type=r.EAxisType.NumericAxis,this.tickProvider=new o.NumericTickProvider(this.webAssemblyContext2D),this.labelProvider=null!==(i=null==t?void 0:t.labelProvider)&&void 0!==i?i:new h.NumericLabelProvider(t),this.deltaCalculator=new l.NumericDeltaCalculator(this.webAssemblyContext2D)}getCurrentCoordinateCalculatorInternal(){const e=this.visibleRange.min,t=this.visibleRange.max,i=this.offset,r=this.axisLength;return this.isXAxis!==this.flippedCoordinates?new n.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D,r,e,t,i,this.allowFastMath):new s.NumericCoordinateCalculator(this.webAssemblyContext2D,r,e,t,i,this.allowFastMath)}}t.NumericAxis=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericLabelProvider=void 0;const r=i(77),n=i(41),s=i(21),o=i(109);class a extends o.LabelProviderBase2D{constructor(e){var t,i;super(Object.assign({labelFormat:null!==(t=null==e?void 0:e.labelFormat)&&void 0!==t?t:n.ENumericFormat.Decimal,labelPrecision:null!==(i=null==e?void 0:e.labelPrecision)&&void 0!==i?i:1},e)),this.type=r.ELabelProviderType.Numeric,this.formatLabelProperty=e=>this.applyFormat((0,s.formatNumber)(e,this.numericFormat,this.precision)),this.formatCursorLabelProperty=e=>{var t,i;return this.applyFormat((0,s.formatNumber)(e,null!==(t=this.cursorNumericFormat)&&void 0!==t?t:this.numericFormat,null!==(i=this.cursorPrecision)&&void 0!==i?i:this.precision))}}onBeginAxisDraw(){}}t.NumericLabelProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSciChartLoader=void 0;const r=i(1);class n{addChartLoader(e,t){this.addLoaderStyles(),r.Guard.notNull(e,"domDivContainer"),r.Guard.notNull(t,"theme");const i=document.createElement("div");i.style.background=t.loadingAnimationBackground,i.style.height="100%",i.style.width="100%",i.style.position="relative",i.style.zIndex="11";const n=document.createElement("div"),s=`<div><span style="background: ${t.loadingAnimationForeground}"/></div>`;return n.innerHTML=s.repeat(8),n.classList.add("scichart_loader"),i.appendChild(n),e.appendChild(i),i}removeChartLoader(e,t){try{e.removeChild(t)}catch(e){}}toJSON(){return{type:this.type}}addLoaderStyles(){if(n.hasStyles)return;const e=document.head,t=document.createElement("style");t.id=n.sciChartLoaderStylesId,e.appendChild(t),t.appendChild(document.createTextNode(s)),n.hasStyles=!0}}t.DefaultSciChartLoader=n,n.hasStyles=!1,n.sciChartLoaderStylesId="scichart_default_loader_styles_id";const s="\n .scichart_loader {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n top: 50%;\n transform: translateY(-50%);\n }\n .scichart_loader div {\n animation: scichart_loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n transform-origin: 40px 40px;\n }\n .scichart_loader div span {\n display: block;\n position: absolute;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n margin: -4px 0 0 -4px;\n }\n .scichart_loader div:nth-child(1) {\n animation-delay: -0.036s;\n }\n .scichart_loader div:nth-child(1) span {\n top: 63px;\n left: 63px;\n }\n .scichart_loader div:nth-child(2) {\n animation-delay: -0.072s;\n }\n .scichart_loader div:nth-child(2) span {\n top: 68px;\n left: 56px;\n }\n .scichart_loader div:nth-child(3) {\n animation-delay: -0.108s;\n }\n .scichart_loader div:nth-child(3) span {\n top: 71px;\n left: 48px;\n }\n .scichart_loader div:nth-child(4) {\n animation-delay: -0.144s;\n }\n .scichart_loader div:nth-child(4) span {\n top: 72px;\n left: 40px;\n }\n .scichart_loader div:nth-child(5) {\n animation-delay: -0.18s;\n }\n .scichart_loader div:nth-child(5) span {\n top: 71px;\n left: 32px;\n }\n .scichart_loader div:nth-child(6) {\n animation-delay: -0.216s;\n }\n .scichart_loader div:nth-child(6) span {\n top: 68px;\n left: 24px;\n }\n .scichart_loader div:nth-child(7) {\n animation-delay: -0.252s;\n }\n .scichart_loader div:nth-child(7) span {\n top: 63px;\n left: 17px;\n }\n .scichart_loader div:nth-child(8) {\n animation-delay: -0.288s;\n }\n .scichart_loader div:nth-child(8) span {\n top: 56px;\n left: 12px;\n }\n @keyframes scichart_loader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=i(71),n=i(4),s=i(6);var o;!function(e){e[e.canvasWebGL=0]="canvasWebGL",e[e.canvas2D=1]="canvas2D",e[e.svg=2]="svg"}(o||(o={}));const a=e=>e+"_2D",l=e=>{const t=e.style.maxHeight;if(t){if(t.includes("px")){const e=parseInt(t.replace("px",""),10);if(!isNaN(e))return e}}},h={checkChartDivExists:e=>{if("string"==typeof e){const t=document.querySelectorAll(`[id=${e}]`).length;t>1?console.error(`Please provide a unique ID for each chart div element, "${e}" it is not a unique identifier`):0===t&&console.error(`Chart div element with the ID "${e}" is not present in the DOM`)}else if(!e)throw new Error("Provided div element doesn't exist!")},ECanvasType:o,getCanvas2dId:a,initCanvas:(e,t,i,h=o.canvasWebGL,u)=>{r.WebGlHelper.initialize(),s.DpiHelper.initialize();const d=(e=>{const t="string"==typeof e?document.querySelector("#"+e):e;if(!t)throw new Error(`Check div element with id "${t.id}" exists`);if("div"!==t.nodeName.toLowerCase())throw new Error(`Element with id "${t.id}" should be of type div`);return t})(e);d.innerHTML="",""===d.style.position&&(d.style.position="relative");const c=d.id,{offsetWidth:p,offsetHeight:g}=d,f=l(d),{width:y,height:v,aspectRatio:m}=((e,t,i,r=0,n=0)=>{let s;s=r&&n?r/n:e&&t?void 0:1.5;const o=Math.round(e||600);if(s){let e=Math.round(o/s);return e>i&&(e=i),{width:o,height:e,aspectRatio:s}}return{width:o,height:Math.round(t),aspectRatio:s}})(p,g,f,t,i);let S;if(!u&&m&&(d.style.aspectRatio=""+m),h===o.canvasWebGL){S=document.createElement("canvas"),S.id=c+"_WebGL",S.style.position="absolute",S.style.display="block",S.style.width="100%",S.style.height="100%";r.WebGlHelper.getContext(S,{premultipliedAlpha:!0,antialias:n.SciChartSurfaceBase.AntiAliasWebGlBackbuffer});d.appendChild(S)}const P=document.createElement("canvas");P.id=a(c),P.style.width="100%",P.style.height="100%",s.DpiHelper.setSize(P,y,v),P.style.position="absolute",h!==o.canvas2D&&(P.style.pointerEvents="none"),h===o.canvasWebGL?P.style.display="none":P.style.display="block",d.appendChild(P),P.onselectstart=()=>!1;const C=document.createElementNS("http://www.w3.org/2000/svg","svg");C.id=c+"_SVG",C.setAttribute("width",y.toString()),C.setAttribute("height",v.toString()),C.setAttribute("role","img"),C.setAttribute("xmlns","http://www.w3.org/2000/svg"),C.style.position="absolute",C.style.display="block",C.style.width="100%",C.style.height="100%",h!==o.svg&&(C.style.pointerEvents="none"),d.appendChild(C);const A=document.createElementNS("http://www.w3.org/2000/svg","svg");A.id=c+"_Adorner",A.setAttribute("width",y.toString()),A.setAttribute("height",v.toString()),A.setAttribute("role","img"),A.setAttribute("xmlns","http://www.w3.org/2000/svg"),A.style.position="absolute",A.style.display="block",A.style.pointerEvents="none",A.style.width="100%",A.style.height="100%",A.style.zIndex="1",d.appendChild(A);const x=document.createElement("div");return x.id=c+"_div",x.style.width="100%",x.style.height="100%",x.style.position="relative",x.style.pointerEvents="none",x.style.textAlign="center",d.appendChild(x),h===o.canvasWebGL&&S.addEventListener("webglcontextlost",e=>{console.warn("WebGL context lost. Reloading the page."),e.preventDefault(),location.reload()},!1),{domChartRoot:d,domCanvasWebGL:S,domCanvas2D:P,domSvgContainer:C,domSvgAdornerLayer:A,domDivContainer:x,aspect:m,disableAspect:u}},subscribeToResize:(e,t,i,r)=>{const n=new ResizeObserver(t=>{for(const r of t){let t,n;r.contentRect?(t=r.contentRect.width,n=r.contentRect.height):r.contentBoxSize?r.contentBoxSize.inlineSize?t=r.contentBoxSize.inlineSize:r.contentBoxSize[0]&&(t=r.contentBoxSize[0].inlineSize):(console.error("ResizeObserver is not supported"),t=900);const s=l(e);s&&n>s&&(n=s);const o=0!==t&&0!==n,a=i.domCanvas2D.width!==t||i.domCanvas2D.height!==n;o&&a&&setTimeout(()=>{i.changeViewportSize(t,n)},0)}});n.observe(e);return{delete:()=>n.disconnect()}}};t.default=h},function(e,t,i){"use strict";function r(e,t){return(void 0!==e||void 0===t)&&((void 0!==t||void 0===e)&&(void 0===e&&void 0===t||e.start===t.start&&e.end===t.end&&n(e.stroke,t.stroke)&&e.strokeThickness===t.strokeThickness))}function n(e,t){return(void 0!==e||void 0===t)&&((void 0!==t||void 0===e)&&(void 0===e&&void 0===t||e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.opacity===t.opacity))}function s(e,t){return(void 0!==e||void 0===t)&&((void 0!==t||void 0===e)&&(void 0===e&&void 0===t||e.alignment===t.alignment&&e.dpiScaling===t.dpiScaling&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.foreground===t.foreground))}function o(e,t){if(void 0===e&&void 0!==t)return!1;if(void 0===t&&void 0!==e)return!1;if(void 0===t&&void 0===e)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.getArraysEqual=t.getTextStylesEqual=t.getTArgbEqual=t.getLineStylesEqual=t.getDescriptorsEqual=void 0,t.getDescriptorsEqual=function(e,t){return void 0===e?void 0===t:void 0===t?void 0===e:e.axisTitle===t.axisTitle&&e.axisSize===t.axisSize&&e.backgroundColor===t.backgroundColor&&n(e.bandColor,t.bandColor)&&e.borderColor===t.borderColor&&o(e.majorCoordinates,t.majorCoordinates)&&o(e.minorCoordinates,t.minorCoordinates)&&o(e.tickLabels,t.tickLabels)&&r(e.majorLineStyle,t.majorLineStyle)&&r(e.minorLineStyle,t.minorLineStyle)&&r(e.majorTickStyle,t.majorTickStyle)&&r(e.minorTickStyle,t.minorTickStyle)&&s(e.titleStyle,t.titleStyle)&&s(e.labelStyle,t.labelStyle)&&e.drawMajorGridlines===t.drawMajorGridlines&&e.drawMinorGridlines===t.drawMinorGridlines&&e.drawMajorTicks===t.drawMajorTicks&&e.drawMinorTicks===t.drawMinorTicks&&e.drawBands===t.drawBands&&e.isVisible===t.isVisible&&e.borderThickness===t.borderThickness&&e.labelDepthTestEnabled===t.labelDepthTestEnabled&&e.titleOffset===t.titleOffset&&e.tickLabelsOffset===t.tickLabelsOffset&&e.smoothLabelOverlapAvoidance===t.smoothLabelOverlapAvoidance},t.getLineStylesEqual=r,t.getTArgbEqual=n,t.getTextStylesEqual=s,t.getArraysEqual=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePointSeriesWrapped=void 0;t.BasePointSeriesWrapped=class{constructor(e,t){this.dataSeries=e,this.count=e.count(),this.xValues=this.dataSeries.getNativeXValues(),this.yValues=null!=t?t:this.dataSeries.getNativeYValues()}get indexes(){return this.indexesProperty||(this.indexesProperty=this.dataSeries.getNativeIndexes()),this.indexesProperty}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePointMarker=void 0;const r=i(13),n=i(0),s=i(30),o=i(26),a=i(96),l=i(4),h=i(75),u=i(6),d=i(308);t.BasePointMarker=class{constructor(e,t){var i,r,n,o,a,l;this.fillProperty="#5555FF",this.heightProperty=5,this.opacityProperty=1,this.strokeProperty="#3333FF",this.strokeThicknessProperty=1,this.widthProperty=5,this.isUpdateSuspended=!1,this.webAssemblyContext=e,this.widthProperty=null!==(i=null==t?void 0:t.width)&&void 0!==i?i:this.widthProperty,this.heightProperty=null!==(r=null==t?void 0:t.height)&&void 0!==r?r:this.heightProperty,this.fillProperty=null!==(n=null==t?void 0:t.fill)&&void 0!==n?n:this.fillProperty,this.strokeProperty=null!==(o=null==t?void 0:t.stroke)&&void 0!==o?o:this.strokeProperty,this.strokeThicknessProperty=null!==(a=null==t?void 0:t.strokeThickness)&&void 0!==a?a:this.strokeThicknessProperty,this.opacityProperty=null!==(l=null==t?void 0:t.opacity)&&void 0!==l?l:this.opacityProperty,s.WebGlRenderContext2D.webGlResourcesRefs.add(this)}get fill(){return this.fillProperty===o.AUTO_COLOR?"#00000000":this.fillProperty.startsWith(o.AUTO_COLOR)?this.fillProperty.substring(o.AUTO_COLOR.length):this.fillProperty}set fill(e){const t=this.fillProperty;this.fillProperty=e,this.notifyPropertyChanged(d.PROPERTY.FILL,e,t)}get stroke(){return this.strokeProperty===o.AUTO_COLOR?"#00000000":this.strokeProperty.startsWith(o.AUTO_COLOR)?this.strokeProperty.substring(o.AUTO_COLOR.length):this.strokeProperty}set stroke(e){const t=this.strokeProperty;this.strokeProperty=e,this.notifyPropertyChanged(d.PROPERTY.STROKE,e,t)}get width(){return this.widthProperty}set width(e){const t=this.widthProperty;this.widthProperty=e,this.notifyPropertyChanged(d.PROPERTY.WIDTH,e,t)}get height(){return this.heightProperty}set height(e){const t=this.heightProperty;this.heightProperty=e,this.notifyPropertyChanged(d.PROPERTY.HEIGHT,e,t)}get strokeThickness(){return this.strokeThicknessProperty}set strokeThickness(e){const t=this.strokeThicknessProperty;this.strokeThicknessProperty=e,this.notifyPropertyChanged(d.PROPERTY.STROKE_THICKNESS,e,t)}get opacity(){return this.opacityProperty}set opacity(e){const t=this.opacityProperty;this.opacityProperty=e,this.applyOpacity(e),this.notifyPropertyChanged(d.PROPERTY.OPACITY,e,t)}getSprite(){return void 0===this.spriteTextures&&(this.spriteTextures=this.createCanvasTexture(),this.applyOpacity(this.opacityProperty)),this.spriteTextures.spriteTexture}getStrokeMask(){return void 0===this.spriteTextures&&(this.spriteTextures=this.createCanvasTexture(),this.applyOpacity(this.opacityProperty)),this.spriteTextures.strokeMask}getFillMask(){return void 0===this.spriteTextures&&(this.spriteTextures=this.createCanvasTexture(),this.applyOpacity(this.opacityProperty)),this.spriteTextures.fillMask}invalidateCache(){this.spriteTextures&&((0,n.deleteSafe)(this.spriteTextures.spriteTexture),(0,n.deleteSafe)(this.spriteTextures.strokeMask),(0,n.deleteSafe)(this.spriteTextures.fillMask),this.spriteTextures=void 0)}resetCache(){this.invalidateCache(),this.widthProperty=void 0,this.heightProperty=void 0,this.fillProperty=void 0,this.strokeProperty=void 0,this.strokeThicknessProperty=void 0,this.opacityProperty=void 0}delete(){this.invalidateCache(),s.WebGlRenderContext2D.webGlResourcesRefs.delete(this)}createCanvasTexture(){if(r.IS_TEST_ENV)return{spriteTexture:void 0,strokeMask:void 0,fillMask:void 0};const e=u.DpiHelper.PIXEL_RATIO*(this.width+this.strokeThickness)+1,t=u.DpiHelper.PIXEL_RATIO*(this.height+this.strokeThickness)+1,i=new h.CanvasTexture(this.webAssemblyContext,e,t);i.clear(),this.drawSprite(i.getContext(),this.width*u.DpiHelper.PIXEL_RATIO,this.height*u.DpiHelper.PIXEL_RATIO,this.stroke,this.strokeThickness*u.DpiHelper.PIXEL_RATIO,this.fill),i.copyTexture();const n=new h.CanvasTexture(this.webAssemblyContext,e,t);n.clear(),this.drawSprite(n.getContext(),this.width*u.DpiHelper.PIXEL_RATIO,this.height*u.DpiHelper.PIXEL_RATIO,"#ffffffff",this.strokeThickness*u.DpiHelper.PIXEL_RATIO,"#00000000"),n.copyTexture();const s=new h.CanvasTexture(this.webAssemblyContext,e,t);return s.clear(),this.drawSprite(s.getContext(),this.width*u.DpiHelper.PIXEL_RATIO,this.height*u.DpiHelper.PIXEL_RATIO,"#00000000",0,"#ffffffff"),s.copyTexture(),{spriteTexture:i,strokeMask:n,fillMask:s}}getPointMarkerStyle(){return new a.PointMarkerStyle({type:this.type,width:this.width,height:this.height,fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness})}toJSON(){const e={fill:this.fill,height:this.height,opacity:this.opacity,stroke:this.stroke,strokeThickness:this.strokeThickness,width:this.width};return{type:this.type,options:e}}onDpiChanged(e){l.DebugForDpi&&console.log("basePointMarker onDpiChanged Scaling factor = "+e.newValue),this.invalidateCache()}resolveAutoColors(e,t,i){if(this.strokeProperty.startsWith(o.AUTO_COLOR)){const r=i.getStrokeColor(e,t,this.webAssemblyContext);this.stroke=o.AUTO_COLOR+this.adjustAutoColor("stroke",r)}if(this.fillProperty.startsWith(o.AUTO_COLOR)){const r=i.getFillColor(e,t,this.webAssemblyContext);this.fill=o.AUTO_COLOR+this.adjustAutoColor("fill",r)}}adjustAutoColor(e,t){return t}resumeUpdates(){this.isUpdateSuspended=!1,this.recreateSpriteTextures()}suspendUpdates(){this.isUpdateSuspended=!0}notifyPropertyChanged(e,t,i){t!==i&&e!==d.PROPERTY.OPACITY&&(this.isUpdateSuspended||this.recreateSpriteTextures())}recreateSpriteTextures(){var e,t,i;this.spriteTextures&&(null===(e=this.spriteTextures.spriteTexture)||void 0===e||e.delete(),null===(t=this.spriteTextures.strokeMask)||void 0===t||t.delete(),null===(i=this.spriteTextures.fillMask)||void 0===i||i.delete(),this.spriteTextures=void 0),this.spriteTextures=this.createCanvasTexture(),this.invalidateParentCallback&&this.invalidateParentCallback()}applyOpacity(e){var t,i,r;this.spriteTextures&&(null===(t=this.spriteTextures.spriteTexture)||void 0===t||t.applyOpacity(e),null===(i=this.spriteTextures.strokeMask)||void 0===i||i.applyOpacity(e),null===(r=this.spriteTextures.fillMask)||void 0===r||r.applyOpacity(e))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PointMarkerStyle=void 0;const r=i(2),n=i(199);class s extends n.BasePointMarkerStyle{constructor(e){var t,i,r;super(e),this.strokeThickness=0,this.strokeThickness=null!==(t=null==e?void 0:e.strokeThickness)&&void 0!==t?t:this.strokeThickness,this.stroke=null!==(i=null==e?void 0:e.stroke)&&void 0!==i?i:"#ffffff00",this.fill=null!==(r=null==e?void 0:e.fill)&&void 0!==r?r:"#ffffff00"}set stroke(e){this.strokeProperty=e,e&&(this.strokeARGBProperty=(0,r.parseColorToUIntArgb)(e))}get stroke(){return this.strokeProperty}get strokeARGB(){return this.strokeARGBProperty}set fill(e){this.fillProperty=e,e&&(this.fillARGBProperty=(0,r.parseColorToUIntArgb)(e))}get fill(){return this.fillProperty}get fillARGB(){return this.fillARGBProperty}}t.PointMarkerStyle=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EllipsePointMarker=void 0;const r=i(43),n=i(95);class s extends n.BasePointMarker{constructor(e,t){super(e,t),this.type=r.EPointMarkerType.Ellipse}drawSprite(e,t,i,r,n,s){const o=e.canvas.width/2,a=e.canvas.height/2,l=n/2,h=t/2-l<0?0:t/2-l,u=i/2-l<0?0:i/2-l;e.fillStyle=s,e.ellipse(o,a,h,u,0,0,2*Math.PI,!1),e.fill(),n>0&&(e.strokeStyle=r,e.lineWidth=n,e.stroke())}}t.EllipsePointMarker=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseDataSeries3D=t.EDataSeriesType3D=void 0;const r=i(18);!function(e){e.Xyz3D="Xyz",e.UniformGrid3D="UniformGrid3D",e.NonUniformGrid3D="NonUniformGrid3D"}(t.EDataSeriesType3D||(t.EDataSeriesType3D={}));t.BaseDataSeries3D=class{constructor(e,t){var i;this.webAssemblyContext=e,this.dataSeriesNameProperty=null!==(i=null==t?void 0:t.dataSeriesName)&&void 0!==i?i:this.dataSeriesNameProperty,this.dataChanged=new r.EventHandler,this.isModifiedProperty=!0}get dataSeriesName(){return this.dataSeriesNameProperty}set dataSeriesName(e){this.dataSeriesNameProperty=e,this.notifyDataChanged()}get isModified(){return this.isModifiedProperty}getIsDeleted(){return this.isDeleted}delete(){this.isDeleted=!0}notifyDataChanged(){this.isModifiedProperty=!0,this.dataChanged.raiseEvent()}resetModified(){this.isModifiedProperty=!1}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dictionary=void 0;t.Dictionary=class{constructor(){this.items={},this.countProperty=0}containsKey(e){return this.items.hasOwnProperty(e)}get count(){return this.countProperty}add(e,t){this.items.hasOwnProperty(e)||this.countProperty++,this.items[e]=t}remove(e){const t=this.items[e];return delete this.items[e],this.countProperty--,t}item(e){return this.items[e]}get keys(){return Object.keys(this.items)}get values(){return this.keys.map(e=>this.items[e])}clear(){this.items={},this.countProperty=0}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChartModifierBase=t.EModifierType=void 0;const r=i(247),n=i(22),s=i(4),o=i(72);var a;!function(e){e.Chart2DModifier="2D Chart Modifier",e.Chart3DModifier="3D Chart Modifier",e.MultiChart2DModifier="Multiple 2D Chart Modifier"}(a=t.EModifierType||(t.EModifierType={}));t.ChartModifierBase=class{constructor(e){var t;this.isEnabledProperty=!0,this.executeOnProperty=r.EExecuteOn.MouseLeftButton,this.id=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:(0,n.generateGuid)()}applyTheme(e){}get parentSurface(){return this.parentSurfaceProperty}get isEnabled(){return this.isEnabledProperty}set isEnabled(e){this.isEnabledProperty=e,this.notifyPropertyChanged(o.PROPERTY.IS_ENABLED)}get isAttached(){return this.isAttachedProperty}get receiveHandledEvents(){return this.receiveHandledEventsProperty}set receiveHandledEvents(e){this.receiveHandledEventsProperty=e,this.notifyPropertyChanged(o.PROPERTY.RECEIVE_HANDLED_EVENTS)}get executeOn(){return this.executeOnProperty}set executeOn(e){this.executeOnProperty=e,this.notifyPropertyChanged(o.PROPERTY.EXECUTE_ON)}get canReceiveMouseEvents(){return this.isEnabled&&this.isAttached&&void 0!==this.parentSurfaceProperty}onAttach(){}onDetach(){}onAttachSeries(e){}onDetachSeries(e){}onAttachSubSurface(e){}onDetachSubSurface(e){}onParentSurfaceRendered(){}modifierMouseDown(e){this.executeOn===r.EExecuteOn.MouseMiddleButton&&e.nativeEvent.preventDefault()}modifierMouseMove(e){this.mousePoint=e.mousePoint}modifierMouseUp(e){}modifierMouseWheel(e){}modifierDoubleClick(e){}modifierMouseEnter(e){}modifierMouseLeave(e){}modifierDrop(e){}modifierPointerCancel(e){}setParentSurface(e){if(e){if(e.surfaceType===s.ESurfaceType.SciChartSurfaceType&&this.modifierType===a.Chart3DModifier)throw new Error("A 3D Chart Modifier cannot be added to a 2D SciChartSurface. Please check surfaceType and ModifierType properties for modifierType");if(e.surfaceType===s.ESurfaceType.SciChart3DSurfaceType&&this.modifierType===a.Chart2DModifier)throw new Error("A 2D Chart Modifier cannot be added to a 3D SciChartSurface. Please check surfaceType and ModifierType properties for modifierType");this.parentSurfaceProperty=e}else this.parentSurfaceProperty=void 0;this.isAttachedProperty=void 0!==this.parentSurfaceProperty,this.notifyPropertyChanged(o.PROPERTY.PARENT_SURFACE)}delete(){}notifyPropertyChanged(e){this.invalidateParentCallback&&this.invalidateParentCallback()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EPaletteProviderType=void 0,function(e){e.Gradient="Gradient",e.DataPointSelection="DataPointSelection",e.Custom="Custom"}(t.EPaletteProviderType||(t.EPaletteProviderType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVerticalAlignment=t.EHorizontalAlignment=t.ELabelPlacement=void 0,function(e){e.Right="Right",e.TopRight="TopRight",e.BottomRight="BottomRight",e.Bottom="Bottom",e.Left="Left",e.TopLeft="TopLeft",e.BottomLeft="BottomLeft",e.Top="Top",e.Axis="Axis",e.Auto="Auto"}(t.ELabelPlacement||(t.ELabelPlacement={})),function(e){e.Right="Right",e.Left="Left"}(t.EHorizontalAlignment||(t.EHorizontalAlignment={})),function(e){e.Top="Top",e.Bottom="Bottom"}(t.EVerticalAlignment||(t.EVerticalAlignment={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logToBase=t.fillNoisySinewave=t.getNoisySinewave=void 0;t.getNoisySinewave=(e,t,i,r,n)=>{const s=[],o=[],a=i/t,l=2*Math.PI*a;for(let i=0;i<e;i++){const a=i*t/(e-1);s.push(a);const h=r*Math.sin(a*l),u=(Math.random()-.5)*n;o.push(h+u)}return[s,o]};t.fillNoisySinewave=(e,t,i,r,n,s)=>{const o=i/t,a=2*Math.PI*o,l=s.getNativeXValues(),h=s.getNativeYValues();l.reserve(e),h.reserve(e);for(let i=0;i<e;i++){const s=i*t/(e-1),o=r*Math.sin(s*a),u=(Math.random()-.5)*n;l.push_back(s),h.push_back(o+u)}};t.logToBase=(e,t)=>10===t?Math.log10(e):Math.log(e)/(t?Math.log(t):1)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ELabelAlignment=void 0,function(e){e.Auto="Auto",e.Left="Left",e.Right="Right",e.Center="Center"}(t.ELabelAlignment||(t.ELabelAlignment={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartDefaults=void 0;class r{}t.SciChartDefaults=r,r.asyncLabels=!1,r.useSharedCache=!1,r.enableResampling=!0,r.performanceWarnings=!0,r.useNativeText=!1,r.nativeFontTimeout=2e3},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoordinateCalculatorBase=void 0;const r=i(3);t.CoordinateCalculatorBase=class{constructor(e,t,i,r,n,s,o=!1){this.webAssemblyContext=e,this.visibleMax=r,this.visibleMin=i,this.viewportDimension=t,this.offset=n,this.hasFlippedCoordinates=s,this.isCategoryCoordinateCalculator=o}getCoordinate(e){return this.nativeCalculator.GetCoordinate(e)}getDataValue(e){return this.nativeCalculator.GetDataValue(e)}translateBy(e,t){let i=this.getDataValue(e)-this.getDataValue(0);return this.hasFlippedCoordinates&&(i=-i),new r.NumberRange(t.min+i,t.max+i)}zoomTranslateBy(e,t,i){return i.growBy(new r.NumberRange(e,t))}delete(){var e;null===(e=this.nativeCalculator)||void 0===e||e.delete(),this.nativeCalculator=void 0}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberRangeAnimator=void 0;const r=i(1),n=i(3),s=i(39),o=i(179);class a{static animate(e,t,i,r,n,l=s.easing.outExpo,h=!1){return new o.GenericAnimation({from:e,to:t,duration:i,onAnimate:(e,t,i)=>{const n=(h?a.interpolateLog:a.interpolate)(e,t,i);r(n)},delay:0,ease:l,onCompleted:n})}static interpolate(e,t,i){r.Guard.notNull(e,"from"),r.Guard.notNull(t,"to");const s=(t.min-e.min)*i+e.min,o=(t.max-e.max)*i+e.max;return new n.NumberRange(s,o)}static interpolateLog(e,t,i){r.Guard.notNull(e,"from"),r.Guard.notNull(t,"to");const s=Math.pow(t.min/e.min,i)*e.min,o=Math.pow(t.max/e.max,i)*e.max;return new n.NumberRange(s,o)}}t.NumberRangeAnimator=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericDeltaCalculator=void 0;const r=i(1),n=i(3),s=i(269);class o extends s.DeltaCalculator{constructor(e){super(),this.webAssemblyContext=e}getDeltaFromRange(e,t,i,s){r.Guard.argumentIsRealNumber(e,"min"),r.Guard.argumentIsRealNumber(t,"max");const o=this.webAssemblyContext.NiceDoubleScale.CalculateTickSpacing(e,t,i,s),a=new n.NumberRange(o.minD,o.maxD);return o.delete(),a}}t.NumericDeltaCalculator=o},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LabelProviderBase2D=t.LabelInfo=void 0;const n=i(13),s=i(22),o=i(137),a=i(12),l=i(105),h=i(76),u=i(133),d=i(270);class c{constructor(e,t,i,r,n){this.subs=[],this.tick=e,this.text=t,this.bitmapTexture=i,this.textureHeight=r,this.textureWidth=n,this.lastUsed=Date.now()}registerNotifier(e){this.subs.push(e)}textureUpdated(){this.subs.forEach(e=>e()),this.subs=[]}}t.LabelInfo=c;class p extends d.LabelProvider{constructor(e){var t,i,r,o,a;super(e),this.useCache=!n.IS_TEST_ENV,this.useNativeText=!1,this.tickToText=new Map,this.textVariesForSameTick=!1,this.rotationProperty=0,this.lineSpacingProperty=1.1,this.providerId=(0,s.generateGuid)(),this.rotationProperty=null!==(t=null==e?void 0:e.rotation)&&void 0!==t?t:this.rotationProperty,this.lineSpacing=null!==(i=null==e?void 0:e.lineSpacing)&&void 0!==i?i:this.lineSpacing,this.asyncLabels=null!==(r=null==e?void 0:e.asyncLabels)&&void 0!==r?r:l.SciChartDefaults.asyncLabels,this.useSharedCache=null!==(o=null==e?void 0:e.useSharedCache)&&void 0!==o?o:l.SciChartDefaults.useSharedCache,this.useNativeText=null!==(a=null==e?void 0:e.useNativeText)&&void 0!==a?a:l.SciChartDefaults.useNativeText}get rotation(){return this.rotationProperty}set rotation(e){this.rotationProperty!==e&&(this.rotationProperty=e,this.invalidateParent())}get lineSpacing(){return this.useNativeText&&1.1===this.lineSpacingProperty?2:this.lineSpacingProperty}set lineSpacing(e){this.lineSpacingProperty=e,this.invalidateParent()}getLabels(e){const t=this.parentAxis;this.useCache&&(this.styleId?u.labelCache.checkStyle(this.styleId,this.getCachedStyle())||(this.delete(),this.styleId=u.labelCache.getStyleId(this.getCachedStyle())):this.styleId=u.labelCache.getStyleId(this.getCachedStyle()));let i=e;if(this.parentAxis.isCategoryAxis){const t=this.parentAxis.getCurrentCoordinateCalculator();i=e.map(e=>t.transformIndexToData(e))}let r=[];if(this.useCache)if(this.useNativeText){const e=[];for(const t of i){const i=this.tickToText.get(t);if(this.textVariesForSameTick){const n=this.formatLabel(t);i&&i===n?r.push(i):(this.tickToText.set(t,n),e.push(n),r.push(n))}else if(i)r.push(i);else{const i=this.formatLabel(t);this.tickToText.set(t,i),e.push(i),r.push(i)}}this.getLabelSizesNative(e,t.dpiAdjustedLabelStyle)}else{for(const e of i){let i,n;const s=this.tickToText.get(e);if(this.textVariesForSameTick?(n=this.formatLabel(e),s&&s===n?(i=u.labelCache.getLabel(s,this.styleId),i&&r.push(s)):this.tickToText.set(e,n)):s?(i=u.labelCache.getLabel(s,this.styleId),i&&r.push(s)):(n=this.formatLabel(e),this.tickToText.set(e,n)),!i){const s=this.getCachedLabelTexture(n,t.axisRenderer.textureManager,t.dpiAdjustedLabelStyle);null!==s.textureWidth&&(i=new c(e,n,s.bitmapTexture,s.textureHeight,s.textureWidth),u.labelCache.setLabel(n,this.styleId,i)),r.push(n)}}u.labelCache.pruneCache()}else r=i.map(e=>this.formatLabel(e));return r}getLabelHeight(e,t,i){if(this.rotationProperty%90==0||this.parentAxis.isHorizontalAxis){const e=this.useCache?u.labelCache.getLabel(t,this.styleId):void 0;if(!e||!e.textureHeight){const{fontSize:e,padding:t}=i;return(0,h.measureTextHeight)(e)+(null==t?void 0:t.top)+(null==t?void 0:t.bottom)}return e.textureHeight}return i.fontSize+i.padding.top+i.padding.bottom}getLabelWidth(e,t,i){if(this.rotationProperty%90!=0&&this.parentAxis.isHorizontalAxis)return i.fontSize+i.padding.left+i.padding.right;{const r=this.useCache?u.labelCache.getLabel(t,this.styleId):void 0;if(!r||!r.textureWidth){const{padding:r}=i;return(0,h.measureTextWidth)(e,t)+r.left+r.right}return r.textureWidth}}getMaxLabelHeightForHorizontalAxis(e,t,i){let r=0;return e.forEach(e=>{const n=this.getLabelHeight(t,e,i);r=n>r?n:r}),r}getMaxLabelWidthForVerticalAxis(e,t,i){let r=0;return e.forEach(e=>{const n=this.getLabelWidth(t,e,i);r=n>r?n:r}),r}getCachedLabelTexture(e,t,i){var r;const n=u.labelCache.getLabel(e,this.styleId);if(n)return void 0===n.textureWidth&&n.registerNotifier(()=>super.invalidateParent()),{textureWidth:null!==(r=n.textureWidth)&&void 0!==r?r:null,textureHeight:n.textureHeight,bitmapTexture:n.bitmapTexture};if(this.asyncLabels){const r=this.styleId;return this.getLabelTextureAsync(e,t,i).then(t=>{const i=u.labelCache.getLabel(e,r);i&&(i.textureHeight=t.textureHeight,i.textureWidth=t.textureWidth,i.bitmapTexture=t.bitmapTexture,i.textureUpdated(),super.invalidateParent())}),{textureWidth:void 0,textureHeight:void 0,bitmapTexture:void 0}}return this.getLabelTexture(e,t,i)}getLabelTextureAsync(e,t,i){return r(this,void 0,void 0,(function*(){if(o.textureWorker.isActive){const r=yield o.textureWorker.measureAndGetImageData([e],i,this.rotationProperty);return t.createTextureFromImageData(r.imageData,r.textureWidth,r.textureHeight)}return this.getLabelTexture(e,t,i)}))}getLabelTexture(e,t,i){return t.createTextTexture([e],i,this.rotationProperty)}getNativeLabelInfo(e){return u.labelCache.getLabel(e,this.styleId)}delete(){this.styleId&&u.labelCache.freeStyle(this.styleId),this.tickToText.clear(),this.styleId=null}toJSON(){const e=super.toJSON(),t={rotation:this.rotation,lineSpacing:this.lineSpacing,asyncLabels:this.asyncLabels,useSharedCache:this.useSharedCache,useNativeText:this.useNativeText};return Object.assign(e.options,t),e}getLabelSizesNative(e,t){if(!e||0===e.length||n.IS_TEST_ENV)return;let i="";const r=[],s=this.parentAxis.parentSurface.webAssemblyContext2D,o=(0,a.getTextBounds)(s),l=s.SCRTGetMainRenderContext2D(),h=(0,a.getFontKey)(s,this.getCachedStyle(),!1),d=l.AquireFont(h),p=this.rotation*(Math.PI/180),g=Math.abs(Math.sin(p)),f=Math.abs(Math.cos(p)),y=(e,i,r)=>{var n,s;let o=e,a=i;0!==this.rotation&&(a=e*g+i*f,o=e*f+i*g);const l=new c(void 0,r,void 0,a+(null===(n=t.padding)||void 0===n?void 0:n.top)+(null==t?void 0:t.padding.bottom),o+(null===(s=t.padding)||void 0===s?void 0:s.left)+(null==t?void 0:t.padding.right));l.textWidth=e,l.textHeight=i,u.labelCache.setLabel(r,this.styleId,l)};if(e.forEach(e=>{e&&!e.includes("\n")?(r.push(e),i+=e+"\n"):(d.CalculateStringBounds(null!=e?e:"",o,0),y(o.m_fWidth,o.m_fHeight,e))}),r.length>0){d.CalculateStringBounds(null!=i?i:"",o,2);for(let e=0;e<r.length;e++){const t=r[e],i=o.GetLineBounds(e);y(i.m_fWidth,i.m_fHeight-i.m_fOffsetY,t)}}}getCachedStyle(){const e=this.parentAxis;return Object.assign(Object.assign({},e.dpiAdjustedLabelStyle),{rotation:this.rotation,providerId:this.useSharedCache?this.useNativeText?"native":void 0:this.providerId})}clearCache(){this.useCache&&this.styleId&&(u.labelCache.freeStyle(this.styleId),this.styleId=void 0),this.tickToText.clear()}invalidateParent(){this.clearCache(),super.invalidateParent()}}t.LabelProviderBase2D=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CameraController=t.ECameraProjectionMode=void 0;const r=i(18),n=i(1),s=i(70),o=i(187),a=i(278);var l;!function(e){e.Perspective="Perspective",e.Orthogonal="Orthogonal"}(l=t.ECameraProjectionMode||(t.ECameraProjectionMode={}));t.CameraController=class{constructor(e,t){var i;this.aspectRatioProperty=1.5,this.farClipProperty=4e3,this.fieldOfViewProperty=60,this.nearClipProperty=1,this.orbitalPitchProperty=0,this.orbitalYawProperty=0,this.orthoHeightProperty=400,this.orthoWidthProperty=600,this.positionProperty=o.Vector3.zero,this.projectionModeProperty=l.Perspective,this.targetProperty=o.Vector3.zero,this.webAssemblyContext=e,this.propertyChanged=new r.EventHandler,this.resetToDefaults(),this.position=(null==t?void 0:t.position)||this.position,this.target=(null==t?void 0:t.target)||this.target,this.id=(null==t?void 0:t.id)||this.id,this.debugPositionsProperty=null!==(i=null==t?void 0:t.debugPositions)&&void 0!==i&&i}get id(){return this.idProperty}set id(e){this.idProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_ID)}get orthoHeight(){return this.orthoHeightProperty}set orthoHeight(e){this.orthoHeightProperty!==e&&(this.orthoHeightProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_ORTHOHEIGHT))}get orthoWidth(){return this.orthoWidthProperty}set orthoWidth(e){this.orthoWidthProperty!==e&&(this.orthoWidthProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_ORTHOWIDTH))}get projectionMode(){return this.projectionModeProperty}set projectionMode(e){this.projectionModeProperty!==e&&(this.projectionModeProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_PROJECTIONMODE))}get aspectRatio(){return this.aspectRatioProperty}set aspectRatio(e){this.aspectRatioProperty!==e&&(this.aspectRatioProperty=e,this.orthoWidth=this.orthoHeight*this.aspectRatioProperty,this.notifyPropertyChanged(a.PROPERTY.CAMERA_ASPECTRATIO))}get isAttached(){return this.isAttachedProperty}set isAttached(e){this.isAttachedProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_ISATTACHED)}get radius(){return this.target.subtract(this.position).length}set radius(e){e<=1&&(e=1),this.radius!==e&&(this.position=this.target.subtract(this.forward.scalarMultiply(e)),this.notifyPropertyChanged(a.PROPERTY.CAMERA_RADIUS))}get orbitalPitch(){return this.orbitalPitchProperty}set orbitalPitch(e){if(this.orbitalPitchProperty===e)return;this.orbitalPitchProperty=e>90?89.9:e<-90?-89.9:e;const t=this.webAssemblyContext.Math3D.PitchAndYawToDirection(this.orbitalPitchProperty,this.orbitalYawProperty);try{let e=new o.Vector3(t.x,t.y,t.z);e=e.scalarMultiply(this.radius),this.position=this.target.subtract(e),this.notifyPropertyChanged(a.PROPERTY.CAMERA_ORBITALPITCH)}finally{null==t||t.delete()}}get orbitalYaw(){return this.orbitalYawProperty}set orbitalYaw(e){if(this.orbitalYawProperty===e)return;this.orbitalYawProperty=e;const t=this.webAssemblyContext.Math3D.PitchAndYawToDirection(this.orbitalPitchProperty,this.orbitalYawProperty);try{let e=new o.Vector3(t.x,t.y,t.z);e=e.scalarMultiply(this.radius),this.position=this.target.subtract(e),this.notifyPropertyChanged(a.PROPERTY.CAMERA_ORBITALYAW)}finally{null==t||t.delete()}}get farClip(){return this.farClipProperty}set farClip(e){this.farClipProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_FARCLIP)}get nearClip(){return this.nearClipProperty}set nearClip(e){this.nearClipProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_NEARCLIP)}get fieldOfView(){return this.fieldOfViewProperty}set fieldOfView(e){this.fieldOfViewProperty=e,this.notifyPropertyChanged(a.PROPERTY.CAMERA_FIELDOFVIEW)}get upGlobal(){return new o.Vector3(0,1,0)}get side(){const e=this.forward,t=e.crossProduct(this.upGlobal).crossProduct(e).crossProduct(e);return t.normalize(),t}get forward(){const e=this.target.subtract(this.position);return e.normalize(),e}get up(){const e=this.forward,t=e.crossProduct(this.upGlobal).crossProduct(e);return t.normalize(),t}get target(){return this.targetProperty}set target(e){if(this.targetProperty===e)return;let t,i;this.targetProperty=e;try{t=this.forward.toTsrVector3(this.webAssemblyContext),i=this.webAssemblyContext.Math3D.DirectionToPitchAndYaw(t),this.orbitalPitchProperty=i.pitch,this.orbitalYawProperty=i.yaw,this.notifyPropertyChanged(a.PROPERTY.CAMERA_TARGET)}finally{null==t||t.delete(),null==i||i.delete()}}get position(){return this.positionProperty}set position(e){if(this.positionProperty===e)return;let t,i;this.positionProperty=e;try{t=this.forward.toTsrVector3(this.webAssemblyContext),i=this.webAssemblyContext.Math3D.DirectionToPitchAndYaw(t),this.orbitalPitchProperty=i.pitch,this.orbitalYawProperty=i.yaw,this.notifyPropertyChanged(a.PROPERTY.CAMERA_POSITION)}finally{null==t||t.delete(),null==i||i.delete()}}toOrthogonal(){this.projectionModeProperty!==l.Orthogonal&&(this.projectionModeProperty=l.Orthogonal,this.orthoWidthProperty=this.radius,this.orthoHeightProperty=this.orthoWidth/this.aspectRatio,this.notifyPropertyChanged(a.PROPERTY.CAMERA_PROJECTIONMODE))}toPerspective(){this.projectionModeProperty!==l.Perspective&&(this.projectionModeProperty=l.Perspective,this.radius=this.orthoWidth,this.notifyPropertyChanged(a.PROPERTY.CAMERA_PROJECTIONMODE))}resetToDefaults(){let e,t;this.positionProperty=new o.Vector3(-1e3,1e3,-1e3),this.targetProperty=new o.Vector3(0,0,0),this.fieldOfViewProperty=60,this.nearClipProperty=1,this.farClipProperty=4e3,this.projectionModeProperty=l.Perspective,this.aspectRatioProperty=1.5,this.orthoWidthProperty=600,this.orthoHeightProperty=400;try{e=this.forward.toTsrVector3(this.webAssemblyContext),t=this.webAssemblyContext.Math3D.DirectionToPitchAndYaw(e),this.orbitalPitch=t.pitch,this.orbitalYaw=t.yaw}finally{null==t||t.delete(),null==e||e.delete()}}updateEngineCamera(e){let t,i,r;n.Guard.notNull(e,"tsrCamera");try{t=this.position.toTsrVector3(this.webAssemblyContext),i=this.target.toTsrVector3(this.webAssemblyContext),r=this.up.toTsrVector3(this.webAssemblyContext),e.SetLoc(t),e.SetAt(i),e.SetFarClip(this.farClip),e.SetNearClip(this.nearClip),e.SetFovAngle(this.webAssemblyContext.Math3D.DegToRad(this.fieldOfView)),e.SetProjectionMode(this.projectionMode===l.Perspective?this.webAssemblyContext.eTSRCameraProjectionMode.CAMERA_PROJECTIONMODE_PERSPECTIVE:this.webAssemblyContext.eTSRCameraProjectionMode.CAMERA_PROJECTIONMODE_ORTHOGONAL),e.SetOrthoWidth(this.orthoWidth),e.SetOrthoHeight(this.orthoHeight),e.SetAspectRatio(this.aspectRatio),e.SetYaw(this.webAssemblyContext.Math3D.DegToRad(this.orbitalYaw)),e.SetPitch(this.webAssemblyContext.Math3D.DegToRad(this.orbitalPitch)),e.SetUp(r)}finally{null==t||t.delete(),null==i||i.delete(),null==r||r.delete()}}notifyPropertyChanged(e){var t;!this.debugPositionsProperty||e!==a.PROPERTY.CAMERA_POSITION&&e!==a.PROPERTY.CAMERA_TARGET||console.log(`SciChart.js Camera P=${this.position.toString()}, T=${this.target.toString()}`),null===(t=this.propertyChanged)||void 0===t||t.raiseEvent(new s.PropertyChangedEventArgs(e))}debugOutput(){console.log("Camera properties: "),console.log(" projectionMode: "+this.projectionMode),console.log(" position: "+this.position.toString()),console.log(" target: "+this.target.toString()),console.log(" up: "+this.up.toString()),console.log(" pitch: "+this.orbitalPitch.toFixed(2)),console.log(" yaw: "+this.orbitalYaw.toFixed(2))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromTsrVector4=t.updateTsrVector4=void 0;const r=i(1);t.updateTsrVector4=(e,t)=>{r.Guard.notNull(e,"color");const i=1/255;t.x=e.red*i,t.y=e.green*i,t.z=e.blue*i,t.w=e.opacity*i};t.fromTsrVector4=e=>(r.Guard.notNull(e,"tsrColor"),{red:Math.round(255*e.x),green:Math.round(255*e.y),blue:Math.round(255*e.z),opacity:Math.round(255*e.w)})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutManager=void 0;const r=i(14),n=i(15),s=i(33),o=i(17),a=i(113),l=i(37),h=i(142),u=i(190),d=i(448),c=i(449),p=i(145),g=i(191),f=i(146),y=i(192),v=i(147),m=i(193);t.LayoutManager=class{constructor(e){this.type=a.ELayoutManagerType.Default,this.leftOuterAxesLayoutStrategyProperty=new g.LeftAlignedOuterAxisLayoutStrategy,this.rightOuterAxesLayoutStrategyProperty=new y.RightAlignedOuterAxisLayoutStrategy,this.topOuterAxesLayoutStrategyProperty=new m.TopAlignedOuterAxisLayoutStrategy,this.bottomOuterAxesLayoutStrategyProperty=new u.BottomAlignedOuterAxisLayoutStrategy,this.leftInnerAxesLayoutStrategy=new p.LeftAlignedInnerAxisLayoutStrategy,this.rightInnerAxesLayoutStrategy=new f.RightAlignedInnerAxisLayoutStrategy,this.topInnerAxesLayoutStrategy=new v.TopAlignedInnerAxisLayoutStrategy,this.bottomInnerAxesLayoutStrategy=new h.BottomAlignedInnerAxisLayoutStrategy,this.chartLayoutState=new d.ChartLayoutState,this.axesGroupedByLayoutStrategy=new c.LayoutStrategyAxes,this.leftOuterAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.LeftOuter,this.leftOuterAxesLayoutStrategy),this.rightOuterAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.RightOuter,this.rightOuterAxesLayoutStrategy),this.topOuterAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.TopOuter,this.topOuterAxesLayoutStrategy),this.bottomOuterAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.BottomOuter,this.bottomOuterAxesLayoutStrategy),this.leftInnerAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.LeftInner,this.leftInnerAxesLayoutStrategy),this.rightInnerAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.RightInner,this.rightInnerAxesLayoutStrategy),this.topInnerAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.TopInner,this.topInnerAxesLayoutStrategy),this.bottomInnerAxesLayoutStrategy=this.createStrategy(null==e?void 0:e.BottomInner,this.bottomInnerAxesLayoutStrategy)}get leftOuterAxesLayoutStrategy(){return this.leftOuterAxesLayoutStrategyProperty}set leftOuterAxesLayoutStrategy(e){var t;const i=this.leftOuterAxesLayoutStrategyProperty;i!==e&&(this.leftOuterAxesLayoutStrategyProperty=e,i.isStacked&&!e.isStacked&&(this.groupAxesByLayoutStrategy(),S(this.axesGroupedByLayoutStrategy.leftOuterAxes)),null===(t=this.sciChartSurface)||void 0===t||t.invalidateElement())}get rightOuterAxesLayoutStrategy(){return this.rightOuterAxesLayoutStrategyProperty}set rightOuterAxesLayoutStrategy(e){var t;const i=this.rightOuterAxesLayoutStrategyProperty;i!==e&&(this.rightOuterAxesLayoutStrategyProperty=e,i.isStacked&&!e.isStacked&&(this.groupAxesByLayoutStrategy(),S(this.axesGroupedByLayoutStrategy.rightOuterAxes)),null===(t=this.sciChartSurface)||void 0===t||t.invalidateElement())}get topOuterAxesLayoutStrategy(){return this.topOuterAxesLayoutStrategyProperty}set topOuterAxesLayoutStrategy(e){var t;const i=this.topOuterAxesLayoutStrategyProperty;i!==e&&(this.topOuterAxesLayoutStrategyProperty=e,i.isStacked&&!e.isStacked&&(this.groupAxesByLayoutStrategy(),S(this.axesGroupedByLayoutStrategy.topOuterAxes)),null===(t=this.sciChartSurface)||void 0===t||t.invalidateElement())}get bottomOuterAxesLayoutStrategy(){return this.bottomOuterAxesLayoutStrategyProperty}set bottomOuterAxesLayoutStrategy(e){var t;const i=this.bottomOuterAxesLayoutStrategyProperty;i!==e&&(this.bottomOuterAxesLayoutStrategyProperty=e,i.isStacked&&!e.isStacked&&(this.groupAxesByLayoutStrategy(),S(this.axesGroupedByLayoutStrategy.bottomOuterAxes)),null===(t=this.sciChartSurface)||void 0===t||t.invalidateElement())}getAxisLayoutStrategy(e,t){switch(e){case s.EAxisAlignment.Left:return t?this.leftInnerAxesLayoutStrategy:this.leftOuterAxesLayoutStrategy;case s.EAxisAlignment.Right:return t?this.rightInnerAxesLayoutStrategy:this.rightOuterAxesLayoutStrategy;case s.EAxisAlignment.Top:return t?this.topInnerAxesLayoutStrategy:this.topOuterAxesLayoutStrategy;case s.EAxisAlignment.Bottom:return t?this.bottomInnerAxesLayoutStrategy:this.bottomOuterAxesLayoutStrategy;default:return(0,s.handleInvalidAxisAlignment)(e)}}layoutChart(e,t){var i,r,n,s;this.groupAxesByLayoutStrategy();const o=null!==(i=null==t?void 0:t.right)&&void 0!==i?i:0,a=null!==(r=null==t?void 0:t.left)&&void 0!==r?r:0,l=null!==(n=null==t?void 0:t.top)&&void 0!==n?n:0,h=null!==(s=null==t?void 0:t.bottom)&&void 0!==s?s:0,u=e.width-a-o,d=e.height-l-h;try{this.measureTopOuterAxes(),this.measureBottomOuterAxes(),this.measureLeftOuterAxes(),this.measureRightOuterAxes(),this.measureTopInnerAxes(),this.measureBottomInnerAxes(),this.measureLeftInnerAxes(),this.measureRightInnerAxes();const e=u-this.chartLayoutState.leftOuterAreaSize-this.chartLayoutState.rightOuterAreaSize,t=d-this.chartLayoutState.topOuterAreaSize-this.chartLayoutState.bottomOuterAreaSize,i=a,r=i+this.chartLayoutState.leftOuterAreaSize,n=r+(e<10?10:e),s=n+this.chartLayoutState.rightOuterAreaSize,o=l,h=o+this.chartLayoutState.topOuterAreaSize,c=h+(t<10?10:t),p=c+this.chartLayoutState.bottomOuterAreaSize;this.sciChartSurface.drawSeriesBehindAxis?this.layoutChartCenter(i,o,s,p):this.layoutChartCenter(r,h,n,c),this.leftOuterAxesLayoutStrategy.layoutAxes(i,h,r-this.sciChartSurface.leftViewportBorder,c,this.axesGroupedByLayoutStrategy.leftOuterAxes),this.rightOuterAxesLayoutStrategy.layoutAxes(n+this.sciChartSurface.rightViewportBorder,h,s,c,this.axesGroupedByLayoutStrategy.rightOuterAxes),this.topOuterAxesLayoutStrategy.layoutAxes(r,o,n,h-this.sciChartSurface.topViewportBorder,this.axesGroupedByLayoutStrategy.topOuterAxes),this.bottomOuterAxesLayoutStrategy.layoutAxes(r,c+this.sciChartSurface.bottomViewportBorder,n,p,this.axesGroupedByLayoutStrategy.bottomOuterAxes);const g=r+this.chartLayoutState.leftInnerAreaSize,f=n-this.chartLayoutState.rightInnerAreaSize,y=h+this.chartLayoutState.topInnerAreaSize,v=c-this.chartLayoutState.bottomInnerAreaSize;return this.leftInnerAxesLayoutStrategy.layoutAxes(r,h,g,c,this.axesGroupedByLayoutStrategy.leftInnerAxes),this.rightInnerAxesLayoutStrategy.layoutAxes(f,h,n,c,this.axesGroupedByLayoutStrategy.rightInnerAxes),this.topInnerAxesLayoutStrategy.layoutAxes(r,h,n,y,this.axesGroupedByLayoutStrategy.topInnerAxes),this.bottomInnerAxesLayoutStrategy.layoutAxes(r,v,n,c,this.axesGroupedByLayoutStrategy.bottomInnerAxes),this.sciChartSurface.seriesViewRect}finally{this.chartLayoutState.clear()}}toJSON(){const e={BottomInner:this.bottomInnerAxesLayoutStrategy.toJSON(),BottomOuter:this.bottomOuterAxesLayoutStrategy.toJSON(),LeftInner:this.leftInnerAxesLayoutStrategy.toJSON(),LeftOuter:this.leftOuterAxesLayoutStrategy.toJSON(),RightInner:this.rightInnerAxesLayoutStrategy.toJSON(),RightOuter:this.rightOuterAxesLayoutStrategy.toJSON(),TopInner:this.topInnerAxesLayoutStrategy.toJSON(),TopOuter:this.topOuterAxesLayoutStrategy.toJSON()};return{type:this.type,options:e}}measureLeftOuterAxes(){this.leftOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.leftOuterAxes)}measureRightOuterAxes(){this.rightOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.rightOuterAxes)}measureTopOuterAxes(){this.topOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.topOuterAxes)}measureBottomOuterAxes(){this.bottomOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.bottomOuterAxes)}measureLeftInnerAxes(){this.leftInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.leftInnerAxes)}measureRightInnerAxes(){this.rightInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.rightInnerAxes)}measureTopInnerAxes(){this.topInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.topInnerAxes)}measureBottomInnerAxes(){this.bottomInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.bottomInnerAxes)}groupAxesByLayoutStrategy(){this.axesGroupedByLayoutStrategy.clear();const{topInnerAxes:e,bottomInnerAxes:t,leftInnerAxes:i,rightInnerAxes:r,topOuterAxes:n,bottomOuterAxes:o,leftOuterAxes:a,rightOuterAxes:l}=this.axesGroupedByLayoutStrategy,h=h=>{h.forEach(h=>{const{axisAlignment:u,isInnerAxis:d,isVisible:c}=h;if(d)switch(u){case s.EAxisAlignment.Top:e.push(h);break;case s.EAxisAlignment.Bottom:t.push(h);break;case s.EAxisAlignment.Left:i.push(h);break;case s.EAxisAlignment.Right:r.push(h)}else switch(u){case s.EAxisAlignment.Top:n.push(h);break;case s.EAxisAlignment.Bottom:o.push(h);break;case s.EAxisAlignment.Left:a.push(h);break;case s.EAxisAlignment.Right:l.push(h)}})};h(this.sciChartSurface.xAxes.asArray()),h(this.sciChartSurface.yAxes.asArray())}layoutChartCenter(e,t,i,r){this.setSeriesViewRect(e,t,i,r),this.sciChartSurface.annotationUnderlaySurfaceViewRect=n.Rect.createWithCoords(e,t,i,r),this.sciChartSurface.annotationOverlaySurfaceViewRect=n.Rect.createWithCoords(e,t,i,r),this.sciChartSurface.chartModifierSurfaceViewRect=n.Rect.createWithCoords(e,t,i,r)}setSeriesViewRect(e,t,i,r){const{seriesViewRect:s}=this.sciChartSurface,o=n.Rect.createWithCoords(e,t,i,r);s&&n.Rect.isEqual(s,o)||this.sciChartSurface.setSeriesViewRect(o)}createStrategy(e,t){return e&&e.type!==t.type?"measureAxes"in e?e:e.type===l.ELayoutStrategyType.Custom?(0,r.createType)(o.EBaseType.LayoutStrategy,e.customType,void 0,e.options):(0,r.createType)(o.EBaseType.LayoutStrategy,e.type,void 0,e.options):t}};const S=e=>{e.length>0&&(e[0].isPrimaryAxis=!0)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ELayoutManagerType=void 0,function(e){e.Default="Default",e.CentralAxes="CentralAxes",e.Synchronised="Synchronised"}(t.ELayoutManagerType||(t.ELayoutManagerType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EResamplingMode=void 0,function(e){e.None="None",e.MinMax="MinMax",e.Mid="Mid",e.Max="Max",e.Min="Min",e.MinMaxWithUnevenSpacing="MinMaxWithUnevenSpacing",e.Auto="Auto",e.MinOrMax="MinOrMax"}(t.EResamplingMode||(t.EResamplingMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateMetadataGenerator=void 0;t.TemplateMetadataGenerator=class{constructor(e){this.template=e}getSingleMetadata(){return Object.assign({},this.template)}getMetadata(){}toJSON(){return"toJSON"in this.template?this.template.toJSON():this.template}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getXRange=t.FastColumnRenderableSeries=void 0;const r=i(3),n=i(8),s=i(26),o=i(4),a=i(40),l=i(7),h=i(149),u=i(316),d=i(61),c=i(317);class p extends a.BaseRenderableSeries{constructor(e,t){var i,r,s,a,l,c,p;super(e,t),this.type=n.ESeriesType.ColumnSeries,this.fillProperty=o.SciChartSurfaceBase.DEFAULT_THEME.columnFillBrush,this.zeroLineYProperty=0,this.dataPointWidthProperty=.8,this.cornerRadiusProperty=0,this.fill=null!==(i=null==t?void 0:t.fill)&&void 0!==i?i:this.fillProperty,this.zeroLineY=null!==(r=null==t?void 0:t.zeroLineY)&&void 0!==r?r:this.zeroLineYProperty,this.dataPointWidthProperty=null!==(s=null==t?void 0:t.dataPointWidth)&&void 0!==s?s:this.dataPointWidthProperty,this.fillLinearGradientProperty=null!==(a=null==t?void 0:t.fillLinearGradient)&&void 0!==a?a:this.fillLinearGradientProperty,this.cornerRadiusProperty=null!==(l=null==t?void 0:t.cornerRadius)&&void 0!==l?l:this.cornerRadiusProperty,(null===(c=this.paletteProvider)||void 0===c?void 0:c.onAttached)&&(null===(p=this.paletteProvider)||void 0===p||p.onAttached(this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new h.ColumnSeriesDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),this.drawingProviders.push(new u.ColumnSeriesDrawingProvider(e,this)),this.drawingProviders.push(new d.PointMarkerDrawingProvider(e,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.fill===t.columnFillBrush&&(this.fill=e.columnFillBrush),this.stroke===t.columnLineColor&&(this.stroke=e.columnLineColor)}get fill(){return(0,s.stripAutoColor)(this.fillProperty)}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(l.PROPERTY.FILL)}get fillLinearGradient(){return this.fillLinearGradientProperty}set fillLinearGradient(e){e!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=e,this.notifyPropertyChanged(l.PROPERTY.FILL_LINEAR_GRADIENT))}get zeroLineY(){return this.zeroLineYProperty}set zeroLineY(e){this.zeroLineYProperty=e,this.notifyPropertyChanged(l.PROPERTY.ZERO_LINE_Y)}get dataPointWidth(){return this.dataPointWidthProperty}set dataPointWidth(e){this.dataPointWidthProperty=e,this.notifyPropertyChanged(l.PROPERTY.DATA_POINT_WIDTH)}get cornerRadius(){return this.cornerRadiusProperty}set cornerRadius(e){this.cornerRadiusProperty=e,this.notifyPropertyChanged(l.PROPERTY.CORNER_RADIUS)}getXRange(){const e=super.getXRange(),i=this.dataSeries.count();return(0,t.getXRange)(e,i,this.dataPointWidth)}getYRange(e,t=!1){const i=super.getYRange(e,t);if(i)return new r.NumberRange(Math.min(i.min,this.zeroLineY),Math.max(i.max,this.zeroLineY))}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.fillProperty.startsWith(s.AUTO_COLOR)){const r=i.getFillColor(e,t,this.webAssemblyContext);this.fill=s.AUTO_COLOR+this.adjustAutoColor("fill",r)}}toJSON(e=!1){const t=super.toJSON(e),i={dataPointWidth:this.dataPointWidth,fill:this.fill,zeroLineY:this.zeroLineY,fillLinearGradient:this.fillLinearGradient,cornerRadius:this.cornerRadius};return Object.assign(t.options,i),t}newHitTestProvider(){return new c.ColumnSeriesHitTestProvider(this,this.webAssemblyContext)}}t.FastColumnRenderableSeries=p;t.getXRange=(e,t,i)=>{if(t>1){const n=e.diff/(t-1)*i/2;return new r.NumberRange(e.min-n,e.max+n)}return e}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EErrorDirection=void 0,function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(t.EErrorDirection||(t.EErrorDirection={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogarithmicAxis=t.MIN_LOG_AXIS_VALUE=void 0;const r=i(39),n=i(107),s=i(3),o=i(58),a=i(29),l=i(320),h=i(152),u=i(48),d=i(171),c=i(321),p=i(186);t.MIN_LOG_AXIS_VALUE=1e-10;class g extends u.AxisBase2D{constructor(e,i){var r,n,a;super(e,i),this.type=o.EAxisType.LogarithmicAxis,this.logBaseProperty=10,this.tickProvider=new h.LogarithmicTickProvider(e),this.deltaCalculator=new c.LogarithmicDeltaCalculator(e),this.labelProvider=null!==(r=null==i?void 0:i.labelProvider)&&void 0!==r?r:new p.LogarithmicLabelProvider(i),this.logBase=null!==(n=null==i?void 0:i.logBase)&&void 0!==n?n:this.logBaseProperty,this.isNegativeProperty=null!==(a=null==i?void 0:i.isNegative)&&void 0!==a&&a,this.visibleRange=(null==i?void 0:i.visibleRange)||this.getDefaultNonZeroRange(),this.majorTickMode=(null==i?void 0:i.majorTickMode)||this.majorTickMode,this.minorTickMode=(null==i?void 0:i.minorTickMode)||this.minorTickMode,(null==i?void 0:i.visibleRangeLimit)?this.visibleRangeLimit=i.visibleRangeLimit:this.isNegativeProperty?this.visibleRangeLimit=new s.NumberRange(-1/0,-t.MIN_LOG_AXIS_VALUE):this.visibleRangeLimit=new s.NumberRange(t.MIN_LOG_AXIS_VALUE,1/0)}get logBase(){return this.logBaseProperty}set logBase(e){this.logBaseProperty!==e&&(this.logBaseProperty=e,this.clearCoordCalcCache(),this.updateLogarithmicBase(this.logBase),this.notifyPropertyChanged(d.PROPERTY.LOG_BASE))}get isNegative(){return this.isNegativeProperty}set isNegative(e){this.isNegativeProperty=e,this.isNegativeProperty?this.visibleRangeLimit=new s.NumberRange(-1/0,-1e-10):this.visibleRangeLimit=new s.NumberRange(1e-10,1/0),this.notifyPropertyChanged(d.PROPERTY.IS_NEGATIVE)}getDefaultNonZeroRange(){const e=this.isNegativeProperty?-1:1;return new s.NumberRange(e*Math.pow(this.logBase,-1),e*Math.pow(this.logBase,2))}hasValidVisibleRange(){return super.hasValidVisibleRange()&&this.visibleRange.min*this.visibleRange.max>0}get tickProvider(){return this.tickProviderProperty}set tickProvider(e){this.tickProviderProperty=e,this.updateLogarithmicBase(this.logBase),this.notifyPropertyChanged(d.PROPERTY.TICK_PROVIDER)}get deltaCalculator(){return this.deltaCalculatorProperty}set deltaCalculator(e){this.deltaCalculatorProperty=e,this.updateLogarithmicBase(this.logBase),this.notifyPropertyChanged(d.PROPERTY.DELTA_CALCULATOR)}get labelProvider(){return this.labelProviderProperty}set labelProvider(e){this.labelProviderProperty=e,this.updateLogarithmicBase(this.logBase),this.notifyPropertyChanged(d.PROPERTY.LABEL_PROVIDER)}get majorTickMode(){return this.logTickProvider.majorTickMode}set majorTickMode(e){this.logTickProvider.majorTickMode=e}get minorTickMode(){return this.logTickProvider.minorTickMode}set minorTickMode(e){this.logTickProvider.minorTickMode=e}getWindowedYRange(e){let t;if(this.parentSurface){this.parentSurface.renderableSeries.asArray().filter(e=>e.yAxisId===this.id&&e.isVisible&&e.hasDataSeriesValues()).forEach(i=>{const r=(null==e?void 0:e.containsKey(i.xAxisId))?e.item(i.xAxisId):this.getXVisibleRange(i.xAxisId),n=this.getIsXCategoryAxis(i.xAxisId);if(r){const e=i.getYRange(r,n);e&&(t=t?t.union(e):e)}})}return(null==t?void 0:t.isZero())&&(t=this.coerceZeroVisibleRange(t)),this.growBy&&t&&(t=t.growByLog(this.growBy,this.logBase)),this.visibleRangeLimit&&t&&(t=t.clip(this.visibleRangeLimit)),t}animateVisibleRange(e,t,i=r.easing.outCubic,s=(()=>{})){var o;return t<=0?(this.visibleRange=e||this.visibleRange,void s()):(null===(o=this.visibleRangeAnimationToken)||void 0===o||o.cancel(),this.visibleRangeAnimationToken=n.NumberRangeAnimator.animate(this.visibleRange,e,t,e=>{this.visibleRange=e},s,i,!0),this.parentSurface.addAnimation(this.visibleRangeAnimationToken),this.visibleRangeAnimationToken)}scale(e,t,i){const r=e.max/e.min;let n,o;const a=this.flippedCoordinates?!i:i,l=this.flippedCoordinates?-t:t;if(a){n=e.min;o=(l>0?Math.pow(r,1-l):Math.pow(r,1+Math.abs(l)))*n}else{o=e.max;n=o/Math.pow(r,1+l)}this.visibleRange=new s.NumberRange(n,o)}toJSON(){const e=super.toJSON(),t={logBase:this.logBase,isNegative:this.isNegative,majorTickMode:this.majorTickMode,minorTickMode:this.minorTickMode};return Object.assign(e.options,t),e}getCurrentCoordinateCalculatorInternal(){const e=this.visibleRange.min,t=this.visibleRange.max,i=this.axisLength,r=this.isXAxis?a.EXyDirection.XDirection:a.EXyDirection.YDirection;return new l.LogarithmicCoordinateCalculator(this.webAssemblyContext2D,i,e,t,r,this.logBase,this.isXAxis!==this.flippedCoordinates,this.offset)}getMaxXRange(){let e=this.getXDataRange();if(e)return this.growBy&&e&&(e=e.growByLog(this.growBy,this.logBase)),this.visibleRangeLimit&&e&&(e=e.clip(this.visibleRangeLimit)),e}get logTickProvider(){return this.tickProvider}updateLogarithmicBase(e){const t=this.tickProvider;t&&(t.logarithmicBase=e);const i=this.deltaCalculator;i&&(i.logarithmicBase=e);const r=this.labelProvider;r&&(r.logarithmicBase=e)}}t.LogarithmicAxis=g},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMousePosition=void 0,function(e){e.OutOfCanvas="OutOfCanvas",e.AxisArea="AxisArea",e.SeriesArea="SeriesArea"}(t.EMousePosition||(t.EMousePosition={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseHeatmapRenderableSeries=t.COLOR_MAP_PREFIX=void 0;const r=i(57),n=i(90),s=i(40),o=i(7),a=i(164);t.COLOR_MAP_PREFIX="colorMap.";class l extends s.BaseRenderableSeries{constructor(e,t){var i,s,o,l,h,u;super(e,t),this.useLinearTextureFilteringProperty=!1,this.fillValuesOutOfRangeProperty=!0,this.colorMapPropertyChanged=this.colorMapPropertyChanged.bind(this),(null==t?void 0:t.colorMap)&&("toJSON"in t.colorMap||(t.colorMap=new a.HeatmapColorMap(t.colorMap))),this.colorMap=null==t?void 0:t.colorMap,this.dataSeries=null==t?void 0:t.dataSeries,this.xAxisId=null!==(i=null==t?void 0:t.xAxisId)&&void 0!==i?i:r.AxisCore.DEFAULT_AXIS_ID,this.xAxisId=null!==(s=null==t?void 0:t.yAxisId)&&void 0!==s?s:r.AxisCore.DEFAULT_AXIS_ID,this.useLinearTextureFilteringProperty=null!==(o=null==t?void 0:t.useLinearTextureFiltering)&&void 0!==o?o:this.useLinearTextureFilteringProperty,this.fillValuesOutOfRangeProperty=null!==(l=null==t?void 0:t.fillValuesOutOfRange)&&void 0!==l?l:this.fillValuesOutOfRangeProperty,(null===(h=this.paletteProvider)||void 0===h?void 0:h.onAttached)&&(null===(u=this.paletteProvider)||void 0===u||u.onAttached(this)),this.zLabelProviderProperty=new n.NumericLabelProvider({labelPrecision:2})}get colorMap(){return this.colorMapProperty}set colorMap(e){var t,i;null===(t=this.colorMapProperty)||void 0===t||t.propertyChanged.unsubscribe(this.colorMapPropertyChanged),this.colorMapProperty=e,null===(i=this.colorMapProperty)||void 0===i||i.propertyChanged.subscribe(this.colorMapPropertyChanged),this.notifyPropertyChanged(o.PROPERTY.COLOR_MAP)}get useLinearTextureFiltering(){return this.useLinearTextureFilteringProperty}set useLinearTextureFiltering(e){this.useLinearTextureFilteringProperty=e,this.notifyPropertyChanged(o.PROPERTY.USE_LINEAR_TEXTURE_FILTERING)}checkIsOutOfDataRange(e,t){const i=this.dataSeries;return!i||e<=i.xRange.min||e>=i.xRange.max||t<=i.yRange.min||t>=i.yRange.max}get zLabelProvider(){return this.zLabelProviderProperty}set zLabelProvider(e){this.zLabelProviderProperty=e,this.notifyPropertyChanged(o.PROPERTY.Z_LABEL_PROVIDER)}get fillValuesOutOfRange(){return this.fillValuesOutOfRangeProperty}set fillValuesOutOfRange(e){this.fillValuesOutOfRangeProperty=e,this.notifyPropertyChanged(o.PROPERTY.FILL_VALUES_OUT_OF_RANGE)}toPointSeries(e){}toJSON(e=!1){var t;const i=super.toJSON(e),r={colorMap:null===(t=this.colorMap)||void 0===t?void 0:t.toJSON(),fillValuesOutOfRange:this.fillValuesOutOfRange,useLinearTextureFiltering:this.useLinearTextureFiltering};return Object.assign(i.options,r),i}colorMapPropertyChanged(e){this.notifyPropertyChanged(t.COLOR_MAP_PREFIX+e.propertyName)}}t.BaseHeatmapRenderableSeries=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePointMarker3D=t.EMarkerType=void 0;const r=i(18),n=i(1),s=i(70),o=i(479);!function(e){e[e.Pixel=0]="Pixel",e[e.TexturedQuad=1]="TexturedQuad",e[e.InstancedMesh=2]="InstancedMesh"}(t.EMarkerType||(t.EMarkerType={}));t.BasePointMarker3D=class{constructor(e,t){n.Guard.notNull(e,"webAssemblyContext"),this.webAssemblyContext=e,this.propertyChanged=new r.EventHandler,this.fillProperty=(null==t?void 0:t.fill)||"#FF3333",this.sizeProperty=(null==t?void 0:t.size)||3}get fill(){return this.fillProperty}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(o.PROPERTY.FILL)}get size(){return this.sizeProperty}set size(e){this.sizeProperty=e,this.notifyPropertyChanged(o.PROPERTY.SIZE)}notifyPropertyChanged(e){var t;null===(t=this.propertyChanged)||void 0===t||t.raiseEvent(new s.PropertyChangedEventArgs(e))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.CELL_HARDNESS_FACTOR="CELL_HARDNESS_FACTOR",e.COLOR_MAP_TEXTURE_SIZE="COLOR_MAP_TEXTURE_SIZE",e.CONTOUR_STROKE="CONTOUR_STROKE",e.CONTOUR_OFFSET="CONTOUR_OFFSET",e.CONTOUR_INTERVAL="CONTOUR_INTERVAL",e.CONTOUR_STROKE_THICKNESS="CONTOUR_STROKE_THICKNESS",e.DATA_SERIES="DATA_SERIES",e.DRAW_MESH_AS="DRAW_MESH_AS",e.DRAW_SKIRT="DRAW_SKIRT",e.FILL="FILL",e.GRADIENT_STOPS="GRADIENT_STOPS",e.HEIGHT_SCALE_FACTOR="HEIGHT_SCALE_FACTOR",e.HIGHLIGHT="HIGHLIGHT",e.IS_VISIBLE="IS_VISIBLE",e.LIGHTING_FACTOR="LIGHTING_FACTOR",e.MAXIMUM="MAXIMUM",e.MESH_COLOR_PALETTE="MESH_COLOR_PALETTE",e.MESH_PALETTE_MODE="MESH_PALETTE_MODE",e.MESH_RESOLUTION="MESH_RESOLUTION",e.MINIMUM="MINIMUM",e.OPACITY="OPACITY",e.PALETTE_PROVIDER="PALETTE_PROVIDER",e.PARENT_SURFACE="PARENT_SURFACE",e.POINT_MARKER3D="POINT_MARKER3D",e.SCENE_ENTITY="SCENE_ENTITY",e.SHININESS="SHININESS",e.STROKE="STROKE",e.STROKE_THICKNESS="STROKE_THICKNESS",e.Y_OFFSET="Y_OFFSET"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SurfaceMeshRenderableSeries3D=t.EMeshResolution=t.EMeshPaletteMode=t.EDrawMeshAs=void 0;const r=i(80),n=i(237),s=i(434),o=i(122),a=i(238);var l,h,u;!function(e){e.WIREFRAME="WIREFRAME",e.SOLID_WIREFRAME="SOLID_WIREFRAME",e.SOLID_WIREFRAME_WITH_CONTOURS="SOLID_WIREFRAME_WITH_CONTOURS",e.SOLID_MESH="SOLID_MESH",e.SOLID_WITH_CONTOURS="SOLID_WITH_CONTOURS",e.CONTOURS="CONTOURS"}(l=t.EDrawMeshAs||(t.EDrawMeshAs={})),function(e){e.HEIGHT_MAP_INTERPOLATED="HEIGHT_MAP_INTERPOLATED",e.HEIGHT_MAP_SOLID_CELLS="HEIGHT_MAP_SOLID_CELLS",e.TEXTURED_SOLID_CELLS="TEXTURED_SOLID_CELLS"}(h=t.EMeshPaletteMode||(t.EMeshPaletteMode={})),function(e){e[e.MESH_RESOLUTION_X1=1]="MESH_RESOLUTION_X1",e[e.MESH_RESOLUTION_X2=2]="MESH_RESOLUTION_X2",e[e.MESH_RESOLUTION_X4=4]="MESH_RESOLUTION_X4"}(u=t.EMeshResolution||(t.EMeshResolution={}));class d extends s.BaseRenderableSeries3D{constructor(e,t){super(e,t),this.drawMeshAsProperty=(null==t?void 0:t.drawMeshAs)||l.SOLID_WIREFRAME,this.strokeThicknessProperty=void 0!==(null==t?void 0:t.strokeThickness)?null==t?void 0:t.strokeThickness:1,this.drawSkirtProperty=void 0===(null==t?void 0:t.drawSkirt)||(null==t?void 0:t.drawSkirt),this.meshColorPaletteProperty=null==t?void 0:t.meshColorPalette,this.minimumProperty=void 0!==(null==t?void 0:t.minimum)?null==t?void 0:t.minimum:0,this.maximumProperty=void 0!==(null==t?void 0:t.maximum)?null==t?void 0:t.maximum:1,this.meshPaletteModeProperty=(null==t?void 0:t.meshPaletteMode)||h.HEIGHT_MAP_INTERPOLATED,this.colorMapTextureSizeProperty=(null==t?void 0:t.colorMapTextureSize)||new r.Size(1024,1),this.heightScaleFactorProperty=void 0!==(null==t?void 0:t.heightScaleFactor)?null==t?void 0:t.heightScaleFactor:1,this.meshResolutionProperty=(null==t?void 0:t.meshResolution)||u.MESH_RESOLUTION_X1,this.yOffsetProperty=void 0!==(null==t?void 0:t.yOffset)?null==t?void 0:t.yOffset:0,this.cellHardnessFactorProperty=void 0!==(null==t?void 0:t.cellHardnessFactor)?null==t?void 0:t.cellHardnessFactor:1,this.lightingFactorProperty=void 0!==(null==t?void 0:t.lightingFactor)?null==t?void 0:t.lightingFactor:.8,this.contourStrokeThicknessProperty=void 0!==(null==t?void 0:t.contourStrokeThickness)?null==t?void 0:t.contourStrokeThickness:2,this.contourIntervalProperty=void 0!==(null==t?void 0:t.contourInterval)?null==t?void 0:t.contourInterval:20,this.contourOffsetProperty=void 0!==(null==t?void 0:t.contourOffset)?t.contourOffset:.1,this.contourStrokeProperty=(null==t?void 0:t.contourStroke)||"#FFFFFF",this.highlightProperty=void 0!==(null==t?void 0:t.highlight)?null==t?void 0:t.highlight:.05,this.setSceneEntity(new n.SurfaceMeshSceneEntity(e,this))}get type(){return a.ESeriesType3D.SurfaceMeshRenderableSeries3D}get colorMapTextureSize(){return this.colorMapTextureSizeProperty}set colorMapTextureSize(e){this.colorMapTextureSizeProperty=e,this.notifyPropertyChanged(o.PROPERTY.COLOR_MAP_TEXTURE_SIZE)}get drawMeshAs(){return this.drawMeshAsProperty}set drawMeshAs(e){this.drawMeshAsProperty=e,this.notifyPropertyChanged(o.PROPERTY.DRAW_MESH_AS)}get strokeThickness(){return this.strokeThicknessProperty}set strokeThickness(e){this.strokeThicknessProperty=e,this.notifyPropertyChanged(o.PROPERTY.STROKE_THICKNESS)}get drawSkirt(){return this.drawSkirtProperty}set drawSkirt(e){this.drawSkirtProperty=e,this.notifyPropertyChanged(o.PROPERTY.DRAW_SKIRT)}get meshColorPalette(){return this.meshColorPaletteProperty}set meshColorPalette(e){this.meshColorPaletteProperty=e,this.notifyPropertyChanged(o.PROPERTY.MESH_COLOR_PALETTE)}get minimum(){return this.minimumProperty}set minimum(e){this.minimumProperty=e,this.notifyPropertyChanged(o.PROPERTY.MINIMUM)}get maximum(){return this.maximumProperty}set maximum(e){this.maximumProperty=e,this.notifyPropertyChanged(o.PROPERTY.MAXIMUM)}get meshPaletteMode(){return this.meshPaletteModeProperty}set meshPaletteMode(e){this.meshPaletteModeProperty=e,this.notifyPropertyChanged(o.PROPERTY.MESH_PALETTE_MODE)}get heightScaleFactor(){return this.heightScaleFactorProperty}set heightScaleFactor(e){this.heightScaleFactorProperty=e,this.notifyPropertyChanged(o.PROPERTY.HEIGHT_SCALE_FACTOR)}get meshResolution(){return this.meshResolutionProperty}set meshResolution(e){this.meshResolutionProperty=e,this.notifyPropertyChanged(o.PROPERTY.MESH_RESOLUTION)}get yOffset(){return this.yOffsetProperty}set yOffset(e){this.yOffsetProperty=e,this.notifyPropertyChanged(o.PROPERTY.Y_OFFSET)}get cellHardnessFactor(){return this.cellHardnessFactorProperty}set cellHardnessFactor(e){this.cellHardnessFactorProperty=e,this.notifyPropertyChanged(o.PROPERTY.CELL_HARDNESS_FACTOR)}get lightingFactor(){return this.lightingFactorProperty}set lightingFactor(e){this.lightingFactorProperty=e,this.notifyPropertyChanged(o.PROPERTY.LIGHTING_FACTOR)}get contourStrokeThickness(){return this.contourStrokeThicknessProperty}set contourStrokeThickness(e){this.contourStrokeThicknessProperty=e,this.notifyPropertyChanged(o.PROPERTY.CONTOUR_STROKE_THICKNESS)}get contourInterval(){return this.contourIntervalProperty}set contourInterval(e){this.contourIntervalProperty=e,this.notifyPropertyChanged(o.PROPERTY.CONTOUR_INTERVAL)}get contourOffset(){return this.contourOffsetProperty}set contourOffset(e){this.contourOffsetProperty=e,this.notifyPropertyChanged(o.PROPERTY.CONTOUR_OFFSET)}get contourStroke(){return this.contourStrokeProperty}set contourStroke(e){this.contourStrokeProperty=e,this.notifyPropertyChanged(o.PROPERTY.CONTOUR_STROKE)}get highlight(){return this.highlightProperty}set highlight(e){this.highlightProperty=e,this.notifyPropertyChanged(o.PROPERTY.HIGHLIGHT)}}t.SurfaceMeshRenderableSeries3D=d},function(e,t){var i,r,n=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(e){i=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,h=[],u=!1,d=-1;function c(){u&&l&&(u=!1,l.length?h=l.concat(h):d=-1,h.length&&p())}function p(){if(!u){var e=a(c);u=!0;for(var t=h.length;t;){for(l=h,h=[];++d<t;)l&&l[d].run();d=-1,t=h.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function f(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];h.push(new g(e,t)),1!==h.length||u||a(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.licenseManager=t.updateLicenseDisplay=t.getLicenseInfo=t.applyLicense=t.getLicenseCookie=t.setCallbacks3D=t.setUseLicenseWizard=t.setRuntimeLicenseKey=t.setLicenseCallback=t.setIsDebugLicensing=t.setDependencies=void 0;const n=i(13),s=i(53),o=i(99),a=i(240),l=i(126),h=i(243),u=i(241),d=i(242),c=i(127);let p=24278,g=24279;const f=a.localStorageApi.getLicenseWizardPort();f&&(p=f,g=p+1);let y={fetchFromWizard:e=>{return t=e,r(void 0,void 0,void 0,(function*(){try{const e="http://localhost:"+p.toString()+t;return yield fetch(e)}catch(e){if(m("Could not connect to license wizard on port "+p.toString()),"undefined"!=typeof localStorage){const e=a.localStorageApi.getLicenseWizardMaxPort();if(e)for(;g<=e;)try{const e="http://localhost:"+g.toString()+t,i=yield fetch(e);return p=g,i}catch(e){m("Could not connect to license wizard on port "+g.toString()),g+=1}}throw e}}));var t},setCookie:(e,t,i)=>(0,d.setCookie)(e,t,i),getCookie:e=>(0,d.getCookie)(e),fetchForChallenge:e=>fetch(e),updateLicenseDisplay:(e,t,i,r)=>q(e,t,i,r),debug:e=>console.log(e)};t.setDependencies=e=>y=e;let v=null;t.setIsDebugLicensing=(e,t=!1)=>{v=e,!t&&e||a.localStorageApi.setIsLicenseDebug(e)};const m=e=>{null===v&&(v=a.localStorageApi.getIsLicenseDebug()),(n.IS_TEST_ENV||v)&&y.debug(e)};let S;m("SciChart version "+s.libraryVersion);t.setLicenseCallback=e=>{S=e};let P="";const C=()=>P;t.setRuntimeLicenseKey=e=>{const i=P;P=e,P!==i&&""!==P&&void 0!==k&&(0,t.applyLicense)(k,V)};let A=!0;t.setUseLicenseWizard=e=>{A=e};const x=n.IS_TEST_ENV?.1:5,b=n.IS_TEST_ENV?12:10;let T="api/license";let E,w=0,R={getLicenseChallenge3D:()=>{},setChallengeResponse3D:e=>{},setNewLicense3D:e=>{},updateLicenseDisplay3D:()=>{}};t.setCallbacks3D=e=>R=e;const D=(e,i)=>r(void 0,void 0,void 0,(function*(){try{if(N!==u.LicenseCheckStatus.LookingForLicenseWizard&&N!==u.LicenseCheckStatus.NoLicenseInWizard)return;let t;if(m("Trying to get license from local license wizard"),t=yield y.fetchFromWizard("/license"),t.ok){const r=yield t.text(),{requiresValidation:n,trialExpired:s}=Y(r,e,i);n?(m("Got a developer license from local license wizard. Validating..."),N=u.LicenseCheckStatus.ValidatingDeveloperLicense,O(e,i)):s?(N=u.LicenseCheckStatus.NoLicenseInWizard,m(`No valid license available in licensing wizard. Trying again in ${x} seconds`),E=setTimeout(()=>D(e,i),1e3*x)):(m("Got a valid license from local license wizard."),N=u.LicenseCheckStatus.LicenseOK)}else N=u.LicenseCheckStatus.NoLicenseInWizard,m(`No license available in licensing wizard. Trying again in ${x} seconds`),E=setTimeout(()=>D(e,i),1e3*x)}catch(t){w+=1,w<b?(m(`Could not find licensing wizard. Trying again in ${x} seconds`),setTimeout(()=>D(e,i),1e3*x)):(console.log("Failed to connect to licensing wizard. Refresh page to retry."),w=0,N=u.LicenseCheckStatus.FailedToFindLicenseWizard)}void 0!==e&&(0,t.updateLicenseDisplay)((0,t.getLicenseInfo)(e),i,!0,!0),R.updateLicenseDisplay3D()})),L=(e,t,i,r)=>{const n=`${e},${t},${i},${r}`;return y.setCookie("scLicense",n,365)};t.getLicenseCookie=()=>{let e;e=y.getCookie("scLicense");const t=e.split(",");return 4===t.length?{key:t[0],token:t[1],expiry:new Date(1e3*Number.parseInt(t[2],10)),lastValidated:new Date(1e3*Number.parseInt(t[3],10))}:{key:t[0],token:null,expiry:null,lastValidated:null}};const M=(e,t)=>{let i=-1;void 0!==t&&(i=t.SCRTCredentials.ApplyLicenseResponse(e));const r=R.setChallengeResponse3D(e);return void 0!==r?r:i};let I=0;const O=(e,i)=>r(void 0,void 0,void 0,(function*(){const r=c.licenseManager2dState.getIsDev()?"license wizard":"server";try{if(N!==u.LicenseCheckStatus.ValidatingDeveloperLicense)return;let n,s,o;m("Attempting to validate license with "+r),void 0!==e?(n=e.SCRTCredentials.GetLicenseChallenge(),s=e.SCRTCredentials.GetOrderId()):({challenge:n,orderId:s}=R.getLicenseChallenge3D());const a=`orderid=${s}&challenge=${n}`;if(c.licenseManager2dState.getIsDev()){const e="/validate?"+a;o=yield y.fetchFromWizard(e)}else if(void 0!==S)o=yield S(a);else{const e="/"+T+(T.indexOf("?")>0?"&":"?")+a;o=yield y.fetchForChallenge(e)}if(o.ok){const r=yield o.text();if(r.startsWith("Error"))m("Server rejected the license challenge: "+r),N=u.LicenseCheckStatus.FailedToValidateDeveloperLicense;else{const n=M(r,e);if(n>0){let s=(0,t.getLicenseCookie)().key;s||(s=C());const o=Math.floor((new Date).getTime()/1e3);L(s,r,n,o),m("License validated"),N=u.LicenseCheckStatus.LicenseOK;const a=n-o;I=0,setTimeout(()=>O(e,i),Math.floor(.95*a*1e3))}else m("license challenge response was invalid: "+r),N=u.LicenseCheckStatus.FailedToValidateDeveloperLicense}}else{if(!c.licenseManager2dState.getIsDev())throw new Error(o.statusText);console.warn("Error during license validation: "+o.statusText),N=u.LicenseCheckStatus.FailedToValidateDeveloperLicense}}catch(n){if(!c.licenseManager2dState.getIsDev())return console.warn("Server license validation failed. Looking for local developer license"),P="",N=u.LicenseCheckStatus.NoLicense,e.SCRTCredentials.ResetRuntimeLicense(),F=!1,c.licenseManager2dState.setIsDev(!0),N=u.LicenseCheckStatus.LookingForLicenseWizard,D(e,i),void 0!==k&&(0,t.updateLicenseDisplay)((0,t.getLicenseInfo)(k),V,!0,!1),void R.updateLicenseDisplay3D();if(I+=1,I<b)m(`Could not find ${r}/${T}. Trying again in ${x} seconds`),setTimeout(()=>O(e,i),1e3*x);else{const e=(0,t.getLicenseCookie)().expiry,i=c.licenseManager2dState.getIsDev()?"Please run the license wizard, ensure your license is activated, then refresh page to retry.":"Please check that the endpoint is configured correctly.";console.error(`Failed to connect to ${r}/${T}. License must be revalidated before ${e.toLocaleString()}. ${i}`),I=0,new Date>e&&(N=u.LicenseCheckStatus.FailedToFindLicenseWizard)}}void 0!==e&&(0,t.updateLicenseDisplay)((0,t.getLicenseInfo)(e),i,!0,!0),R.updateLicenseDisplay3D()}));let k,V,_=!0,N=u.LicenseCheckStatus.NoLicense,F=!1;let B;t.applyLicense=(e,i)=>{var r;m("applyLicense running");let n="",s=e.SCRTCredentials.GetLicenseType();m("Initial license status is "+u.LicenseType[$(s,e)]),(window.location.hostname.includes(".csb.app")||"codesandbox.io"===window.location.hostname||window.location.hostname.includes(".codesandbox.io")||window.location.hostname.includes("fiddle.jshell.net")||window.location.hostname.includes("cdpn.io"))&&(P="builtin");const o=C();if((N===u.LicenseCheckStatus.NoLicense||N===u.LicenseCheckStatus.LicenseOK||N===u.LicenseCheckStatus.LookingForLicenseWizard)&&s===e.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE&&o){m("Runtime license found");const t=o.indexOf(";");if(t>0){const e=Math.floor((new Date).getTime()/1e3),i=o.substring(t+1);L(o.substr(0,t),i,e+60,e)}else{e.SCRTCredentials.SetRuntimeLicenseKeyW(o),s=e.SCRTCredentials.GetLicenseType();const t=$(s,e);if(m("Runtime license status is "+u.LicenseType[t]),s===e.SCRTLicenseType.LICENSE_TYPE_FULL||s===e.SCRTLicenseType.LICENSE_TYPE_TRIAL||s===e.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION)F=!0,n=o;else{const t=e.SCRTCredentials.GetLicenseErrors();window&&(null===(r=window.location)||void 0===r?void 0:r.hostname)&&!window.location.hostname.includes("localhost")||!t.startsWith("License is not valid for this domain")?v?m("Runtime license is invalid: "+t):console.warn("Runtime license is invalid. Call setIsDebugLicensing(true) for details."):m("Runtime license is invalid: "+t),n=""}}}const a=(0,t.getLicenseCookie)();if(""===n&&a&&""!==a.key?(m("Found license in cookie."),n=a.key,e.SCRTCredentials.SetRuntimeLicenseKeyW(n),s=e.SCRTCredentials.GetLicenseType(),s!==e.SCRTLicenseType.LICENSE_TYPE_FULL&&s!==e.SCRTLicenseType.LICENSE_TYPE_TRIAL&&s!==e.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION&&(m("License cookie is invalid. "+e.SCRTCredentials.GetLicenseErrors()),(0,d.deleteCookie)("scLicense"),n="",s=e.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE)):N===u.LicenseCheckStatus.FetchingFromServer&&(N=u.LicenseCheckStatus.NoLicense),""!==n)if(s===e.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE&&(e.SCRTCredentials.SetRuntimeLicenseKeyW(n),s=e.SCRTCredentials.GetLicenseType()),c.licenseManager2dState.setIsDev(e.SCRTCredentials.GetAllowDebugging()),s===e.SCRTLicenseType.LICENSE_TYPE_FULL||s===e.SCRTLicenseType.LICENSE_TYPE_TRIAL)N=u.LicenseCheckStatus.LicenseOK,m("license ok");else if(e.SCRTCredentials.RequiresValidation())if(m("license requires validation"),F&&c.licenseManager2dState.getIsDev())e.SCRTCredentials.ResetRuntimeLicense(),(0,d.deleteCookie)("scLicense"),N=u.LicenseCheckStatus.DevKeyInRuntimeKey;else if(a.expiry>new Date&&a.key===n){m("current token in cookie");const t=M(a.token,e);s=e.SCRTCredentials.GetLicenseType(),s!==e.SCRTLicenseType.LICENSE_TYPE_FULL&&s!==e.SCRTLicenseType.LICENSE_TYPE_TRIAL||(N=u.LicenseCheckStatus.LicenseOK);const r=Math.floor((new Date).getTime()/1e3);1e3*t>a.expiry.getTime()&&L(n,a.token,t,r);const o=86400,l=((new Date).getTime()-a.lastValidated.getTime())/1e3;m(`License expires in ${t-r} seconds. Last validated ${l} seconds ago`),l>o&&N!==u.LicenseCheckStatus.ValidatingDeveloperLicense&&(N=u.LicenseCheckStatus.ValidatingDeveloperLicense,O(e,i))}else N===u.LicenseCheckStatus.NoLicense&&(N=u.LicenseCheckStatus.ValidatingDeveloperLicense,O(e,i));else m("license is invalid: "+e.SCRTCredentials.GetLicenseErrors());m("checkstatus: "+u.LicenseCheckStatus[N]),N===u.LicenseCheckStatus.NoLicense&&A&&void 0===E&&(N=u.LicenseCheckStatus.LookingForLicenseWizard,c.licenseManager2dState.setIsDev(!0),D(e,i)),void 0!==e&&(0,t.updateLicenseDisplay)((0,t.getLicenseInfo)(e),i,!0,!1),R.updateLicenseDisplay3D()};let H=()=>{console.error("Modal not initialized")};const Y=(e,i,r)=>{let n,s=!1;B&&(B.style.display="none"),F=!1,L(e,null,null,null),void 0!==i&&(i.SCRTCredentials.SetRuntimeLicenseKeyW(e),s=i.SCRTCredentials.RequiresValidation(),n=i.SCRTCredentials.GetLicenseType()===i.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED,(0,t.updateLicenseDisplay)((0,t.getLicenseInfo)(i),r,!0,!0));const o=R.setNewLicense3D(e);return void 0!==o&&(s=o.requiresValidation,n=o.trialExpired),{requiresValidation:s,trialExpired:n}},z=new o.Dictionary,j=(e,t)=>{if(z.containsKey(e))return;const i=document.styleSheets;if(0===i.length){const e=document.createElement("style");e.appendChild(document.createTextNode("")),document.head.appendChild(e)}const r=i[i.length-1],n=r.insertRule(t,r.cssRules.length);z.add(e,n)},G=(e,i)=>{B=document.createElement("div"),B.id="scichartLicenseModal",B.style.display="none",B.style.position="fixed",B.style.zIndex="100",B.style.left="0",B.style.top="0",B.style.width="100%",B.style.height="100%",B.style.overflow="auto",B.style.backgroundColor="rgb(0,0,0)",B.style.backgroundColor="rgba(0,0,0,0.4)";const r=document.createElement("div");r.style.backgroundColor="#fefefe",r.style.position="absolute",r.style.left="50%",r.style.top="50%",r.style.transform="translate(-50%, -50%)",r.style.borderRadius="4px",r.style.padding="20px",r.style.maxWidth="460px",B.appendChild(r);const n=document.createElement("div");n.style.display="block",r.appendChild(n);const s=document.createElement("div");s.style.display="none",r.appendChild(s),H=()=>{B.style.display="block",n.style.display="block",s.style.display="none"};const o=document.createElement("div");o.style.display="flex",o.style.padding="8px 16px",o.style.backgroundColor="#5cb85c",o.style.color="white",n.appendChild(o);const a=document.createElement("div");a.style.flexGrow="1",a.innerHTML=e,o.appendChild(a),j("licenseModalClose",".licenseModalClose {\n color: #aaa;\n float: right;\n font-size: 28px;\n font-weight: bold;\n }"),j("licenseModalClose:hover",".licenseModalClose:hover {\n color: black;\n text-decoration: none;\n cursor: pointer;\n }"),j("licenseModalClose:focus",".licenseModalClose:focus {\n color: black;\n text-decoration: none;\n cursor: pointer;\n }");const l=document.createElement("span");l.innerHTML="×",l.className="licenseModalClose",o.appendChild(l);const h=document.createElement("div");h.style.padding="10px 26px 10px 16px",h.innerHTML='<ol><li>If you have not done so already, download the SciChart Cross Platform Licensing Wizard for\n <a href="https://github.com/ABTSoftware/SciChart.LicenseWizard/releases/latest/download/SciChart-Licensing-Wizard.exe" download> Windows</a> or\n <a href="https://github.com/ABTSoftware/SciChart.LicenseWizard/releases/latest/download/SciChart-Licensing-Wizard.dmg" download> macOS</a></li>\n <li>Install it and sign in with your SciChart username and password</li>\n <li>Start a trial for SciChart Web</li>\n <li>This web page should pick up your license from the wizard in a few seconds, or refresh the page</li>';const u=document.createElement("div");h.innerHTML="To toggle License debug mode use button below and refresh the page.";const d=document.createElement("button");d.style.margin="10px";const c=()=>{d.textContent=v?"Disable licensing debug mode":"Enable licensing debug mode"};c(),d.onclick=()=>{(0,t.setIsDebugLicensing)(!v,!0),c()},n.appendChild(h),n.appendChild(u),n.appendChild(d);const p=document.createElement("div");p.innerHTML=i,p.style.padding="8px 16px",p.style.backgroundColor="#5cb85c",p.style.color="white",n.appendChild(p),window.onclick=e=>{e.target===B&&(B.style.display="none")};const g=document.getElementById(B.id);return null==g?document.body.appendChild(B):document.body.replaceChild(B,g),l.onclick=()=>{B.style.display="none"},B};let X=null,W=null;const U=(e,t)=>{const i=t.cloneNode(!0),r=e.getElementsByClassName("licenseMessage");if(r.length>0){const t=r[0];e.replaceChild(i,t)}else e.appendChild(i);A&&(i.onclick=H)},$=(e,t)=>{let i=u.LicenseType.NoLicense;switch(e){case t.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE:i=u.LicenseType.NoLicense;break;case t.SCRTLicenseType.LICENSE_TYPE_TRIAL:i=u.LicenseType.Trial;break;case t.SCRTLicenseType.LICENSE_TYPE_FULL:i=u.LicenseType.Full;break;case t.SCRTLicenseType.LICENSE_TYPE_FULL_EXPIRED:i=u.LicenseType.Full_Expired;break;case t.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED:i=u.LicenseType.Trial_Expired;break;case t.SCRTLicenseType.LICENSE_TYPE_SUBSCRIPTION_EXPIRED:i=u.LicenseType.Subscription_Expired;break;case t.SCRTLicenseType.LICENSE_TYPE_INVALID_DEVELOPER_LICENSE:i=u.LicenseType.Invalid_Developer;break;case t.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION:i=u.LicenseType.Requres_Validation;break;case t.SCRTLicenseType.LICENSE_TYPE_INVALID_LICENSE:i=u.LicenseType.Invalid}return i};let Z,K,J;t.getLicenseInfo=e=>{const t=e.SCRTCredentials.GetLicenseType(),i=$(t,e),r=e.SCRTCredentials.GetLicenseDaysRemaining();if(N===u.LicenseCheckStatus.LicenseOK&&c.licenseManager2dState.getLicenseType()!==i){c.licenseManager2dState.setOrderId(e.SCRTCredentials.GetEncryptedOrderId()),c.licenseManager2dState.setProductCode(e.SCRTCredentials.GetProductCode()),c.licenseManager2dState.setLicenseType(i),c.licenseManager2dState.setDevCount(e.SCRTCredentials.GetDeveloperCount());const t=e.SCRTCredentials.HasFeature("TE");c.licenseManager2dState.setTelemetry(t===e.SCRTLicenseType.LICENSE_TYPE_FULL||t===e.SCRTLicenseType.LICENSE_TYPE_TRIAL)}v&&m(e.SCRTCredentials.Dump());return{licenseType:i,daysRemaining:r,error:e.SCRTCredentials.GetLicenseErrors()}};const q=(e,t,i,r)=>{null==X&&(X=document.createElement("div"),X.className="licenseMessage",W=document.createElement("div"),W.className="licenseMessageChild",W.innerHTML="",X.appendChild(W));let n="",s="",o="";const{licenseType:a,daysRemaining:d,error:p}=e;if(i&&a!==Z||!i&&a!==K||N!==J){J=N,i?Z=a:K=a,m((i?"2D":"3D")+" license status changed"),t.invalidateElement(),t.otherSurfaces.map(e=>e.invalidateElement());const e='<a href="https://www.scichart.com/licensing-scichart" target="_blank" style="color: white">www.scichart.com/licensing-scichart</a>',r='<a href="https://www.scichart.com/contact-us/" target="_blank" style="color: orange">contact support</a>';a===u.LicenseType.NoLicense?(n="You need to have a license to use SciChart. ",o="Instructions can be seen at "+e):a===u.LicenseType.Invalid?(n=p.startsWith("License is not valid for this domain")?`Sorry! Your license key is invalid for this domain</br>Please ${r} with your OrderID if you believe this to be incorrect.`:p.startsWith("This version of SciChart can no longer be trialed")?"Sorry! This version of SciChart is too old to be trialed. Please update to the latest version":`Sorry! Your license key appears to be invalid</br>Please ${r} with your OrderID if you believe this to be incorrect.`,o="Instructions can be seen at "+e):a===u.LicenseType.Invalid_Developer?(n="Sorry! You need a developer license to use SciChart on a domain not included in your runtime key.",o=`Instructions can be seen at ${e}</br>\n Please ${r} with your OrderID if you are experiencing issues.`):a===u.LicenseType.Requres_Validation?(n=c.licenseManager2dState.getIsDev()?"Your developer license must be validated by the SciChart Licensing Wizard running locally":"This runtime key must be validated by a server side key.",o=`Instructions can be seen at ${e}</br>\n Please ${r} with your OrderID if you are experiencing issues.`):a===u.LicenseType.Subscription_Expired?(n="Sorry! Your support subscription has expired.<br>",o=`Please ${r} us if you would like to renew your subscription.`):a===u.LicenseType.Trial_Expired&&d<1?(n="Sorry! Your trial has expired.",o=`Please ${r} if you require an extension.`):a===u.LicenseType.Trial_Expired&&d>1?(n="This version is too old to trial.",o=`Please ${r} if you require an extension.`):a===u.LicenseType.Trial&&d<=7?n=`You have ${d} day${1===d?"":"s"} remaining of the trial.`:(a===u.LicenseType.Full||a===u.LicenseType.Trial&&d>7)&&(X.style.display="none",W.innerHTML=""),N!==u.LicenseCheckStatus.LicenseOK?(N===u.LicenseCheckStatus.FetchingFromServer&&(s="<br>Fetching license from server..."),N===u.LicenseCheckStatus.LookingForLicenseWizard?s="<br>Looking for Licensing Wizard... <u>Please run it or click for download and installation instructions</u>.":N===u.LicenseCheckStatus.FailedToFindLicenseWizard?s=c.licenseManager2dState.getIsDev()?"<br><u>Could not connect to the Licensing Wizard. Please run it or click for download and installation instructions, then reload this page.</u>":"<br><u>Could not connect to the server licensing endpoint</u>":N===u.LicenseCheckStatus.ValidatingDeveloperLicense?s=c.licenseManager2dState.getIsDev()?"<br><u>Trying to validate your license... Please run the Licensing Wizard or click for download and installation instructions</u>.":"<br><u>Trying to validate your license with the server...</u>.":N===u.LicenseCheckStatus.FailedToValidateDeveloperLicense?s=c.licenseManager2dState.getIsDev()?"<br><u>Failed to validate your developer license with the Licensing Wizard. If you have changed your activated license, try clearing your cookies for this site.</u>.":"<br><u>Failed to validate the runtime license with the server</u>.":N===u.LicenseCheckStatus.NoLicenseInWizard&&a===u.LicenseType.NoLicense?s="<br><u>Please use the Licensing wizard to start a trial or activate a serial key. Click for more information</u>.":N===u.LicenseCheckStatus.DevKeyInRuntimeKey?s="<br><u>You have set a developer key as a runtime key, which will not work on any other machine. Click for more information</u>":a===u.LicenseType.Trial_Expired&&d>1?s="<br><u>Please update to the latest version of SciChart. Click for more information</u>.":N===u.LicenseCheckStatus.NoLicenseInWizard&&a===u.LicenseType.Trial_Expired&&(s="<br><u>Please activate a serial key in the Licensing Wizard, or contact sales for an extension. Click for more information</u>."),n&&(X.style.width="100%",X.style.height="100%",X.style.top="0",X.style.left="0",X.style.position="absolute",X.style.pointerEvents="auto",X.style.cursor="pointer",X.style.background=h.EColor.BackgroundColor,X.style.zIndex="10",W.style.display="block",W.style.color="orange",W.style.width="80%",W.style.position="absolute",W.style.left="50%",W.style.top="50%",W.style.transform="translate(-50%, -50%)",W.style.textAlign="center",W.style.pointerEvents="auto",A?(W.innerHTML=n+s,G(n,o)):W.innerHTML=n+'<br><a href="https://github.com/ABTSoftware/SciChart.JS.Examples/blob/master/README-BetaTesters.md" target="_blank" style="color: white">Click here for a beta trial key and instructions</a>')):(0,l.sendTelemetry)()}U(t.domDivContainer,X),r&&t.otherSurfaces.forEach(e=>{U(e.domDivContainer,X)})};t.updateLicenseDisplay=(e,t,i,r)=>y.updateLicenseDisplay(e,t,i,r),t.licenseManager={setRuntimeLicenseKey:e=>(0,t.setRuntimeLicenseKey)(e),setIsDebugLicensing:e=>(0,t.setIsDebugLicensing)(e),setLicenseCallback:e=>(0,t.setLicenseCallback)(e),setServerLicenseEndpoint:e=>(e=>{T=e})(e),applyLicense2D:(e,i,r)=>((e,i,r)=>{m("applyLicense 2D"),_&&(V=i,k=e),r||_?(0,t.applyLicense)(e,i):N!==u.LicenseCheckStatus.LicenseOK&&(0,t.updateLicenseDisplay)((0,t.getLicenseInfo)(k),V,!0,!1),r||(_=!1)})(e,i,r)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendTelemetry=t.shouldSendTelemetry=t.getUserCookie=void 0;const r=i(127),n=i(242),s=i(53),o=i(13),a=i(22);let l=!1;t.getUserCookie=()=>{const e=(0,n.getCookie)("scUser");if(e){const t=e.split(",");if(3===t.length)return{userId:t[0],sessionId:t[1],sessionStart:Number.parseInt(t[2],10)}}return{userId:(0,a.base64Id)(),sessionId:(0,a.base64Id)(),sessionStart:0}};t.shouldSendTelemetry=()=>!o.IS_TEST_ENV&&(!l&&(!!r.licenseManager2dState.getIsDev()&&(!!r.licenseManager2dState.getTelemetry()&&!(window&&!window.navigator.onLine))));t.sendTelemetry=()=>{if(!(0,t.shouldSendTelemetry)())return;const e=(0,t.getUserCookie)(),i=(new Date).toISOString();if(Date.now()-e.sessionStart<36e5)return;e.sessionId=(0,a.base64Id)(),e.sessionStart=Date.now(),((e,t,i)=>{const r=`${e},${t},${i}`;(0,n.setCookie)("scUser",r,365)})(e.userId,e.sessionId,e.sessionStart);const o={time:i,iKey:"210b4d64-8147-471e-b6cb-244a2c939455",name:"Microsoft.ApplicationInsights.210b4d648147471eb6cb244a2c939455.Event",tags:{"ai.user.id":e.userId,"ai.session.id":e.sessionId,"ai.device.id":"browser","ai.device.type":"Browser"},data:{baseType:"EventData",baseData:{ver:2,name:"LicenseSet",properties:{platform:"JS",licenseType:r.licenseManager2dState.getLicenseType(),orderId:r.licenseManager2dState.getOrderId(),productCode:r.licenseManager2dState.getProductCode(),isDev:r.licenseManager2dState.getIsDev(),devCount:r.licenseManager2dState.getDevCount(),sciChartVersion:s.libraryVersion},measurements:{}}}};(window.location.hostname.includes(".csb.app")||window.location.hostname.includes(".codesandbox.io")||window.location.hostname.includes("fiddle.jshell.net")||window.location.hostname.includes("cdpn.io"))&&(o.data.baseData.properties.url=window.location.href);const h=JSON.stringify([o]);fetch("https://dc.services.visualstudio.com/v2/track",{method:"POST",headers:{"Content-Type":"application/json"},body:h}).catch(e=>{}),l=!0}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.licenseManager2dState=void 0;const r=i(241);let n=!1;let s="";let o="";let a=1;let l=r.LicenseType.NoLicense;let h=!1;t.licenseManager2dState={getIsDev:()=>n,setIsDev:e=>{n=e},getOrderId:()=>s,setOrderId:e=>{s=e},getProductCode:()=>o,setProductCode:e=>{o=e},getLicenseType:()=>l,setLicenseType:e=>{l=e},getDevCount:()=>a,setDevCount:e=>{a=e},getTelemetry:()=>h,setTelemetry:e=>{h=e}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartJSDarkv2Theme=void 0;const r=i(85),n=i(129);class s extends n.SciChartJSDarkTheme{constructor(){super(),this.type=r.EThemeProviderType.DarkV2,this.sciChartBackground="radial-gradient(circle, #3C3C3FFF 0%, #1C1C1EFF 100%)",this.loadingAnimationBackground="radial-gradient(circle, #3C3C3FFF 0%, #1C1C1EFF 100%)",this.axisBandsFill="#20212333",this.majorGridLineBrush="#AAAAAA37",this.minorGridLineBrush="#77777719",this.strokePalette=["#F48420","#AE408E","#209FD9","#264B93"],this.fillPalette=["#F4842077","#AE408E77","#209FD977","#264B9377"],this.isLightBackground=!1}}t.SciChartJSDarkv2Theme=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartJSDarkTheme=void 0;const r=i(85),n=i(26);class s extends n.ThemeProvider{constructor(){super(...arguments),this.type=r.EThemeProviderType.Dark,this.sciChartBackground="#1C1C1EFF",this.loadingAnimationBackground="#1C1C1EFF",this.loadingAnimationForeground="#AAA",this.gridBorderBrush="#5A5B5BFF",this.axisBandsFill="#202123E1",this.axisBorder="#00000000",this.tickTextBrush="#A6A7ACFF",this.majorGridLineBrush="#323539FF",this.minorGridLineBrush="#232426FF",this.gridBackgroundBrush="TRANSPARENT",this.rolloverLineBrush="#42b64933",this.cursorLineBrush="#228B22FF",this.rubberBandFillBrush="#42b64933",this.rubberBandStrokeBrush="#42b64977",this.legendBackgroundBrush="#1D2C35FF",this.labelBackgroundBrush="#42b649AA",this.labelBorderBrush="#42b649FF",this.labelForegroundBrush="#EEEEEEFF",this.textAnnotationForeground="#EEEEEEFF",this.textAnnotationBackground="#42b649AA",this.annotationsGripsBorderBrush="#CDCDCD99",this.annotationsGripsBackroundBrush="#CDCDCD22",this.annotationSelectionStroke="#f00e0e66",this.overviewFillBrush="#262728BB",this.scrollbarBackgroundBrush="#262728FF",this.scrollbarBorderBrush="#121212FF",this.scrollbarGripsBackgroundBrush="#535353FF",this.scrollbarViewportBackgroundBrush="#222222FF",this.scrollbarViewportBorderBrush="#232323FF",this.upWickColor="#50ff50FF",this.downWickColor="#ff5050FF",this.upBodyBrush="#50ff50B2",this.downBodyBrush="#ff5050B2",this.upBandSeriesLineColor="#279B27FF",this.downBandSeriesLineColor="#FF1919FF",this.upBandSeriesFillColor="#279B2733",this.downBandSeriesFillColor="#FF191933",this.mountainAreaBrush="#4083B777",this.mountainLineColor="#C6E6FFFF",this.lineSeriesColor="#C6E6FFFF",this.columnLineColor="#FFFFFFFF",this.columnFillBrush="#FFFFFFFF",this.impulseFillBrush="#FFFFFFFF",this.defaultColorMapBrush=[{offset:0,color:"DARKBLUE"},{offset:.5,color:"CORNFLOWERBLUE"},{offset:1,color:"#FF22AAFF"}],this.axisTitleColor="#C8C7C3FF",this.shadowEffectColor="#000000FF",this.planeBorderColor="#333333FF",this.axisPlaneBackgroundFill="TRANSPARENT",this.axis3DBandsFill="#202123E1",this.isLightBackground=!1}}t.SciChartJSDarkTheme=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderContextAnnotationBase=void 0;const r=i(28);class n extends r.AnnotationBase{constructor(e){super(e),this.isSvgAnnotation=!1}}t.RenderContextAnnotationBase=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextureCache=void 0;const r=i(0),n=i(132);class s extends n.BaseCache{constructor(e){super(e),this.wasmContext=e}get value(){return!this.cachedEntity&&this.textureFormat&&(this.cachedEntity=this.create(this.width,this.height,this.textureFormat)),this.cachedEntity}create(e,t,i){return this.cachedEntity&&e===this.width&&t===this.height&&i===this.textureFormat||(this.cachedEntity=(0,r.deleteSafe)(this.cachedEntity),this.width=e,this.height=t,this.textureFormat=i,this.cachedEntity=this.wasmContext.SCRTCreateBitmapTexture(this.width,this.height,i)),this.cachedEntity}resetCache(){this.invalidateCache(),this.width=void 0,this.height=void 0,this.textureFormat=void 0}}t.TextureCache=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCache=void 0;const r=i(0),n=i(30);t.BaseCache=class{constructor(e){this.webAssemblyContext=e,e&&n.WebGlRenderContext2D.webGlResourcesRefs.add(this)}get value(){return this.cachedEntity}invalidateCache(){this.cachedEntity=(0,r.deleteSafe)(this.cachedEntity)}resetCache(){this.invalidateCache()}delete(){this.cachedEntity=(0,r.deleteSafe)(this.cachedEntity),this.webAssemblyContext&&n.WebGlRenderContext2D.webGlResourcesRefs.delete(this)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.labelCache=void 0;const r=i(0),n=new Map,s={};let o=0;const a=(e,t)=>`${e}|:|${t}`,l=e=>{const t=e.indexOf("|:|");return{text:e.substring(0,t-1),styleId:e.substring(t+3)}},h=e=>{for(const t of Array.from(n.keys())){const{text:i,styleId:s}=l(t);if(s===e){const e=n.get(t);(0,r.deleteSafe)(e.bitmapTexture),n.delete(t)}}};let u=200,d=6e4,c=0;const p=(e,t)=>e.alignment===t.alignment&&e.color===t.color&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontStyle===t.fontStyle&&e.fontWeight===t.fontWeight&&(void 0===e.padding&&void 0===t.padding||e.padding.equals(t.padding))&&e.extras===t.extras&&e.rotation===t.rotation&&e.providerId===t.providerId;t.labelCache={getStyleId:e=>{for(const t in s)if(s.hasOwnProperty(t)){const i=s[t];if(i&&p(e,i.style))return i.uses++,t}o++;const t=o.toString();return s[t]={style:e,uses:1},t},freeStyle:e=>{const t=s[e];t&&(t.uses--,setTimeout(()=>{const t=s[e];t&&0===t.uses&&h(e)},d))},getLabel:(e,t)=>{const i=a(e,t),r=n.get(i);return r&&(r.lastUsed=Date.now()),r},setLabel:(e,t,i)=>{const r=a(e,t);n.set(r,i)},checkStyle:(e,t)=>{const i=s[e.toString()];return!!i&&p(i.style,t)},getMaxSize:()=>u,setMaxSize:e=>{u=e},getMinAge:()=>d,setMinAge:e=>{d=e},pruneCache:()=>{const e=Date.now()-d;if(n.size>u&&c<e)try{const t=Math.min(Math.floor(n.size/2),2*(n.size-u)),i=Array.from(n.entries());i.sort((e,t)=>e[1].lastUsed-t[1].lastUsed);for(let s=0;s<t;s++){const[t,o]=i[s];o.lastUsed<e?(o.bitmapTexture=(0,r.deleteSafe)(o.bitmapTexture),n.delete(t)):0===s&&(c=o.lastUsed)}}catch(e){console.warn(e)}},resetCache:()=>{n.clear();for(const e in s)delete s[e]}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGlPen=void 0;const r=i(13),n=i(0),s=i(27),o=i(253);t.WebGlPen=class{constructor(e,t){this.scrtPenProperty=e,this.originalColor=null!=t?t:null==e?void 0:e.m_uiColor}get scrtPen(){return this.scrtPenProperty}delete(){this.scrtPenProperty=(0,n.deleteSafe)(this.scrtPenProperty)}getPenType(){return o.EDrawingTypes.WasmPen}setOpacity(e){r.IS_TEST_ENV||(this.scrtPen.m_uiColor=(0,s.uintArgbColorMultiplyOpacity)(this.originalColor,e))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVerticalAnchorPoint=t.EHorizontalAnchorPoint=void 0,function(e){e.Left="Left",e.Center="Center",e.Right="Right"}(t.EHorizontalAnchorPoint||(t.EHorizontalAnchorPoint={})),function(e){e.Top="Top",e.Center="Center",e.Bottom="Bottom"}(t.EVerticalAnchorPoint||(t.EVerticalAnchorPoint={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericTickProvider=void 0;const r=i(1),n=i(3),s=i(51),o=i(261);class a extends o.TickProvider{constructor(e){super(),this.minDeltaValue=1e-13,this.webAssemblyContext=e}getMinorTicks(e,t,i){const r=new n.NumberRange(e,t),s=i;return this.isParamsValid(s,r)?this.calculateTicks(s,r.min,r.max):[]}getMajorTicks(e,t,i){const r=new n.NumberRange(e,t),s=i;return this.isParamsValid(s,r)?this.calculateTicks(s,r.max,r.max):[]}isParamsValid(e,t){return r.Guard.notNull(e,"visibleRange"),r.Guard.notNull(t,"deltaRange"),(0,s.isRealNumber)(e.min)&&(0,s.isRealNumber)(e.max)&&t.min>0&&t.max>0}calculateTicks(e,t,i){const r=[],n=e.min,s=e.max;let o=n;const a=t===i,l=this.webAssemblyContext.NumberUtil;l.IsDivisibleBy(o,t)||(o=l.RoundUp(o,t));const h=o;let u=0;for(;o<=s;)l.IsDivisibleBy(o,i)===a&&r.push(o),o=h+ ++u*t;return r}}t.NumericTickProvider=a},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.textureWorker=void 0;const n=i(13),s={},o={};let a=0;function l(e){const{id:t,err:i,payload:r}=e.data;if(r){const e=s[t];e&&e(r)}else{const e=o[t];e&&e(i||"Got nothing")}delete s[t],delete o[t]}t.textureWorker=new class{constructor(){this.timeout=200,this.isActiveProperty=!0,!n.IS_TEST_ENV&&"undefined"!=typeof window&&window.Worker&&"undefined"!=typeof OffscreenCanvas?(this.worker=this.makeWorker(),this.worker.onmessage=l,this.worker.onerror=e=>{console.warn("Label Worker could not be started",e),this.isActiveProperty=!1}):this.isActiveProperty=!1}get isActive(){return this.isActiveProperty}measureAndGetImageData(e,t,i,n,l,h){return r(this,void 0,void 0,(function*(){if(!this.isActiveProperty)return Promise.reject("Worker is inactive");const r={text:e,textStyle:t,rotation:i,lineSpacing:n,backgroundColor:l,opacity:h};return yield function(e,t,i){const r=a++,n={id:r,payload:e,method:i};return new Promise((e,i)=>{s[r]=e,o[r]=i,t.postMessage(n)})}(r,this.worker)}))}makeWorker(){const e=URL.createObjectURL(new Blob(['\n var DEFAULT_HEIGHT = 1080;\n var DEFAULT_WIDTH = 1920;\n var ELabelAlignment;\n (function (ELabelAlignment) {\n ELabelAlignment["Auto"] = "Auto";\n ELabelAlignment["Left"] = "Left";\n ELabelAlignment["Right"] = "Right";\n ELabelAlignment["Center"] = "Center";\n })(ELabelAlignment || (ELabelAlignment = {}));\n var canvas = new OffscreenCanvas(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n var ctx = canvas.getContext("2d");\n var createTextTexture = function (text, textStyle, rotation, lineSpacing, backgroundColor, opacity) {\n var fontStyle = textStyle.fontStyle, fontWeight = textStyle.fontWeight, fontFamily = textStyle.fontFamily, fontSizePx = textStyle.fontSize, padding = textStyle.padding, alignment = textStyle.alignment, color = textStyle.color;\n ctx.globalAlpha = opacity !== null && opacity !== void 0 ? opacity : 1;\n ctx.textBaseline = "top";\n ctx.fillStyle = color;\n ctx.font = getFontString(fontStyle, fontWeight, fontSizePx, fontFamily);\n var textureWidth = 0;\n // const fontSizePt = Math.ceil(fontSizePx * PX_TO_PT);\n var lineHeight = measureTextHeight(fontSizePx);\n var extraLineHeight = lineHeight * (lineSpacing !== null && lineSpacing !== void 0 ? lineSpacing : 1.1);\n var textureHeight = lineHeight + padding.top + padding.bottom;\n for (var index = 0; index < text.length; index++) {\n var line = text[index];\n var lineWidth = measureTextWidth(line) + padding.left + padding.right;\n if (lineWidth > textureWidth) {\n textureWidth = lineWidth;\n }\n if (index > 0) {\n textureHeight += extraLineHeight;\n }\n }\n var y = padding.top;\n var x = padding.left;\n if (!textureWidth || !textureHeight) {\n return undefined;\n }\n var newTextureWidth = textureWidth;\n var newTextureHeight = textureHeight;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n if (backgroundColor) {\n ctx.fillStyle = backgroundColor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n // Save state\n ctx.save();\n if (rotation) {\n // convert to radians\n var rotationRad = (rotation * Math.PI) / 180;\n // We need to Math.ceil to fix rotation for WebGL1\n newTextureWidth = Math.ceil(textureWidth * Math.abs(Math.cos(rotationRad)) + textureHeight * Math.abs(Math.sin(rotationRad)));\n newTextureHeight = Math.ceil(textureWidth * Math.abs(Math.sin(rotationRad)) + textureHeight * Math.abs(Math.cos(rotationRad)));\n // translate to the center of rectangle\n ctx.translate(newTextureWidth / 2, newTextureHeight / 2);\n ctx.rotate(rotationRad);\n // translate to the new origin that is located in the left top center of the texture\n ctx.translate(-textureWidth / 2, -textureHeight / 2);\n }\n for (var _i = 0, text_1 = text; _i < text_1.length; _i++) {\n var line = text_1[_i];\n if (alignment === ELabelAlignment.Center || alignment === ELabelAlignment.Right) {\n var lineWidth = measureTextWidth(line);\n x =\n alignment === ELabelAlignment.Right\n ? textureWidth - lineWidth - padding.right\n : (textureWidth - lineWidth) / 2;\n }\n ctx.fillText(line, Math.round(x), Math.round(y));\n y += extraLineHeight;\n }\n ctx.strokeStyle = color;\n ctx.restore();\n var imageData = ctx.getImageData(0, 0, newTextureWidth, newTextureHeight);\n return {\n imageData: imageData,\n textureWidth: newTextureWidth,\n textureHeight: newTextureHeight\n };\n };\n var measureTextHeight = function (fontSizePx) { return fontSizePx; };\n var measureTextWidth = function (text) {\n var textMeasure = ctx.measureText(text);\n return Math.ceil(textMeasure.width);\n };\n var getFontString = function (fontStyle, fontWeight, fontSize, fontFamily) {\n if (!fontWeight)\n return fontStyle + " " + fontSize + "px " + fontFamily;\n return fontStyle + " " + fontWeight + " " + fontSize + "px " + fontFamily;\n };\n self.onmessage = function (msg) {\n var _a = msg.data, id = _a.id, payload = _a.payload, method = _a.method;\n var text = payload.text, textStyle = payload.textStyle, rotation = payload.rotation, lineSpacing = payload.lineSpacing, backgroundColor = payload.backgroundColor, opacity = payload.opacity;\n try {\n var result = createTextTexture(text, textStyle, rotation, lineSpacing, backgroundColor, opacity);\n var reply = {\n id: id,\n payload: result\n };\n self.postMessage(reply);\n }\n catch (err) {\n self.postMessage({\n id: id,\n err: err,\n payload: undefined\n });\n }\n };'],{type:"application/javascript"})),t=new Worker(e);return URL.revokeObjectURL(e),t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmartDateLabelProvider=t.ETradeChartLabelFormat=void 0;const r=i(77),n=i(41),s=i(42),o=i(21),a=i(109);var l;!function(e){e.Seconds="Seconds",e.Minutes="Minutes",e.Days="Days",e.Months="Months"}(l=t.ETradeChartLabelFormat||(t.ETradeChartLabelFormat={}));class h extends a.LabelProviderBase2D{constructor(e){var t,i,s;super(Object.assign({labelFormat:null!==(t=null==e?void 0:e.labelFormat)&&void 0!==t?t:n.ENumericFormat.Date_DDMMYYYY,cursorLabelFormat:null!==(i=null==e?void 0:e.cursorLabelFormat)&&void 0!==i?i:n.ENumericFormat.Date_DDMMYYYY},e)),this.type=r.ELabelProviderType.SmartDate,this.textVariesForSameTick=!0,this.showWiderDateOnFirstLabelProperty=!0,this.firstLabel=!0,this.showWiderDateOnFirstLabelProperty=null!==(s=null==e?void 0:e.showWiderDateOnFirstLabel)&&void 0!==s?s:this.showWiderDateOnFirstLabel,this.formatCursorLabelProperty=e=>{var t,i;return this.applyFormat((0,o.formatNumber)(e,null!==(t=this.cursorNumericFormat)&&void 0!==t?t:this.numericFormat,null!==(i=this.cursorPrecision)&&void 0!==i?i:this.precision))},this.doFormat=this.doFormat.bind(this),this.formatLabelProperty=this.doFormat}get showWiderDateOnFirstLabel(){return this.showWiderDateOnFirstLabelProperty}set showWiderDateOnFirstLabel(e){this.showWiderDateOnFirstLabelProperty!==e&&(this.showWiderDateOnFirstLabelProperty=e,this.invalidateParent())}onBeginAxisDraw(){}getLabels(e){let t=e[0];const i=e.length;let r=e[i-1];if(this.parentAxis.isCategoryAxis){const e=this.parentAxis.getCurrentCoordinateCalculator();t=e.transformIndexToData(t),r=e.transformIndexToData(r)}this.prevPrevValue=void 0,this.prevValue=void 0;const n=r-t;this.firstLabel=!0,this.format=this.getTradeChartLabelFormat(n,i);const s=super.getLabels(e);return this.format=void 0,s}get numericFormat(){}set numericFormat(e){}doFormat(e){var t,i;if(this.format){const t=this.formatTradeChartLabel(this.format,e,this.prevValue,this.prevPrevValue);return this.prevPrevValue=this.prevValue,this.prevValue=e,t}return this.applyFormat((0,o.formatNumber)(e,null!==(t=this.cursorNumericFormat)&&void 0!==t?t:this.numericFormat,null!==(i=this.cursorPrecision)&&void 0!==i?i:this.precision))}getTradeChartLabelFormat(e,t){return e<=3600?l.Seconds:e<=432e3?l.Minutes:e<=432e4?l.Days:l.Months}formatTradeChartLabel(e,t,i,r){const a=!this.firstLabel||this.showWiderDateOnFirstLabel;if(this.firstLabel=!1,e===l.Seconds){return(void 0===i||(0,s.formatUnixDateToHumanStringMMMDD)(t)!==(0,s.formatUnixDateToHumanStringMMMDD)(i))&&a?(0,s.formatUnixDateToHumanStringMMMDD)(t):(0,s.formatUnixDateToHumanStringHHMMSS)(t)}if(e===l.Minutes){return(void 0===i||(0,s.formatUnixDateToHumanStringMMMDD)(t)!==(0,s.formatUnixDateToHumanStringMMMDD)(i))&&a?(0,s.formatUnixDateToHumanStringMMMDD)(t):(0,s.formatUnixDateToHumanStringHHMM)(t)}if(e===l.Days){return(void 0===i||(0,s.formatUnixDateToHumanStringMMM)(t)!==(0,s.formatUnixDateToHumanStringMMM)(i))&&a?(0,s.formatUnixDateToHumanStringMMM)(t):(0,s.formatUnixDateToHumanStringDD)(t)}if(e===l.Months){if((void 0===i||(0,s.formatUnixDateToHumanStringYYYY)(t)!==(0,s.formatUnixDateToHumanStringYYYY)(i))&&a)return(0,s.formatUnixDateToHumanStringYYYY)(t);return void 0===r||(0,s.formatUnixDateToHumanStringYYYY)(i)!==(0,s.formatUnixDateToHumanStringYYYY)(r)||(0,s.formatUnixDateToHumanStringMMM)(t)!==(0,s.formatUnixDateToHumanStringMMM)(i)?(0,s.formatUnixDateToHumanStringMMM)(t):(0,s.formatUnixDateToHumanStringDD)(t)}return(0,o.formatNumber)(t,n.ENumericFormat.Date_DDMMYYYY,0)}}t.SmartDateLabelProvider=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PieLabelProvider=void 0;const r=i(77),n=i(41),s=i(21),o=i(78),a=i(270);class l extends a.LabelProvider{constructor(e){var t,i;super(Object.assign({labelFormat:null!==(t=null==e?void 0:e.labelFormat)&&void 0!==t?t:n.ENumericFormat.Decimal,labelPrecision:null!==(i=null==e?void 0:e.labelPrecision)&&void 0!==i?i:2},e)),this.type=r.ELabelProviderType.Pie,this.formatLabelProperty=e=>this.applyFormat((0,s.formatNumber)(e,this.numericFormat,this.precision))+(this.parentSurface.valueMode===o.EPieValueMode.Percentage?" %":"")}getSegmentText(e,t){const i=this.parentSurface.valueMode===o.EPieValueMode.Percentage?e.getPercentage(t):e.value;return this.formatLabel(i)}attachedToSurface(e){this.parentSurface=e}onBeginAxisDraw(){}invalidateParent(){this.parentSurface&&this.parentSurface.invalidateElement&&this.parentSurface.invalidateElement()}}t.PieLabelProvider=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChart3DSurface=t.sciChartConfig3D=void 0;const r=i(4),n=i(6),s=i(13),o=i(0),a=i(69),l=i(110),h=i(187),u=i(279),d=i(278),c=i(273),p=i(280),g=i(281),f=i(282),y=i(283),v=i(284),m=i(53);t.sciChartConfig3D={};class S extends r.SciChartSurfaceBase{constructor(e,t){var i,r,o,d;super(e,null==t?void 0:t.canvases),this.animationList=[],this.isAxisCubeRenderedProperty=!1;const c=null!==(r=null===(i=this.domCanvas2D)||void 0===i?void 0:i.width)&&void 0!==r?r:s.DEFAULT_WIDTH,p=null!==(d=null===(o=this.domCanvas2D)||void 0===o?void 0:o.height)&&void 0!==d?d:s.DEFAULT_HEIGHT;if(this.webAssemblyContext3D=e,!s.IS_TEST_ENV){const t=c/n.DpiHelper.PIXEL_RATIO,i=p/n.DpiHelper.PIXEL_RATIO;this.isCopyCanvasSurface?this.changeMasterCanvasViewportSize(e,t,i):this.changeWebGLCanvasViewportSize(e,t,i)}this.invalidateElement=this.invalidateElement.bind(this),this.sciChart3DRenderer=new v.SciChart3DRenderer(this,e),this.viewportManager=new g.DefaultViewportManager3D,this.worldDimensionsProperty=(null==t?void 0:t.worldDimensions)||new h.Vector3(300,200,300),this.detachSeries=this.detachSeries.bind(this),this.attachSeries=this.attachSeries.bind(this),this.renderableSeries=new a.ObservableArray,this.renderableSeries.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(e=>this.detachSeries(e)),null===(i=e.getNewItems())||void 0===i||i.forEach(e=>this.attachSeries(e))}),this.childPropertyChanged=this.childPropertyChanged.bind(this),this.camera=(null==t?void 0:t.camera)||new l.CameraController(this.webAssemblyContext3D),this.sceneWorldProperty=new this.webAssemblyContext3D.SCRTSceneWorld,this.sceneWorldProperty.Init(),this.rootEntity=new y.RootSceneEntity(e,this),this.axisCubeEntity=new u.AxisCubeEntity(e,this),this.rootEntity.children.add(this.axisCubeEntity),this.gizmoEntity=new f.GizmoEntity(e),this.gizmoEntity.enableGizmo=!0,this.rootEntity.children.add(this.gizmoEntity),s.IS_TEST_ENV||(this.watermarkProperties=new e.SCRTWaterMarkProperties,this.watermarkPropertyPosition=new e.TSRVector2(0,0),this.watermarkProperties.SetPosition(this.watermarkPropertyPosition),this.watermarkProperties.SetOpacity(.5),e.SCRT3DSetWaterMarkProperties(this.watermarkProperties))}static createSingle(e,t){return(0,p.createSingle3dInternal)(e,t)}static configure(e){var i,r;t.sciChartConfig3D.dataUrl=null!==(i=null==e?void 0:e.dataUrl)&&void 0!==i?i:void 0,t.sciChartConfig3D.wasmUrl=null!==(r=null==e?void 0:e.wasmUrl)&&void 0!==r?r:void 0}static useWasmFromCDN(){t.sciChartConfig3D.dataUrl=`https://cdn.jsdelivr.net/npm/scichart@${m.libraryVersion}/_wasm/scichart3d.data`,t.sciChartConfig3D.wasmUrl=`https://cdn.jsdelivr.net/npm/scichart@${m.libraryVersion}/_wasm/scichart3d.wasm`}static create(e,t){return(0,c.createMultichart3d)(e,t)}getSceneWorld(){return this.sceneWorldProperty}delete(){super.delete(),this.renderableSeries.asArray().forEach(e=>e.delete()),this.renderableSeries.clear(),this.xAxis=(0,o.deleteSafe)(this.xAxis),this.yAxis=(0,o.deleteSafe)(this.yAxis),this.zAxis=(0,o.deleteSafe)(this.zAxis),this.rootEntity=(0,o.deleteSafe)(this.rootEntity),this.watermarkProperties=(0,o.deleteSafe)(this.watermarkProperties),this.watermarkPropertyPosition=(0,o.deleteSafe)(this.watermarkPropertyPosition),this.sceneWorldProperty=(0,o.deleteSafe)(this.sceneWorldProperty),s.IS_TEST_ENV||this.webAssemblyContext3D.SCRTSetActiveWorld(null)}get enableGizmo(){return this.gizmoEntity.enableGizmo}set enableGizmo(e){this.gizmoEntity.enableGizmo=e}get viewportManager(){return this.viewportManagerProperty}set viewportManager(e){var t,i;null===(t=this.viewportManagerProperty)||void 0===t||t.detachSciChartSurface(),this.viewportManagerProperty=e,null===(i=this.viewportManagerProperty)||void 0===i||i.attachSciChartSurface(this),this.notifyPropertyChanged(d.PROPERTY.SURFACE_VIEWPORT_MANAGER)}get worldDimensions(){return this.worldDimensionsProperty}set worldDimensions(e){this.worldDimensionsProperty=e,this.notifyPropertyChanged(d.PROPERTY.SURFACE_WORLD_DIMENSIONS)}get camera(){return this.cameraProperty}set camera(e){var t,i;null===(t=this.cameraProperty)||void 0===t||t.propertyChanged.unsubscribe(this.childPropertyChanged),this.cameraProperty=e,null===(i=this.cameraProperty)||void 0===i||i.propertyChanged.subscribe(this.childPropertyChanged),this.notifyPropertyChanged(d.PROPERTY.SURFACE_CAMERA)}get xAxis(){return this.xAxisProperty}set xAxis(e){this.detachAxis(this.xAxisProperty),this.xAxisProperty=e,this.attachAxis(this.xAxisProperty),this.notifyPropertyChanged(d.PROPERTY.SURFACE_XAXIS)}get yAxis(){return this.yAxisProperty}set yAxis(e){this.detachAxis(this.yAxisProperty),this.yAxisProperty=e,this.attachAxis(this.yAxisProperty),this.notifyPropertyChanged(d.PROPERTY.SURFACE_YAXIS)}get zAxis(){return this.zAxisProperty}set zAxis(e){this.detachAxis(this.zAxisProperty),this.zAxisProperty=e,this.attachAxis(this.zAxisProperty),this.notifyPropertyChanged(d.PROPERTY.SURFACE_ZAXIS)}setIsAxisCubeRendered(){this.isAxisCubeRenderedProperty=!0}get isAxisCubeRendered(){return this.isAxisCubeRenderedProperty}invalidateElement(){if(this.isSuspended)return;const e=this.domCanvas2D?this.domCanvas2D.id:"undefinedCanvasId";this.webAssemblyContext3D.TSRRequestCanvasDraw(e)}onDpiChanged(e){var t,i;this.renderableSeries.asArray().forEach(t=>t.onDpiChanged(e)),this.changeViewportSize(null===(t=this.getMainCanvas())||void 0===t?void 0:t.clientWidth,null===(i=this.getMainCanvas())||void 0===i?void 0:i.clientHeight),super.onDpiChanged(e)}get surfaceType(){return r.ESurfaceType.SciChart3DSurfaceType}onSciChartRendered(){}doDrawingLoop(){this.sciChart3DRenderer.render()}applyTheme(e){var t,i,r;super.applyTheme(e),this.renderableSeries.asArray().forEach(t=>t.applyTheme(e)),null===(t=this.xAxis)||void 0===t||t.applyTheme(e),null===(i=this.yAxis)||void 0===i||i.applyTheme(e),null===(r=this.zAxis)||void 0===r||r.applyTheme(e),this.invalidateElement()}changeViewportSize(e,t){e&&t&&(this.isCopyCanvasSurface?(this.changeMasterCanvasViewportSize(this.webAssemblyContext3D,e,t),this.domCanvas2D&&n.DpiHelper.setSize(this.domCanvas2D,e,t)):this.changeWebGLCanvasViewportSize(this.webAssemblyContext3D,e,t),this.invalidateElement())}getAnimations(){return this.animationList}addAnimation(...e){void 0!==e&&(e.forEach(e=>this.animationList.push(e)),this.invalidateElement())}get isRunningAnimation(){return this.animationList.some(e=>!e.isComplete)}onAnimate(e){if(e){const t=[];for(let i=0;i<this.animationList.length;i++){const r=this.animationList[i];r.isComplete||(r.update(e),r.isComplete||(this.invalidateElement(),t.push(r)))}this.animationList=t}}updateWatermark(e,t){var i;if(!s.IS_TEST_ENV){this.watermarkPropertyPosition.x=e,this.watermarkPropertyPosition.y=t,this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);const r=null===(i=this.themeProvider)||void 0===i?void 0:i.isLightBackground;this.watermarkProperties.m_bIsDarkBackground=void 0!==r&&!r,this.webAssemblyContext3D.SCRT3DSetWaterMarkProperties(this.watermarkProperties)}}attachChartModifier(e){super.attachChartModifier(e),e.setParentSurface(this),e.invalidateParentCallback=this.invalidateElement,e.onAttach(),this.invalidateElement()}applySciChartBackground(e,t=!0){this.backgroundProperty=e,this.domChartRoot&&(this.domChartRoot.style.background=e),this.webAssemblyContext3D.SCRT3DSetClearColor(0,0,0,0)}detachSeries(e){this.rootEntity.children.remove(e.sceneEntity),e.onDetach(),this.invalidateElement()}attachSeries(e){if(e.onAttach(this),!e.sceneEntity)throw new Error("IRenderableSeries3D.sceneEntity must be set before attaching to SciChart3DSurface");this.rootEntity.children.add(e.sceneEntity),this.invalidateElement()}detachAxis(e){e&&(e.invalidateParentCallback=void 0,e.parentSurface=void 0)}attachAxis(e){if(e){if(e.invalidateParentCallback)throw new Error("Invalid operation in sciChart3DSurface.attachAxis, this axis has already been attached to a SciChart3DSurface. Please detach it from a SciChart3DSurface before attaching to another");e.onAttach(this,e===this.xAxis,e===this.yAxis,e===this.zAxis),this.themeProviderProperty&&e.applyTheme(this.themeProviderProperty),e.invalidateParentCallback=this.invalidateElement}}childPropertyChanged(e){this.invalidateElement()}}t.SciChart3DSurface=S},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseSceneEntity3D=void 0;const r=i(0),n=i(69),s=i(79),o=i(22);t.BaseSceneEntity3D=class{constructor(e){this.id=(0,o.generateGuid)(),this.isVisible=!0,this.webAssemblyContext=e,this.entityId=11111,this.detachChild=this.detachChild.bind(this),this.attachChild=this.attachChild.bind(this),this.children=new n.ObservableArray,this.children.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(this.detachChild),null===(i=e.getNewItems())||void 0===i||i.forEach(this.attachChild)}),this.onDpiChanged=this.onDpiChanged.bind(this)}getRoot(){if(this.type===s.ESceneEntityType.RootSceneEntity)return this;let e=this.parent;for(;void 0!==e;){if(e.type===s.ESceneEntityType.RootSceneEntity)return e;e=e.parent}}delete(){this.children.asArray().forEach(e=>e.delete()),this.nativeEntity&&this.world.RemoveEntity(this.nativeEntity),this.nativeEntityProperty=(0,r.deleteSafe)(this.nativeEntityProperty)}Update(e){if(this.currentRenderPassData){if(!this.nativeEntity)throw new Error("BaseSceneEntity.nativeSceneEntity must be set by calling setEntity() in the constructor");this.isVisible&&this.nativeEntity.Update(e)}}Render(){if(this.currentRenderPassData){if(!this.nativeEntity)throw new Error("BaseSceneEntity.nativeSceneEntity must be set by calling setEntity() in the constructor");this.isVisible&&this.nativeEntity.Render()}}onEngineRestart(){}onDpiChanged(e){}get entityId(){return this.entityIdProperty}set entityId(e){this.entityIdProperty=e}setRenderPassData(e){this.currentRenderPassData=e}getEntity(e){for(let t=0;t<this.children.size();t++){const i=this.children.get(t);if(i.type===e)return i}}invalidateScene(){var e,t;null===(t=null===(e=this.rootSceneEntity)||void 0===e?void 0:e.parentSurface)||void 0===t||t.invalidateElement()}onAttached(){this.parent.type,s.ESceneEntityType.SCRTSceneEntity}onDetached(){}visitEntities(e){e(this),this.children.asArray().forEach(t=>{t.visitEntities(e)})}get nativeEntity(){return this.nativeEntityProperty}attachChild(e){var t;null===(t=this.nativeEntity)||void 0===t||t.AddChildEntityInternal(e.nativeEntity),e.parent=this,e.onAttached()}detachChild(e){var t;null===(t=this.nativeEntity)||void 0===t||t.RemoveChildEntityInternal(e.nativeEntity),e.onDetached(),e.parent=void 0}setNativeEntity(e){this.nativeEntityProperty=e}get world(){return this.getRoot().parentSurface.getSceneWorld()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomAlignedInnerAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(144);class o extends s.BaseCenteredAxisLayoutStrategy{constructor(e){super(e),this.type=r.ELayoutStrategyType.BottomInner,this.layoutAxisPartsStrategy=n.layoutAxisPartsTopStrategy}measureAxes(e,t,i){this.sciChartSurface=e;let r=0;i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),r+=(0,n.getHorizontalAxisRequiredSize)(e.axisLayoutState)}),t.bottomInnerAreaSize=Math.max(t.bottomInnerAreaSize,r)}layoutAxes(e,t,i,r,s){if(s.forEach(e=>{e.axisLength=void 0,e.offset=0}),0===s.length)return;let o=r;if(void 0!==this.axisPosition){const e=this.sciChartSurface.getYAxisById(this.orthogonalAxisId)||this.sciChartSurface.getXAxisById(this.orthogonalAxisId);if(!e||e.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of vertical axis on the surface!");const t=e.getCurrentCoordinateCalculator();o=(0,n.getCoordinateWithCoordinateMode)(this.axisPosition,t,this.coordinateMode)+e.viewRect.top}this.layoutAxesFromBottomToTop(e,t,i,o,s)}}t.BottomAlignedInnerAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EInnerAxisPlacementCoordinateMode=void 0,function(e){e[e.DataValue=0]="DataValue",e[e.Pixel=1]="Pixel",e[e.Relative=2]="Relative"}(t.EInnerAxisPlacementCoordinateMode||(t.EInnerAxisPlacementCoordinateMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCenteredAxisLayoutStrategy=void 0;const r=i(48),n=i(59),s=i(294),o=i(143);class a extends n.BaseAxisLayoutStrategy{constructor(e){var t,i,n;super(),this.orthogonalAxisIdProperty=r.AxisBase2D.DEFAULT_AXIS_ID,this.coordinateModeProperty=o.EInnerAxisPlacementCoordinateMode.DataValue,this.orthogonalAxisIdProperty=null!==(t=null==e?void 0:e.orthogonalAxisId)&&void 0!==t?t:this.orthogonalAxisIdProperty,this.coordinateModeProperty=null!==(i=null==e?void 0:e.coordinateMode)&&void 0!==i?i:this.coordinateModeProperty,this.axisPositionProperty=null!==(n=null==e?void 0:e.axisPosition)&&void 0!==n?n:this.axisPositionProperty}get orthogonalAxisId(){return this.orthogonalAxisIdProperty}set orthogonalAxisId(e){this.orthogonalAxisIdProperty=e,this.notifyPropertyChanged(s.PROPERTY.VERTICAL_AXIS_ID)}get coordinateMode(){return this.coordinateModeProperty}set coordinateMode(e){this.coordinateModeProperty=e,this.notifyPropertyChanged(s.PROPERTY.COORDINATE_MODE)}get axisPosition(){return this.axisPositionProperty}set axisPosition(e){this.axisPositionProperty=e,this.notifyPropertyChanged(s.PROPERTY.AXIS_POSITION_COORDINATE)}toJSON(){const e={axisPosition:this.axisPosition,coordinateMode:this.coordinateMode,orthogonalAxisId:this.orthogonalAxisId};return{type:this.type,options:e}}notifyPropertyChanged(e){var t;(null===(t=this.sciChartSurface)||void 0===t?void 0:t.invalidateElement)&&this.sciChartSurface.invalidateElement()}}t.BaseCenteredAxisLayoutStrategy=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LeftAlignedInnerAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(144);class o extends s.BaseCenteredAxisLayoutStrategy{constructor(e){super(e),this.type=r.ELayoutStrategyType.LeftInner,this.layoutAxisPartsStrategy=n.layoutAxisPartsRightStrategy}measureAxes(e,t,i){this.sciChartSurface=e;let r=0;i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),r+=(0,n.getVerticalAxisRequiredSize)(e.axisLayoutState)}),t.leftInnerAreaSize=Math.max(t.leftInnerAreaSize,r)}layoutAxes(e,t,i,r,s){if(s.forEach(e=>{e.axisLength=void 0,e.offset=0}),0===s.length)return;let o=e;if(void 0!==this.axisPosition){const e=this.sciChartSurface.getXAxisById(this.orthogonalAxisId)||this.sciChartSurface.getYAxisById(this.orthogonalAxisId);if(!e||!e.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of horizontal axis on the surface!");const t=e.getCurrentCoordinateCalculator();o=(0,n.getCoordinateWithCoordinateMode)(this.axisPosition,t,this.coordinateMode)+e.parentSurface.seriesViewRect.left}this.layoutAxesFromLeftToRight(o,t,i,r,s)}}t.LeftAlignedInnerAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RightAlignedInnerAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(144);class o extends s.BaseCenteredAxisLayoutStrategy{constructor(e){super(e),this.type=r.ELayoutStrategyType.RightInner,this.layoutAxisPartsStrategy=n.layoutAxisPartsLeftStrategy}measureAxes(e,t,i){this.sciChartSurface=e;let r=0;i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),r+=(0,n.getVerticalAxisRequiredSize)(e.axisLayoutState)}),t.rightInnerAreaSize=Math.max(t.rightInnerAreaSize,r)}layoutAxes(e,t,i,r,s){if(s.forEach(e=>{e.axisLength=void 0,e.offset=0}),0===s.length)return;let o=i;if(void 0!==this.axisPosition){const e=this.sciChartSurface.getXAxisById(this.orthogonalAxisId)||this.sciChartSurface.getYAxisById(this.orthogonalAxisId);if(!e||!e.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of horizontal axis on the surface!");const t=e.getCurrentCoordinateCalculator();o=(0,n.getCoordinateWithCoordinateMode)(this.axisPosition,t,this.coordinateMode)+e.parentSurface.seriesViewRect.left}this.layoutAxesFromRightToLeft(e,t,o,r,s)}}t.RightAlignedInnerAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TopAlignedInnerAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(144);class o extends s.BaseCenteredAxisLayoutStrategy{constructor(e){super(e),this.type=r.ELayoutStrategyType.TopInner,this.layoutAxisPartsStrategy=n.layoutAxisPartsBottomStrategy}measureAxes(e,t,i){this.sciChartSurface=e;let r=0;i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),r+=(0,n.getHorizontalAxisRequiredSize)(e.axisLayoutState)}),t.topInnerAreaSize=Math.max(t.topInnerAreaSize,r)}layoutAxes(e,t,i,r,s){if(s.forEach(e=>{e.axisLength=void 0,e.offset=0}),0===s.length)return;let o=t;if(void 0!==this.axisPosition){const e=this.sciChartSurface.getYAxisById(this.orthogonalAxisId)||this.sciChartSurface.getXAxisById(this.orthogonalAxisId);if(!e||e.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of vertical axis on the surface!");const t=e.getCurrentCoordinateCalculator();o=(0,n.getCoordinateWithCoordinateMode)(this.axisPosition,t,this.coordinateMode)+e.viewRect.top}this.layoutAxesFromTopToBottom(e,o,i,r,s)}}t.TopAlignedInnerAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyPointSeriesWrapped=void 0;const r=i(94);class n extends r.BasePointSeriesWrapped{constructor(e){super(e)}}t.XyPointSeriesWrapped=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnSeriesDataLabelProvider=t.EColumnDataLabelPosition=void 0;const r=i(5),n=i(44),s=i(47),o=i(83);var a;!function(e){e.Outside="Outside",e.Inside="Inside",e.Position="Position"}(a=t.EColumnDataLabelPosition||(t.EColumnDataLabelPosition={}));class l extends o.DataLabelProvider{constructor(e){var t;super(Object.assign({horizontalTextPosition:s.EHorizontalTextPosition.Center,verticalTextPosition:s.EVerticalTextPosition.Center},e)),this.type=n.EDataLabelProviderType.Column,this.positionModeProperty=a.Outside,this.positionModeProperty=null!==(t=null==e?void 0:e.positionMode)&&void 0!==t?t:this.positionMode}get positionMode(){return this.positionModeProperty}set positionMode(e){this.positionModeProperty=e,this.invalidateParent()}generateDataLabels(e,t){const i=this.parentSeries;this.yAdj=Math.ceil(i.strokeThickness/2),i.pointMarker&&(this.yAdj=Math.max(this.yAdj,Math.ceil(i.pointMarker.height/2))),super.generateDataLabels(e,t)}getPosition(e,t){var i,n,o,l,h,u,d,c,p,g,f,y,v,m,S,P,C,A,x,b,T,E,w,R;let D=e.xCoord();const L=t.m_fHeight-t.GetLineBounds(0).m_fHeight;let M=e.yCoord()-L;e.isXFlipped;const I=e.isYFlipped?-1:1;return e.isVerticalChart?(this.verticalTextPosition===s.EVerticalTextPosition.Center?M+=t.m_fHeight/2:this.verticalTextPosition===s.EVerticalTextPosition.Below?M+=t.m_fHeight+(null!==(n=null===(i=this.style.padding)||void 0===i?void 0:i.top)&&void 0!==n?n:0):M-=null!==(l=null===(o=this.style.padding)||void 0===o?void 0:o.bottom)&&void 0!==l?l:0,this.positionMode===a.Outside?(e.yVal()*I>=0?D+=this.yAdj+(null!==(u=null===(h=e.style.padding)||void 0===h?void 0:h.left)&&void 0!==u?u:1):D-=t.m_fWidth+this.yAdj+(null!==(c=null===(d=e.style.padding)||void 0===d?void 0:d.right)&&void 0!==c?c:1),new r.Point(D,M)):this.positionMode===a.Inside?(e.yVal()*I>=0?D-=t.m_fWidth+this.yAdj+(null!==(g=null===(p=e.style.padding)||void 0===p?void 0:p.right)&&void 0!==g?g:1):D+=this.yAdj+(null!==(y=null===(f=e.style.padding)||void 0===f?void 0:f.left)&&void 0!==y?y:1),new r.Point(D,M)):super.getPosition(e,t)):(this.horizontalTextPosition===s.EHorizontalTextPosition.Center?D-=t.m_fWidth/2:this.horizontalTextPosition===s.EHorizontalTextPosition.Left?D-=t.m_fWidth+(null!==(m=null===(v=this.style.padding)||void 0===v?void 0:v.right)&&void 0!==m?m:0):D+=null!==(P=null===(S=this.style.padding)||void 0===S?void 0:S.left)&&void 0!==P?P:0,this.positionMode===a.Outside?(e.yVal()*I>=0?M-=this.yAdj+(null!==(A=null===(C=e.style.padding)||void 0===C?void 0:C.bottom)&&void 0!==A?A:1):M+=t.m_fHeight+this.yAdj+(null!==(b=null===(x=e.style.padding)||void 0===x?void 0:x.top)&&void 0!==b?b:1),new r.Point(D,M)):this.positionMode===a.Inside?(e.yVal()*I>=0?M+=t.m_fHeight+this.yAdj+(null!==(E=null===(T=e.style.padding)||void 0===T?void 0:T.top)&&void 0!==E?E:1):M-=this.yAdj+(null!==(R=null===(w=e.style.padding)||void 0===w?void 0:w.bottom)&&void 0!==R?R:1),new r.Point(D,M)):super.getPosition(e,t))}toJSON(){const e=super.toJSON(),t={positionMode:this.positionMode};return Object.assign(e.options,t),e}}t.ColumnSeriesDataLabelProvider=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseDataLabelProvider=void 0;const r=i(1),n=i(47),s=i(2),o=i(26),a=i(12),l=i(6);t.BaseDataLabelProvider=class{constructor(e){this.dataLabels=[],this.styleProperty=null==e?void 0:e.style,this.colorProperty=null==e?void 0:e.color}onAttach(e,t){r.Guard.notNull(e,"webAssemblyContext"),r.Guard.notNull(t,"parentSeries"),this.webAssemblyContext=e,this.parentSeries=t}get style(){return this.styleProperty}set style(e){this.styleProperty=e,this.invalidateParent()}get color(){var e,t,i;return this.colorProperty?(0,o.stripAutoColor)(this.colorProperty):null===(i=null===(t=null===(e=this.parentSeries)||void 0===e?void 0:e.parentSurface)||void 0===t?void 0:t.themeProvider)||void 0===i?void 0:i.tickTextBrush}set color(e){this.colorProperty=e,this.invalidateParent()}updateStyle(e){this.styleProperty=Object.assign(Object.assign({},this.styleProperty),e),this.invalidateParent()}generateDataLabels(e,t){}draw(e){var t,i,r;if(!this.dataLabels||0===this.dataLabels.length)return;if(!this.style||!this.style.fontFamily||!this.style.fontSize)return;const o=(0,s.parseColorToUIntArgb)(this.color),h=l.DpiHelper.adjustTextStyle(this.style),u=e.getFont(h),d=(0,a.getVector4)(this.webAssemblyContext,0,0,0,0),c=(0,n.convertMultiLineAlignment)(this.style.multiLineAlignment,this.webAssemblyContext);for(const e of this.dataLabels)u.DrawStringAdvanced(null!==(t=e.text)&&void 0!==t?t:"",null!==(i=e.color)&&void 0!==i?i:o,Math.round(e.position.x+this.parentSeries.parentSurface.seriesViewRect.left),Math.round(e.position.y+this.parentSeries.parentSurface.seriesViewRect.top),d,c,null!==(r=this.style.lineSpacing)&&void 0!==r?r:2)}resolveAutoColors(e,t,i){if(this.colorProperty&&this.colorProperty.startsWith(o.AUTO_COLOR)){const r=i.getStrokeColor(e,t,this.webAssemblyContext);this.color=o.AUTO_COLOR+r}}toJSON(){return{type:this.type,options:{style:this.style,color:this.color}}}invalidateParent(){var e;(null===(e=this.parentSeries)||void 0===e?void 0:e.invalidateParentCallback)&&this.parentSeries.invalidateParentCallback()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataLabelState=void 0;const r=i(3),n=i(2),s=i(6);t.DataLabelState=class{constructor(e,t,i,o,a,l){var h,u,d,c,p,g,f,y,v;this.dataLabels=[],this.indexProperty=0,this.xCoordCache=void 0,this.yCoordCache=void 0;const m=t.pointSeries,S=t.xCoordinateCalculator.isCategoryCoordinateCalculator;if(this.style=s.DpiHelper.adjustTextStyle(i),this.color=(0,n.parseColorToUIntArgb)(o),this.xValues=S?m.indexes:m.xValues,this.yValues=a,this.parentSeries=l,this.renderPassData=t,this.yFinalValues=null===(h=this.parentSeries.dataSeries)||void 0===h?void 0:h.yFinalAnimationValues,this.isXFlipped=(t.isVerticalChart?this.renderPassData.yCoordinateCalculator:this.renderPassData.xCoordinateCalculator).hasFlippedCoordinates,this.isYFlipped=(t.isVerticalChart?this.renderPassData.xCoordinateCalculator:this.renderPassData.yCoordinateCalculator).hasFlippedCoordinates,t.indexRange)this.indexStart=0,this.pointCount=this.xValues.size(),this.indexEnd=this.pointCount-1,this.pointGap=Math.abs(this.xCoord(this.indexStart)-this.xCoord(this.indexEnd))/this.pointCount;else{const e=this.parentSeries.dataSeries.getIndicesRange(new r.NumberRange(t.xCoordinateCalculator.visibleMin,t.xCoordinateCalculator.visibleMax),S);this.indexStart=e.min,this.indexEnd=e.max,this.pointCount=e.diff,this.pointCount>1?this.pointGap=Math.abs(this.xCoord(this.indexStart)-this.xCoord(this.indexEnd))/this.pointCount:this.pointGap=1/0}this.index=this.indexStart,this.font=e.getFont(this.style),this.xPadding=(null!==(d=null===(u=this.style.padding)||void 0===u?void 0:u.left)&&void 0!==d?d:0)+(null!==(p=null===(c=this.style.padding)||void 0===c?void 0:c.right)&&void 0!==p?p:0),this.yPadding=(null!==(f=null===(g=this.style.padding)||void 0===g?void 0:g.top)&&void 0!==f?f:0)+(null!==(v=null===(y=this.style.padding)||void 0===y?void 0:y.bottom)&&void 0!==v?v:0)}get index(){return this.indexProperty}set index(e){this.xCoordCache=void 0,this.yCoordCache=void 0,this.indexProperty=e}xVal(e){let t=null!=e?e:this.indexProperty;return this.isXFlipped||(t=this.indexEnd-(t-this.indexStart)),this.xValues.get(t)}yVal(e){let t=null!=e?e:this.indexProperty;return this.isXFlipped||(t=this.indexEnd-(t-this.indexStart)),this.yValues.get(t)}yValAfterAnimation(e){if(!this.yFinalValues)return this.yVal(e);let t=null!=e?e:this.indexProperty;return this.isXFlipped||(t=this.indexEnd-(t-this.indexStart)),this.yFinalValues.get(t)}xCoord(e){return this.renderPassData.isVerticalChart?this.yCoordInternal(e):this.xCoordInternal(e)}yCoord(e){return this.renderPassData.isVerticalChart?this.xCoordInternal(e):this.yCoordInternal(e)}hasNext(e){const t=null!=e?e:this.indexProperty;return this.isXFlipped?t<this.indexEnd:t>0}get lastLabel(){return this.dataLabels.length>0?this.dataLabels[this.dataLabels.length-1]:void 0}getMetaData(){const e=this.renderPassData.pointSeries.indexes.get(this.index);return this.parentSeries.dataSeries.getMetadataAt(e)}get isVerticalChart(){return this.renderPassData.isVerticalChart}xCoordInternal(e){return void 0!==e?this.renderPassData.xCoordinateCalculator.getCoordinate(this.xVal(e)):(void 0!==this.xCoordCache||(this.xCoordCache=this.renderPassData.xCoordinateCalculator.getCoordinate(this.xVal())),this.xCoordCache)}yCoordInternal(e){return void 0!==e?this.renderPassData.yCoordinateCalculator.getCoordinate(this.yVal(e)):(void 0!==this.yCoordCache||(this.yCoordCache=this.renderPassData.yCoordinateCalculator.getCoordinate(this.yVal())),this.yCoordCache)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogarithmicTickProvider=t.ELogarithmicMajorTickMode=t.ELogarithmicMinorTickMode=void 0;const r=i(1),n=i(3),s=i(51),o=i(261);var a,l;!function(e){e.Linear="Linear",e.Logarithmic="Logarithmic",e.Auto="Auto"}(a=t.ELogarithmicMinorTickMode||(t.ELogarithmicMinorTickMode={})),function(e){e.EqualSpacing="EqualSpacing",e.RoundNumbers="RoundNumbers"}(l=t.ELogarithmicMajorTickMode||(t.ELogarithmicMajorTickMode={}));class h extends o.TickProvider{constructor(e){super(),this.logarithmicBase=10,this.majorTickModeProperty=l.EqualSpacing,this.minorTickModeProperty=a.Linear,this.wasmContext=e}get majorTickMode(){return this.majorTickModeProperty}set majorTickMode(e){var t;this.majorTickModeProperty=e,(null===(t=this.parentAxis)||void 0===t?void 0:t.invalidateParentCallback)&&this.parentAxis.invalidateParentCallback()}get minorTickMode(){return this.minorTickModeProperty}set minorTickMode(e){var t;this.minorTickModeProperty=e,(null===(t=this.parentAxis)||void 0===t?void 0:t.invalidateParentCallback)&&this.parentAxis.invalidateParentCallback()}getMajorTicks(e,t,i){const r=new n.NumberRange(e,t),s=this.parentAxis;let o=1;if((null==s?void 0:s.isNegative)&&i.min<0&&(o=-1,i=new n.NumberRange(Math.abs(i.max),Math.abs(i.min))),!this.isParamsValid(i,r))return[];if(this.majorTickMode===l.RoundNumbers)return this.getRoundNumberMajorTicks(e,t,i);{const e=[];let r=i.min;i.min;const n=i.max,s=this.wasmContext.NumberUtil;s.IsPowerOf(r,this.logarithmicBase,this.logarithmicBase)||(r=s.RoundDownPower(r,this.logarithmicBase,this.logarithmicBase));let a=s.Log(r,this.logarithmicBase);a=s.RoundToDigits(a,10),s.IsDivisibleBy(a,t)||(a=s.RoundUp(a,t));let l=a;r=Math.pow(this.logarithmicBase,l);let h=0;for(;r<=n;)s.IsDivisibleBy(l,t)&&e.push(o*r),l=a+ ++h*t,r=Math.pow(this.logarithmicBase,l);return-1===o?e.reverse():e}}getRoundNumberMajorTicks(e,t,i){const r=[];let n=i.min;const s=i.min,o=i.max,a=Math.pow(this.logarithmicBase,t),l=this.roundNum(s*(a-1));for(n=this.roundNum(n,l),r.push(n);n<=o;){const e=n*(a-1);let t=this.roundNum(n*a,e),i=t;for(;t===n;)i*=a,t=this.roundNum(i,e);n=t,r.push(n)}return r}roundNum(e,t){if(0===e)return 0;let i=Math.floor(Math.log10(e));t&&(i=Math.min(i,Math.round(Math.log10(t))));const r=this.wasmContext.NumberUtil.RoundToDigits(e/Math.pow(10,i),1),n=Math.floor(r),s=r-n;let o=NaN;return o=s<.3?0:s<.7?.5:1,(n+o)*Math.pow(10,i)}getMinorTicks(e,t,i){const r=this.parentAxis;let s=1;(null==r?void 0:r.isNegative)&&(s=-1,i=new n.NumberRange(Math.abs(i.max),Math.abs(i.min)));const o=i.min*e,l=i.min*Math.pow(this.logarithmicBase,.7*t),h=(Math.pow(this.logarithmicBase,t)-1)/e,u=this.minorTickMode===a.Logarithmic||this.minorTickMode===a.Auto&&l<o,d=[],c=this.getMajorTicks(e,t,i),p=c.length,g=Math.pow(this.logarithmicBase,t);if(p>0)for(let r=0;r<=p;r++){const o=r<p?c[r]:c[r-1]*g,a=Math.max(o/g,i.min),l=a*e;if(u){this.getMajorTicks(1,t/h,new n.NumberRange(a,o)).forEach(e=>d.push(s*e))}else{let e=a+l;for(;e<o&&l>0;)d.push(s*e),e+=l}}return d}isParamsValid(e,t){return r.Guard.notNull(e,"visibleRange"),r.Guard.notNull(t,"deltaRange"),(0,s.isRealNumber)(e.min)&&(0,s.isRealNumber)(e.max)&&(0,s.isRealNumber)(t.min)&&(0,s.isRealNumber)(t.max)}}t.LogarithmicTickProvider=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adjustTooltipPosition=t.calcTooltipSize=t.CursorModifier=void 0;const r=i(14),n=i(0),s=i(17),o=i(19),a=i(119),l=i(9),h=i(10),u=i(28),d=i(338),c=i(88),p=i(4),g=i(20),f=i(72);class y extends g.ChartModifierBase2D{constructor(e){var t,i,n,l,h,u,d,c,g,f,y,v,S,P,C,A,x,b,T,E,w,R;super(e),this.type=o.EChart2DModifierType.Cursor,this.tooltipSvgTemplate=m,this.crosshairStrokeThickness=2,this.crosshairStrokeDashArray=[],this.tooltipContainerBackground="#228B22",this.tooltipTextStroke="#fff",this.showTooltip=!1,this.axisLabelStroke="#fff",this.axisLabelFill="#228B22",this.xAxisLabelStroke=void 0,this.xAxisLabelFill=void 0,this.yAxisLabelStroke=void 0,this.yAxisLabelFill=void 0,this.tooltipLegendOffsetX=0,this.tooltipLegendOffsetY=0,this.hitTestRadius=0,this.mousePosition=a.EMousePosition.OutOfCanvas,this.crosshairStrokeProperty=p.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,this.includedSeriesMap=new Map,this.showXLineProperty=!0,this.showYLineProperty=!0,this.showAxisLabelsProperty=!0,(null==e?void 0:e.tooltipSvgTemplate)&&"string"==typeof e.tooltipSvgTemplate&&(this.typeMap.set("tooltipSvgTemplate",e.tooltipSvgTemplate),e.tooltipSvgTemplate=(0,r.getFunction)(s.EBaseType.OptionFunction,e.tooltipSvgTemplate)),this.tooltipSvgTemplate=null!==(t=null==e?void 0:e.tooltipSvgTemplate)&&void 0!==t?t:this.tooltipSvgTemplate,this.crosshairStrokeThickness=null!==(i=null==e?void 0:e.crosshairStrokeThickness)&&void 0!==i?i:this.crosshairStrokeThickness,this.crosshairStrokeDashArray=null!==(n=null==e?void 0:e.crosshairStrokeDashArray)&&void 0!==n?n:this.crosshairStrokeDashArray,this.crosshairStroke=null!==(l=null==e?void 0:e.crosshairStroke)&&void 0!==l?l:this.crosshairStroke,this.tooltipContainerBackground=null!==(h=null==e?void 0:e.tooltipContainerBackground)&&void 0!==h?h:this.tooltipContainerBackground,this.tooltipTextStroke=null!==(u=null==e?void 0:e.tooltipTextStroke)&&void 0!==u?u:this.tooltipTextStroke,this.showTooltip=null!==(d=null==e?void 0:e.showTooltip)&&void 0!==d?d:this.showTooltip,this.showAxisLabels=null!==(c=null==e?void 0:e.showAxisLabels)&&void 0!==c?c:this.showAxisLabels,this.axisLabelFill=null!==(g=null==e?void 0:e.axisLabelFill)&&void 0!==g?g:this.axisLabelFill,this.axisLabelStroke=null!==(f=null==e?void 0:e.axisLabelStroke)&&void 0!==f?f:this.axisLabelStroke,this.xAxisLabelStroke=null!==(y=null==e?void 0:e.xAxisLabelStroke)&&void 0!==y?y:this.xAxisLabelStroke,this.xAxisLabelFill=null!==(v=null==e?void 0:e.xAxisLabelFill)&&void 0!==v?v:this.xAxisLabelFill,this.yAxisLabelStroke=null!==(S=null==e?void 0:e.yAxisLabelStroke)&&void 0!==S?S:this.yAxisLabelStroke,this.yAxisLabelFill=null!==(P=null==e?void 0:e.yAxisLabelFill)&&void 0!==P?P:this.yAxisLabelFill,this.placementDivIdProperty=null!==(C=null==e?void 0:e.placementDivId)&&void 0!==C?C:this.placementDivIdProperty,(null==e?void 0:e.tooltipLegendTemplate)&&"string"==typeof e.tooltipLegendTemplate&&(this.typeMap.set("tooltipLegendTemplate",e.tooltipLegendTemplate),e.tooltipLegendTemplate=(0,r.getFunction)(s.EBaseType.OptionFunction,e.tooltipLegendTemplate)),this.tooltipLegendTemplate=null!==(A=null==e?void 0:e.tooltipLegendTemplate)&&void 0!==A?A:this.tooltipLegendTemplate,this.tooltipLegendOffsetX=null!==(x=null==e?void 0:e.tooltipLegendOffsetX)&&void 0!==x?x:this.tooltipLegendOffsetX,this.tooltipLegendOffsetY=null!==(b=null==e?void 0:e.tooltipLegendOffsetY)&&void 0!==b?b:this.tooltipLegendOffsetY,(null==e?void 0:e.tooltipDataTemplate)&&"string"==typeof e.tooltipDataTemplate&&(this.typeMap.set("tooltipDataTemplate",e.tooltipDataTemplate),e.tooltipDataTemplate=(0,r.getFunction)(s.EBaseType.OptionFunction,e.tooltipDataTemplate)),this.tooltipDataTemplateProperty=null!==(T=null==e?void 0:e.tooltipDataTemplate)&&void 0!==T?T:this.tooltipDataTemplateProperty,this.showXLine=null!==(E=null==e?void 0:e.showXLine)&&void 0!==E?E:this.showXLine,this.showYLine=null!==(w=null==e?void 0:e.showYLine)&&void 0!==w?w:this.showYLine,this.hitTestRadius=null!==(R=null==e?void 0:e.hitTestRadius)&&void 0!==R?R:this.hitTestRadius}applyTheme(e){this.testPropertyChanged(f.PROPERTY.CROSSHAIR_STROKE)||(this.crosshairStroke=e.cursorLineBrush)}onAttach(){var e;super.onAttach();const t=this.xAxisLabelFill?this.xAxisLabelFill:this.axisLabelFill,i=this.yAxisLabelFill?this.yAxisLabelFill:this.axisLabelFill,r=this.xAxisLabelStroke?this.xAxisLabelStroke:this.axisLabelStroke,n=this.yAxisLabelStroke?this.yAxisLabelStroke:this.axisLabelStroke;this.showXLine&&(this.xLineAnnotation=this.newLineAnnotation(t,r),this.parentSurface.modifierAnnotations.add(this.xLineAnnotation)),this.showYLine&&(this.yLineAnnotation=this.newLineAnnotation(i,n),this.parentSurface.modifierAnnotations.add(this.yLineAnnotation)),this.tooltipAnnotation=new d.CursorTooltipSvgAnnotation({cursorModifier:this,xCoordinateMode:u.ECoordinateMode.Pixel,yCoordinateMode:u.ECoordinateMode.Pixel,tooltipSvgTemplate:null!==(e=this.tooltipSvgTemplate)&&void 0!==e?e:m,containerBackground:this.tooltipContainerBackground,textStroke:this.tooltipTextStroke,tooltipLegendTemplate:this.tooltipLegendTemplate,tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,xAxisId:this.xAxisId,yAxisId:this.yAxisId,placementDivId:this.placementDivId}),this.parentSurface.modifierAnnotations.add(this.tooltipAnnotation)}onDetach(){var e;super.onDetach(),this.xLineAnnotation&&(null===(e=this.xLineAnnotation)||void 0===e||e.delete(),this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation)),this.yLineAnnotation&&(this.yLineAnnotation.delete(),this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation)),this.tooltipAnnotation.delete(),this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation)}onAttachSeries(e){this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()}onDetachSeries(e){this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()}modifierMouseMove(e){let t;super.modifierMouseMove(e),this.mousePoint?(t=(0,l.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect),this.mousePosition=t?a.EMousePosition.SeriesArea:a.EMousePosition.AxisArea):this.mousePosition=a.EMousePosition.OutOfCanvas,this.update()}modifierMouseLeave(e){super.modifierMouseLeave(e),this.mousePosition=a.EMousePosition.OutOfCanvas,this.update()}modifierMouseEnter(e){super.modifierMouseEnter(e)}onParentSurfaceRendered(){this.update()}get crosshairStroke(){return this.crosshairStrokeProperty}set crosshairStroke(e){this.crosshairStrokeProperty=e,this.notifyPropertyChanged(f.PROPERTY.CROSSHAIR_STROKE)}get showXLine(){return this.showXLineProperty}set showXLine(e){if(this.showXLineProperty!==e){if(this.showXLineProperty=e,this.showXLineProperty&&!this.xLineAnnotation){const e=this.xAxisLabelFill?this.xAxisLabelFill:this.axisLabelFill,t=this.xAxisLabelStroke?this.xAxisLabelStroke:this.axisLabelStroke;this.xLineAnnotation=this.newLineAnnotation(e,t),this.parentSurface.modifierAnnotations.add(this.xLineAnnotation)}else!this.showXLineProperty&&this.xLineAnnotation&&(this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation),this.xLineAnnotation=(0,n.deleteSafe)(this.xLineAnnotation));this.notifyPropertyChanged(f.PROPERTY.X_LINE)}}get showYLine(){return this.showYLineProperty}set showYLine(e){if(this.showYLineProperty!==e){if(this.showYLineProperty=e,this.showYLineProperty&&!this.yLineAnnotation){const e=this.yAxisLabelFill?this.yAxisLabelFill:this.axisLabelFill,t=this.yAxisLabelStroke?this.yAxisLabelStroke:this.axisLabelStroke;this.yLineAnnotation=this.newLineAnnotation(e,t),this.parentSurface.modifierAnnotations.add(this.yLineAnnotation)}else!this.showYLineProperty&&this.yLineAnnotation&&(this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation),this.yLineAnnotation=(0,n.deleteSafe)(this.yLineAnnotation));this.notifyPropertyChanged(f.PROPERTY.Y_LINE)}}get showAxisLabels(){return this.showAxisLabelsProperty}set showAxisLabels(e){this.showAxisLabelsProperty!==e&&(this.showAxisLabelsProperty=e,this.xLineAnnotation&&(this.xLineAnnotation.showLabel=this.showAxisLabelsProperty),this.yLineAnnotation&&(this.yLineAnnotation.showLabel=this.showAxisLabelsProperty),this.notifyPropertyChanged(f.PROPERTY.AXIS_LABELS))}get placementDivId(){return this.placementDivIdProperty}set placementDivId(e){this.placementDivIdProperty!==e&&(this.placementDivIdProperty=e,this.notifyPropertyChanged(f.PROPERTY.PLACEMENT_DIV_ID))}includeSeries(e,t){this.includedSeriesMap.set(e,t),this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()}getIncludedRenderableSeries(){const e=this.parentSurface.renderableSeries.asArray().filter(e=>!e.isStacked&&e.isVisible&&this.testIsIncludedSeries(e)),t=this.parentSurface.renderableSeries.asArray().filter(e=>e.isStacked),i=e;return t.forEach(e=>{e.getVisibleSeries().forEach(e=>{this.testIsIncludedSeries(e)&&i.push(e)})}),i}get tooltipDataTemplate(){return this.tooltipDataTemplateProperty}set tooltipDataTemplate(e){this.tooltipDataTemplateProperty=e,this.notifyPropertyChanged(f.PROPERTY.TOOLTIP_DATA_TEMPLATE)}hitTestRenderableSeries(e,t){if(t)return this.hitTestRadius<=0?e.hitTestProvider.hitTestXSlice(t.x,t.y):e.hitTestProvider.hitTestDataPoint(t.x,t.y,this.hitTestRadius)}getMousePosition(){return this.mousePosition}toJSON(){const e=super.toJSON(),t={axisLabelFill:this.axisLabelFill,axisLabelStroke:this.axisLabelStroke,xAxisLabelFill:this.xAxisLabelFill,xAxisLabelStroke:this.xAxisLabelStroke,yAxisLabelFill:this.yAxisLabelFill,yAxisLabelStroke:this.yAxisLabelStroke,crosshairStroke:this.crosshairStroke,crosshairStrokeDashArray:this.crosshairStrokeDashArray,crosshairStrokeThickness:this.crosshairStrokeThickness,showAxisLabels:this.showAxisLabels,showTooltip:this.showTooltip,tooltipContainerBackground:this.tooltipContainerBackground,tooltipDataTemplate:this.typeMap.get("tooltipDataTemplate"),tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,tooltipLegendTemplate:this.typeMap.get("tooltipLegendTemplate"),tooltipSvgTemplate:this.typeMap.get("tooltipSvgTemplate"),tooltipTextStroke:this.tooltipTextStroke};return Object.assign(e.options,t),e}notifyPropertyChanged(e){super.notifyPropertyChanged(e),e===f.PROPERTY.X_AXIS_ID&&(this.tooltipAnnotation.xAxisId=this.xAxisId,this.xLineAnnotation&&(this.xLineAnnotation.xAxisId=this.xAxisId),this.yLineAnnotation&&(this.yLineAnnotation.xAxisId=this.xAxisId)),e===f.PROPERTY.Y_AXIS_ID&&(this.tooltipAnnotation.yAxisId=this.yAxisId,this.xLineAnnotation&&(this.xLineAnnotation.yAxisId=this.yAxisId),this.yLineAnnotation&&(this.yLineAnnotation.yAxisId=this.yAxisId))}getSeriesInfos(){return this.getIncludedRenderableSeries().map(e=>{const t=this.hitTestRenderableSeries(e,this.mousePoint);if(t)return e.getSeriesInfo(t)}).filter(e=>void 0!==e)}update(){if(this.mousePosition!==a.EMousePosition.SeriesArea)return this.xLineAnnotation&&(this.xLineAnnotation.isHidden=!0),this.yLineAnnotation&&(this.yLineAnnotation.isHidden=!0),this.tooltipAnnotation.isHidden=!0,void(this.placementDivId&&this.tooltipAnnotation.delete());const e=(0,l.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect);if(this.xLineAnnotation&&(this.xLineAnnotation.isHidden=!1),this.yLineAnnotation&&(this.yLineAnnotation.isHidden=!1),this.showTooltip&&(this.tooltipAnnotation.isHidden=!1),e){const t=(0,l.translateToNotScaled)(e.x),i=(0,l.translateToNotScaled)(e.y);this.xLineAnnotation&&(this.xLineAnnotation.y1=0),this.yLineAnnotation&&(this.yLineAnnotation.x1=0),this.isVerticalChart()?(this.xLineAnnotation&&(this.xLineAnnotation.y2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.right),this.xLineAnnotation.x1=i,this.xLineAnnotation.x2=i),this.yLineAnnotation&&(this.yLineAnnotation.x2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom),this.yLineAnnotation.y1=t,this.yLineAnnotation.y2=t)):(this.xLineAnnotation&&(this.xLineAnnotation.y2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom),this.xLineAnnotation.x1=t,this.xLineAnnotation.x2=t),this.yLineAnnotation&&(this.yLineAnnotation.x2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.right),this.yLineAnnotation.y1=i,this.yLineAnnotation.y2=i)),this.showTooltip&&(this.tooltipAnnotation.x1=t,this.tooltipAnnotation.y1=i),(this.showTooltip||this.tooltipLegendTemplate)&&(this.tooltipAnnotation.seriesInfos=this.getSeriesInfos())}}newLineAnnotation(e,t){return new c.LineAnnotation({xCoordinateMode:u.ECoordinateMode.Pixel,yCoordinateMode:u.ECoordinateMode.Pixel,strokeThickness:this.crosshairStrokeThickness,strokeDashArray:this.crosshairStrokeDashArray,stroke:this.crosshairStroke,isHidden:!0,showLabel:this.showAxisLabels,axisLabelFill:e,axisLabelStroke:t,xAxisId:this.xAxisId,yAxisId:this.yAxisId})}testIsIncludedSeries(e){return!1!==this.includedSeriesMap.get(e)}isVerticalChart(){var e,t;const i=(null===(e=this.parentSurface)||void 0===e?void 0:e.getXAxisById(this.xAxisId))||(null===(t=this.parentSurface)||void 0===t?void 0:t.xAxes.get(0));return!!i&&i.isVerticalChart}}t.CursorModifier=y;const v=(e,t)=>{const i=[];return t&&i.push(t),e.forEach((t,r)=>{if(t.isHit)if(t.seriesName?i.push(t.seriesName):e.length>1&&i.push("Series #"+(r+1)),t.dataSeriesType===h.EDataSeriesType.Ohlc){const e=t;i.push("X: "+e.formattedXValue),i.push("Open: "+e.formattedOpenValue),i.push("Highest: "+e.formattedHighValue),i.push("Lowest: "+e.formattedLowValue),i.push("Close: "+e.formattedCloseValue)}else if(t.dataSeriesType===h.EDataSeriesType.Xyy){const e=t;i.push("X: "+e.formattedXValue),i.push("Y: "+e.formattedYValue),i.push("Y1: "+e.formattedY1Value)}else if(t.dataSeriesType===h.EDataSeriesType.HeatmapUniform){const e=t;i.push("X: "+e.formattedXValue),i.push("Y: "+e.formattedYValue),null!==e.zValue&&void 0!==e.zValue&&i.push("Z: "+e.formattedZValue)}else{const e=t;i.push(`X: ${e.formattedXValue} Y: ${e.formattedYValue}`)}}),i},m=(e,i)=>{var r;const n="id_"+Date.now(),s=(null!==(r=i.cursorModifier.tooltipDataTemplate)&&void 0!==r?r:v)(e,i.title);if(0===s.length)return"<svg></svg>";const{width:o,height:a}=(0,t.calcTooltipSize)(s);(0,t.adjustTooltipPosition)(o,a,i);let l="";s.forEach((e,t)=>{l+=`<tspan x="8" dy="1.2em">${e}</tspan>`});return`<svg class="scichart__cursor-tooltip" width="${o}" height="${a}">\n <defs>\n <filter id="${n}" x="0" y="0" width="200%" height="200%">\n <feOffset result="offOut" in="SourceAlpha" dx="3" dy="3" />\n <feGaussianBlur result="blurOut" in="offOut" stdDeviation="3" />\n <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />\n </filter>\n </defs>\n <rect rx="4" ry="4" width="95%" height="90%" fill="${i.containerBackground}" filter="url(#${n})" />\n <svg width="100%">\n <text x="8" y="3" font-size="13" font-family="Verdana" dy="0" fill="${i.textStroke}">${l}</text>\n </svg>\n </svg>`};t.calcTooltipSize=(e,t=13)=>({width:8*e.reduce((e,t)=>t.length>e?t.length:e,0)+20,height:17*e.length+16});t.adjustTooltipPosition=(e,t,i)=>{const{seriesViewRect:r}=i.parentSurface,n=i.x1,s=i.y1,o=(0,l.translateToNotScaled)(r.width)-n<e?-e:5,a=(0,l.translateToNotScaled)(r.height)-s<t?-t:5;i.xCoordShift=o,i.yCoordShift=a}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRubberBandRect=t.RubberBandXyZoomModifier=void 0;const r=i(39),n=i(0),s=i(5),o=i(15),a=i(19),l=i(29),h=i(81),u=i(9),d=i(219),c=i(20),p=i(72);class g extends c.ChartModifierBase2D{constructor(e){var t,i,n,s,o,l;super(e),this.type=a.EChart2DModifierType.RubberBandXYZoom,this.isAnimated=!0,this.animationDuration=400,this.easingFunction=r.easing.outExpo,this.isClicked=!1,this.fillProperty="#42b64933",this.strokeProperty="#42b64977",this.strokeThicknessProperty=2,this.fill=null!==(t=null==e?void 0:e.fill)&&void 0!==t?t:this.fillProperty,this.stroke=null!==(i=null==e?void 0:e.stroke)&&void 0!==i?i:this.strokeProperty,this.strokeThickness=null!==(n=null==e?void 0:e.strokeThickness)&&void 0!==n?n:this.strokeThicknessProperty,this.isAnimated=null===(s=null==e?void 0:e.isAnimated)||void 0===s||s,this.animationDuration=null!==(o=null==e?void 0:e.animationDuration)&&void 0!==o?o:400,(null==e?void 0:e.easingFunction)&&"string"==typeof e.easingFunction&&(e.easingFunction=r.easing[e.easingFunction]),this.easingFunction=null!==(l=null==e?void 0:e.easingFunction)&&void 0!==l?l:r.easing.outExpo}applyTheme(e){this.testPropertyChanged(p.PROPERTY.FILL)||(this.fill=e.rubberBandFillBrush),this.testPropertyChanged(p.PROPERTY.STROKE)||(this.stroke=e.rubberBandStrokeBrush)}onAttach(){super.onAttach(),this.rubberBandRect=new d.RubberBandSvgRect(this.parentSurface.domSvgContainer,this.fill,this.stroke,this.strokeThickness)}onDetach(){super.onDetach(),this.rubberBandRect=void 0}modifierMouseDown(e){if(super.modifierMouseDown(e),this.executeOn!==e.button)return;if(!this.isAttached)throw new Error("Should not call RubberBandXyZoomModifier.modifierMouseDown if not attached");this.parentSurface.setZoomState(h.EZoomState.UserZooming);const t=(0,u.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect);t&&(this.pointFrom=t,this.isClicked=!0)}modifierMouseMove(e){super.modifierMouseMove(e);const{seriesViewRect:t}=this.parentSurface;if(this.isClicked){this.pointTo=(0,u.translateFromCanvasToSeriesViewRect)(o.Rect.clipPointToRect(e.mousePoint,t),t);const i=this.parentSurface.getCoordSvgTranslation(),{x:r,right:n,y:s,bottom:a}=f(this.pointFrom,this.pointTo,this.xyDirection,this.parentSurface.seriesViewRect);this.rubberBandRect.isHidden=!1,this.rubberBandRect.x1=(0,u.translateToNotScaled)(r+i.x),this.rubberBandRect.x2=(0,u.translateToNotScaled)(n+i.x),this.rubberBandRect.y1=(0,u.translateToNotScaled)(s+i.y),this.rubberBandRect.y2=(0,u.translateToNotScaled)(a+i.y)}}modifierMouseUp(e){if(super.modifierMouseUp(e),this.executeOn===e.button&&this.isClicked){const{seriesViewRect:t}=this.parentSurface;this.pointTo=(0,u.translateFromCanvasToSeriesViewRect)(o.Rect.clipPointToRect(e.mousePoint,t),t);const{x:i,right:r,y:n,bottom:a}=f(this.pointFrom,this.pointTo,this.xyDirection,this.parentSurface.seriesViewRect);this.isClicked=!1,this.rubberBandRect.isHidden=!0,this.calculateDraggedDistance()>g.MIN_DRAG_SENSITIVITY&&this.performZoom(new s.Point(i,n),new s.Point(r,a))}}get strokeThickness(){return this.strokeThicknessProperty}set strokeThickness(e){this.strokeThicknessProperty=e,this.notifyPropertyChanged(p.PROPERTY.STROKE_THICKNESS)}get stroke(){return this.strokeProperty}set stroke(e){this.strokeProperty=e,this.notifyPropertyChanged(p.PROPERTY.STROKE)}get fill(){return this.fillProperty}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(p.PROPERTY.FILL)}toJSON(){const e=super.toJSON(),t={animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,fill:this.fill,isAnimated:this.isAnimated,stroke:this.stroke,strokeThickness:this.strokeThickness};return Object.assign(e.options,t),e}performZoom(e,t){const i=[l.EXyDirection.XDirection,l.EXyDirection.XyDirection].includes(this.xyDirection),r=[l.EXyDirection.YDirection,l.EXyDirection.XyDirection].includes(this.xyDirection);this.parentSurface.xAxes.asArray().forEach(n=>{(!n.isVerticalChart&&i||n.isVerticalChart&&r)&&this.performZoomOnAxis(n,n.isVerticalChart?e.y:e.x,n.isVerticalChart?t.y:t.x)}),this.parentSurface.yAxes.asArray().forEach(n=>{(!n.isVerticalChart&&r||n.isVerticalChart&&i)&&this.performZoomOnAxis(n,n.isVerticalChart?e.x:e.y,n.isVerticalChart?t.x:t.y)})}performZoomOnAxis(e,t,i){e.zoom(t,i,this.isAnimated?this.animationDuration:0,this.easingFunction)}notifyPropertyChanged(e){super.notifyPropertyChanged(e),this.updateRubberBandRect()}calculateDraggedDistance(){const e=Math.pow(this.pointFrom.x-this.pointTo.x,2),t=Math.pow(this.pointFrom.y-this.pointTo.y,2);return Math.sqrt(e+t)}updateRubberBandRect(){this.parentSurface&&(this.rubberBandRect=(0,n.deleteSafe)(this.rubberBandRect),this.rubberBandRect=new d.RubberBandSvgRect(this.parentSurface.domSvgContainer,this.fill,this.stroke,this.strokeThickness))}}function f(e,t,i,r){let n=t.x<=e.x?t.x:e.x,a=t.x<=e.x?e.x:t.x,h=t.y<=e.y?t.y:e.y,u=t.y<=e.y?e.y:t.y;return i===l.EXyDirection.XDirection&&(h=0,u=r.height),i===l.EXyDirection.YDirection&&(n=0,a=r.width),o.Rect.createWithPoints(new s.Point(n,h),new s.Point(a,u))}t.RubberBandXyZoomModifier=g,g.MIN_DRAG_SENSITIVITY=5,t.getRubberBandRect=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testHasExcluded=t.getIncludedAxis=void 0;t.getIncludedAxis=(e,i)=>0===i.size?e:(0,t.testHasExcluded)(i)?e.filter(e=>!1!==i.get(e.id)):e.filter(e=>!0===i.get(e.id));t.testHasExcluded=e=>{let t=!1;return e.forEach(e=>{!1===e&&(t=!0)}),t}},function(e,t,i){"use strict";var r,n,s;Object.defineProperty(t,"__esModule",{value:!0}),t.getTooltipPositionProperties=t.getUpdatedPoints=t.getEndPoint=t.getStartPoint=t.getTotalSpacing=t.getTotalSize=t.checkHasOverlap=t.spreadTooltips=t.EShift=t.ECoord=t.ESize=void 0,function(e){e.width="width",e.height="height"}(r=t.ESize||(t.ESize={})),function(e){e.xCoord="xCoord",e.yCoord="yCoord"}(n=t.ECoord||(t.ECoord={})),function(e){e.xCoordShift="xCoordShift",e.yCoordShift="yCoordShift"}(s=t.EShift||(t.EShift={}));t.spreadTooltips=(e,i,r,n,s)=>{const o=new Map,a=e.length,l=(0,t.getTotalSize)(e,r.sizePropertyName),h=l+(0,t.getTotalSpacing)(e,n),u=e[0],d=e[a-1];let c=(0,t.getStartPoint)(u[r.coordPropertyName],u[r.shiftPropertyName],i),p=(0,t.getEndPoint)(d[r.coordPropertyName],d[r.shiftPropertyName],i,d[r.sizePropertyName]);const g=(0,t.getUpdatedPoints)(c,p,h,s[r.sizePropertyName]);c=g.start,p=g.end;const f=(p-c-l)/(e.length-1);return e.reduce((e,t)=>(o.set(t.index,(e-t[r.coordPropertyName])/i),e+t[r.sizePropertyName]+f),c),o};t.checkHasOverlap=(e,t,i,r)=>{const n=e.length;for(let s=0;s<n-1;s++){const n=e[s],o=n[r.coordPropertyName]+n[r.sizePropertyName]+n[r.shiftPropertyName]*i,a=e[s+1];if(a[r.coordPropertyName]+a[r.shiftPropertyName]*i-o<t)return!0}return!1};t.getTotalSize=(e,t)=>e.reduce((e,i)=>{const r=i[t];return"number"==typeof r?e+r:e},0);t.getTotalSpacing=(e,t)=>(e.length-1)*t;t.getStartPoint=(e,t,i)=>e+t*i;t.getEndPoint=(e,t,i,r)=>e+t*i+r;t.getUpdatedPoints=(e,t,i,r)=>{const n=i-(t-e),s=n/2,o=r-t;let a=e-s,l=t+s;return e<s&&(a=0,l=t+(n-e)),o<s&&(a=e-(n-o),l=r),{start:a,end:l}};t.getTooltipPositionProperties=e=>e?{sizePropertyName:r.width,coordPropertyName:n.xCoord,shiftPropertyName:s.xCoordShift}:{sizePropertyName:r.height,coordPropertyName:n.yCoord,shiftPropertyName:s.yCoordShift}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildSeries=void 0;const r=i(356),n=i(115),s=i(169),o=i(198),a=i(97),l=i(200),h=i(202),u=i(203),d=i(204),c=i(357),p=i(358),g=i(359),f=i(360),y=i(224),v=i(225),m=i(149),S=i(226),P=i(83),C=i(159),A=i(158),x=i(227),b=i(228),T=i(361),E=i(364),w=i(368),R=i(116),D=i(373),L=i(377),M=i(379),I=i(382),O=i(386),k=i(387),V=i(389),_=i(391),N=i(395),F=i(396),B=i(397),H=i(398),Y=i(196),z=i(399),j=i(206),G=i(403),X=i(232),W=i(233),U=i(408),$=i(38),Z=i(17),K=i(44),J=i(101),q=i(43),Q=i(8),ee=i(163),te=i(210),ie=i(36),re=i(14);(0,re.registerWasmType)(Z.EBaseType.PointMarker,q.EPointMarkerType.Cross,(e,t)=>new o.CrossPointMarker(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.PointMarker,q.EPointMarkerType.Ellipse,(e,t)=>new a.EllipsePointMarker(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.PointMarker,q.EPointMarkerType.Sprite,(e,t)=>new l.SpritePointMarker(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.PointMarker,q.EPointMarkerType.Square,(e,t)=>new h.SquarePointMarker(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.PointMarker,q.EPointMarkerType.Triangle,(e,t)=>new u.TrianglePointMarker(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.PointMarker,q.EPointMarkerType.X,(e,t)=>new d.XPointMarker(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.ShaderEffect,ee.EShaderEffectType.Glow,(e,t)=>new V.GlowEffect(e,t),!0),(0,re.registerWasmType)(Z.EBaseType.ShaderEffect,ee.EShaderEffectType.Shadow,(e,t)=>new N.ShadowEffect(e,t),!0),(0,re.registerType)(Z.EBaseType.Animation,$.EAnimationType.Fade,e=>new c.FadeAnimation(e),!0),(0,re.registerType)(Z.EBaseType.Animation,$.EAnimationType.Scale,e=>new p.ScaleAnimation(e),!0),(0,re.registerType)(Z.EBaseType.Animation,$.EAnimationType.Sweep,e=>new g.SweepAnimation(e),!0),(0,re.registerType)(Z.EBaseType.Animation,$.EAnimationType.Wave,e=>new f.WaveAnimation(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Default,e=>new P.DataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Line,e=>new A.LineSeriesDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Column,e=>new m.ColumnSeriesDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Text,e=>new b.TextDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Heatmap,e=>new C.HeatMapDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.NonUniformHeatmap,e=>new x.NonUniformHeatMapDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Bubble,e=>new v.BubbleSeriesDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Band,e=>new y.BandSeriesDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.DataLabelProvider,K.EDataLabelProviderType.Contours,e=>new S.ContoursDataLabelProvider(e),!0),(0,re.registerType)(Z.EBaseType.MetadataGenerator,"Template",e=>new n.TemplateMetadataGenerator(e),!0),(0,re.registerWasmType)(Z.EBaseType.PaletteProvider,J.EPaletteProviderType.Gradient,(e,t)=>s.PaletteFactory.createGradient(e,t),!0),(0,re.registerType)(Z.EBaseType.PaletteProvider,J.EPaletteProviderType.DataPointSelection,e=>new r.DataPointSelectionPaletteProvider(e),!0);t.buildSeries=(e,i,r)=>{"string"==typeof i&&(i=JSON.parse(i,ie.chartReviver)),"string"==typeof r&&(r=JSON.parse(r,ie.chartReviver));const n=[];Array.isArray(i)||(i=[i]);for(const s of i){let i;if(s.type===Q.ESeriesType.BandSeries)i=new T.FastBandRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.BubbleSeries)i=new E.FastBubbleRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.CandlestickSeries)i=new w.FastCandlestickRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.ColumnSeries)i=new R.FastColumnRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.ImpulseSeries)i=new L.FastImpulseRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.LineSeries)i=new M.FastLineRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.MountainSeries)i=new I.FastMountainRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.ErrorBarsSeries)i=new D.FastErrorBarsRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.OhlcSeries)i=new O.FastOhlcRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.ScatterSeries)i=new U.XyScatterRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.SplineBandSeries)i=new F.SplineBandRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.SplineLineSeries)i=new B.SplineLineRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.SplineMountainSeries)i=new H.SplineMountainRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.UniformHeatmapSeries)i=new W.UniformHeatmapRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.NonUniformHeatmapSeries)i=new _.NonUniformHeatmapRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.UniformContoursSeries)i=new X.UniformContoursRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.TextSeries)i=new k.FastTextRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.StackedColumnSeries)i=new z.StackedColumnRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.StackedMountainSeries)i=new G.StackedMountainRenderableSeries(e,s.options);else if(s.type===Q.ESeriesType.StackedColumnCollection){const n=new Y.StackedColumnCollection(e,s.options);n.add(...(0,t.buildSeries)(e,s.series,r)),i=n}else if(s.type===Q.ESeriesType.StackedMountainCollection){const n=new j.StackedMountainCollection(e,s.options);n.add(...(0,t.buildSeries)(e,s.series,r)),i=n}if(i){const t=(0,te.buildDataSeries)(e,s,r);t&&(i.dataSeries=t)}i&&n.push(i)}return n}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineSeriesDataLabelProvider=void 0;const r=i(5),n=i(44),s=i(83);class o extends s.DataLabelProvider{constructor(e){var t;super(e),this.type=n.EDataLabelProviderType.Line,this.aboveBelowProperty=!0,this.aboveBelowProperty=null!==(t=null==e?void 0:e.aboveBelow)&&void 0!==t?t:this.aboveBelow}get aboveBelow(){return this.aboveBelowProperty}set aboveBelow(e){this.aboveBelowProperty=e,this.invalidateParent()}generateDataLabels(e,t){const i=this.parentSeries;this.yAdj=Math.ceil(i.strokeThickness/2),i.pointMarker&&(this.yAdj=Math.max(this.yAdj,Math.ceil(i.pointMarker.height/2))),super.generateDataLabels(e,t)}getPosition(e,t){var i,n,s,o,a,l;if(this.aboveBelow){const h=e.xCoord()+(null!==(n=null===(i=this.style.padding)||void 0===i?void 0:i.left)&&void 0!==n?n:0),u=t.m_fHeight-t.GetLineBounds(0).m_fHeight;let d=e.yCoord()-u;if(e.hasNext()){const i=e.yCoord(e.index+1),r=e.xCoord(e.index+1);r>h&&i>d||r<h&&i<d?d-=this.yAdj+(null!==(o=null===(s=e.style.padding)||void 0===s?void 0:s.bottom)&&void 0!==o?o:1):d+=t.m_fHeight+this.yAdj+(null!==(l=null===(a=e.style.padding)||void 0===a?void 0:a.top)&&void 0!==l?l:1)}return new r.Point(h,d)}return super.getPosition(e,t)}toJSON(){const e=super.toJSON(),t={aboveBelow:this.aboveBelow};return Object.assign(e.options,t),e}}t.LineSeriesDataLabelProvider=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeatMapDataLabelProvider=void 0;const r=i(5),n=i(15),s=i(44),o=i(41),a=i(80),l=i(21),h=i(2),u=i(12),d=i(6),c=i(150);class p extends c.BaseDataLabelProvider{constructor(e){var t,i;super(e),this.type=s.EDataLabelProviderType.Heatmap,this.numericFormatProperty=o.ENumericFormat.Decimal,this.precisionProperty=1,this.numericFormatProperty=null!==(t=null==e?void 0:e.numericFormat)&&void 0!==t?t:this.numericFormatProperty,this.precision=null!==(i=null==e?void 0:e.precision)&&void 0!==i?i:this.precisionProperty,this.metaDataSelector=null==e?void 0:e.metaDataSelector}get numericFormat(){return this.numericFormatProperty}set numericFormat(e){var t;this.numericFormatProperty=e,null===(t=this.parentSeries)||void 0===t||t.invalidateParentCallback()}get precision(){return this.precisionProperty}set precision(e){var t;this.precisionProperty=e,null===(t=this.parentSeries)||void 0===t||t.invalidateParentCallback()}getText(e,t){var i,r;if(this.metaDataSelector)return this.metaDataSelector(this.dataSeries.getMetadataAt(t,e));const n=this.zValues[t][e];return n==n?(0,l.formatNumber)(n,null!==(i=this.numericFormat)&&void 0!==i?i:o.ENumericFormat.Decimal,null!==(r=this.precision)&&void 0!==r?r:1):void 0}getPosition(e,t,i,n,s,o,a,l){let h=l.xCoordinateCalculator.getCoordinate(i),u=l.yCoordinateCalculator.getCoordinate(n);if(l.isVerticalChart){const e=h;h=u,u=e}return l.xCoordinateCalculator.hasFlippedCoordinates?h+=(o-s.width)/2:h-=o-(o-s.width)/2,l.yCoordinateCalculator.hasFlippedCoordinates?u+=a-(a-s.height)/2:u-=(a-s.height)/2,new r.Point(h,u)}shouldGenerate(e,t,i){return e.height<i&&e.width<t}getColor(e,t,i){return this.colorValue}shouldSkipLabel(e,t,i,r,n){const s=this.parentSeries.parentSurface.seriesViewRect;return i.rect.y<0||i.rect.bottom>s.height||(i.rect.x<0||i.rect.right>s.width)}generateDataLabels(e,t){var i,r;if(this.dataLabels=[],!this.style||!this.style.fontFamily||!this.style.fontSize)return;this.dataSeries=this.parentSeries.dataSeries,this.zValues=this.dataSeries.getZValues();const s=(0,u.getTextBounds)(this.webAssemblyContext),o=d.DpiHelper.adjustTextStyle(this.style),l=e.getFont(o);let c=Math.abs(t.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(1))-t.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0))),p=Math.abs(t.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(1))-t.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0)));if(l.CalculateStringBounds(null!==(i=this.getText(0,0))&&void 0!==i?i:"",s,null!==(r=this.style.lineSpacing)&&void 0!==r?r:2),t.isVerticalChart&&([p,c]=[c,p]),!this.shouldGenerate(new a.Size(s.m_fWidth,s.m_fHeight),c,p))return;this.colorValue=(0,h.parseColorToUIntArgb)(this.color);const{xStart:g,xStep:f,yStart:y,yStep:v}=this.parentSeries.dataSeries;for(let e=0;e<this.dataSeries.arrayHeight;e++){const i=y+v*e;if(!(t.yCoordinateCalculator.visibleMin>i+v||t.yCoordinateCalculator.visibleMax<i))for(let i=0;i<this.dataSeries.arrayWidth;i++){const r=g+f*i;if(t.xCoordinateCalculator.visibleMin>r+f||t.xCoordinateCalculator.visibleMax<r)continue;const o=this.getText(i,e);if(!o)continue;l.CalculateStringBounds(null!=o?o:"",s,2);const h=new a.Size(s.m_fWidth,s.m_fHeight),u=this.dataSeries.getXValue(i),d=this.dataSeries.getYValue(e),y=this.getPosition(i,e,u,d,h,c,p,t),v={text:o,position:y,rect:new n.Rect(y.x,y.y-s.GetLineBounds(0).m_fHeight,h.width,h.height),color:this.getColor(i,e,o),dataX:this.dataSeries.getXValue(i),dataY:this.dataSeries.getYValue(e)};this.shouldSkipLabel(i,e,v,c,p)||this.dataLabels.push(v)}}}toJSON(){const e=super.toJSON(),t={numericFormat:this.numericFormat,precision:this.precision};return Object.assign(e.options,t),e}}t.HeatMapDataLabelProvider=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcSeriesDrawingProvider=t.EOhlcDrawingMode=void 0;const r=i(0),n=i(54),s=i(35),o=i(7),a=i(49);var l;!function(e){e.Candles="Candles",e.Ohlc="Ohlc"}(l=t.EOhlcDrawingMode||(t.EOhlcDrawingMode={}));class h extends a.BaseSeriesDrawingProvider{constructor(e,t,i){super(e,t),this.drawingMode=i,this.nativeDrawingProvider=new this.webAssemblyContext.SCRTCandlestickSeriesDrawingProvider;const{strokeThickness:r,strokeUp:o,strokeDown:a,opacity:l}=t,h=t;this.strokeUpPenCache=new s.Pen2DCache(e),this.strokeDownPenCache=new s.Pen2DCache(e),this.brushUpCache=new n.BrushCache(e),this.brushDownCache=new n.BrushCache(e),(0,s.createPenInCache)(this.strokeUpPenCache,o,r,l),(0,s.createPenInCache)(this.strokeDownPenCache,a,r,l),h.brushUp&&(0,n.createBrushInCache)(this.brushUpCache,h.brushUp,l),h.brushDown&&(0,n.createBrushInCache)(this.brushDownCache,h.brushDown,l)}onDpiChanged(e){super.onDpiChanged(e),this.onSeriesPropertyChange(o.PROPERTY.STROKE_UP),this.onSeriesPropertyChange(o.PROPERTY.STROKE_DOWN)}onSeriesPropertyChange(e){super.onSeriesPropertyChange(e);const{strokeThickness:t,strokeUp:i,strokeDown:r,opacity:a}=this.parentSeries;e!==o.PROPERTY.STROKE_UP&&e!==o.PROPERTY.STROKE_THICKNESS&&e!==o.PROPERTY.OPACITY||(0,s.createPenInCache)(this.strokeUpPenCache,i,t,a),e!==o.PROPERTY.STROKE_DOWN&&e!==o.PROPERTY.STROKE_THICKNESS&&e!==o.PROPERTY.OPACITY||(0,s.createPenInCache)(this.strokeDownPenCache,r,t,a);const l=this.parentSeries;e!==o.PROPERTY.BRUSH_DOWN&&e!==o.PROPERTY.OPACITY||(0,n.createBrushInCache)(this.brushDownCache,null==l?void 0:l.brushDown,a),e!==o.PROPERTY.BRUSH_UP&&e!==o.PROPERTY.OPACITY||(0,n.createBrushInCache)(this.brushUpCache,null==l?void 0:l.brushUp,a)}draw(e,t){const i=t.pointSeries,r=new this.webAssemblyContext.SCRTOhlcDrawingParams;try{if(this.drawingMode===l.Candles){const e=(0,n.getScrtBrushFromCache)(this.brushUpCache),t=(0,n.getScrtBrushFromCache)(this.brushDownCache);if(!e||!t)return;r.SetBrushes(e,t)}const o=(0,s.getScrtPenFromCache)(this.strokeUpPenCache),a=(0,s.getScrtPenFromCache)(this.strokeDownPenCache);if(!o||!a)return;r.SetPens(o,a);const h="#ffffffff";super.applyStrokeFillPaletting(h,void 0,h,void 0,this.parentSeries.opacity),r.SetPalettedColors(this.palettingState.palettedColors),r.forceShaderMethod=!0,r.verticalChart=t.isVerticalChart,r.candleWidth=this.parentSeries.getDataPointWidth(t.xCoordinateCalculator,this.parentSeries.dataPointWidth),r.drawAsOhlc=this.drawingMode===l.Ohlc;const u=e.getNativeContext(),d=(this.parentSeries.parentSurface.seriesViewRect,t.xCoordinateCalculator.isCategoryCoordinateCalculator),c=i.xValues,p=i.openValues,g=i.highValues,f=i.lowValues,y=i.closeValues;r.count=y.size(),this.nativeDrawingProvider.DrawPointsVec(u,d?i.indexes:c,p,g,f,y,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,r)}finally{r.delete()}}delete(){this.strokeDownPenCache=(0,r.deleteSafe)(this.strokeDownPenCache),this.strokeUpPenCache=(0,r.deleteSafe)(this.strokeUpPenCache),this.brushUpCache=(0,r.deleteSafe)(this.brushUpCache),this.brushDownCache=(0,r.deleteSafe)(this.brushDownCache),this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),super.delete()}}t.OhlcSeriesDrawingProvider=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EErrorMode=void 0,function(e){e.Both="Both",e.High="High",e.Low="Low"}(t.EErrorMode||(t.EErrorMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseLineRenderableSeries=t.ELineType=void 0;const r=i(40),n=i(7),s=i(158),o=i(380),a=i(61),l=i(381);var h;!function(e){e.Normal="Normal",e.Digital="Digital",e.DigitalNoEdge="DigitalNoEdge",e.DigitalYX="DigitalYX"}(h=t.ELineType||(t.ELineType={}));class u extends r.BaseRenderableSeries{constructor(e,t){var i;super(e,t),this.strokeDashArrayProperty=[],this.lineTypeProperty=h.Normal,this.strokeDashArrayProperty=null==t?void 0:t.strokeDashArray,this.lineTypeProperty=null!==(i=null==t?void 0:t.lineType)&&void 0!==i?i:this.lineTypeProperty,this.drawingProviders=[],this.drawingProviders.push(new o.LineSeriesDrawingProvider(e,this)),this.drawingProviders.push(new a.PointMarkerDrawingProvider(e,this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new s.LineSeriesDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.stroke===t.lineSeriesColor&&(this.stroke=e.lineSeriesColor)}get strokeDashArray(){return this.strokeDashArrayProperty}set strokeDashArray(e){this.strokeDashArrayProperty=e,this.notifyPropertyChanged(n.PROPERTY.STROKE_DASH_ARRAY)}get lineType(){return this.lineTypeProperty}set lineType(e){this.lineTypeProperty=e,this.notifyPropertyChanged(n.PROPERTY.LINE_TYPE)}toJSON(e=!1){const t=super.toJSON(e),i={strokeDashArray:this.strokeDashArray,lineType:this.lineTypeProperty};return Object.assign(t.options,i),t}newHitTestProvider(){return new l.LineSeriesHitTestProvider(this,this.webAssemblyContext)}}t.BaseLineRenderableSeries=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EShaderEffectType=void 0,function(e){e.Glow="Glow",e.Shadow="Shadow"}(t.EShaderEffectType||(t.EShaderEffectType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeatmapColorMap=void 0;const r=i(18),n=i(70),s=i(7);class o{constructor(e){var t,i;this.minimumProperty=null!==(t=null==e?void 0:e.minimum)&&void 0!==t?t:0,this.maximumProperty=null!==(i=null==e?void 0:e.maximum)&&void 0!==i?i:100,this.gradientStops=(null==e?void 0:e.gradientStops)||[{offset:0,color:"Red"},{offset:1,color:"Green"}],this.propertyChanged=new r.EventHandler,this.calculateScaleFactor()}get gradientStops(){return this.gradientStopsProperty}set gradientStops(e){this.gradientStopsProperty=e,this.notifyPropertyChanged(s.PROPERTY.GRADIENT_STOPS)}get minimum(){return this.minimumProperty}set minimum(e){this.minimumProperty=e,this.notifyPropertyChanged(s.PROPERTY.MINIMUM)}get maximum(){return this.maximumProperty}set maximum(e){this.maximumProperty=e,this.notifyPropertyChanged(s.PROPERTY.MAXIMUM)}toJSON(){return{minimum:this.minimum,maximum:this.maximum,gradientStops:this.gradientStops}}notifyPropertyChanged(e){var t;null===(t=this.propertyChanged)||void 0===t||t.raiseEvent(new n.PropertyChangedEventArgs(e))}calculateScaleFactor(){this.scaleFactorProperty=(o.DefaultPrecision-1)/Math.abs(this.maximumProperty-this.minimumProperty)}}t.HeatmapColorMap=o,o.DefaultPrecision=1e3},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyDoubleVector=void 0;const r=i(55);t.copyDoubleVector=(e,t,i)=>{const n=e.size();t.resizeFast(n),i.SCRTMemCopy(t.dataPtr(0),e.dataPtr(0),n*r.SIZEOF_NUMBER)}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.configure2DSurface=t.buildPieChart=t.build2DChart=void 0;const n=i(142),s=i(190),o=i(410),a=i(411),l=i(112),h=i(145),u=i(191),d=i(412),c=i(146),p=i(192),g=i(413),f=i(147),y=i(193),v=i(414),m=i(415),S=i(129),P=i(128),C=i(416),A=i(89),x=i(91),b=i(417),T=i(78),E=i(66),w=i(17),R=i(113),D=i(37),L=i(167),M=i(177),I=i(217),O=i(157),k=i(36),V=i(14),_=i(85);(0,V.registerType)(w.EBaseType.ThemeProvider,_.EThemeProviderType.Light,()=>new C.SciChartJSLightTheme,!0),(0,V.registerType)(w.EBaseType.ThemeProvider,_.EThemeProviderType.DarkV2,()=>new P.SciChartJSDarkv2Theme,!0),(0,V.registerType)(w.EBaseType.ThemeProvider,_.EThemeProviderType.Dark,()=>new S.SciChartJSDarkTheme,!0),(0,V.registerType)(w.EBaseType.ThemeProvider,_.EThemeProviderType.Navy,()=>new m.SciChartJsNavyTheme,!0),(0,V.registerType)(w.EBaseType.LayoutManager,R.ELayoutManagerType.Default,e=>new l.LayoutManager(e),!0),(0,V.registerType)(w.EBaseType.LayoutManager,R.ELayoutManagerType.CentralAxes,e=>new a.CentralAxesLayoutManager(e),!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.BottomInner,e=>new n.BottomAlignedInnerAxisLayoutStrategy(e),!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.BottomOuter,e=>new s.BottomAlignedOuterAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.BottomStacked,e=>new o.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.LeftInner,e=>new h.LeftAlignedInnerAxisLayoutStrategy(e),!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.LeftOuter,e=>new u.LeftAlignedOuterAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.LeftStacked,e=>new d.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.RightInner,e=>new c.RightAlignedInnerAxisLayoutStrategy(e),!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.RightOuter,e=>new p.RightAlignedOuterAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.RightStacked,e=>new g.RightAlignedOuterVerticallyStackedAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.TopInner,e=>new f.TopAlignedInnerAxisLayoutStrategy(e),!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.TopOuter,e=>new y.TopAlignedOuterAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.LayoutStrategy,D.ELayoutStrategyType.TopStacked,e=>new v.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy,!0),(0,V.registerType)(w.EBaseType.Loader,"Default",()=>new x.DefaultSciChartLoader,!0);t.build2DChart=(e,t)=>r(void 0,void 0,void 0,(function*(){let i;"string"==typeof t&&(t=JSON.parse(t,k.chartReviver)),i=(null==t?void 0:t.createSingle)?yield E.SciChartSurface.createSingle(e,null==t?void 0:t.surface):yield E.SciChartSurface.create(e,null==t?void 0:t.surface);let{wasmContext:r,sciChartSurface:n}=i;return N(t,n,r),t.onCreated&&("string"==typeof t.onCreated&&(n.onCreatedName=t.onCreated,t.onCreated=(0,V.getFunction)(w.EBaseType.OnCreateFunction,t.onCreated)),t.onCreated(n)),{wasmContext:r,sciChartSurface:n}}));function N(e,t,i){if(e.xAxes&&t.xAxes.add(...(0,M.buildAxes)(i,e.xAxes)),0!==t.xAxes.size()||e.subCharts||t.xAxes.add(new A.NumericAxis(i)),e.yAxes&&t.yAxes.add(...(0,M.buildAxes)(i,e.yAxes)),0!==t.yAxes.size()||e.subCharts||t.yAxes.add(new A.NumericAxis(i)),e.series&&t.renderableSeries.add(...(0,O.buildSeries)(i,e.series,e.sharedData)),e.modifiers&&t.chartModifiers.add(...(0,I.buildModifiers)(e.modifiers)),e.annotations&&t.annotations.add(...(0,L.buildAnnotations)(e.annotations)),e.subCharts&&!t.isSubSurface)for(const r of e.subCharts){N(r,t.addSubChart(r.surface),i)}}t.buildPieChart=(e,t)=>r(void 0,void 0,void 0,(function*(){"string"==typeof t&&(t=JSON.parse(t,k.chartReviver));const i=yield T.SciChartPieSurface.create(e,null==t?void 0:t.surface);if(null==t?void 0:t.segments)for(const e of null==t?void 0:t.segments){const t=new b.PieSegment(e);i.pieSegments.add(t)}return t.onCreated&&("string"==typeof t.onCreated&&(i.onCreatedName=t.onCreated,t.onCreated=(0,V.getFunction)(w.EBaseType.OnCreateFunction,t.onCreated)),t.onCreated(i)),i})),t.configure2DSurface=N},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildAnnotations=void 0;const r=i(239),n=i(252),s=i(174),o=i(255),a=i(23),l=i(88),h=i(175),u=i(257),d=i(258),c=i(17),p=i(36),g=i(14);(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.RenderContextAxisMarkerAnnotation,e=>new r.AxisMarkerAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.RenderContextBoxAnnotation,e=>new n.BoxAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.RenderContextHorizontalLineAnnotation,e=>new o.HorizontalLineAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.RenderContextLineAnnotation,e=>new l.LineAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.RenderContextVerticalLineAnnotation,e=>new d.VerticalLineAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.SVGTextAnnotation,e=>new u.TextAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.SVGCustomAnnotation,e=>new s.CustomAnnotation(e),!0),(0,g.registerType)(c.EBaseType.Annotation,a.EAnnotationType.RenderContextNativeTextAnnotation,e=>new h.NativeTextAnnotation(e),!0);t.buildAnnotations=e=>{"string"==typeof e&&(e=JSON.parse(e,p.chartReviver));const t=[];if(Array.isArray(e))for(const i of e)t.push((0,g.createType)(c.EBaseType.Annotation,i.type,null,i.options));else t.push((0,g.createType)(c.EBaseType.Annotation,e.type,null,e.options));return t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableArrayChangedArgs=t.EObservableArrayChangedAction=void 0,function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove",e[e.Replace=2]="Replace",e[e.Reset=3]="Reset"}(t.EObservableArrayChangedAction||(t.EObservableArrayChangedAction={}));t.ObservableArrayChangedArgs=class{constructor(e,t,i){this.action=e,this.oldItems=i,this.newItems=t}getAction(){return this.action}getNewItems(){return this.newItems}getOldItems(){return this.oldItems}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaletteFactory=void 0;const r=i(101),n=i(27),s=i(2),o=i(73);class a{static createGradient(e,t,i){t.endPoint.x,t.startPoint.x,t.endPoint.y,t.startPoint.y;const s=a.createColorMap(e,t.gradientStops.slice(0));let l;const h=(t,i,r,o=1)=>{const a=r/(l.getDataSeriesValuesCount()-1),h=e.NumberUtil.Constrain(Math.round(a*(s.length-1)),0,s.length-1),u=s[h];return(0,n.uintArgbColorMultiplyOpacity)(u,o)},u=void 0===i||!0===(null==i?void 0:i.enableStroke),d=!0===(null==i?void 0:i.enableFill),c=!0===(null==i?void 0:i.enablePointMarkers);return{strokePaletteMode:o.EStrokePaletteMode.GRADIENT,fillPaletteMode:o.EFillPaletteMode.GRADIENT,onAttached(e){l=e},onDetached(){},overrideStrokeArgb(e,t,r){var n;return u?h(0,0,r,null!==(n=null==i?void 0:i.strokeOpacity)&&void 0!==n?n:1):void 0},overrideFillArgb(e,t,r,n,s){var o;return d?h(0,0,r,null!==(o=null==i?void 0:i.fillOpacity)&&void 0!==o?o:1):void 0},overridePointMarkerArgb(e,t,r,n,s){var o;const a=null!==(o=null==i?void 0:i.pointMarkerOpacity)&&void 0!==o?o:1;return c?{fill:h(0,0,r,a),stroke:h(0,0,r,a)}:void 0},toJSON:()=>({type:r.EPaletteProviderType.Gradient,options:t})}}static createColorMap(e,t){const i=[],r=t.length,n=t[0].offset;let o=t[t.length-1].offset-n;const l=o/(a.precision-1);let h=(0,s.parseColorToUIntArgb)(t[0].color),u=t[0].offset,d=h,c=u;r>1&&(d=(0,s.parseColorToUIntArgb)(t[1].color),c=t[1].offset),o=c-u;let p=0;for(let g=0;g<a.precision;++g){const a=n+g*l;a>=c&&(p++,u=c,h=d,p+1<r&&(d=(0,s.parseColorToUIntArgb)(t[p+1].color),c=t[p+1].offset),o=c-u);let f=0;if(h===d||o<=1e-11)f=d;else{const t=(a-u)/o;f=e.NumberUtil.LinearInterpolateI(h,d,t)}i.push(f)}return i}}t.PaletteFactory=a,a.precision=500},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSuspender=void 0;const r=i(99),n=i(1);class s{constructor(e,t=!0){this.resumeTargetProperty=t,this.targetProperty=e,s.suspendedInstances.containsKey(this.targetProperty.suspendableId)?this.increment(e):s.suspendedInstances.add(e.suspendableId,{id:e.suspendableId,suspendable:e,suspendCount:1})}static getIsSuspended(e){return s.suspendedInstances.containsKey(e.suspendableId)}static using(e,t){n.Guard.notNull(e,"target");const i=e.suspendUpdates();try{t()}finally{i.resume()}}get isSuspended(){return s.getIsSuspended(this.targetProperty)}get shouldResumeTarget(){return this.resumeTargetProperty}resume(){this.targetProperty.decrementSuspend(),0===this.decrement(this.targetProperty)&&(s.suspendedInstances.remove(this.targetProperty.suspendableId),this.targetProperty.resumeUpdates(this))}increment(e){s.suspendedInstances.item(e.suspendableId).suspendCount++}decrement(e){let t=s.suspendedInstances.item(e.suspendableId).suspendCount;return t--,s.suspendedInstances.item(e.suspendableId).suspendCount=t,t}}t.UpdateSuspender=s,s.suspendedInstances=new r.Dictionary},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.ALLOW_FAST_MATH="ALLOW_FAST_MATH",e.AUTO_RANGE="AUTO_RANGE",e.AUTO_TICKS="AUTO_TICKS",e.AXIS_ALIGNMENT="AXIS_ALIGNMENT",e.AXIS_BANDS_FILL="AXIS_BANDS_FILL",e.AXIS_TITLE="AXIS_TITLE",e.AXIS_LENGTH="AXIS_LENGTH",e.BORDER="BORDER",e.CURSOR_TEXT_FORMATTING="CURSOR_TEXT_FORMATTING",e.DELTA_CALCULATOR="DELTA_CALCULATOR",e.TICK_COORDINATES_CALCULATOR="TICK_COORDINATES_CALCULATOR",e.DRAW_MAJOR_GRID_LINES="DRAW_MAJOR_GRID_LINES",e.DRAW_MINOR_GRID_LINES="DRAW_MINOR_GRID_LINES",e.DRAW_MAJOR_TICK_LINES="DRAW_MAJOR_TICK_LINES",e.DRAW_MINOR_TICK_LINES="DRAW_MINOR_TICK_LINES",e.DRAW_MAJOR_BANDS="DRAW_MAJOR_BANDS",e.DRAW_LABELS="DRAW_LABELS",e.FLIPPED_COORDINATES="FLIPPED_COORDINATES",e.GROW_BY="GROW_BY",e.ID="ID",e.IS_AXIS_FLIPPED="IS_AXIS_FLIPPED",e.IS_NEGATIVE="IS_NEGATIVE",e.IS_INNER_AXIS="IS_INNER_AXIS",e.IS_PRIMARY_AXIS="IS_PRIMARY_AXIS",e.IS_VISIBLE="IS_VISIBLE",e.IS_XAXIS="IS_XAXIS",e.LABEL_PROVIDER="LABEL_PROVIDER",e.AXIS_RENDERER="LABEL_PROVIDER",e.LOG_BASE="LOG_BASE",e.MAJOR_DELTA="MAJOR_DELTA",e.MAJOR_GRID_LINE_STYLE="MAJOR_GRID_LINE_STYLE",e.MAJOR_TICK_LINE_STYLE="MAJOR_TICK_LINE_STYLE",e.MAX_AUTO_TICKS="MAX_AUTO_TICKS",e.MINOR_DELTA="MINOR_DELTA",e.MINOR_GRID_LINE_STYLE="MINOR_GRID_LINE_STYLE",e.MINOR_TICK_LINE_STYLE="MINOR_TICK_LINE_STYLE",e.MINORS_PER_MAJOR="MINORS_PER_MAJOR",e.OFFSET="OFFSET",e.TEXT_FORMATTING="TEXT_FORMATTING",e.TEXT_STYLE="TEXT_STYLE",e.TICK_TEXT_BRUSH="TICK_TEXT_BRUSH",e.VISIBLE_RANGE="VISIBLE_RANGE",e.VISIBLE_RANGE_LIMIT="VISIBLE_RANGE_LIMIT",e.VISIBLE_RANGE_SIZE_LIMIT="VISIBLE_RANGE_SIZE_LIMIT",e.TICK_PROVIDER="TICK_PROVIDER",e.VIEW_RECT="VIEW_RECT",e.ZOOMEXTENTS_RANGE="ZOOMEXTENTS_RANGE"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSolidBrush=void 0;const r=i(13),n=i(27),s=i(2);t.createSolidBrush=(e,t,i)=>{if(r.IS_TEST_ENV||!t)return;const o=(0,n.uintArgbColorMultiplyOpacity)((0,s.parseColorToUIntArgb)(t),i),a=(0,n.uintArgbColorIsTransparent)(o);if(isNaN(o))throw new Error(`Color code ${t} cannot be converted to an ARGB integer`);return new e.SCRTSolidBrush(o,a)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGlBrush=void 0;const r=i(0),n=i(253);t.WebGlBrush=class{constructor(e){this.scrtBrushProperty=e}get scrtBrush(){return this.scrtBrushProperty}delete(){this.scrtBrushProperty=(0,r.deleteSafe)(this.scrtBrushProperty)}getBrushType(){return n.EDrawingTypes.WasmBrush}setOpacity(e){var t;null===(t=this.scrtBrushProperty)||void 0===t||t.SetOpacity(e)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomAnnotation=void 0;const r=i(34),n=i(23),s=i(87);class o extends s.SvgAnnotationBase{constructor(e){var t;super(e),this.type=n.EAnnotationType.SVGCustomAnnotation,this.svgStringProperty=null!==(t=null==e?void 0:e.svgString)&&void 0!==t?t:void 0}toJSON(){const e=super.toJSON(),t={svgString:this.svgStringProperty};return Object.assign(e.options,t),e}create(e,t,i,n){!this.svg||this.isEditable?(!this.svg||this.svg&&(this.isSelected||this.prevX1Coordinate!==this.getX1Coordinate(e,t)||this.prevY1Coordinate!==this.getY1Coordinate(e,t))?(this.prevX1Coordinate=this.getX1Coordinate(e,t),this.prevY1Coordinate=this.getY1Coordinate(e,t),this.svg&&this.delete(),this.setSvg(r.annotationHelpers.createSvg(this.svgStringProperty,this.svgRoot)),this.calcAndSetAnnotationBorders(e,t),this.updateAdornerInner(),this.prevIsSelected=this.isSelected):this.calcAndSetAnnotationBorders(e,t),this.prevIsSelected!==this.isSelected&&this.svg&&this.isEditable&&(this.updateAdornerInner(),this.prevIsSelected=this.isSelected)):this.calcAndSetAnnotationBorders(e,t)}get svgString(){return this.svgStringProperty}set svgString(e){this.delete(),this.svgStringProperty=e}}t.CustomAnnotation=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeTextAnnotation=t.EWrapTo=void 0;const r=i(1),n=i(5),s=i(135),o=i(47),a=i(29),l=i(27),h=i(2),u=i(11),d=i(256),c=i(9),p=i(12),g=i(6),f=i(28),y=i(34),v=i(46),m=i(23),S=i(130);var P;!function(e){e.ViewRect="ViewRect",e.Annotation="Annotation"}(P=t.EWrapTo||(t.EWrapTo={}));class C extends S.RenderContextAnnotationBase{constructor(e){var t,i,r,n,a,l,h,u,d,c,p,g;super(e),this.type=m.EAnnotationType.RenderContextNativeTextAnnotation,this.scaleOnResize=!1,this.fontSizeProperty=14,this.fontFamilyProperty="Arial",this.textColorProperty="#ffffff",this.rotationProperty=0,this.textProperty="",this.verticalAnchorPointProperty=s.EVerticalAnchorPoint.Top,this.horizontalAnchorPointProperty=s.EHorizontalAnchorPoint.Left,this.multiLineAlignmentProperty=o.EMultiLineAlignment.Center,this.lineSpacingProperty=3,this.scaleProperty=1,this.textColorProperty=null!==(t=null==e?void 0:e.textColor)&&void 0!==t?t:this.textColorProperty,this.fontSizeProperty=null!==(i=null==e?void 0:e.fontSize)&&void 0!==i?i:this.fontSizeProperty,this.fontFamilyProperty=null!==(r=null==e?void 0:e.fontFamily)&&void 0!==r?r:this.fontFamilyProperty,this.rotationProperty=null!==(n=null==e?void 0:e.rotation)&&void 0!==n?n:this.rotationProperty,this.textProperty=null!==(a=null==e?void 0:e.text)&&void 0!==a?a:this.textProperty,this.verticalAnchorPointProperty=null!==(l=null==e?void 0:e.verticalAnchorPoint)&&void 0!==l?l:this.verticalAnchorPointProperty,this.horizontalAnchorPointProperty=null!==(h=null==e?void 0:e.horizontalAnchorPoint)&&void 0!==h?h:this.horizontalAnchorPointProperty,this.multiLineAlignmentProperty=null!==(u=null==e?void 0:e.multiLineAlignment)&&void 0!==u?u:this.multiLineAlignmentProperty,this.wrapToProperty=null!==(d=null==e?void 0:e.wrapTo)&&void 0!==d?d:this.wrapToProperty,this.lineSpacingProperty=null!==(c=null==e?void 0:e.lineSpacing)&&void 0!==c?c:this.lineSpacingProperty,this.scaleProperty=null!==(p=null==e?void 0:e.scale)&&void 0!==p?p:this.scaleProperty,this.initialWidth=Math.abs(this.x2-this.x1),this.scaleOnResize=null!==(g=null==e?void 0:e.scaleOnResize)&&void 0!==g?g:this.scaleOnResize}get textColor(){return this.textColorProperty}set textColor(e){this.textColorProperty=e,this.notifyPropertyChanged(v.PROPERTY.COLOR)}get fontSize(){return this.fontSizeProperty}set fontSize(e){this.fontSizeProperty=e,this.notifyPropertyChanged(v.PROPERTY.AXIS_FONT_SIZE)}get fontFamily(){return this.fontFamilyProperty}set fontFamily(e){this.fontFamilyProperty=e,this.notifyPropertyChanged(v.PROPERTY.AXIS_FONT_FAMILY)}get rotation(){return this.rotationProperty}set rotation(e){this.rotationProperty=e,this.notifyPropertyChanged(v.PROPERTY.ROTATION)}get text(){return this.textProperty}set text(e){this.textProperty=e,this.notifyPropertyChanged(v.PROPERTY.TEXT)}get verticalAnchorPoint(){return this.verticalAnchorPointProperty}set verticalAnchorPoint(e){this.verticalAnchorPointProperty!==e&&(this.verticalAnchorPointProperty=e,this.notifyPropertyChanged(v.PROPERTY.VERTICAL_ANCHOR_POINT))}get horizontalAnchorPoint(){return this.horizontalAnchorPointProperty}set horizontalAnchorPoint(e){this.horizontalAnchorPointProperty!==e&&(this.horizontalAnchorPointProperty=e,this.notifyPropertyChanged(v.PROPERTY.HORIZONTAL_ANCHOR_POINT))}get multiLineAlignment(){return this.multiLineAlignmentProperty}set multiLineAlignment(e){this.multiLineAlignmentProperty!==e&&(this.multiLineAlignmentProperty=e,this.notifyPropertyChanged(v.PROPERTY.MULTILINE_ALIGNMENT))}get wrapTo(){return this.wrapToProperty}set wrapTo(e){this.wrapToProperty!==e&&(this.wrapToProperty=e,this.notifyPropertyChanged(v.PROPERTY.WRAP_TO))}get lineSpacing(){return this.lineSpacingProperty}set lineSpacing(e){this.lineSpacingProperty=e,this.notifyPropertyChanged(v.PROPERTY.LINE_SPACING)}get scale(){return this.scaleProperty}set scale(e){e!==this.scaleProperty&&(this.scaleProperty=e,this.notifyPropertyChanged(v.PROPERTY.SCALE))}delete(){}onAttach(e){super.onAttach(e)}getRotationCenter(e,t,i){return new n.Point(e,t)}drawWithContext(e,t,i,n){r.Guard.notNull(e,"renderContext"),r.Guard.notNull(t,"xCalc"),r.Guard.notNull(i,"yCalc");let a=this.getX1Coordinate(t,i),u=this.getY1Coordinate(t,i);const c={fontFamily:this.fontFamily,fontSize:Math.round(this.fontSize*g.DpiHelper.PIXEL_RATIO)};let f,y,v=(0,h.parseColorToUIntArgb)(this.textColor);v=(0,l.uintArgbColorOverrideOpacity)(v,this.opacity);const m=-this.rotation*Math.PI/180,S=0!==this.rotation||1!==this.scale;f=e.getFont(c,S,!1);const C=(0,p.getTextBounds)(this.parentSurface.webAssemblyContext2D);let A=this.text;if(this.wrapTo){let e=1/0;if("number"==typeof this.wrapTo)e=this.wrapTo;else if(this.wrapTo===P.ViewRect)this.horizontalAnchorPoint===s.EHorizontalAnchorPoint.Left?e=this.parentSurface.seriesViewRect.width-a:this.horizontalAnchorPoint===s.EHorizontalAnchorPoint.Center?e=2*Math.min(a,this.parentSurface.seriesViewRect.width-a):this.horizontalAnchorPoint===s.EHorizontalAnchorPoint.Right&&(e=a);else if(this.wrapTo===P.Annotation){let r=this.getX2Coordinate(t,i);r>a&&(e=r-a)}A=(0,d.wrapNativeText)(this.text,e,f,C)}let x=this.lineSpacing;f.CalculateStringBounds(null!=A?A:"",C,x),x<1&&(x=this.lineSpacing*(C.GetLineBounds(0).m_fHeight-C.GetLineBounds(0).m_fOffsetY),f.CalculateStringBounds(null!=A?A:"",C,x));const b=this.getRotationCenter(a+n.x,u+n.y,C);y=(0,p.getVector4)(this.parentSurface.webAssemblyContext2D,b.x,b.y,m,0),this.horizontalAnchorPointProperty===s.EHorizontalAnchorPoint.Center?a-=C.m_fWidth/2:this.horizontalAnchorPointProperty===s.EHorizontalAnchorPoint.Right&&(a-=C.m_fWidth),this.verticalAnchorPointProperty===s.EVerticalAnchorPoint.Center?(u+=C.GetLineBounds(0).m_fHeight/2,u-=(C.GetLineBounds(0).m_fHeight-C.GetLineBounds(0).m_fOffsetY)*(C.GetLinesCount()-1)/2):this.verticalAnchorPointProperty===s.EVerticalAnchorPoint.Top?u+=C.GetLineBounds(0).m_fHeight:C.GetLinesCount()>1&&(u+=C.GetLineBounds(0).m_fOffsetY,u-=(C.GetLineBounds(0).m_fHeight-C.GetLineBounds(0).m_fOffsetY)*(C.GetLinesCount()-1));const T=a+n.x,E=u+n.y;let w=a,R=u-C.GetLineBounds(0).m_fHeight,D=a+C.m_fWidth,L=R+C.m_fHeight;if(0!==this.rotation){const e=Math.sin(m),t=Math.cos(m),i=this.getRotationCenter(a,u,C),r=(r,n)=>({x:(r-i.x)*t+(n-i.y)*e,y:(n-i.y)*t-(r-i.x)*e}),n=r(w,R),s=r(D,R),o=r(w,L),l=r(D,L);w=Math.min(n.x,s.x,o.x,l.x)+i.x,D=Math.max(n.x,s.x,o.x,l.x)+i.x,R=Math.min(n.y,s.y,o.y,l.y)+i.y,L=Math.max(n.y,s.y,o.y,l.y)+i.y}const M=(0,o.convertMultiLineAlignment)(this.multiLineAlignment,this.parentSurface.webAssemblyContext2D);let I=f.GetScale(),O=!1;I!==this.scale&&(f.SetScale(this.scale),O=!0),this.setAnnotationBorders(w,w+(D-w)*this.scale,R,R+(L-R)*this.scale),f.DrawStringAdvanced(A,v,Math.round(T),Math.round(E),y,M,x),O&&f.SetScale(I),this.updateAdornerInner()}onDragStarted(e){super.onDragStarted(e);const{x1:t,x2:i,y1:r,y2:s}=this.getAnnotationBorders(!1,!0),{x1y1:o,x2y1:a,x1y2:l,x2y2:h}=y.annotationHelpers.calcNewApex(t,r,i,s,this.isVerticalChart),d=(0,c.translateFromCanvasToSeriesViewRect)(new n.Point(e.mousePoint.x,e.mousePoint.y),this.parentSurface.seriesViewRect,!0);if(o&&this.canDragPoint(f.EDraggingGripPoint.x1y1)){if((0,u.calcDistance)(o.x,o.y,d.x,d.y)<this.annotationsGripsRadius*g.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=f.EDraggingGripPoint.x1y1,!0}if(a&&this.canDragPoint(f.EDraggingGripPoint.x2y1)){if((0,u.calcDistance)(a.x,a.y,d.x,d.y)<this.annotationsGripsRadius*g.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=f.EDraggingGripPoint.x2y1,!0}if(l&&this.canDragPoint(f.EDraggingGripPoint.x1y2)){if((0,u.calcDistance)(l.x,l.y,d.x,d.y)<this.annotationsGripsRadius*g.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=f.EDraggingGripPoint.x1y2,!0}if(h&&this.canDragPoint(f.EDraggingGripPoint.x2y2)){if((0,u.calcDistance)(h.x,h.y,d.x,d.y)<this.annotationsGripsRadius*g.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=f.EDraggingGripPoint.x2y2,!0}return!!(d&&this.canDragPoint(f.EDraggingGripPoint.Body)&&this.clickToSelect(e))&&(this.adornerDraggingPoint=f.EDraggingGripPoint.Body,!0)}calcDragDistance(e){if(!this.prevValue)return void(this.prevValue=e);this.adornerDraggingPoint===f.EDraggingGripPoint.Body?(this.x1=this.x1-(this.prevValue.x-e.x),this.x2=this.x2-(this.prevValue.x-e.x),this.y1=this.y1-(this.prevValue.y-e.y),this.y2=this.y2-(this.prevValue.y-e.y)):this.adornerDraggingPoint===f.EDraggingGripPoint.x1y1?this.resizeDirections===a.EXyDirection.XDirection?this.x1-=this.prevValue.x-e.x:(this.resizeDirections===a.EXyDirection.YDirection||(this.x1-=this.prevValue.x-e.x),this.y1-=this.prevValue.y-e.y):this.adornerDraggingPoint===f.EDraggingGripPoint.x2y2?this.resizeDirections===a.EXyDirection.XDirection?this.x2-=this.prevValue.x-e.x:(this.resizeDirections===a.EXyDirection.YDirection||(this.x2-=this.prevValue.x-e.x),this.y2-=this.prevValue.y-e.y):this.adornerDraggingPoint===f.EDraggingGripPoint.x2y1?this.resizeDirections===a.EXyDirection.XDirection?this.x2-=this.prevValue.x-e.x:(this.resizeDirections===a.EXyDirection.YDirection||(this.x2-=this.prevValue.x-e.x),this.y1-=this.prevValue.y-e.y):this.adornerDraggingPoint===f.EDraggingGripPoint.x1y2&&(this.resizeDirections===a.EXyDirection.XDirection?this.x1-=this.prevValue.x-e.x:(this.resizeDirections===a.EXyDirection.YDirection||(this.x1-=this.prevValue.x-e.x),this.y2-=this.prevValue.y-e.y));const t=Math.abs(this.x2-this.x1)/this.initialWidth;this.scaleOnResize&&t&&(this.scale=t),this.prevValue=e}onDpiChanged(e){super.onDpiChanged(e),this.notifyPropertyChanged(v.PROPERTY.STROKE)}toJSON(){const e=super.toJSON(),t={fontFamily:this.fontFamily,fontSize:this.fontSize,textColor:this.textColor,rotation:this.rotation,text:this.text};return Object.assign(e.options,t),e}checkIsClickedOnAnnotationInternal(e,t){const{x1:i,x2:r,y1:n,y2:s}=this.getAnnotationBorders(!0);return(0,u.testIsInBounds)(e,t,i,s,r,n)}updateAdornerInner(){const e=this.parentSurface.domSvgAdornerLayer;if(this.deleteAdorner(),this.isSelected){const{x1:t,x2:i,y1:r,y2:n}=this.getAdornerAnnotationBorders(),s=this.svgStringAdornerTemplate(t,r,i,n);this.svgAdorner=y.annotationHelpers.createSvg(s,e)}}svgStringAdornerTemplate(e,t,i,r){let n=`<svg xmlns="http://www.w3.org/2000/svg">\n <rect x="${e}" y="${t}" width="${i-e}" height="${r-t}" stroke="${this.selectionBoxStroke}" stroke-width="${this.selectionBoxThickness}px" fill="none" />\n `;const s=this.getAdornerAnnotationBorders(!1,!0);return this.canDragPoint(f.EDraggingGripPoint.x1y1)&&(n+=this.getAnnotationGripSvg(s.x1,s.y1)),this.canDragPoint(f.EDraggingGripPoint.x2y2)&&(n+=this.getAnnotationGripSvg(s.x2,s.y2)),this.canDragPoint(f.EDraggingGripPoint.x2y1)&&(n+=this.getAnnotationGripSvg(s.x2,s.y1)),this.canDragPoint(f.EDraggingGripPoint.x1y2)&&(n+=this.getAnnotationGripSvg(s.x1,s.y2)),n+="</svg>",n}}t.NativeTextAnnotation=C},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESciChartSurfaceType=void 0,function(e){e.Default2D="Default2D",e.Pie2D="Pie2D",e.Default3D="Default3D"}(t.ESciChartSurfaceType||(t.ESciChartSurfaceType={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildAxes=void 0;const r=i(178),n=i(271),s=i(183),o=i(186),a=i(90),l=i(139),h=i(138),u=i(209),d=i(118),c=i(89),p=i(58),g=i(17),f=i(77),y=i(36),v=i(14);(0,v.registerType)(g.EBaseType.LabelProvider,f.ELabelProviderType.Numeric,e=>new a.NumericLabelProvider(e),!0),(0,v.registerType)(g.EBaseType.LabelProvider,f.ELabelProviderType.Date,e=>new s.DateLabelProvider(e),!0),(0,v.registerType)(g.EBaseType.LabelProvider,f.ELabelProviderType.Logarithmic,e=>new o.LogarithmicLabelProvider(e),!0),(0,v.registerType)(g.EBaseType.LabelProvider,f.ELabelProviderType.SmartDate,e=>new h.SmartDateLabelProvider,!0),(0,v.registerType)(g.EBaseType.LabelProvider,f.ELabelProviderType.Text,e=>new u.TextLabelProvider(e),!0),(0,v.registerType)(g.EBaseType.LabelProvider,f.ELabelProviderType.Pie,e=>new l.PieLabelProvider(e),!0);t.buildAxes=(e,t)=>{"string"==typeof t&&(t=JSON.parse(t,y.chartReviver));const i=[];if(Array.isArray(t))for(const r of t)i.push(m(e,r));else i.push(m(e,t));return i};const m=(e,t)=>{let i;switch(t.type){case p.EAxisType.CategoryAxis:i=new r.CategoryAxis(e,t.options);break;case p.EAxisType.NumericAxis:i=new c.NumericAxis(e,t.options);break;case p.EAxisType.LogarithmicAxis:i=new d.LogarithmicAxis(e,t.options);break;case p.EAxisType.DateTimeNumericAxis:i=new n.DateTimeNumericAxis(e,t.options);break;default:i=new c.NumericAxis(e,{})}return i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CategoryAxis=void 0;const r=i(58),n=i(443),s=i(183);class o extends n.CategoryAxisBase{constructor(e,t){var i;super(e,t),this.type=r.EAxisType.CategoryAxis,this.labelProvider=null!==(i=null==t?void 0:t.labelProvider)&&void 0!==i?i:new s.DateLabelProvider(t)}}t.CategoryAxis=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericAnimation=void 0;const r=i(22),n=i(65),s=i(39);t.GenericAnimation=class{constructor(e){var t,i,o,a;this.delay=0,this.duration=1e3,this.ease=s.easing.linear,this.id=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:(0,r.generateGuid)(),this.delay=null!==(i=null==e?void 0:e.delay)&&void 0!==i?i:this.delay,this.duration=null!==(o=null==e?void 0:e.duration)&&void 0!==o?o:this.duration,(null==e?void 0:e.ease)&&"string"==typeof e.ease&&(e.ease=s.easing[e.ease]),this.ease=null!==(a=null==e?void 0:e.ease)&&void 0!==a?a:this.ease,this.from=e.from,this.to=e.to,this.onAnimate=e.onAnimate,this.onCompleted=null==e?void 0:e.onCompleted,this.animationFSM=new n.AnimationFiniteStateMachine(this),(null==e?void 0:e.setInitialValueImmediately)&&this.onAnimate(this.from,this.to,0)}get isComplete(){return this.animationFSM.is([n.EAnimationState.Completed])}reset(){this.animationFSM=new n.AnimationFiniteStateMachine(this)}update(e){const t=this.animationFSM.update(e);[n.EAnimationStateTransition.InitialState_Running,n.EAnimationStateTransition.Delayed_Running].includes(t)&&this.onAnimate(this.from,this.to,0),this.animationFSM.is([n.EAnimationState.Running,n.EAnimationState.Completed])&&this.onAnimate(this.from,this.to,this.animationFSM.animationProgress),[n.EAnimationStateTransition.Running_Completed,n.EAnimationStateTransition.InitialState_Completed].includes(t)&&this.onCompleted&&this.onCompleted()}cancel(){this.animationFSM.toCompleted()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtil=void 0;t.NumberUtil=class{static constrain(e,t,i){return Math.max(Math.min(e,i),t)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDefaultRenderLayer=void 0,function(e){e[e.AxisBandsLayer=0]="AxisBandsLayer",e[e.MinorGridLinesLayer=1]="MinorGridLinesLayer",e[e.MajorGridLinesLayer=2]="MajorGridLinesLayer",e[e.AnnotationsBelowSeriesLayer=3]="AnnotationsBelowSeriesLayer",e[e.SeriesLayer=4]="SeriesLayer",e[e.AxisBordersLayer=5]="AxisBordersLayer",e[e.AxesLayer=6]="AxesLayer",e[e.AnnotationsAboveSeriesLayer=7]="AnnotationsAboveSeriesLayer"}(t.EDefaultRenderLayer||(t.EDefaultRenderLayer={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.drawBorder=void 0;const r=i(86),n=i(12);t.drawBorder=(e,t,i,s,o,a,l,h,u)=>{if(0===h&&0===a&&0===o&&0===l)return;const d=i.newBrush(u,!0),c=(0,n.getVectorRectVertex)(t);c.push_back((0,r.createNativeRect)(t,s.x,s.y-a,s.x+s.width+l,s.y)),c.push_back((0,r.createNativeRect)(t,s.x+s.width,s.y,s.x+s.width+l,s.y+s.height+h)),c.push_back((0,r.createNativeRect)(t,s.x-o,s.y+s.height,s.x+s.width,s.y+s.height+h)),c.push_back((0,r.createNativeRect)(t,s.x-o,s.y-a,s.x,s.y+s.height)),e.drawRects(c,d,0,0)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateLabelProvider=void 0;const r=i(77),n=i(41),s=i(21),o=i(109);class a extends o.LabelProviderBase2D{constructor(e){var t,i;super(Object.assign({labelFormat:null!==(t=null==e?void 0:e.labelFormat)&&void 0!==t?t:n.ENumericFormat.Date_DDMMYYYY,cursorLabelFormat:null!==(i=null==e?void 0:e.cursorLabelFormat)&&void 0!==i?i:n.ENumericFormat.Date_DDMMYYYY},e)),this.type=r.ELabelProviderType.Date,this.formatLabelProperty=e=>this.applyFormat((0,s.formatNumber)(e,this.numericFormat,this.precision)),this.formatCursorLabelProperty=e=>{var t,i;return this.applyFormat((0,s.formatNumber)(e,null!==(t=this.cursorNumericFormat)&&void 0!==t?t:this.numericFormat,null!==(i=this.cursorPrecision)&&void 0!==i?i:this.precision))}}onBeginAxisDraw(){}}t.DateLabelProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlippedNumericCoordinateCalculator=void 0;const r=i(106);class n extends r.CoordinateCalculatorBase{constructor(e,t,i,r,n=0,s=!1){super(e,t,i,r,n,!0),this.nativeCalculator=s?new e.FlippedLinearCoordinateCalculatorSingle(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset):new e.FlippedLinearCoordinateCalculatorDouble(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset)}}t.FlippedNumericCoordinateCalculator=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericCoordinateCalculator=void 0;const r=i(106);class n extends r.CoordinateCalculatorBase{constructor(e,t,i,r,n=0,s=!1){super(e,t,i,r,n,!1),this.nativeCalculator=s?new e.LinearCoordinateCalculatorSingle(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset):new e.LinearCoordinateCalculatorDouble(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset)}}t.NumericCoordinateCalculator=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogarithmicLabelProvider=void 0;const r=i(41),n=i(21),s=i(90);class o extends s.NumericLabelProvider{constructor(e){var t,i;super(Object.assign({labelFormat:null!==(t=null==e?void 0:e.labelFormat)&&void 0!==t?t:r.ENumericFormat.Scientific,labelPrecision:null!==(i=null==e?void 0:e.labelPrecision)&&void 0!==i?i:1},e)),this.formatLabelProperty=e=>this.numericFormat===r.ENumericFormat.Scientific?this.applyFormat((0,n.toScientific)(e,this.precision,this.logarithmicBase)):this.applyFormat((0,n.formatNumber)(e,this.numericFormat,this.precision))}}t.LogarithmicLabelProvider=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector3=void 0;const r=i(1);class n{constructor(e,t,i){this.xProperty=e,this.yProperty=t,this.zProperty=i}static get zero(){return n.zeroVector}get x(){return this.xProperty}get y(){return this.yProperty}get z(){return this.zProperty}toTsrVector3(e){return r.Guard.notNull(e,"webAssemblyContext"),new e.TSRVector3(this.x,this.y,this.z)}subtract(e){return new n(this.x-e.x,this.y-e.y,this.z-e.z)}add(e){return new n(this.x+e.x,this.y+e.y,this.z+e.z)}scalarMultiply(e){return new n(this.x*e,this.y*e,this.z*e)}crossProduct(e){return new n(this.y*e.z-this.z*e.y,this.z*e.x-this.x*e.z,this.x*e.y-this.y*e.x)}get length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){const e=1/this.length;if(0===e)throw new Error("Vector3 magnitude is zero, cannot normalize!");this.xProperty=this.xProperty*e,this.yProperty=this.yProperty*e,this.zProperty=this.zProperty*e}toString(){return`Vector3 (${this.xProperty.toFixed(2)}, ${this.yProperty.toFixed(2)}, ${this.zProperty.toFixed(2)})`}}t.Vector3=n,n.zeroVector=new n(0,0,0)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceWarnings=void 0;const r=i(290);t.performanceWarnings={dataDistributionFlagNaN:new r.OneTimePerformanceWarning("Data Distribution flag (BaseDataSeries.containsNaN = false) can be applied to improve performance. Read this website article https://www.scichart.com/documentation/js/current/DataResampling.html for more info. To disable this warning set SciChartDefaults.performanceWarnings = false"),dataDistributionFlagSortedAscending:new r.OneTimePerformanceWarning("Data Distribution flag (BaseDataSeries.isSorted = true) can be applied to improve performance. Read this website article https://www.scichart.com/documentation/js/current/DataResampling.html for more info. To disable this warning set SciChartDefaults.performanceWarnings = false"),subchartBackgroundNotSimpleColor:new r.OneTimePerformanceWarning("When using isTransparent: false on a SubChart, the background needs to be a simple color, not an html gradient (which the default theme uses). To disable this warning set SciChartDefaults.performanceWarnings = false"),dataLabelsSkippingMany:new r.OneTimePerformanceWarning("DataLabelProvider generated many more labels than it could display. To improve performance consider increasing the pointGapThreshold, increasing the skipNumber, or decreasing the pointCountThreshold. To disable this warning set SciChartDefaults.performanceWarnings = false")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESvgClippingMode=void 0,function(e){e.SeriesViewRect="SeriesViewRect",e.SubChart="SubChart",e.Chart="Chart"}(t.ESvgClippingMode||(t.ESvgClippingMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomAlignedOuterAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(59);class o extends s.BaseAxisLayoutStrategy{constructor(){super(),this.type=r.ELayoutStrategyType.BottomOuter,this.layoutAxisPartsStrategy=n.layoutAxisPartsBottomStrategy}measureAxes(e,t,i){var r,s;let o=null!==(s=null===(r=e.adjustedPadding)||void 0===r?void 0:r.bottom)&&void 0!==s?s:0;o+=e.bottomViewportBorder+e.bottomCanvasBorder,i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),o+=(0,n.getHorizontalAxisRequiredSize)(e.axisLayoutState),(0,n.updateLeftAndRightChartLayoutState)(t,e.axisLayoutState.additionalLeftSize,e.axisLayoutState.additionalRightSize)}),t.bottomOuterAreaSize=Math.max(t.bottomOuterAreaSize,o)}layoutAxes(e,t,i,r,n){n.forEach(e=>{e.axisLength=void 0,e.offset=0}),this.layoutAxesFromTopToBottom(e,t,i,r,n)}}t.BottomAlignedOuterAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LeftAlignedOuterAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(59);class o extends s.BaseAxisLayoutStrategy{constructor(){super(),this.type=r.ELayoutStrategyType.LeftOuter,this.layoutAxisPartsStrategy=n.layoutAxisPartsLeftStrategy}measureAxes(e,t,i){var r,s;let o=null!==(s=null===(r=e.adjustedPadding)||void 0===r?void 0:r.left)&&void 0!==s?s:0;o+=e.leftViewportBorder+e.leftCanvasBorder,i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),o+=(0,n.getVerticalAxisRequiredSize)(e.axisLayoutState),(0,n.updateTopAndBottomChartLayoutState)(t,e.axisLayoutState.additionalTopSize,e.axisLayoutState.additionalBottomSize)}),t.leftOuterAreaSize=Math.max(t.leftOuterAreaSize,o)}layoutAxes(e,t,i,r,n){n.forEach(e=>{e.axisLength=void 0,e.offset=0}),this.layoutAxesFromRightToLeft(e,t,i,r,n)}}t.LeftAlignedOuterAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RightAlignedOuterAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(59);class o extends s.BaseAxisLayoutStrategy{constructor(){super(),this.type=r.ELayoutStrategyType.RightOuter,this.layoutAxisPartsStrategy=n.layoutAxisPartsRightStrategy}measureAxes(e,t,i){var r,s;let o=null!==(s=null===(r=e.adjustedPadding)||void 0===r?void 0:r.right)&&void 0!==s?s:0;o+=e.rightViewportBorder+e.rightCanvasBorder,i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),o+=(0,n.getVerticalAxisRequiredSize)(e.axisLayoutState),(0,n.updateTopAndBottomChartLayoutState)(t,e.axisLayoutState.additionalTopSize,e.axisLayoutState.additionalBottomSize)}),t.rightOuterAreaSize=Math.max(t.rightOuterAreaSize,o)}layoutAxes(e,t,i,r,n){n.forEach(e=>{e.axisLength=void 0,e.offset=0}),this.layoutAxesFromLeftToRight(e,t,i,r,n)}}t.RightAlignedOuterAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TopAlignedOuterAxisLayoutStrategy=void 0;const r=i(37),n=i(16),s=i(59);class o extends s.BaseAxisLayoutStrategy{constructor(){super(),this.type=r.ELayoutStrategyType.TopOuter,this.layoutAxisPartsStrategy=n.layoutAxisPartsTopStrategy}measureAxes(e,t,i){var r,s;let o=null!==(s=null===(r=e.adjustedPadding)||void 0===r?void 0:r.top)&&void 0!==s?s:0;o+=e.topViewportBorder+e.topCanvasBorder,i.forEach(e=>{e.measure(),(0,n.updateAxisLayoutState)(e),o+=(0,n.getHorizontalAxisRequiredSize)(e.axisLayoutState),(0,n.updateLeftAndRightChartLayoutState)(t,e.axisLayoutState.additionalLeftSize,e.axisLayoutState.additionalRightSize)}),t.topOuterAreaSize=Math.max(t.topOuterAreaSize,o)}layoutAxes(e,t,i,r,n){n.forEach(e=>{e.axisLength=void 0,e.offset=0}),this.layoutAxesFromBottomToTop(e,t,i,r,n)}}t.TopAlignedOuterAxisLayoutStrategy=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderPassData=void 0;t.RenderPassData=class{constructor(e,t,i,r,n,s){this.indexRange=e,this.getxCoordinateCalculator=t,this.getyCoordinateCalculator=i,this.isVerticalChart=r,this.pointSeries=n,this.resamplingHash=s}get xCoordinateCalculator(){return this.getxCoordinateCalculator()}get yCoordinateCalculator(){return this.getyCoordinateCalculator()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initDrawEngineSingleChart=t.createSingleInternal=t.sciChartSingleDestinations=void 0;const r=i(289),n=i(53),s=i(1),o=i(71),a=i(300),l=i(125),h=i(91),u=i(92),d=i(66),c=i(4),p=i(12);t.sciChartSingleDestinations=[];t.createSingleInternal=(e,i)=>new Promise((s,a)=>{var l;const p=u.default.initCanvas(e,null==i?void 0:i.widthAspect,null==i?void 0:i.heightAspect,void 0,null==i?void 0:i.disableAspect),g=null!==(l=null==i?void 0:i.loader)&&void 0!==l?l:new h.DefaultSciChartLoader,f=g.addChartLoader(p.domDivContainer,null==i?void 0:i.theme),y=o.WebGlHelper.getWebGlSupport();if(y!==o.EWebGLSupport.WebGL2&&y!==o.EWebGLSupport.WebGL1)throw Error("Sorry Your browser does not support WebGL.");{const e=(0,c.getLocateFile)(d.sciChartConfig);new r({locateFile:e,noInitialRun:!0}).then(e=>{g.removeChartLoader(p.domDivContainer,f),e.doNotCaptureKeyboard=!0,(0,t.initDrawEngineSingleChart)(e,p,s,null==i?void 0:i.theme),(0,n.checkBuildStamp)(e)}).catch(()=>{g.removeChartLoader(p.domDivContainer,f),a("Could not load SciChart WebAssembly module.\n Check your build process and ensure that your scichart2d.wasm, scichart2d.data and scichart2d.js files are from the same version")})}});t.initDrawEngineSingleChart=(e,i,r,n)=>{s.Guard.notNull(n,"theme");const o=i.domCanvas2D.width,h=i.domCanvas2D.height;let c;e.preRun.push(()=>ENV.SDL_EMSCRIPTEN_KEYBOARD_ELEMENT="#chart_WebGL"),e.canvas=i.domCanvasWebGL;const g={InitializeChart(){c=new d.SciChartSurface(e,{canvases:i}),c.applyTheme(n),t.sciChartSingleDestinations.push({canvasElementId:i.domCanvasWebGL.id,sciChartSurface:c,width:o,height:h}),c.setDestinations(t.sciChartSingleDestinations),setTimeout(()=>{c.invalidateElement(),l.licenseManager.applyLicense2D(e,c,!0);const t=u.default.subscribeToResize(i.domChartRoot,i.aspect,c,i.disableAspect);c.addDeletable(t),c.addDeletable((0,p.freeCache)(e)),r({wasmContext:e,sciChartSurface:c})},0)},Draw(e){c.renderSurface.onRenderTimeElapsed()},Update(e){a.Logger.log("sciChartInitCommon.ts Update")},ShutDownChart(){a.Logger.log("sciChartInitCommon.ts ShutDownChart")}},f=e.SCRTSampleChartInterface.implement(g),y=new e.SCRTFrameRenderer2D;f.SetFrameRenderer(y),f.SetFPSCounterEnabled(!1),e.SCRTSetGlobalSampleChartInterface(f),e.callMain()}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedColumnCollection=void 0;const r=i(0),n=i(3),s=i(8),o=i(40),a=i(312),l=i(7),h=i(116);class u extends a.BaseStackedCollection{constructor(e,t){var i,r;super(e,t),this.type=s.ESeriesType.StackedColumnCollection,this.seriesGroups={},this.dataPointWidthProperty=.5,this.zeroLineYProperty=0,this.dataPointWidthProperty=null!==(i=null==t?void 0:t.dataPointWidth)&&void 0!==i?i:this.dataPointWidthProperty,this.zeroLineYProperty=null!==(r=null==t?void 0:t.zeroLineY)&&void 0!==r?r:this.zeroLineYProperty,this.getColumnWidth=this.getColumnWidth.bind(this),this.detachChildSeries=this.detachChildSeries.bind(this),this.attachChildSeries=this.attachChildSeries.bind(this),this.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(this.detachChildSeries),null===(i=e.getNewItems())||void 0===i||i.forEach(this.attachChildSeries)})}delete(){this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),super.delete()}updateAccumulatedVectors(){const e=this.getDataSeriesValuesCount();if(!this.isAccumulatedVectorDirty||!e)return;this.checkXValuesCorrect(),this.isAccumulatedVectorDirty=!1,this.clearAccumulatedVectors(e),this.updateGroups();const t=this.seriesGroups,i=this.getGroupsCount();Object.keys(t).forEach((e,r)=>{t[e].forEach(e=>{e.setGroupsCount(i),e.setGroupIndex(r)})});for(let i=0;i<e;i++)this.accumulatedValues0.push_back(this.zeroLineY),Object.keys(t).forEach(e=>{const r=t[e];let n;this.isOneHundredPercent&&(n=r.reduce((e,t)=>e+t.dataSeries.getNativeYValues().get(i),0));let s=0;r.forEach(e=>{let t=e.dataSeries.getNativeYValues().get(i);this.isOneHundredPercent&&(t=100*t/n);const r=s+t;e.accumulatedValues.push_back(r),s=r})})}draw(e,t){if(this.canDraw){if(this.updateHitTestProviders(t),!this.isEnoughDataToDraw())return;this.updateAccumulatedVectors();const i=t.xCoordinateCalculator.isCategoryCoordinateCalculator,r=this.getFirstSeries().dataSeries,n=this.parentSurface.seriesViewRect,{isVerticalChart:s,xCoordinateCalculator:o,yCoordinateCalculator:a}=t,l=i?r.getNativeIndexes():r.getNativeXValues(),h=this.seriesGroups,u=this.getGroupsCount(),c=this.getColumnWidth(o);Object.keys(h).forEach((t,i)=>{let r;h[t].forEach((t,h)=>{const p=0===h?this.accumulatedValues0:r.accumulatedValues,g=t.accumulatedValues;d(this.webAssemblyContext,e,o,a,s,this.nativeDrawingProvider,l,p,g,t.getFillBrush(),t.getStrokePen(),n,c,0,u,i),r=t})})}}getXRange(){if(!this.isEnoughDataToDraw())return new n.NumberRange;const e=this.getFirstSeries().dataSeries.xRange,t=this.getFirstSeries().dataSeries.count();return(0,h.getXRange)(e,t,this.dataPointWidth)}getYRange(e,t){const i=super.getYRange(e,t);return new n.NumberRange(Math.min(i.min,this.zeroLineY),Math.max(i.max,this.zeroLineY))}onAttach(e){super.onAttach(e),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTStackedColumnSeriesDrawingProvider}notifyPropertyChanged(e){super.notifyPropertyChanged(e),e!==l.PROPERTY.DATA_SERIES&&e!==l.PROPERTY.IS_VISIBLE&&e!==l.PROPERTY.IS_ONE_HUNDRED_PERCENT&&e!==l.PROPERTY.STACKED_GROUP_ID||(this.isAccumulatedVectorDirty=!0)}hasDataSeriesValues(){return this.isEnoughDataToDraw()}getColumnWidth(e){const t=this.dataPointWidth,i=this.getFirstSeries().dataSeries,r=e.isCategoryCoordinateCalculator,n=r?i.getNativeIndexes():i.getNativeXValues(),s=this.parentSurface.seriesViewRect,a=this.getGroupsCount();return(0,o.getDataPointWidth)(n,e,s.width,t,r,this.webAssemblyContext)/a}toJSON(e=!1){const t=super.toJSON(e),i={dataPointWidth:this.dataPointWidth,zeroLineY:this.zeroLineY};return Object.assign(t.options,i),t}get dataPointWidth(){return this.dataPointWidthProperty}set dataPointWidth(e){this.dataPointWidthProperty=e,this.notifyPropertyChanged(l.PROPERTY.DATA_POINT_WIDTH)}get zeroLineY(){return this.zeroLineYProperty}set zeroLineY(e){this.zeroLineYProperty=e,this.notifyPropertyChanged(l.PROPERTY.ZERO_LINE_Y)}detachChildSeries(e){e.onDetachFromParentCollection(),this.invalidateParent()}attachChildSeries(e){e.onAttachToParentCollection(this,this.getParentSurface,this.notifyPropertyChanged,this.getColumnWidth),this.invalidateParent()}checkXValuesCorrect(){const e=this.getDataSeriesValuesCount();this.getVisibleSeries().forEach(t=>{var i;if((null===(i=t.dataSeries)||void 0===i?void 0:i.count())!==e)throw Error("All stacked series in on collection should have the same amount of X Values")})}clearAccumulatedVectors(e){this.accumulatedValues0.clear(),this.accumulatedValues0.reserve(e),this.asArray().forEach(t=>{t.accumulatedValues.clear(),t.accumulatedValues.reserve(e)})}getLastVisibleSeries(){const[e]=this.getVisibleSeries().slice(-1);return e}updateGroups(){const e={};this.getVisibleSeries().forEach(t=>{const i=t.stackedGroupId;e[i]||(e[i]=[]),e[i].push(t)}),this.seriesGroups=e}getGroupsCount(){return Object.keys(this.seriesGroups).length}}t.StackedColumnCollection=u;const d=(e,t,i,r,n,s,o,a,l,h,u,d,c,p,g,f)=>{const y=new e.SCRTStackedColumnDrawingParams;y.count=o.size(),y.columnWidth=c<=0?1:c,y.spacing=p,y.viewportWidth=d.width,y.viewportHeight=d.height,y.verticalChart=n,y.stackedGroupCount=g,y.stackedGroupIndex=f,y.forceShaderMethod=!0,u&&y.SetLinesPen(u),h&&y.SetFillBrush(h);const v=t.getNativeContext();s.DrawPointsVec(v,o,l,a,i.nativeCalculator,r.nativeCalculator,y),y.delete()}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePointSeriesResampled=void 0;t.BasePointSeriesResampled=class{constructor(e,t){this.wasmContext=e,this.intIndexes=new e.IntVector,this.indexes=new e.SCRTDoubleVector,this.xValues=new e.SCRTDoubleVector,this.yValues=new e.SCRTDoubleVector,this.xRange=t}get count(){return this.xValues.size()}delete(){this.intIndexes.delete(),this.indexes.delete(),this.xValues.delete(),this.yValues.delete()}updateIndexes(){const e=this.count;this.indexes.resizeFast(e);for(let t=0;t<e;t++)this.indexes.set(t,this.intIndexes.get(t))}clearIntIndexes(){this.intIndexes.clear()}debugOutputForUnitTests(){console.log("points count "+this.count),console.log("xResampled at min",this.xValues.get(0)),console.log("openResampled at min",this.yValues.get(0));const e=Math.round(this.count/2);console.log("middle",e),console.log("xResampled at middle",this.xValues.get(e)),console.log("yValues at middle",this.yValues.get(e));const t=this.count-1;console.log("xResampled at end",this.xValues.get(t)),console.log("yValues at end",this.yValues.get(t))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CrossPointMarker=void 0;const r=i(43),n=i(95);class s extends n.BasePointMarker{constructor(e,t){super(e,t),this.type=r.EPointMarkerType.Cross}drawSprite(e,t,i,r,n,s){if(n>0){e.strokeStyle=r,e.lineWidth=n;const s=e.canvas.width/2,o=e.canvas.height/2,a=i/2,l=t/2;e.beginPath(),e.moveTo(s,o-a),e.lineTo(s,o+a),e.stroke(),e.beginPath(),e.moveTo(s-l,o),e.lineTo(s+l,o),e.stroke()}}}t.CrossPointMarker=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePointMarkerStyle=void 0;const r=i(43);t.BasePointMarkerStyle=class{constructor(e){var t,i,r;this.width=0,this.height=0,this.type=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:this.type,this.width=null!==(i=null==e?void 0:e.width)&&void 0!==i?i:this.width,this.height=null!==(r=null==e?void 0:e.height)&&void 0!==r?r:this.height}get isCustomPointMarker(){return this.type===r.EPointMarkerType.Sprite}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpritePointMarker=void 0;const r=i(43),n=i(201),s=i(95),o=i(308);class a extends s.BasePointMarker{constructor(e,t){super(e,t),this.type=r.EPointMarkerType.Sprite,this.image=null==t?void 0:t.image,(null==t?void 0:t.width)&&(this.width=t.width),(null==t?void 0:t.height)&&(this.height=t.height)}get image(){return this.imageProperty}set image(e){const t=this.imageProperty;this.imageProperty=e,this.imageProperty&&(this.width=this.imageProperty.width,this.height=this.imageProperty.height),this.notifyPropertyChanged(o.PROPERTY.IMAGE,e,t)}drawSprite(e,t,i,r,n,s){const o=e.canvas.width/2,a=e.canvas.height/2,l=this.height/2,h=this.width/2;this.image&&e.drawImage(this.image,o-h,a-l,this.width,this.height)}getPointMarkerStyle(){return new n.CustomPointMarkerStyle({type:this.type,width:this.width,height:this.height,image:this.image})}toJSON(){const e=super.toJSON(),t={image:this.image};return Object.assign(e.options,t),e}}t.SpritePointMarker=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomPointMarkerStyle=void 0;const r=i(199);class n extends r.BasePointMarkerStyle{constructor(e){var t;super(e),this.image=null!==(t=null==e?void 0:e.image)&&void 0!==t?t:this.image}}t.CustomPointMarkerStyle=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SquarePointMarker=void 0;const r=i(5),n=i(43),s=i(95);class o extends s.BasePointMarker{constructor(e,t){super(e,t),this.type=n.EPointMarkerType.Square}drawSprite(e,t,i,n,s,o){const a=e.canvas.width/2,l=e.canvas.height/2,h=i/2,u=t/2,d=s/2,c=new r.Point(a-u+d,l-h+d),p=new r.Point(a+u-d,l+h-d);e.fillStyle=o,e.beginPath(),e.moveTo(c.x,c.y),e.lineTo(p.x,c.y),e.lineTo(p.x,p.y),e.lineTo(c.x,p.y),e.closePath(),e.fill(),s>0&&(e.strokeStyle=n,e.lineWidth=s,e.stroke())}}t.SquarePointMarker=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrianglePointMarker=void 0;const r=i(5),n=i(43),s=i(95);class o extends s.BasePointMarker{constructor(e,t){super(e,t),this.type=n.EPointMarkerType.Triangle}drawSprite(e,t,i,n,s,o){const a=e.canvas.width/2,l=e.canvas.height/2,h=i/2,u=t/2,d=s/2,c=new r.Point(a,l-h+d),p=new r.Point(a+u-d,l+h-d),g=new r.Point(a-u+d,l+h-d);e.fillStyle=o,e.beginPath(),e.moveTo(c.x,c.y),e.lineTo(p.x,p.y),e.lineTo(g.x,g.y),e.lineTo(c.x,c.y),e.closePath(),e.fill(),s>0&&(e.strokeStyle=n,e.lineWidth=s,e.stroke())}}t.TrianglePointMarker=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XPointMarker=void 0;const r=i(43),n=i(95);class s extends n.BasePointMarker{constructor(e,t){super(e,t),this.type=r.EPointMarkerType.X}drawSprite(e,t,i,r,n,s){const o=e.canvas.width/2,a=e.canvas.height/2,l=i/2,h=t/2,u=n/4;n>0&&(e.strokeStyle=r,e.lineWidth=1.5*n,e.beginPath(),e.moveTo(o-h+u,a-l+u),e.lineTo(o+h-u,a+l-u),e.stroke(),e.beginPath(),e.moveTo(o+h-u,a-l+u),e.lineTo(o-h+u,a+l-u),e.stroke())}}t.XPointMarker=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RolloverModifierRenderableSeriesProps=void 0;const r=i(0),n=i(4),s=i(450);t.RolloverModifierRenderableSeriesProps=class{constructor(e,t=!1){this.tooltipLegendOffsetX=20,this.tooltipLegendOffsetY=20,this.showsRolloverProperty=!0,this.tooltipTextColorProperty=n.SciChartSurfaceBase.DEFAULT_THEME.textAnnotationForeground,this.renderableSeries=e,this.isY1=t}setInvalidateParentCallback(e){this.invalidateParentCallback=e}get showRollover(){return this.showsRolloverProperty}set showRollover(e){this.showsRolloverProperty=e,this.notifyPropertyChanged(s.PROPERTY.SHOWS_ROLLOVER)}get tooltipColor(){return this.tooltipColorProperty?this.tooltipColorProperty:this.getRenderableSeriesStroke()?this.getRenderableSeriesStroke():n.SciChartSurfaceBase.DEFAULT_THEME.textAnnotationBackground}set tooltipColor(e){this.tooltipColorProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_COLOR)}get tooltipTextColor(){return this.tooltipTextColorProperty}set tooltipTextColor(e){this.tooltipTextColorProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_TEXT_COLOR)}get tooltipTitle(){return this.tooltipTitleProperty}set tooltipTitle(e){this.tooltipTitleProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_TITLE)}get markerColor(){return this.markerColorProperty?this.markerColorProperty:this.getRenderableSeriesStroke()?this.getRenderableSeriesStroke():n.SciChartSurfaceBase.DEFAULT_THEME.textAnnotationBackground}set markerColor(e){this.markerColorProperty=e,this.notifyPropertyChanged(s.PROPERTY.MARKER_COLOR)}get tooltipDataTemplate(){return this.tooltipDataTemplateProperty}set tooltipDataTemplate(e){this.tooltipDataTemplateProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_DATA_TEMPLATE)}get tooltipLegendTemplate(){return this.tooltipLegendTemplateProperty}set tooltipLegendTemplate(e){console.warn("tooltipLegendTemplate property on the RolloverModifierRenderableSeriesProps will be removed in version 2.0, please set tooltipLegendTemplate on the RolloverModifier instead"),this.tooltipLegendTemplateProperty=e}delete(){this.rolloverModifier=void 0,this.marker=(0,r.deleteSafe)(this.marker),this.tooltip=(0,r.deleteSafe)(this.tooltip)}notifyPropertyChanged(e){this.invalidateParentCallback&&this.invalidateParentCallback()}getRenderableSeriesStroke(){if(this.isY1){return this.renderableSeries.strokeY1}return this.renderableSeries.stroke}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedMountainCollection=void 0;const r=i(3),n=i(8),s=i(207),o=i(194),a=i(312),l=i(7);class h extends a.BaseStackedCollection{constructor(e,t){super(e,t),this.type=n.ESeriesType.StackedMountainCollection,this.detachChildSeries=this.detachChildSeries.bind(this),this.attachChildSeries=this.attachChildSeries.bind(this),this.collectionChanged.subscribe(e=>{var t,i;null===(t=e.getOldItems())||void 0===t||t.forEach(this.detachChildSeries),null===(i=e.getNewItems())||void 0===i||i.forEach(this.attachChildSeries)})}delete(){super.delete()}updateAccumulatedVectors(){const e=this.getDataSeriesValuesCount();if(this.isAccumulatedVectorDirty&&e){this.checkXValuesCorrect(),this.isAccumulatedVectorDirty=!1,this.clearAccumulatedVectors(e);for(let t=0;t<e;t++){this.accumulatedValues0.push_back(0);let e,i=0;this.isOneHundredPercent&&(e=this.getVisibleSeries().reduce((e,i)=>e+i.dataSeries.getNativeYValues().get(t),0)),this.getVisibleSeries().forEach(r=>{let n=r.dataSeries.getNativeYValues().get(t);this.isOneHundredPercent&&(n=100*n/e);const s=i+n;r.accumulatedValues.push_back(s),i=s})}}}draw(e,t){if(this.canDraw){if(this.updateHitTestProviders(t),!this.isEnoughDataToDraw())return;this.updateAccumulatedVectors();const i=this.parentSurface.getXAxisById(this.xAxisId);this.getVisibleSeries().reduceRight((r,n,a,l)=>{const h=n.accumulatedValues,u=0===a?this.accumulatedValues0:l[a-1].accumulatedValues,d=new s.XyyPointSeriesWrapped(n.dataSeries,u,h),c=new o.RenderPassData(void 0,t.getxCoordinateCalculator,t.getyCoordinateCalculator,i.isVerticalChart,d);return n.strokeY1=0===a?"transparent":l[a-1].stroke,n.strokeY1DashArray=0===a?[]:l[a-1].strokeDashArray,n.draw(e,c),n},void 0)}}getXRange(){return this.isEnoughDataToDraw()?this.getFirstSeries().dataSeries.xRange:new r.NumberRange}onAttach(e){super.onAttach(e),this.getVisibleSeries().forEach(t=>{t.onAttach(e)})}onDetach(){this.getVisibleSeries().forEach(e=>{e.onDetach()}),super.onDetach()}notifyPropertyChanged(e){super.notifyPropertyChanged(e),e!==l.PROPERTY.DATA_SERIES&&e!==l.PROPERTY.IS_VISIBLE&&e!==l.PROPERTY.IS_ONE_HUNDRED_PERCENT||(this.isAccumulatedVectorDirty=!0)}hasDataSeriesValues(){return this.isEnoughDataToDraw()}detachChildSeries(e){e.onDetachFromParentCollection(),this.invalidateParent()}attachChildSeries(e){e.onAttachToParentCollection(this,this.getParentSurface,this.notifyPropertyChanged),this.parentSurface&&e.onAttach(this.parentSurface),this.invalidateParent()}checkXValuesCorrect(){const e=this.getDataSeriesValuesCount();this.getVisibleSeries().forEach(t=>{if(t.dataSeries.count()!==e)throw Error("All stacked series in on collection should have the same amount of X Values")})}clearAccumulatedVectors(e){this.accumulatedValues0.clear(),this.accumulatedValues0.reserve(e),this.asArray().forEach(t=>{t.accumulatedValues.clear(),t.accumulatedValues.reserve(e)})}getLastVisibleSeries(){const[e]=this.getVisibleSeries().slice(-1);return e}}t.StackedMountainCollection=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyyPointSeriesWrapped=void 0;const r=i(94);class n extends r.BasePointSeriesWrapped{constructor(e,t,i){super(e,t),this.y1Values=null!=i?i:e.getNativeY1Values()}}t.XyyPointSeriesWrapped=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringOccurrences=t.htmlToElement=void 0,t.htmlToElement=function(e){const t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild},t.stringOccurrences=function(e,t,i=!1){if(e+="",(t+="").length<=0)return e.length+1;let r=0,n=0;const s=i?1:t.length;for(;n=e.indexOf(t,n),n>=0;)++r,n+=s;return r}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapText=t.TextLabelProvider=void 0;const n=i(77),s=i(137),o=i(76),a=i(133),l=i(109);class h extends l.LabelProviderBase2D{constructor(e){var t,i;super(e),this.type=n.ELabelProviderType.Text,this.maxLengthProperty=0,this.labelsProperty=null!==(t=null==e?void 0:e.labels)&&void 0!==t?t:[],this.maxLength=null!==(i=null==e?void 0:e.maxLength)&&void 0!==i?i:this.maxLength,this.formatLabelProperty=e=>{var t,i;if(this.parentAxis.isCategoryAxis&&Array.isArray(this.labels)){const i=this.parentAxis.getCurrentCoordinateCalculator().transformDataToIndex(e);return this.wrapText(null!==(t=this.labels[i])&&void 0!==t?t:"")}return this.wrapText(null!==(i=this.labels[e])&&void 0!==i?i:"")},this.formatCursorLabelProperty=this.formatLabelProperty}get labels(){return this.labelsProperty}set labels(e){this.labelsProperty=e,this.invalidateParent()}get maxLength(){return this.maxLengthProperty}set maxLength(e){this.maxLengthProperty=e,this.invalidateParent()}onBeginAxisDraw(){}getLabelWidth(e,t,i){if(this.useNativeText||this.rotation%90==0||!this.parentAxis.isHorizontalAxis){const r=a.labelCache.getLabel(t,this.styleId);if(!r){const{padding:r}=i;return(0,o.measureTextWidth)(e,t)+r.left+r.right}return r.textureWidth}return(Array.isArray(t)?t:t.split("\n")).length*this.lineSpacing*i.fontSize+i.padding.left+i.padding.right}getLabelTextureAsync(e,t,i){return r(this,void 0,void 0,(function*(){if(s.textureWorker.isActive){let r;return r=Array.isArray(e)?yield s.textureWorker.measureAndGetImageData(e,i,this.rotation,this.lineSpacing):yield s.textureWorker.measureAndGetImageData([e],i,this.rotation,this.lineSpacing),t.createTextureFromImageData(r.imageData,r.textureWidth,r.textureHeight)}return this.getLabelTexture(e,t,i)}))}getLabelTexture(e,t,i){const r=e.split("\n");return t.createTextTexture(r,i,this.rotation,this.lineSpacing)}wrapText(e){return e&&Array.isArray(e)?e.join("\n"):(0,t.wrapText)(e,this.maxLength).join("\n")}toJSON(){const e=super.toJSON(),t={labels:this.labels,maxLength:this.maxLength};return Object.assign(e.options,t),e}getCachedStyle(){const e=this.parentAxis;return Object.assign(Object.assign({},e.dpiAdjustedLabelStyle),{rotation:this.rotation,extras:`ls${this.lineSpacing},ml${this.maxLength}`,providerId:this.useSharedCache?void 0:this.providerId})}}t.TextLabelProvider=h;t.wrapText=(e,t)=>{if(0===t)return[e];const i=[];if(!e)return i;const r=e.split(" ");let n="";for(const e of r){const r=n+(""!==n?" ":"")+e;r.length>t?""===n?i.push(e):(i.push(n),n=e):n=r}return i.push(n),i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildDataSeries=void 0;const r=i(322),n=i(324),s=i(326),o=i(327),a=i(328),l=i(329),h=i(331),u=i(333),d=i(211),c=i(335),p=i(213),g=i(216),f=i(212),y=i(337),v=i(214),m=i(215),S=i(56),P=i(8),C=i(36);function A(e,t){return e.hasOwnProperty(t)}t.buildDataSeries=(e,t,i)=>{let r,n;if("string"==typeof t&&(t=JSON.parse(t,C.chartReviver)),"string"==typeof i&&(i=JSON.parse(i,C.chartReviver)),A(t,"xyData")){const s=t.xyData;if(i&&s.xDataId){const t=i[s.xDataId],n=i[s.yDataId];r=new f.XyDataSeries(e,Object.assign({xValues:t,yValues:n},s))}else r=new f.XyDataSeries(e,s);A(s,"filter")&&(n=s.filter)}else if(A(t,"xyyData")){const s=t.xyyData;if(i&&s.xDataId){const t=i[s.xDataId],n=i[s.yDataId],o=i[s.y1DataId];r=new v.XyyDataSeries(e,Object.assign({xValues:t,yValues:n,y1Values:o},s))}else r=new v.XyyDataSeries(e,s);A(s,"filter")&&(n=s.filter)}else if(A(t,"xyzData")){const s=t.xyzData;if(i&&s.xDataId){const t=i[s.xDataId],n=i[s.yDataId],o=i[s.zDataId];r=new m.XyzDataSeries(e,Object.assign({xValues:t,yValues:n,zValues:o},s))}else r=new m.XyzDataSeries(e,s);A(s,"filter")&&(n=s.filter)}else if(A(t,"xyTextData")){const s=t.xyTextData;if(i&&s.xDataId){const t=i[s.xDataId],n=i[s.yDataId];r=new y.XyTextDataSeries(e,Object.assign({xValues:t,yValues:n},s))}else r=new y.XyTextDataSeries(e,s);A(s,"filter")&&(n=s.filter)}else if(A(t,"hlcData")){const s=t.hlcData;if(i&&s.xDataId){const t=i[s.xDataId],n=i[s.highDataId],o=i[s.lowDataId],a=i[s.closeDataId];r=new d.HlcDataSeries(e,Object.assign({xValues:t,highValues:n,lowValues:o,yValues:a},s))}else r=new d.HlcDataSeries(e,s);A(s,"filter")&&(n=s.filter)}else if(A(t,"ohlcData")){const s=t.ohlcData;if(i&&s.xDataId){const t=i[s.xDataId],n=i[s.openDataId],o=i[s.highDataId],a=i[s.lowDataId],l=i[s.closeDataId];r=new p.OhlcDataSeries(e,Object.assign({xValues:t,openValues:n,highValues:o,lowValues:a,closeValues:l},s))}else r=new p.OhlcDataSeries(e,s);A(s,"filter")&&(n=s.filter)}else!A(t,"heatmapData")||t.type!==P.ESeriesType.UniformHeatmapSeries&&t.type!==P.ESeriesType.UniformContoursSeries?A(t,"heatmapData")&&t.type===P.ESeriesType.NonUniformHeatmapSeries&&(r=new c.NonUniformHeatmapDataSeries(e,t.heatmapData)):r=new g.UniformHeatmapDataSeries(e,t.heatmapData);if(n&&("dataSeries"in t.options&&(r=t.options.dataSeries),r)){const e=x(r,n);e&&(r=e)}return r};const x=(e,t)=>{if(t.type===S.EDataFilterType.HlcScaleOffset)return new r.HlcScaleOffsetFilter(e,t.options);if(t.type===S.EDataFilterType.OhlcScaleOffset)return new n.OhlcScaleOffsetFilter(e,t.options);if(t.type===S.EDataFilterType.XyLinearTrend)return new s.XyLinearTrendFilter(e,t.options);if(t.type===S.EDataFilterType.XyMovingAverage)return new o.XyMovingAverageFilter(e,t.options);if(t.type===S.EDataFilterType.XyRatio){const i=t.options;if(Array.isArray(i.divisorSeries)){const r=new Array(e.count()).fill(0);t.options.divisorSeries=new f.XyDataSeries(e.webAssemblyContext,{xValues:r,yValues:i.divisorSeries})}return new a.XyRatioFilter(e,t.options)}return t.type===S.EDataFilterType.XyScaleOffset?new l.XyScaleOffsetFilter(e,t.options):t.type===S.EDataFilterType.XyyScaleOffset?new h.XyyScaleOffsetFilter(e,t.options):t.type===S.EDataFilterType.XyzScaleOffset?new u.XyzScaleOffsetFilter(e,t.options):void 0}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlcDataSeries=void 0;const r=i(0),n=i(1),s=i(3),o=i(67),a=i(55),l=i(51),h=i(24),u=i(60),d=i(10);class c extends u.BaseDataSeries{constructor(e,t){super(e,t),this.type=d.EDataSeriesType.Hlc,this.highValues=new e.SCRTDoubleVector,this.lowValues=new e.SCRTDoubleVector,this.lInitialAnimationValues=new e.SCRTDoubleVector,this.lFinalAnimationValues=new e.SCRTDoubleVector,this.hInitialAnimationValues=new e.SCRTDoubleVector,this.hFinalAnimationValues=new e.SCRTDoubleVector,(null==t?void 0:t.xValues)&&(n.Guard.notNull(t.yValues,"options.yValues"),n.Guard.notNull(t.highValues,"options.highValues"),n.Guard.notNull(t.lowValues,"options.lowValues"),this.appendRange(t.xValues,t.yValues,t.highValues,t.lowValues,t.metadata))}getNativeHighValues(){return this.highValues}getNativeLowValues(){return this.lowValues}append(e,t,i,r,n){if(!this.getIsDeleted()){const s=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,s,[e],[t]),this.appendMetadata(n),s.push_back(e),this.getNativeYValues().push_back(t),this.getNativeHighValues().push_back(i),this.getNativeLowValues().push_back(r),this.notifyDataChanged(d.EDataChangeType.Append,null,1)}}appendRange(e,t,i,r,s){if(!this.getIsDeleted()){n.Guard.isTrue((0,o.isNumberArray)(e)||(0,o.isTypedArray)(e),"xValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(t)||(0,o.isTypedArray)(t),"yValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(i)||(0,o.isTypedArray)(i),"hValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(r)||(0,o.isTypedArray)(r),"lValues must be an array of numbers"),n.Guard.arraysSameLengthArr([{arg:e,name:"xValues"},{arg:t,name:"yValues"},{arg:i,name:"hValues"},{arg:r,name:"lValues"}]),s&&(n.Guard.isTrue(Array.isArray(s),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(e,"xValues",s,"metadata"));const l=this.getNativeXValues(),h=this.getNativeYValues(),u=this.getNativeHighValues(),c=this.getNativeLowValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,l,e,t),this.appendMetadataRange(s,e.length),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,l,e),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,h,t),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,u,i),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,c,r),this.notifyDataChanged(d.EDataChangeType.Append,null,e.length)}}update(e,t,i,r,n){this.getIsDeleted()||(this.validateIndex(e),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[t],e),this.getNativeYValues().set(e,t),this.getNativeHighValues().set(e,i),this.getNativeLowValues().set(e,r),this.setMetadataAt(e,n),this.notifyDataChanged(d.EDataChangeType.Update,e,1))}updateXyhl(e,t,i,r,n,s){if(!this.getIsDeleted()){this.validateIndex(e);const o=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,o,[t],[i],e),o.set(e,t),this.getNativeYValues().set(e,i),this.getNativeHighValues().set(e,r),this.getNativeLowValues().set(e,n),this.setMetadataAt(e,s),this.notifyDataChanged(d.EDataChangeType.Update,e,1)}}insert(e,t,i,r,n,s){if(!this.getIsDeleted()){this.validateIndex(e,"Start index is out of range");const o=this.getNativeXValues(),a=this.getNativeYValues(),l=this.getNativeHighValues(),h=this.getNativeLowValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,o,[t],[i],e),o.insertAt(e,t),a.insertAt(e,i),l.insertAt(e,r),h.insertAt(e,n),this.insertMetadata(e,s),this.notifyDataChanged(d.EDataChangeType.Insert,e,1)}}insertRange(e,t,i,r,s,l){if(!this.getIsDeleted()){n.Guard.isTrue((0,o.isNumberArray)(t)||(0,o.isTypedArray)(t),"xValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(i)||(0,o.isTypedArray)(i),"yValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(r)||(0,o.isTypedArray)(r),"hValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(s)||(0,o.isTypedArray)(s),"lValues must be an array of numbers"),this.validateIndex(e,"Start index is out of range"),n.Guard.arraysSameLengthArr([{arg:t,name:"xValues"},{arg:i,name:"yValues"},{arg:r,name:"hValues"},{arg:s,name:"lValues"}]),l&&(n.Guard.isTrue(Array.isArray(l),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(t,"xValues",l,"metadata"));const h=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,h,t,i,e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,t,h,e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,i,this.getNativeYValues(),e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,r,this.getNativeHighValues(),e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,s,this.getNativeLowValues(),e),this.insertMetadataRange(e,l),this.notifyDataChanged(d.EDataChangeType.Insert,e,t.length)}}removeAt(e){this.getIsDeleted()||(this.validateIndex(e),this.getNativeXValues().removeAt(e),this.getNativeYValues().removeAt(e),this.getNativeHighValues().removeAt(e),this.getNativeLowValues().removeAt(e),this.removeMetadataAt(e),this.notifyDataChanged(d.EDataChangeType.Remove,e,1))}removeRange(e,t){this.getIsDeleted()||(this.validateIndex(e,"Start index is out of range"),this.getNativeXValues().removeRange(e,t),this.getNativeYValues().removeRange(e,t),this.getNativeHighValues().removeRange(e,t),this.getNativeLowValues().removeRange(e,t),this.removeMetadataRange(e,t),this.notifyDataChanged(d.EDataChangeType.Remove,e,t))}clear(){this.getIsDeleted()||(super.clear(),this.getNativeXValues().clear(),this.getNativeYValues().clear(),this.getNativeHighValues().clear(),this.getNativeLowValues().clear(),this.setMetadata(void 0),this.notifyDataChanged(d.EDataChangeType.Clear,null,null))}getXRange(e,t,i,n){const o=this.getXValues(e),{hValues:a,lValues:h}=this.getHlcValues(e);let u;if(t){if(1===this.count()){const e=i?a:o,t=(n?h:o).get(0)-1,r=e.get(0)+1;return new s.NumberRange(t,r)}if(this.count()>1){let e,t,o;try{if(o=this.webAssemblyContext.NumberUtil.MinMax(n?this.getNativeLowValues():this.getNativeXValues()),e=o.minD,o=this.webAssemblyContext.NumberUtil.MinMax(i?this.getNativeHighValues():this.getNativeXValues()),t=o.maxD,!(0,l.isRealNumber)(e)||!(0,l.isRealNumber)(t))return new s.NumberRange(0,0)}finally{(0,r.deleteSafe)(o)}return e===t?new s.NumberRange(e-1,t+1):(e>t&&(u=e,e=t,t=u),new s.NumberRange(e,t))}}else{if(1===this.count()){const e=o.get(0)-1,t=o.get(0)+1;return new s.NumberRange(e,t)}if(this.count()>1){let e=o.get(0),t=o.get(this.count()-1);if(!this.dataDistributionCalculator.isSortedAscending){let i;try{if(i=this.webAssemblyContext.NumberUtil.MinMax(this.getNativeXValues()),!(0,l.isRealNumber)(i.minD)||!(0,l.isRealNumber)(i.maxD))return new s.NumberRange(0,0);e=i.minD,t=i.maxD}finally{(0,r.deleteSafe)(i)}}return e===t?new s.NumberRange(e-1,t+1):(e>t&&(u=e,e=t,t=u),new s.NumberRange(e,t))}}return new s.NumberRange(0,0)}getWindowedYRange(e,t,i=!1,n=d.EDataSeriesValueType.Default,o=!1,a,h){const{hValues:u,lValues:c,yValues:p}=this.getHlcValues(n);if(1===this.count()&&!o){if(o){const e=p.get(0)-1,t=p.get(0)+1;return new s.NumberRange(e,t)}{const e=Math.min(u.get(0),c.get(0))-1,t=Math.max(u.get(0),c.get(0))+1;return new s.NumberRange(e,t)}}const g=i?e:this.getIndicesRange(e);let f=Number.MAX_VALUE,y=Number.MIN_VALUE;const v=Math.max(Math.floor(g.min),0),m=Math.min(Math.ceil(g.max),this.count()-1);if(!(m<v)){if(o){let e;try{if(e=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(p,v,m-v+1),!(0,l.isRealNumber)(e.minD)||!(0,l.isRealNumber)(e.maxD))return new s.NumberRange(0,0);f=e.minD,y=e.maxD}finally{(0,r.deleteSafe)(e)}}else{const e=a?u:p,t=h?c:p;let i;try{if(i=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(e,v,m-v+1),!(0,l.isRealNumber)(i.minD)||!(0,l.isRealNumber)(i.maxD))return new s.NumberRange(0,0);if(y=i.maxD,i=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(t,v,m-v+1),!(0,l.isRealNumber)(i.minD)||!(0,l.isRealNumber)(i.maxD))return new s.NumberRange(0,0);f=i.minD}finally{(0,r.deleteSafe)(i)}}return new s.NumberRange(f,y)}}delete(){this.highValues=(0,r.deleteSafe)(this.highValues),this.lowValues=(0,r.deleteSafe)(this.lowValues),this.hInitialAnimationValues=(0,r.deleteSafe)(this.hInitialAnimationValues),this.hFinalAnimationValues=(0,r.deleteSafe)(this.hFinalAnimationValues),this.lInitialAnimationValues=(0,r.deleteSafe)(this.lInitialAnimationValues),this.lFinalAnimationValues=(0,r.deleteSafe)(this.lFinalAnimationValues),super.delete()}setInitialAnimationVectors(e){if(super.setInitialAnimationVectors(e),!e)return this.hInitialAnimationValues.resize(0,0),void this.lInitialAnimationValues.resize(0,0);h.animationHelpers.copyVector(e.getNativeHighValues(),this.hInitialAnimationValues),h.animationHelpers.copyVector(e.getNativeLowValues(),this.lInitialAnimationValues)}setFinalAnimationVectors(e){if(super.setFinalAnimationVectors(e),!e)return this.hFinalAnimationValues.resize(0,0),void this.lFinalAnimationValues.resize(0,0);h.animationHelpers.copyVector(e.getNativeHighValues(),this.hFinalAnimationValues),h.animationHelpers.copyVector(e.getNativeLowValues(),this.lFinalAnimationValues)}validateAnimationVectors(){super.validateAnimationVectors();const e=this.xInitialAnimationValues.size();if(e!==this.hInitialAnimationValues.size()||e!==this.hFinalAnimationValues.size()||e!==this.lInitialAnimationValues.size()||e!==this.lFinalAnimationValues.size())throw Error("initialAnimationValues and finalAnimationValues must have the same length")}updateAnimationProperties(e,t){super.updateAnimationProperties(e,t),t.isOnStartAnimation?(t.calculateAnimationValues(this.webAssemblyContext,this.hFinalAnimationValues,this.getNativeHighValues(),e),t.calculateAnimationValues(this.webAssemblyContext,this.lFinalAnimationValues,this.getNativeLowValues(),e)):t.isDataSeriesAnimation&&(t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.hInitialAnimationValues,this.hFinalAnimationValues,this.getNativeHighValues(),e),t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.lInitialAnimationValues,this.lFinalAnimationValues,this.getNativeLowValues(),e))}toJSON(e=!1){const t=super.toJSON();if(!e){const e=[],i=[],r=[],n=[];for(let t=0;t<this.count();t++)e.push(this.xValues.get(t)),i.push(this.yValues.get(t)),r.push(this.highValues.get(t)),n.push(this.lowValues.get(t));const s={xValues:e,yValues:i,highValues:r,lowValues:n};Object.assign(t,s)}return t}getHlcValues(e){let t,i,r;switch(e){case d.EDataSeriesValueType.FinalAnimationValues:t=this.hFinalAnimationValues,i=this.lFinalAnimationValues,r=this.yFinalAnimationValues;break;case d.EDataSeriesValueType.InitialAnimationValues:t=this.hInitialAnimationValues,i=this.lInitialAnimationValues,r=this.yInitialAnimationValues;break;default:t=this.highValues,i=this.lowValues,r=this.yValues}return{hValues:t,lValues:i,yValues:r}}}t.HlcDataSeries=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyDataSeries=void 0;const r=i(1),n=i(67),s=i(55),o=i(60),a=i(10);class l extends o.BaseDataSeries{constructor(e,t){super(e,t),this.type=a.EDataSeriesType.Xy,(null==t?void 0:t.xValues)&&(r.Guard.notNull(t.yValues,"options.yValues"),this.appendRange(t.xValues,t.yValues,t.metadata))}append(e,t,i){if(!this.getIsDeleted()){const r=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,r,[e],[t]),this.appendMetadata(i),r.push_back(e),this.getNativeYValues().push_back(t),this.notifyDataChanged(a.EDataChangeType.Append,null,1)}}appendRange(e,t,i){if(!this.getIsDeleted()){r.Guard.isTrue((0,n.isNumberArray)(e)||(0,n.isTypedArray)(e),"xValues must be an array of numbers"),r.Guard.isTrue((0,n.isNumberArray)(t)||(0,n.isTypedArray)(t),"yValues must be an array of numbers"),r.Guard.arraysSameLength(e,"xValues",t,"yValues"),i&&(r.Guard.isTrue(Array.isArray(i),"metadata must be an array of IPointMetadata"),r.Guard.arraysSameLength(e,"xValues",i,"metadata"));const o=this.getNativeXValues(),l=this.getNativeYValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,o,e,t),this.appendMetadataRange(i,e.length),(0,s.appendDoubleVectorFromJsArray)(this.webAssemblyContext,o,e),(0,s.appendDoubleVectorFromJsArray)(this.webAssemblyContext,l,t),this.notifyDataChanged(a.EDataChangeType.Append,null,e.length)}}update(e,t,i){this.getIsDeleted()||(this.validateIndex(e),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[t],e),this.getNativeYValues().set(e,t),this.setMetadataAt(e,i),this.notifyDataChanged(a.EDataChangeType.Update,e,1))}updateXy(e,t,i,r){if(!this.getIsDeleted()){this.validateIndex(e);const n=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,n,[t],[i],e),n.set(e,t),this.getNativeYValues().set(e,i),this.setMetadataAt(e,r),this.notifyDataChanged(a.EDataChangeType.Update,e,1)}}insert(e,t,i,r){if(!this.getIsDeleted()){this.validateIndex(e,"Start index is out of range");const n=this.getNativeXValues(),s=this.getNativeYValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,n,[t],[i],e),n.insertAt(e,t),s.insertAt(e,i),this.insertMetadata(e,r),this.notifyDataChanged(a.EDataChangeType.Insert,e,1)}}insertRange(e,t,i,o){if(!this.getIsDeleted()){r.Guard.isTrue((0,n.isNumberArray)(t)||(0,n.isTypedArray)(t),"xValues must be an array of numbers"),r.Guard.isTrue((0,n.isNumberArray)(i)||(0,n.isTypedArray)(i),"yValues must be an array of numbers"),this.validateIndex(e,"Start index is out of range"),r.Guard.arraysSameLength(t,"xValues",i,"yValues"),o&&(r.Guard.isTrue(Array.isArray(o),"metadata must be an array of IPointMetadata"),r.Guard.arraysSameLength(t,"xValues",o,"metadata"));const l=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,l,t,i,e),(0,s.insertDoubleVectorFromJsArray)(this.webAssemblyContext,t,this.getNativeXValues(),e),(0,s.insertDoubleVectorFromJsArray)(this.webAssemblyContext,i,this.getNativeYValues(),e),this.insertMetadataRange(e,o),this.notifyDataChanged(a.EDataChangeType.Insert,e,t.length)}}removeAt(e){this.getIsDeleted()||(this.validateIndex(e),this.getNativeXValues().removeAt(e),this.getNativeYValues().removeAt(e),this.removeMetadataAt(e),this.notifyDataChanged(a.EDataChangeType.Remove,e,1))}removeRange(e,t){this.getIsDeleted()||(this.validateIndex(e,"Start index is out of range"),this.getNativeXValues().removeRange(e,t),this.getNativeYValues().removeRange(e,t),this.removeMetadataRange(e,t),this.notifyDataChanged(a.EDataChangeType.Remove,e,t))}clear(){this.getIsDeleted()||(super.clear(),this.getNativeXValues().clear(),this.getNativeYValues().clear(),this.setMetadata(void 0),this.notifyDataChanged(a.EDataChangeType.Clear,null,null))}toJSON(e=!1){const t=super.toJSON();if(!e){const e=[],i=[];for(let t=0;t<this.count();t++)e.push(this.xValues.get(t)),i.push(this.yValues.get(t));const r={xValues:e,yValues:i};Object.assign(t,r)}return t}}t.XyDataSeries=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcDataSeries=void 0;const r=i(0),n=i(1),s=i(3),o=i(67),a=i(55),l=i(24),h=i(60),u=i(10);class d extends h.BaseDataSeries{constructor(e,t){super(e,t),this.type=u.EDataSeriesType.Ohlc,this.openValues=new e.SCRTDoubleVector,this.highValues=new e.SCRTDoubleVector,this.lowValues=new e.SCRTDoubleVector,this.openInitialAnimationValues=new e.SCRTDoubleVector,this.highInitialAnimationValues=new e.SCRTDoubleVector,this.lowInitialAnimationValues=new e.SCRTDoubleVector,this.openFinalAnimationValues=new e.SCRTDoubleVector,this.highFinalAnimationValues=new e.SCRTDoubleVector,this.lowFinalAnimationValues=new e.SCRTDoubleVector,(null==t?void 0:t.xValues)&&this.appendRange(t.xValues,t.openValues,t.highValues,t.lowValues,t.closeValues,t.metadata)}getNativeOpenValues(){return this.openValues}getNativeHighValues(){return this.highValues}getNativeLowValues(){return this.lowValues}getNativeCloseValues(){return this.getNativeYValues()}append(e,t,i,r,n,s){if(!this.getIsDeleted()){const o=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,o,[e],[n]),this.appendMetadata(s),o.push_back(e),this.getNativeOpenValues().push_back(t),this.getNativeHighValues().push_back(i),this.getNativeLowValues().push_back(r),this.getNativeCloseValues().push_back(n),this.notifyDataChanged(u.EDataChangeType.Append,null,1)}}appendRange(e,t,i,r,s,l){if(!this.getIsDeleted()){n.Guard.isTrue((0,o.isNumberArray)(e)||(0,o.isTypedArray)(e),"xValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(t)||(0,o.isTypedArray)(t),"openValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(i)||(0,o.isTypedArray)(i),"highValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(r)||(0,o.isTypedArray)(r),"lowValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(s)||(0,o.isTypedArray)(s),"closeValues must be an array of numbers"),n.Guard.arraysSameLengthArr([{arg:e,name:"xValues"},{arg:t,name:"openValues"},{arg:i,name:"highValues"},{arg:r,name:"lowValues"},{arg:s,name:"closeValues"}]),l&&(n.Guard.isTrue(Array.isArray(l),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(e,"xValues",l,"metadata"));const h=this.getNativeXValues(),d=this.getNativeOpenValues(),c=this.getNativeHighValues(),p=this.getNativeLowValues(),g=this.getNativeCloseValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,h,e,s),this.appendMetadataRange(l,e.length),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,h,e),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,d,t),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,c,i),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,p,r),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,g,s),this.notifyDataChanged(u.EDataChangeType.Append,null,e.length)}}update(e,t,i,r,n,s){this.getIsDeleted()||(this.validateIndex(e),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[n],e),this.getNativeOpenValues().set(e,t),this.getNativeHighValues().set(e,i),this.getNativeLowValues().set(e,r),this.getNativeCloseValues().set(e,n),this.setMetadataAt(e,s),this.notifyDataChanged(u.EDataChangeType.Update,e,1))}updateXohlc(e,t,i,r,n,s,o){if(!this.getIsDeleted()){this.validateIndex(e);const a=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,a,[t],[s],e),a.set(e,t),this.getNativeOpenValues().set(e,i),this.getNativeHighValues().set(e,r),this.getNativeLowValues().set(e,n),this.getNativeCloseValues().set(e,s),this.setMetadataAt(e,o),this.notifyDataChanged(u.EDataChangeType.Update,e,1)}}insert(e,t,i,r,n,s,o){if(!this.getIsDeleted()){this.validateIndex(e,"Start index is out of range");const a=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,a,[t],[s],e),a.insertAt(e,t),this.getNativeOpenValues().insertAt(e,i),this.getNativeHighValues().insertAt(e,r),this.getNativeLowValues().insertAt(e,n),this.getNativeCloseValues().insertAt(e,s),this.insertMetadata(e,o),this.notifyDataChanged(u.EDataChangeType.Insert,e,1)}}insertRange(e,t,i,r,s,l,h){if(!this.getIsDeleted()){n.Guard.isTrue((0,o.isNumberArray)(t)||(0,o.isTypedArray)(t),"xValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(i)||(0,o.isTypedArray)(i),"openValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(r)||(0,o.isTypedArray)(r),"highValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(s)||(0,o.isTypedArray)(s),"lowValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(l)||(0,o.isTypedArray)(l),"closeValues must be an array of numbers"),this.validateIndex(e,"Start index is out of range"),n.Guard.arraysSameLengthArr([{arg:t,name:"xValues"},{arg:i,name:"openValues"},{arg:r,name:"highValues"},{arg:s,name:"lowValues"},{arg:l,name:"closeValues"}]),h&&(n.Guard.isTrue(Array.isArray(h),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(t,"xValues",h,"metadata"));const d=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,d,t,l,e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,t,d,e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,i,this.getNativeOpenValues(),e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,r,this.getNativeHighValues(),e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,s,this.getNativeLowValues(),e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,l,this.getNativeCloseValues(),e),this.insertMetadataRange(e,h),this.notifyDataChanged(u.EDataChangeType.Insert,e,t.length)}}removeAt(e){this.getIsDeleted()||(this.validateIndex(e),this.getNativeXValues().removeAt(e),this.getNativeOpenValues().removeAt(e),this.getNativeHighValues().removeAt(e),this.getNativeLowValues().removeAt(e),this.getNativeCloseValues().removeAt(e),this.removeMetadataAt(e),this.notifyDataChanged(u.EDataChangeType.Remove,e,1))}removeRange(e,t){this.getIsDeleted()||(this.validateIndex(e,"Start index is out of range"),this.getNativeXValues().removeRange(e,t),this.getNativeOpenValues().removeRange(e,t),this.getNativeHighValues().removeRange(e,t),this.getNativeLowValues().removeRange(e,t),this.getNativeCloseValues().removeRange(e,t),this.removeMetadataRange(e,t),this.notifyDataChanged(u.EDataChangeType.Remove,e,t))}clear(){this.getIsDeleted()||(super.clear(),this.getNativeXValues().clear(),this.getNativeOpenValues().clear(),this.getNativeHighValues().clear(),this.getNativeLowValues().clear(),this.getNativeCloseValues().clear(),this.setMetadata(void 0),this.notifyDataChanged(u.EDataChangeType.Clear,null,null))}delete(){this.openValues=(0,r.deleteSafe)(this.openValues),this.highValues=(0,r.deleteSafe)(this.highValues),this.lowValues=(0,r.deleteSafe)(this.lowValues),this.openInitialAnimationValues=(0,r.deleteSafe)(this.openInitialAnimationValues),this.openInitialAnimationValues=(0,r.deleteSafe)(this.openInitialAnimationValues),this.openInitialAnimationValues=(0,r.deleteSafe)(this.openInitialAnimationValues),this.openFinalAnimationValues=(0,r.deleteSafe)(this.openFinalAnimationValues),this.openFinalAnimationValues=(0,r.deleteSafe)(this.openFinalAnimationValues),this.openFinalAnimationValues=(0,r.deleteSafe)(this.openFinalAnimationValues),super.delete()}getWindowedYRange(e,t,i=!1,r=u.EDataSeriesValueType.Default){const{closeValues:n,highValues:o,lowValues:a}=this.getOHLCValues(r);if(1===this.count()){const e=n.get(0)-1,t=n.get(0)+1;return new s.NumberRange(e,t)}const l=i?e:this.getIndicesRange(e);let h=Number.MAX_VALUE,d=Number.MIN_VALUE;const c=Math.max(l.min,0),p=Math.min(l.max,this.count()-1);if(!(p<c)){for(let e=c;e<=p;e++){const t=o.get(e),i=a.get(e);i<h&&(h=i),t>d&&(d=t)}return new s.NumberRange(h,d)}}setInitialAnimationVectors(e){if(super.setInitialAnimationVectors(e),!e)return this.openInitialAnimationValues.resize(0,0),this.highInitialAnimationValues.resize(0,0),void this.lowInitialAnimationValues.resize(0,0);l.animationHelpers.copyVector(e.getNativeOpenValues(),this.openInitialAnimationValues),l.animationHelpers.copyVector(e.getNativeHighValues(),this.highInitialAnimationValues),l.animationHelpers.copyVector(e.getNativeLowValues(),this.lowInitialAnimationValues)}setFinalAnimationVectors(e){if(super.setFinalAnimationVectors(e),!e)return this.openFinalAnimationValues.resize(0,0),this.highFinalAnimationValues.resize(0,0),void this.lowFinalAnimationValues.resize(0,0);l.animationHelpers.copyVector(e.getNativeOpenValues(),this.openFinalAnimationValues),l.animationHelpers.copyVector(e.getNativeHighValues(),this.highFinalAnimationValues),l.animationHelpers.copyVector(e.getNativeLowValues(),this.lowFinalAnimationValues)}validateAnimationVectors(){const e=this.xInitialAnimationValues.size();if(e!==this.yInitialAnimationValues.size()||e!==this.openInitialAnimationValues.size()||e!==this.highInitialAnimationValues.size()||e!==this.lowInitialAnimationValues.size()||e!==this.xFinalAnimationValues.size()||e!==this.yFinalAnimationValues.size()||e!==this.openFinalAnimationValues.size()||e!==this.highFinalAnimationValues.size()||e!==this.lowFinalAnimationValues.size())throw Error("initialAnimationValues and finalAnimationValues must have the same length")}updateAnimationProperties(e,t){super.updateAnimationProperties(e,t),t.isOnStartAnimation?(t.calculateAnimationValues(this.webAssemblyContext,this.openFinalAnimationValues,this.getNativeOpenValues(),e),t.calculateAnimationValues(this.webAssemblyContext,this.highFinalAnimationValues,this.getNativeHighValues(),e),t.calculateAnimationValues(this.webAssemblyContext,this.lowFinalAnimationValues,this.getNativeLowValues(),e)):t.isDataSeriesAnimation&&(t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.openInitialAnimationValues,this.openFinalAnimationValues,this.getNativeOpenValues(),e),t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.highInitialAnimationValues,this.highFinalAnimationValues,this.getNativeHighValues(),e),t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.lowInitialAnimationValues,this.lowFinalAnimationValues,this.getNativeLowValues(),e))}toJSON(e=!1){const t=super.toJSON();if(!e){const e=[],i=[],r=[],n=[],s=[];for(let t=0;t<this.count();t++)e.push(this.xValues.get(t)),i.push(this.openValues.get(t)),r.push(this.highValues.get(t)),n.push(this.lowValues.get(t)),s.push(this.yValues.get(t));const o={xValues:e,openValues:i,highValues:r,lowValues:n,closeValues:s};Object.assign(t,o)}return t}getOHLCValues(e){let t,i,r,n;switch(e){case u.EDataSeriesValueType.FinalAnimationValues:t=this.openFinalAnimationValues,i=this.highFinalAnimationValues,r=this.lowFinalAnimationValues,n=this.yFinalAnimationValues;break;case u.EDataSeriesValueType.InitialAnimationValues:t=this.openInitialAnimationValues,i=this.highInitialAnimationValues,r=this.lowInitialAnimationValues,n=this.yInitialAnimationValues;break;default:t=this.openValues,i=this.highValues,r=this.lowValues,n=this.yValues}return{openValues:t,highValues:i,lowValues:r,closeValues:n}}}t.OhlcDataSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyyDataSeries=void 0;const r=i(0),n=i(1),s=i(3),o=i(67),a=i(55),l=i(24),h=i(60),u=i(10);class d extends h.BaseDataSeries{constructor(e,t){super(e,t),this.type=u.EDataSeriesType.Xyy,this.y1Values=new e.SCRTDoubleVector,this.y1InitialAnimationValues=new e.SCRTDoubleVector,this.y1FinalAnimationValues=new e.SCRTDoubleVector,(null==t?void 0:t.xValues)&&(n.Guard.notNull(t.yValues,"options.yValues"),n.Guard.notNull(t.y1Values,"options.y1Values"),this.appendRange(t.xValues,t.yValues,t.y1Values,t.metadata))}getNativeY1Values(){return this.y1Values}append(e,t,i,r){if(!this.getIsDeleted()){const n=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,n,[e],[t]),this.appendMetadata(r),n.push_back(e),this.getNativeYValues().push_back(t),this.getNativeY1Values().push_back(i),this.notifyDataChanged(u.EDataChangeType.Append,null,1)}}appendRange(e,t,i,r){if(!this.getIsDeleted()){n.Guard.isTrue((0,o.isNumberArray)(e)||(0,o.isTypedArray)(e),"xValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(t)||(0,o.isTypedArray)(t),"yValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(i)||(0,o.isTypedArray)(i),"y1Values must be an array of numbers"),n.Guard.arraysSameLengthArr([{arg:e,name:"xValues"},{arg:t,name:"yValues"},{arg:i,name:"y1Values"}]),r&&(n.Guard.isTrue(Array.isArray(r),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(e,"xValues",r,"metadata"));const s=this.getNativeXValues(),l=this.getNativeYValues(),h=this.getNativeY1Values();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,s,e,t),this.appendMetadataRange(r,e.length),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,s,e),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,l,t),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,h,i),this.notifyDataChanged(u.EDataChangeType.Append,null,e.length)}}update(e,t,i,r){this.getIsDeleted()||(this.validateIndex(e),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[t],e),this.getNativeYValues().set(e,t),this.getNativeY1Values().set(e,i),this.setMetadataAt(e,r),this.notifyDataChanged(u.EDataChangeType.Update,e,1))}updateXyy1(e,t,i,r,n){if(!this.getIsDeleted()){this.validateIndex(e);const s=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,s,[t],[i],e),s.set(e,t),this.getNativeYValues().set(e,i),this.getNativeY1Values().set(e,r),this.setMetadataAt(e,n),this.notifyDataChanged(u.EDataChangeType.Update,e,1)}}insert(e,t,i,r,n){if(!this.getIsDeleted()){this.validateIndex(e,"Start index is out of range");const s=this.getNativeXValues(),o=this.getNativeYValues(),a=this.getNativeY1Values();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,s,[t],[i],e),s.insertAt(e,t),o.insertAt(e,i),a.insertAt(e,r),this.insertMetadata(e,n),this.notifyDataChanged(u.EDataChangeType.Insert,e,1)}}insertRange(e,t,i,r,s){if(!this.getIsDeleted()){n.Guard.isTrue((0,o.isNumberArray)(t)||(0,o.isTypedArray)(t),"xValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(i)||(0,o.isTypedArray)(i),"yValues must be an array of numbers"),n.Guard.isTrue((0,o.isNumberArray)(r)||(0,o.isTypedArray)(r),"y1Values must be an array of numbers"),this.validateIndex(e,"Start index is out of range"),n.Guard.arraysSameLengthArr([{arg:t,name:"xValues"},{arg:i,name:"yValues"},{arg:r,name:"y1Values"}]),s&&(n.Guard.isTrue(Array.isArray(s),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(t,"xValues",s,"metadata"));const l=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,l,t,i,e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,t,l,e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,i,this.getNativeYValues(),e),(0,a.insertDoubleVectorFromJsArray)(this.webAssemblyContext,r,this.getNativeY1Values(),e),this.insertMetadataRange(e,s),this.notifyDataChanged(u.EDataChangeType.Insert,e,t.length)}}removeAt(e){this.getIsDeleted()||(this.validateIndex(e),this.getNativeXValues().removeAt(e),this.getNativeYValues().removeAt(e),this.getNativeY1Values().removeAt(e),this.removeMetadataAt(e),this.notifyDataChanged(u.EDataChangeType.Remove,e,1))}removeRange(e,t){this.getIsDeleted()||(this.validateIndex(e,"Start index is out of range"),this.getNativeXValues().removeRange(e,t),this.getNativeYValues().removeRange(e,t),this.getNativeY1Values().removeRange(e,t),this.removeMetadataRange(e,t),this.notifyDataChanged(u.EDataChangeType.Remove,e,t))}clear(){this.getIsDeleted()||(super.clear(),this.getNativeXValues().clear(),this.getNativeYValues().clear(),this.getNativeY1Values().clear(),this.setMetadata(void 0),this.notifyDataChanged(u.EDataChangeType.Clear,null,null))}getWindowedYRange(e,t,i=!1,r=u.EDataSeriesValueType.Default){const{yValues:n,y1Values:o}=this.getYY1Values(r);if(1===this.count()){const e=Math.min(n.get(0),o.get(0))-1,t=Math.max(n.get(0),o.get(0))+1;return new s.NumberRange(e,t)}const a=i?e:this.getIndicesRange(e);let l=Number.MAX_VALUE,h=Number.MIN_VALUE;const d=Math.max(Math.floor(a.min),0),c=Math.min(Math.ceil(a.max),this.count()-1);if(!(c<d)){for(let e=d;e<=c;e++){const t=n.get(e);t<l&&(l=t),t>h&&(h=t);const i=o.get(e);i<l&&(l=i),i>h&&(h=i)}return new s.NumberRange(l,h)}}delete(){this.y1Values=(0,r.deleteSafe)(this.y1Values),this.y1InitialAnimationValues=(0,r.deleteSafe)(this.y1InitialAnimationValues),this.y1FinalAnimationValues=(0,r.deleteSafe)(this.y1FinalAnimationValues),super.delete()}setInitialAnimationVectors(e){super.setInitialAnimationVectors(e),e?l.animationHelpers.copyVector(e.getNativeY1Values(),this.y1InitialAnimationValues):this.y1InitialAnimationValues.resize(0,0)}setFinalAnimationVectors(e){super.setFinalAnimationVectors(e),e?l.animationHelpers.copyVector(e.getNativeY1Values(),this.y1FinalAnimationValues):this.y1FinalAnimationValues.resize(0,0)}validateAnimationVectors(){super.validateAnimationVectors();const e=this.xInitialAnimationValues.size();if(e!==this.y1InitialAnimationValues.size()||e!==this.y1FinalAnimationValues.size())throw Error("initialAnimationValues and finalAnimationValues must have the same length")}updateAnimationProperties(e,t){super.updateAnimationProperties(e,t),t.isOnStartAnimation?t.calculateAnimationValues(this.webAssemblyContext,this.y1FinalAnimationValues,this.getNativeY1Values(),e):t.isDataSeriesAnimation&&t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.y1InitialAnimationValues,this.y1FinalAnimationValues,this.getNativeY1Values(),e)}toJSON(e=!1){const t=super.toJSON();if(!e){const e=[],i=[],r=[];for(let t=0;t<this.count();t++)e.push(this.xValues.get(t)),i.push(this.yValues.get(t)),r.push(this.y1Values.get(t));const n={xValues:e,yValues:i,y1Values:r};Object.assign(t,n)}return t}getYY1Values(e){let t,i;switch(e){case u.EDataSeriesValueType.FinalAnimationValues:t=this.yFinalAnimationValues,i=this.y1FinalAnimationValues;break;case u.EDataSeriesValueType.InitialAnimationValues:t=this.yInitialAnimationValues,i=this.y1InitialAnimationValues;break;default:t=this.yValues,i=this.y1Values}return{yValues:t,y1Values:i}}}t.XyyDataSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyzDataSeries=void 0;const r=i(0),n=i(1),s=i(67),o=i(55),a=i(24),l=i(60),h=i(10);class u extends l.BaseDataSeries{constructor(e,t){super(e,t),this.type=h.EDataSeriesType.Xyz,this.zValues=new e.SCRTDoubleVector,this.zInitialAnimationValues=new e.SCRTDoubleVector,this.zFinalAnimationValues=new e.SCRTDoubleVector,(null==t?void 0:t.xValues)&&(n.Guard.notNull(t.yValues,"options.yValues"),n.Guard.notNull(t.zValues,"options.zValues"),this.appendRange(t.xValues,t.yValues,t.zValues,t.metadata))}getNativeZValues(){return this.zValues}append(e,t,i,r){if(!this.getIsDeleted()){const n=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,n,[e],[t]),this.appendMetadata(r),n.push_back(e),this.getNativeYValues().push_back(t),this.getNativeZValues().push_back(i),this.notifyDataChanged(h.EDataChangeType.Append,null,1)}}appendRange(e,t,i,r){if(!this.getIsDeleted()){n.Guard.isTrue((0,s.isNumberArray)(e)||(0,s.isTypedArray)(e),"xValues must be an array of numbers"),n.Guard.isTrue((0,s.isNumberArray)(t)||(0,s.isTypedArray)(t),"yValues must be an array of numbers"),n.Guard.isTrue((0,s.isNumberArray)(i)||(0,s.isTypedArray)(i),"zValues must be an array of numbers"),n.Guard.arraysSameLengthArr([{arg:e,name:"xValues"},{arg:t,name:"yValues"},{arg:i,name:"zValues"}]),r&&(n.Guard.isTrue(Array.isArray(r),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(e,"xValues",r,"metadata"));const a=this.getNativeXValues(),l=this.getNativeYValues(),u=this.getNativeZValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,a,e,t),this.appendMetadataRange(r,e.length),(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,a,e),(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,l,t),(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,u,i),this.notifyDataChanged(h.EDataChangeType.Append,null,e.length)}}update(e,t,i,r){this.getIsDeleted()||(this.validateIndex(e),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[t],e),this.getNativeYValues().set(e,t),this.getNativeZValues().set(e,i),this.setMetadataAt(e,r),this.notifyDataChanged(h.EDataChangeType.Update,e,1))}updateXyz(e,t,i,r,n){if(!this.getIsDeleted()){this.validateIndex(e);const s=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,s,[t],[i],e),s.set(e,t),this.getNativeYValues().set(e,i),this.getNativeZValues().set(e,r),this.setMetadataAt(e,n),this.notifyDataChanged(h.EDataChangeType.Update,e,1)}}insert(e,t,i,r,n){if(!this.getIsDeleted()){this.validateIndex(e,"Start index is out of range");const s=this.getNativeXValues(),o=this.getNativeYValues(),a=this.getNativeZValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,s,[t],[i],e),s.insertAt(e,t),o.insertAt(e,i),a.insertAt(e,r),this.insertMetadata(e,n),this.notifyDataChanged(h.EDataChangeType.Insert,e,1)}}insertRange(e,t,i,r,a){if(!this.getIsDeleted()){n.Guard.isTrue((0,s.isNumberArray)(t)||(0,s.isTypedArray)(t),"xValues must be an array of numbers"),n.Guard.isTrue((0,s.isNumberArray)(i)||(0,s.isTypedArray)(i),"yValues must be an array of numbers"),n.Guard.isTrue((0,s.isNumberArray)(r)||(0,s.isTypedArray)(r),"zValues must be an array of numbers"),this.validateIndex(e,"Start index is out of range"),n.Guard.arraysSameLengthArr([{arg:t,name:"xValues"},{arg:i,name:"yValues"},{arg:r,name:"zValues"}]),a&&(n.Guard.isTrue(Array.isArray(a),"metadata must be an array of IPointMetadata"),n.Guard.arraysSameLength(t,"xValues",a,"metadata"));const l=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,l,t,i,e),(0,o.insertDoubleVectorFromJsArray)(this.webAssemblyContext,t,l,e),(0,o.insertDoubleVectorFromJsArray)(this.webAssemblyContext,i,this.getNativeYValues(),e),(0,o.insertDoubleVectorFromJsArray)(this.webAssemblyContext,r,this.getNativeZValues(),e),this.insertMetadataRange(e,a),this.notifyDataChanged(h.EDataChangeType.Insert,e,t.length)}}removeAt(e){this.getIsDeleted()||(this.validateIndex(e),this.getNativeXValues().removeAt(e),this.getNativeYValues().removeAt(e),this.getNativeZValues().removeAt(e),this.removeMetadataAt(e),this.notifyDataChanged(h.EDataChangeType.Remove,e,1))}removeRange(e,t){this.getIsDeleted()||(this.validateIndex(e,"Start index is out of range"),this.getNativeXValues().removeRange(e,t),this.getNativeYValues().removeRange(e,t),this.getNativeZValues().removeRange(e,t),this.removeMetadataRange(e,t),this.notifyDataChanged(h.EDataChangeType.Remove,e,t))}clear(){this.getIsDeleted()||(super.clear(),this.getNativeXValues().clear(),this.getNativeYValues().clear(),this.getNativeZValues().clear(),this.setMetadata(void 0),this.notifyDataChanged(h.EDataChangeType.Clear,null,null))}delete(){this.zValues=(0,r.deleteSafe)(this.zValues),this.zInitialAnimationValues=(0,r.deleteSafe)(this.zInitialAnimationValues),this.zFinalAnimationValues=(0,r.deleteSafe)(this.zFinalAnimationValues),super.delete()}setInitialAnimationVectors(e){super.setInitialAnimationVectors(e),e?a.animationHelpers.copyVector(e.getNativeZValues(),this.zInitialAnimationValues):this.zInitialAnimationValues.resize(0,0)}setFinalAnimationVectors(e){super.setFinalAnimationVectors(e),e?a.animationHelpers.copyVector(e.getNativeZValues(),this.zFinalAnimationValues):this.zFinalAnimationValues.resize(0,0)}validateAnimationVectors(){super.validateAnimationVectors();const e=this.xInitialAnimationValues.size();if(e!==this.zInitialAnimationValues.size()||e!==this.zFinalAnimationValues.size())throw Error("initialAnimationValues and finalAnimationValues must have the same length")}updateAnimationProperties(e,t){super.updateAnimationProperties(e,t),t.isOnStartAnimation?t.calculateAnimationValues(this.webAssemblyContext,this.zFinalAnimationValues,this.getNativeZValues(),e,!0):t.isDataSeriesAnimation&&t.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.zInitialAnimationValues,this.zFinalAnimationValues,this.getNativeZValues(),e)}toJSON(e=!1){const t=super.toJSON();if(!e){const e=[],i=[],r=[];for(let t=0;t<this.count();t++)e.push(this.xValues.get(t)),i.push(this.yValues.get(t)),r.push(this.zValues.get(t));const n={xValues:e,yValues:i,zValues:r};Object.assign(t,n)}return t}getYZValues(e){let t,i;switch(e){case h.EDataSeriesValueType.FinalAnimationValues:t=this.yFinalAnimationValues,i=this.zFinalAnimationValues;break;case h.EDataSeriesValueType.InitialAnimationValues:t=this.yInitialAnimationValues,i=this.zInitialAnimationValues;break;default:t=this.yValues,i=this.zValues}return{yValues:t,zValues:i}}}t.XyzDataSeries=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformHeatmapDataSeries=void 0;const r=i(3),n=i(336),s=i(10);class o extends n.BaseHeatmapDataSeries{constructor(e,t){super(e,t),this.type=s.EDataSeriesType.HeatmapUniform,this.xStart=t.xStart,this.xStep=t.xStep,this.yStart=t.yStart,this.yStep=t.yStep,this.xRangeProperty=new r.NumberRange(this.xStart,this.getXValue(this.arrayWidth)),this.yRangeProperty=new r.NumberRange(this.yStart,this.getYValue(this.arrayHeight))}getXValue(e){const t=this.xStep*e;return this.xStart+t}getYValue(e){const t=this.yStep*e;return this.yStart+t}notifyDataChanged(e,t){this.xRangeProperty=new r.NumberRange(this.xStart,this.getXValue(this.arrayWidth)),this.yRangeProperty=new r.NumberRange(this.yStart,this.getYValue(this.arrayHeight)),super.notifyDataChanged(e,t)}toJSON(e){const t=super.toJSON(e);return t.xStart=this.xStart,t.xStep=this.xStep,t.yStart=this.yStart,t.yStep=this.yStep,t}getXRange(){return this.xRangeProperty}getYRange(){return this.yRangeProperty}}t.UniformHeatmapDataSeries=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildModifiers=void 0;const r=i(153),n=i(218),s=i(341),o=i(220),a=i(221),l=i(344),h=i(345),u=i(154),d=i(349),c=i(352),p=i(353),g=i(354),f=i(355),y=i(17),v=i(19),m=i(36),S=i(14);(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.Cursor,e=>new r.CursorModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.DataPointSelection,e=>new n.DataPointSelectionModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.MouseWheelZoom,e=>new o.MouseWheelZoomModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.PinchZoom,e=>new l.PinchZoomModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.Rollover,e=>new h.RolloverModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.RubberBandXYZoom,e=>new u.RubberBandXyZoomModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.SeriesSelection,e=>new d.SeriesSelectionModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.XAxisDrag,e=>new c.XAxisDragModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.YAxisDrag,e=>new p.YAxisDragModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.ZoomExtents,e=>new g.ZoomExtentsModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.ZoomPan,e=>new f.ZoomPanModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.OverviewRangeSelection,e=>new a.OverviewRangeSelectionModifier(e),!0),(0,S.registerType)(y.EBaseType.Chart2DModifier,v.EChart2DModifierType.Legend,e=>new s.LegendModifier(e),!0);t.buildModifiers=e=>{"string"==typeof e&&(e=JSON.parse(e,m.chartReviver));const t=[];if(Array.isArray(e))for(const i of e)t.push(P(i));else t.push(P(e));return t};const P=e=>e.type===v.EChart2DModifierType.Custom?(0,S.createType)(y.EBaseType.Chart2DModifier,e.customType,null,e.options):(0,S.createType)(y.EBaseType.Chart2DModifier,e.type,null,e.options)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataPointSelectionModifier=t.ESelectionMode=void 0;const r=i(14),n=i(18),s=i(15),o=i(17),a=i(19),l=i(11),h=i(9),u=i(10),d=i(115),c=i(31),p=i(219),g=i(20),f=i(72),y=i(339),v=i(340),m=i(154);var S;!function(e){e.Union="Union",e.Inverse="Inverse",e.Replace="Replace"}(S=t.ESelectionMode||(t.ESelectionMode={}));class P extends g.ChartModifierBase2D{constructor(e){var t,i,s;super(e),this.type=a.EChart2DModifierType.DataPointSelection,this.selectionChanged=new n.EventHandler,this.includedSeriesMap=new Map,this.selectedDataPointsMap=new Map,this.selectionHasChanged=!1,this.allowClickSelect=null===(t=null==e?void 0:e.allowClickSelect)||void 0===t||t,this.allowDragSelect=null===(i=null==e?void 0:e.allowDragSelect)||void 0===i||i,(null==e?void 0:e.selectionStroke)&&(this.selectionStroke=e.selectionStroke),(null==e?void 0:e.selectionFill)&&(this.selectionFill=null==e?void 0:e.selectionFill),this.selectionStrokeThicknessProperty=null!==(s=null==e?void 0:e.selectionStrokeThickness)&&void 0!==s?s:1,(null==e?void 0:e.onSelectionChanged)&&("string"==typeof e.onSelectionChanged?(this.typeMap.set("onSelectionChanged",e.onSelectionChanged),this.selectionChanged.subscribe((0,r.getFunction)(o.EBaseType.OptionFunction,e.onSelectionChanged))):this.selectionChanged.subscribe(e.onSelectionChanged)),(null==e?void 0:e.getSelectionMode)&&("string"==typeof e.getSelectionMode?(this.typeMap.set("getSelectionMode",e.getSelectionMode),this.getSelectionMode=(0,r.getFunction)(o.EBaseType.OptionFunction,e.getSelectionMode)):this.getSelectionMode=e.getSelectionMode)}applyTheme(e){this.testPropertyChanged(f.PROPERTY.SELECTION_FILL)||(this.selectionFill=e.rubberBandFillBrush),this.testPropertyChanged(f.PROPERTY.SELECTION_STROKE)||(this.selectionStroke=e.rubberBandStrokeBrush)}onAttach(){var e,t;super.onAttach(),this.selectionRect=new p.RubberBandSvgRect(null===(e=this.parentSurface)||void 0===e?void 0:e.domSvgContainer,this.selectionFill,this.selectionStroke,this.selectionStrokeThickness),this.clearSelectedDataPoints(),null===(t=this.getAllSeries())||void 0===t||t.forEach(e=>this.onAttachSeries(e))}onDetach(){var e;super.onDetach(),this.selectionRect=void 0,this.clearSelectedDataPoints(),null===(e=this.getAllSeries())||void 0===e||e.forEach(e=>this.onDetachSeries(e))}get selectedDataPoints(){return Array.from(this.selectedDataPointsMap.values())}onAttachSeries(e){if(super.onAttachSeries(e),!e.dataSeries||e.dataSeries.type===u.EDataSeriesType.HeatmapUniform)return;const t=e.dataSeries;t.hasMetadataGenerator()||t.setMetadataGenerator(new d.TemplateMetadataGenerator({isSelected:!1}));for(let i=0;i<t.getMetadataLength();i++){const r=t.getMetadataAt(i);if(null==r?void 0:r.isSelected){const t=new y.DataPointInfo(e,r,i);this.addSelectedDataPoint(e,i,t)}}this.raiseSelectionChanged(!1)}onDetachSeries(e){super.onDetachSeries(e),e.dataSeries&&(this.removeSelectedDataPointsForSeries(e),this.raiseSelectionChanged(!1))}modifierMouseDown(e){if(super.modifierMouseDown(e),this.executeOn!==e.button)return;if(!this.isAttached)throw new Error("Should not call DataPointSelectionModifier.modifierMouseDown if not attached");if(!(0,h.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect))return;const t=(0,h.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect);t&&(this.startPoint=t,this.isClicked=!0),e.handled=!0}modifierMouseMove(e){super.modifierMouseMove(e);const{seriesViewRect:t}=this.parentSurface;if(this.isClicked){this.endPoint=(0,h.translateFromCanvasToSeriesViewRect)(s.Rect.clipPointToRect(e.mousePoint,t),t);const{x:i,right:r,y:n,bottom:o}=(0,m.getRubberBandRect)(this.startPoint,this.endPoint,this.xyDirection,this.parentSurface.seriesViewRect);this.selectionRect.isHidden=!this.allowDragSelect,this.selectionRect.x1=(0,h.translateToNotScaled)(i),this.selectionRect.x2=(0,h.translateToNotScaled)(r),this.selectionRect.y1=(0,h.translateToNotScaled)(n),this.selectionRect.y2=(0,h.translateToNotScaled)(o)}}modifierMouseUp(e){if(super.modifierMouseUp(e),this.executeOn===e.button){if(!this.isAttached)throw new Error("Should not call DataPointSelectionModifier.modifierMouseUp if not attached");if(this.isClicked){const{seriesViewRect:t}=this.parentSurface;this.endPoint=(0,h.translateFromCanvasToSeriesViewRect)(s.Rect.clipPointToRect(e.mousePoint,t),t);const i=(0,m.getRubberBandRect)(this.startPoint,this.endPoint,this.xyDirection,this.parentSurface.seriesViewRect),r=i.width>=3&&i.height>=3&&this.allowDragSelect,n=this.getSelectionMode(e,r);r&&this.allowDragSelect?this.selectManyPoints(i,n):this.allowClickSelect&&this.selectSinglePoint(e.mousePoint,n),this.isClicked=!1,this.selectionRect.isHidden=!0}}}get selectionStrokeThickness(){return this.selectionStrokeThicknessProperty}set selectionStrokeThickness(e){this.selectionStrokeThicknessProperty=e,this.notifyPropertyChanged(f.PROPERTY.SELECTION_STROKE_THICKNESS)}get selectionStroke(){return this.selectionStrokeProperty}set selectionStroke(e){this.selectionStrokeProperty=e,this.notifyPropertyChanged(f.PROPERTY.SELECTION_STROKE)}get selectionFill(){return this.selectionFillProperty}set selectionFill(e){this.selectionFillProperty=e,this.notifyPropertyChanged(f.PROPERTY.SELECTION_FILL)}getIncludedRenderableSeries(){return this.getAllSeries().filter(e=>!1!==this.includedSeriesMap.get(e))}includeSeries(e,t){t||this.includedSeriesMap.set(e,t),t&&this.includedSeriesMap.delete(e)}get includedSeries(){return this.includedSeriesMap}getSelectionMode(e,t){return e.ctrlKey?S.Union:e.shiftKey?S.Inverse:S.Replace}toJSON(){const e=super.toJSON(),t={allowClickSelect:this.allowClickSelect,allowDragSelect:this.allowDragSelect,getSelectionMode:this.typeMap.get("getSelectionMode"),onSelectionChanged:this.typeMap.get("onSelectionChanged"),selectionFill:this.selectionFill,selectionStroke:this.selectionStroke,selectionStrokeThickness:this.selectionStrokeThickness};return Object.assign(e.options,t),e}selectManyPoints(e,t){if(this.parentSurface){t!==S.Replace||this.deselectAllPoints(!1),this.getIncludedRenderableSeries().filter(e=>e.isVisible&&e.dataSeries).forEach((e,i)=>{const r=e.xAxis.getCurrentCoordinateCalculator(),n=e.yAxis.getCurrentCoordinateCalculator();let s,o,a,h;if(r.getDataValue(this.startPoint.x)<=r.getDataValue(this.endPoint.x)?(s=r.getDataValue(this.startPoint.x),o=r.getDataValue(this.endPoint.x)):(s=r.getDataValue(this.endPoint.x),o=r.getDataValue(this.startPoint.x)),n.getDataValue(this.startPoint.y)<=n.getDataValue(this.endPoint.y)?(a=n.getDataValue(this.startPoint.y),h=n.getDataValue(this.endPoint.y)):(a=n.getDataValue(this.endPoint.y),h=n.getDataValue(this.startPoint.y)),e.dataSeries.type===u.EDataSeriesType.HeatmapUniform);else{const i=e.dataSeries;for(let r=0;r<i.count();r++){const n=i.getNativeXValues().get(r),u=i.getNativeYValues().get(r);if((0,l.testIsInBounds)(n,u,s,h,o,a)){const n=i.getMetadataAt(r);t!==S.Inverse?(n.isSelected=!0,this.addSelectedDataPoint(e,r,new y.DataPointInfo(e,n,r))):n.isSelected?(n.isSelected=!1,this.removeSelectedDataPoint(e,r)):(n.isSelected=!0,this.addSelectedDataPoint(e,r,new y.DataPointInfo(e,n,r)))}}}}),this.raiseSelectionChanged(!0)}}selectSinglePoint(e,t){if(this.parentSurface){const i=this.getIncludedRenderableSeries().filter(e=>e.isVisible&&e.dataSeries).map(t=>({renderableSeries:t,hitTestInfo:t.hitTestProvider.hitTestForDataPointSelectionModifier(e.x,e.y,c.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS)}));t!==S.Replace||this.deselectAllPoints(!1),i.forEach(e=>{const i=e.hitTestInfo,r=e.renderableSeries;if(i.isHit)if(i.metadata)if(t===S.Union){i.metadata.isSelected=!0;const e=new y.DataPointInfo(i.associatedSeries,i.metadata,i.dataSeriesIndex);this.addSelectedDataPoint(i.associatedSeries,i.dataSeriesIndex,e)}else i.metadata.isSelected=!i.metadata.isSelected,i.metadata.isSelected?this.addSelectedDataPoint(r,i.dataSeriesIndex,new y.DataPointInfo(i.associatedSeries,i.metadata,i.dataSeriesIndex)):this.removeSelectedDataPoint(r,i.dataSeriesIndex);else console.warn(`Cannot select datapoint for series ${i.dataSeriesName} as it does not have metadata. To solve this either:\nConfigure metadata when you create the series or when you add data eg renderableSeries.dataSeries = new XyDataSeries(wasmContext, { metadata: { isSelected: false }}), or:\nAdd the DataPointSelectionModifier after all series have had their dataSeries set.`)}),this.raiseSelectionChanged(!0)}}deselectAllPoints(e=!0){this.selectedDataPoints.forEach(e=>{e.renderableSeries&&e.metadata&&(e.metadata.isSelected=!1)}),this.clearSelectedDataPoints(),e&&this.raiseSelectionChanged(!0)}addSelectedDataPoint(e,t,i){this.selectedDataPointsMap.set(C(e,t),i),this.selectionHasChanged=!0}removeSelectedDataPoint(e,t){this.selectedDataPointsMap.delete(C(e,t)),this.selectionHasChanged=!0}clearSelectedDataPoints(){this.selectedDataPointsMap.size>0&&(this.selectionHasChanged=!0),this.selectedDataPointsMap.clear()}removeSelectedDataPointsForSeries(e){this.selectedDataPointsMap.forEach((t,i)=>{t.renderableSeries===e&&(this.selectedDataPointsMap.delete(i),this.selectionHasChanged=!0)})}raiseSelectionChanged(e){var t;this.selectionHasChanged&&(this.selectionChanged.raiseEvent(new v.DataPointSelectionChangedArgs(this,this.selectedDataPoints)),this.selectionHasChanged=!1,e&&(null===(t=this.parentSurface)||void 0===t||t.invalidateElement()))}}t.DataPointSelectionModifier=P;const C=(e,t)=>`${e.id}_${t}`},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RubberBandSvgRect=void 0;const r=i(34),n=i(458);t.RubberBandSvgRect=class{constructor(e,t,i,r){this.x1Property=0,this.x2Property=0,this.y1Property=0,this.y2Property=0,this.isHiddenProperty=!0,this.svgRoot=e,this.create(t,i,r)}get x1(){return this.x1Property}set x1(e){this.x1Property=e,this.notifyPropertyChanged(n.PROPERTY.X1)}get x2(){return this.x2Property}set x2(e){this.x2Property=e,this.notifyPropertyChanged(n.PROPERTY.X2)}get y1(){return this.y1Property}set y1(e){this.y1Property=e,this.notifyPropertyChanged(n.PROPERTY.Y1)}get y2(){return this.y2Property}set y2(e){this.y2Property=e,this.notifyPropertyChanged(n.PROPERTY.Y2)}get isHidden(){return this.isHiddenProperty}set isHidden(e){this.isHiddenProperty=e,this.notifyPropertyChanged(n.PROPERTY.IS_HIDDEN)}delete(){this.svgRoot.removeChild(this.svg)}create(e,t,i){if(this.svg&&this.delete(),this.svgRoot){const n=s(e,t,i),o=r.annotationHelpers.createSvg(n,this.svgRoot);this.svg=o,this.svg.setAttribute("x","100px"),this.svg.setAttribute("y","100px")}}update(e){if(this.svgRoot){if(e===n.PROPERTY.IS_HIDDEN&&(this.svg.style.display=this.isHidden?"none":"block"),e===n.PROPERTY.X1||e===n.PROPERTY.X2){const e=Math.abs(this.x2-this.x1);this.svg.setAttribute("x",this.x1.toString()),this.svg.setAttribute("width",e+"px")}if(e===n.PROPERTY.Y1||e===n.PROPERTY.Y2){const e=Math.abs(this.y2-this.y1);this.svg.setAttribute("y",this.y1.toString()),this.svg.setAttribute("height",e+"px")}}}notifyPropertyChanged(e){this.update(e)}};const s=(e,t,i,r=0,n=0)=>`<svg width="${r}" height="${n}" style="display: none">\n <rect width="100%" height="100%" fill="${e}" stroke="${t}" stroke-width="${i}"/>\n </svg>`},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseWheelZoomModifier=t.EActionType=void 0;const r=i(19),n=i(29),s=i(81),o=i(155),a=i(9),l=i(48),h=i(20);var u;!function(e){e[e.Zoom=0]="Zoom",e[e.Pan=1]="Pan"}(u=t.EActionType||(t.EActionType={}));class d extends h.ChartModifierBase2D{constructor(e){var t,i,s,o,a,l,h;if(super(e),this.type=r.EChart2DModifierType.MouseWheelZoom,this.applyToSeriesViewRect=!0,this.applyToAxes=!0,this.includedXAxisMap=new Map,this.includedYAxisMap=new Map,this.growFactor=(null==e?void 0:e.growFactor)||.001,this.actionType=null!==(t=null==e?void 0:e.actionType)&&void 0!==t?t:u.Zoom,this.applyToSeriesViewRect=null!==(i=null==e?void 0:e.applyToSeriesViewRect)&&void 0!==i?i:this.applyToSeriesViewRect,this.applyToAxes=null!==(s=null==e?void 0:e.applyToAxes)&&void 0!==s?s:this.applyToAxes,this.actionType===u.Pan&&this.xyDirection===n.EXyDirection.XyDirection&&(console.warn("SciChart MouseWheelZoomModifier: actionType=Pan and xyDirection=Xy conflict. Auto setting XyDirection to X"),this.xyDirection=n.EXyDirection.XDirection),(null==e?void 0:e.includedXAxisIds)&&(null==e?void 0:e.excludedXAxisIds))throw new Error("You either should use includedXAxisIds or excludedXAxisIds");if((null==e?void 0:e.includedYAxisIds)&&(null==e?void 0:e.excludedYAxisIds))throw new Error("You either should use includedYAxisIds or excludedYAxisIds");null===(o=null==e?void 0:e.includedXAxisIds)||void 0===o||o.forEach(e=>{this.includedXAxisMap.set(e,!0)}),null===(a=null==e?void 0:e.includedYAxisIds)||void 0===a||a.forEach(e=>{this.includedYAxisMap.set(e,!0)}),null===(l=null==e?void 0:e.excludedXAxisIds)||void 0===l||l.forEach(e=>{this.includedXAxisMap.set(e,!1)}),null===(h=null==e?void 0:e.excludedYAxisIds)||void 0===h||h.forEach(e=>{this.includedYAxisMap.set(e,!1)})}modifierMouseWheel(e){super.modifierMouseWheel(e);const t=(0,a.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect);if(t&&this.applyToSeriesViewRect)this.actionType===u.Zoom?e.handled=this.performZoom(t,e.mouseWheelDelta):this.actionType===u.Pan&&(e.handled=this.performPan(e.mouseWheelDelta));else if(this.applyToAxes){const t=[];[n.EXyDirection.XDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&t.push(...this.getIncludedXAxis()),[n.EXyDirection.YDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&t.push(...this.getIncludedYAxis());const i=(0,h.getActiveAxes)(t,e.mousePoint);if(i.length>0)if(e.handled=!0,this.actionType===u.Zoom){const t=this.growFactor*e.mouseWheelDelta,r=(0,a.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect,!0);i.forEach(e=>{this.growBy(r,e,t)})}else this.actionType===u.Pan&&i.forEach(t=>{const i=this.getAxisSize(t),r=e.mouseWheelDelta*this.growFactor*i;t.scroll(r,l.EClipMode.None)})}e.handled&&this.parentSurface.setZoomState(s.EZoomState.UserZooming)}performZoom(e,t){const i=this.growFactor*t;let r=!1;return[n.EXyDirection.XDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(t=>{this.growBy(e,t,i),r=!0}),[n.EXyDirection.YDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(t=>{this.growBy(e,t,i),r=!0}),r}performPan(e){let t=!1;return[n.EXyDirection.XDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(i=>{const r=this.getAxisSize(i),n=e*this.growFactor*r;i.scroll(n,l.EClipMode.None),t=!0}),[n.EXyDirection.YDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(i=>{const r=this.getAxisSize(i),n=e*this.growFactor*r;i.scroll(n,l.EClipMode.None),t=!0}),t}includeXAxis(e,t){this.includedXAxisMap.set(e.id,t)}includeYAxis(e,t){this.includedYAxisMap.set(e.id,t)}includeAllAxes(){this.includedXAxisMap.clear()}getIncludedXAxis(){return(0,o.getIncludedAxis)(this.parentSurface.xAxes.asArray(),this.includedXAxisMap)}getIncludedYAxis(){return(0,o.getIncludedAxis)(this.parentSurface.yAxes.asArray(),this.includedYAxisMap)}toJSON(){const e=super.toJSON(),t={actionType:this.actionType,growFactor:this.growFactor,applyToSeriesViewRect:this.applyToSeriesViewRect,applyToAxes:this.applyToAxes,includedXAxisIds:Array.from(this.includedXAxisMap.entries()).filter(e=>e[1]).map(e=>e[0]),includedYAxisIds:Array.from(this.includedYAxisMap.entries()).filter(e=>e[1]).map(e=>e[0]),excludedXAxisIds:Array.from(this.includedXAxisMap.entries()).filter(e=>!e[1]).map(e=>e[0]),excludedYAxisIds:Array.from(this.includedYAxisMap.entries()).filter(e=>!e[1]).map(e=>e[0])};return Object.assign(e.options,t),e}getAxisSize(e){let t=e.isHorizontalAxis?e.viewRect.width:e.viewRect.height;return Math.abs(t)<1e-8&&this.parentSurface&&(t=e.isHorizontalAxis?this.parentSurface.seriesViewRect.width:this.parentSurface.seriesViewRect.height),t}}t.MouseWheelZoomModifier=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRangeSelectionModifier=void 0;const r=i(107),n=i(0),s=i(3),o=i(15),a=i(19),l=i(29),h=i(9),u=i(28),d=i(343),c=i(20);class p extends c.ChartModifierBase2D{constructor(e){var t,i;super(e),this.type=a.EChart2DModifierType.OverviewRangeSelection,this.animationDuration=1e3,this.animate=!0,this.isClicked=!1,this.onSelectedAreaChanged=null==e?void 0:e.onSelectedAreaChanged,this.xAxisId=null!==(t=null==e?void 0:e.xAxisId)&&void 0!==t?t:this.xAxisId,this.yAxisId=null!==(i=null==e?void 0:e.yAxisId)&&void 0!==i?i:this.yAxisId}onAttach(){super.onAttach(),this.updateSelectionAnnotation()}modifierMouseDown(e){if(super.modifierMouseDown(e),this.executeOn!==e.button)return;if(!this.isAttached)throw new Error("Should not call OverviewRangeSelectionModifier.modifierMouseDown if not attached");(0,h.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect)&&(this.isClicked=!0)}modifierMouseUp(e){var t;if(super.modifierMouseUp(e),this.executeOn===e.button){if(!this.isAttached)throw new Error("Should not call OverviewRangeSelectionModifier.modifierMouseUp if not attached");if(this.isClicked){e.handled=!0,null===(t=this.overviewPositionAnimation)||void 0===t||t.cancel();const{seriesViewRect:i}=this.parentSurface;this.pointTo=(0,h.translateFromCanvasToSeriesViewRect)(o.Rect.clipPointToRect(e.mousePoint,i),i),this.isClicked=!1;const n=this.parentSurface.getXAxisById(this.xAxisId),a=n.getCurrentCoordinateCalculator().getDataValue(n.isHorizontalAxis?this.pointTo.x:this.pointTo.y)-(this.rangeSelectionAnnotation.x1+this.rangeSelectionAnnotation.x2)/2,l=new s.NumberRange(this.rangeSelectionAnnotation.x1,this.rangeSelectionAnnotation.x2),u=new s.NumberRange(this.rangeSelectionAnnotation.x1+a,this.rangeSelectionAnnotation.x2+a),d=e=>{var t,i,r;null===(t=this.rangeSelectionAnnotation)||void 0===t||t.setCoordinates({x1:e.min,x2:e.max}),this.annotationBeforeSelectedAreaProperty.x2=null===(i=this.rangeSelectionAnnotation)||void 0===i?void 0:i.x1,this.annotationAfterSelectedAreaProperty.x1=null===(r=this.rangeSelectionAnnotation)||void 0===r?void 0:r.x2,this.onSelectedAreaChanged(new s.NumberRange(this.rangeSelectionAnnotation.x1,this.rangeSelectionAnnotation.x2))};this.animate?(this.overviewPositionAnimation=r.NumberRangeAnimator.animate(l,u,this.animationDuration,d,null),this.parentSurface.addAnimation(this.overviewPositionAnimation)):d(u)}}}get rangeSelectionAnnotation(){return this.rangeSelectionAnnotationProperty}get unselectedsvgString(){return this.annotationBeforeSelectedAreaProperty.svgString}set unselectedsvgString(e){this.annotationBeforeSelectedAreaProperty.svgString=e,this.annotationAfterSelectedAreaProperty.svgString=e}get selectedArea(){return this.selectedAreaProperty}set selectedArea(e){var t,i,r,n,s,o;this.selectedAreaProperty=e;const a=null===(t=this.parentSurface)||void 0===t?void 0:t.getXAxisById(this.xAxisId);a&&(null===(i=this.rangeSelectionAnnotation)||void 0===i||i.setCoordinates({x1:e.min,x2:e.max}),null===(r=this.annotationBeforeSelectedAreaProperty)||void 0===r||r.setCoordinates({x1:a.visibleRange.min,x2:null===(n=this.rangeSelectionAnnotation)||void 0===n?void 0:n.x1}),null===(s=this.annotationAfterSelectedAreaProperty)||void 0===s||s.setCoordinates({x1:null===(o=this.rangeSelectionAnnotation)||void 0===o?void 0:o.x2,x2:a.visibleRange.max}))}createAnnotation(e){return new d.OverviewCustomResizableAnnotation(e)}updateSelectionAnnotation(){var e;if(this.parentSurface){const t=()=>{var e;null===(e=this.overviewPositionAnimation)||void 0===e||e.cancel();const t=new s.NumberRange(this.rangeSelectionAnnotation.x1,this.rangeSelectionAnnotation.x2);this.selectedAreaProperty=t,this.annotationBeforeSelectedAreaProperty.x2=this.rangeSelectionAnnotation.x1,this.annotationAfterSelectedAreaProperty.x1=this.rangeSelectionAnnotation.x2,this.onSelectedAreaChanged(t)},i=null===(e=this.parentSurface)||void 0===e?void 0:e.getXAxisById(this.xAxisId),r={xAxisId:this.xAxisId,yAxisId:this.yAxisId,opacity:.5,y1:0,y2:1,xCoordinateMode:u.ECoordinateMode.DataValue,yCoordinateMode:u.ECoordinateMode.Relative,resizeDirections:l.EXyDirection.XDirection},o=this.createAnnotation(Object.assign(Object.assign({},r),{x1:this.selectedArea.min,x2:this.selectedArea.max,isEditable:!0,svgString:y,onDrag:t})),a=this.createAnnotation(Object.assign(Object.assign({},r),{x1:i.visibleRange.min,x2:this.selectedArea.min,svgString:v})),h=this.createAnnotation(Object.assign(Object.assign({},r),{x1:this.selectedArea.max,x2:i.visibleRange.max,svgString:v}));i.isHorizontalAxis?(o.adornerSvgStringTemplate=g,a.minWidth=0,h.minWidth=0):(o.adornerSvgStringTemplate=f,a.minHeight=0,h.minHeight=0),this.rangeSelectionAnnotationProperty=(0,n.deleteSafe)(this.rangeSelectionAnnotation),this.annotationBeforeSelectedAreaProperty=(0,n.deleteSafe)(this.annotationBeforeSelectedAreaProperty),this.annotationAfterSelectedAreaProperty=(0,n.deleteSafe)(this.annotationAfterSelectedAreaProperty),this.parentSurface.modifierAnnotations.remove(this.rangeSelectionAnnotation),this.parentSurface.modifierAnnotations.remove(this.annotationBeforeSelectedAreaProperty),this.parentSurface.modifierAnnotations.remove(this.annotationAfterSelectedAreaProperty),this.parentSurface.modifierAnnotations.add(o),this.parentSurface.modifierAnnotations.add(a),this.parentSurface.modifierAnnotations.add(h),this.rangeSelectionAnnotationProperty=o,this.annotationBeforeSelectedAreaProperty=a,this.annotationAfterSelectedAreaProperty=h}}}t.OverviewRangeSelectionModifier=p;const g=(e,t,i,r)=>{const n=i-e,s=r-t;return`<svg x="${e}" y="${t}" width="${n}px" height="${s}px" viewBox="0 0 ${n} ${s}" overflow="visible" xmlns="http://www.w3.org/2000/svg">\n <line x1="0" y1="0" x2="${n}" y2="0" stroke="black" stroke-width="1" />\n <line x1="0" y1="${s}" x2="${n}" y2="${s}" stroke="black" stroke-width="1" />\n <line x1="0" y1="0" x2="0" y2="${s}" stroke="black" stroke-width="1" />\n <line x1="${n}" y1="0" x2="${n}" y2="${s}" stroke="black" stroke-width="1" />\n <rect x="-3" y="30%" width="7" height="40%" fill="#2e2e2e" rx="5" stroke="black" />\n <rect x="${n-3}" y="30%" width="7" height="40%" fill="#2e2e2e" rx="5" stroke="black" />\n </svg>`},f=(e,t,i,r)=>{const n=i-e,s=r-t;return`<svg x="${e}" y="${t}" width="${n}px" height="${s}px" viewBox="0 0 ${n} ${s}" overflow="visible" xmlns="http://www.w3.org/2000/svg">\n <line x1="0" y1="0" x2="${n}" y2="0" stroke="black" stroke-width="1" />\n <line x1="0" y1="${s}" x2="${n}" y2="${s}" stroke="black" stroke-width="1" />\n <line x1="0" y1="0" x2="0" y2="${s}" stroke="black" stroke-width="1" />\n <line x1="${n}" y1="0" x2="${n}" y2="${s}" stroke="black" stroke-width="1" />\n <rect x="30%" y="-3" width="40%" height="7" fill="#2e2e2e" rx="5" stroke="black" />\n <rect x="30%" y="${s-3}" width="40%" height="7" fill="#2e2e2e" rx="5" stroke="black" />\n </svg>`},y='<svg width="50" height="50" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="100%" height="100%" style="fill:transparent">\n </rect>\n</svg>',v='<svg width="50" height="50" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="100%" height="100%" style="fill:black">\n </rect>\n </svg>'},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECursorStyle=void 0,function(e){e.NS="ns-resize",e.EW="ew-resize",e.Defalut="auto"}(t.ECursorStyle||(t.ECursorStyle={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDragMode=void 0,function(e){e.Scaling="Scaling",e.Panning="Panning"}(t.EDragMode||(t.EDragMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BandSeriesDataLabelProvider=void 0;const r=i(5),n=i(44),s=i(41),o=i(47),a=i(21),l=i(151),h=i(158);class u extends h.LineSeriesDataLabelProvider{constructor(e){var t;super(e),this.type=n.EDataLabelProviderType.Band,this.singleLabelProperty=!1,this.singleLabelProperty=null!==(t=null==e?void 0:e.singleLabel)&&void 0!==t?t:this.singleLabelProperty}get singleLabel(){return this.singleLabelProperty}set singleLabel(e){this.singleLabelProperty=e,this.invalidateParent()}getText(e){if(this.singleLabel){if(this.metaDataSelector){const t=e.renderPassData.pointSeries.indexes.get(e.index);return this.metaDataSelector(e.parentSeries.dataSeries.getMetadataAt(t))}const t=!this.updateTextInAnimation&&e.parentSeries.isRunningAnimation,i=t?e.yValAfterAnimation():e.yVal();this.state1.index=e.index;const r=t?this.state1.yValAfterAnimation():this.state1.yVal();return this.getSingleLabelText(e.xVal(),i,r)}return super.getText(e)}getSingleLabelText(e,t,i){var r,n,o,l;if(t==t||i==i){let e="";return t==t&&(e=(0,a.formatNumber)(t,null!==(r=this.numericFormat)&&void 0!==r?r:s.ENumericFormat.Decimal,null!==(n=this.precision)&&void 0!==n?n:1)),t==t&&i==i&&(e+="\n"),i==i&&(e+=(0,a.formatNumber)(i,null!==(o=this.numericFormat)&&void 0!==o?o:s.ENumericFormat.Decimal,null!==(l=this.precision)&&void 0!==l?l:1)),e}}getPosition(e,t){var i,n,s,a;if(this.singleLabel){let l=e.xCoord();this.horizontalTextPosition===o.EHorizontalTextPosition.Center?l-=t.m_fWidth/2:this.horizontalTextPosition===o.EHorizontalTextPosition.Left?l-=t.m_fWidth+(null!==(n=null===(i=this.style.padding)||void 0===i?void 0:i.right)&&void 0!==n?n:0):l+=null!==(a=null===(s=this.style.padding)||void 0===s?void 0:s.right)&&void 0!==a?a:0;const h=t.m_fHeight-t.GetLineBounds(0).m_fHeight;let u=(e.yCoord()+this.state1.yCoord()-h)/2;return new r.Point(l,u)}return super.getPosition(e,t)}getY1Provider(e){return new h.LineSeriesDataLabelProvider(e.toJSON().options)}generateDataLabels(e,t){if(this.singleLabel){const i=t.pointSeries.y1Values;this.state1=new l.DataLabelState(e,t,this.style,this.color,i,this.parentSeries),super.generateDataLabels(e,t)}else{super.generateDataLabels(e,t);const i=this.getY1Provider(this);i.ySelector=e=>e.y1Values,i.onAttach(this.webAssemblyContext,this.parentSeries),i.generateDataLabels(e,t),this.dataLabels.push(...i.dataLabels)}}toJSON(){const e=super.toJSON(),t={singleLabel:this.singleLabel};return Object.assign(e.options,t),e}}t.BandSeriesDataLabelProvider=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BubbleSeriesDataLabelProvider=void 0;const r=i(5),n=i(47),s=i(44),o=i(83);class a extends o.DataLabelProvider{constructor(e){var t,i;super(e),this.type=s.EDataLabelProviderType.Bubble,this.horizontalTextPositionProperty=null!==(t=null==e?void 0:e.horizontalTextPosition)&&void 0!==t?t:n.EHorizontalTextPosition.Center,this.verticalTextPositionProperty=null!==(i=null==e?void 0:e.verticalTextPosition)&&void 0!==i?i:n.EVerticalTextPosition.Center}getPosition(e,t){var i,s,o,a,l,h,u,d;let c=e.xCoord(),p=Math.abs(e.parentSeries.getBubbleDiameter(e.index))/2;this.horizontalTextPosition===n.EHorizontalTextPosition.Center?c-=t.m_fWidth/2:this.horizontalTextPosition===n.EHorizontalTextPosition.Left?c-=t.m_fWidth+(null!==(s=null===(i=this.style.padding)||void 0===i?void 0:i.right)&&void 0!==s?s:0)+p:c+=(null!==(a=null===(o=this.style.padding)||void 0===o?void 0:o.right)&&void 0!==a?a:0)+p;const g=t.m_fHeight-t.GetLineBounds(0).m_fHeight;let f=e.yCoord()-g;return this.verticalTextPosition===n.EVerticalTextPosition.Center?f+=t.m_fHeight/2:this.verticalTextPosition===n.EVerticalTextPosition.Below?f+=t.m_fHeight+(null!==(h=null===(l=this.style.padding)||void 0===l?void 0:l.top)&&void 0!==h?h:0)+p:f-=(null!==(d=null===(u=this.style.padding)||void 0===u?void 0:u.bottom)&&void 0!==d?d:0)+p,new r.Point(c,f)}}t.BubbleSeriesDataLabelProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContoursDataLabelProvider=void 0;const r=i(5),n=i(15),s=i(44),o=i(41),a=i(80),l=i(21),h=i(2),u=i(12),d=i(6),c=i(150);class p extends c.BaseDataLabelProvider{constructor(e){var t,i,r;super(e),this.type=s.EDataLabelProviderType.Contours,this.numericFormatProperty=o.ENumericFormat.Decimal,this.precisionProperty=1,this.labelRowCountProperty=10,this.numericFormatProperty=null!==(t=null==e?void 0:e.numericFormat)&&void 0!==t?t:this.numericFormatProperty,this.precision=null!==(i=null==e?void 0:e.precision)&&void 0!==i?i:this.precisionProperty,this.labelRowCountProperty=null!==(r=null==e?void 0:e.labelRowCount)&&void 0!==r?r:this.labelRowCountProperty,this.metaDataSelector=null==e?void 0:e.metaDataSelector}get numericFormat(){return this.numericFormatProperty}set numericFormat(e){var t;this.numericFormatProperty=e,null===(t=this.parentSeries)||void 0===t||t.invalidateParentCallback()}get precision(){return this.precisionProperty}set precision(e){var t;this.precisionProperty=e,null===(t=this.parentSeries)||void 0===t||t.invalidateParentCallback()}get labelRowCount(){return this.labelRowCountProperty}set labelRowCount(e){var t;this.labelRowCountProperty=e,null===(t=this.parentSeries)||void 0===t||t.invalidateParentCallback()}getText(e,t){var i,r;if(this.metaDataSelector)return this.metaDataSelector(this.dataSeries.getMetadataAt(t,e));const n=this.zValues[t][e];return n==n?(0,l.formatNumber)(n,null!==(i=this.numericFormat)&&void 0!==i?i:o.ENumericFormat.Decimal,null!==(r=this.precision)&&void 0!==r?r:1):void 0}getPosition(e,t,i,n,s,o){let a=o.xCoordinateCalculator.getCoordinate(i),l=o.yCoordinateCalculator.getCoordinate(n);if(o.isVerticalChart){const e=a;a=l,l=e}return new r.Point(a,l)}shouldGenerate(e,t,i){return e.height<i&&e.width<t}getColor(e,t,i){return this.colorValue}shouldSkipLabel(e,t,i,r,n){const s=this.parentSeries.parentSurface.seriesViewRect;return i.rect.y<0||i.rect.bottom>s.height||(i.rect.x<0||i.rect.right>s.width)}generateDataLabels(e,t){var i,r,s,c;if(this.dataLabels=[],!this.style||!this.style.fontFamily||!this.style.fontSize)return;this.dataSeries=this.parentSeries.dataSeries,this.zValues=this.dataSeries.getZValues();const p=(0,u.getTextBounds)(this.webAssemblyContext),g=d.DpiHelper.adjustTextStyle(this.style),f=e.getFont(g);Math.abs(t.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(1))-t.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0))),Math.abs(t.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(1))-t.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0)));this.colorValue=(0,h.parseColorToUIntArgb)(this.color);const{xStart:y,xStep:v,yStart:m,yStep:S}=this.parentSeries.dataSeries,P=this.parentSeries.getContourDrawingParams(),C=P.majorStepZ,A=(P.yMax-P.yMin)/(this.labelRowCount+1);let x=m;for(let e=0;e<this.dataSeries.arrayHeight;e++){const h=m+S*e;if(h<=x+A)continue;if(x=h,t.yCoordinateCalculator.visibleMin>h+S||t.yCoordinateCalculator.visibleMax<h)continue;let u=void 0;for(let h=0;h<this.dataSeries.arrayWidth;h++){const d=y+v*h;if(t.xCoordinateCalculator.visibleMin>d+v||t.xCoordinateCalculator.visibleMax<d)continue;const g=this.zValues[e][h];let m=void 0,S=d;if(void 0!==u){const e=Math.floor(u/C)*C,t=e+C;g<=e?(m=(0,l.formatNumber)(e,null!==(i=this.numericFormat)&&void 0!==i?i:o.ENumericFormat.Decimal,null!==(r=this.precision)&&void 0!==r?r:1),S=v*(e-g)/(u-g)-v/2+d):g>=t&&(m=(0,l.formatNumber)(t,null!==(s=this.numericFormat)&&void 0!==s?s:o.ENumericFormat.Decimal,null!==(c=this.precision)&&void 0!==c?c:1),S=v*(t-g)/(g-u)-v/2+d)}if(u=g,!m)continue;f.CalculateStringBounds(null!=m?m:"",p,2);const P=new a.Size(p.m_fWidth,p.m_fHeight),A=(this.dataSeries.getXValue(h),this.dataSeries.getYValue(e)),x=this.getPosition(h,e,S,A,P,t),b={text:m,position:x,rect:new n.Rect(x.x,x.y-p.GetLineBounds(0).m_fHeight,P.width,P.height),color:this.getColor(h,e,m),dataX:this.dataSeries.getXValue(h),dataY:this.dataSeries.getYValue(e)};this.dataLabels.push(b)}}}toJSON(){const e=super.toJSON(),t={numericFormat:this.numericFormat,precision:this.precision,labelRowCount:this.labelRowCount};return Object.assign(e.options,t),e}}t.ContoursDataLabelProvider=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformHeatMapDataLabelProvider=void 0;const r=i(5),n=i(15),s=i(44),o=i(80),a=i(2),l=i(12),h=i(6),u=i(159);class d extends u.HeatMapDataLabelProvider{constructor(){super(...arguments),this.type=s.EDataLabelProviderType.NonUniformHeatmap,this.cellSizeThresholdCoefficient=1}getPosition(e,t,i,n,s,o,a,l){let h=l.xCoordinateCalculator.getCoordinate(i),u=l.yCoordinateCalculator.getCoordinate(n);if(l.isVerticalChart){const e=h;h=u,u=e}return l.xCoordinateCalculator.hasFlippedCoordinates?h+=(o-s.width)/2:h-=o-(o-s.width)/2,l.yCoordinateCalculator.hasFlippedCoordinates?u+=a-(a-s.height)/2:u-=(a-s.height)/2,new r.Point(h,u)}generateDataLabels(e,t){var i,r;if(this.dataLabels=[],!this.style||!this.style.fontFamily||!this.style.fontSize)return;this.dataSeries=this.parentSeries.dataSeries,this.zValues=this.dataSeries.getZValues();const s=(0,l.getTextBounds)(this.webAssemblyContext),u=h.DpiHelper.adjustTextStyle(this.style),d=e.getFont(u),c=Math.abs(t.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(this.dataSeries.arrayWidth))-t.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0))),p=Math.abs(t.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(this.dataSeries.arrayHeight))-t.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0))),g=this.dataSeries.xCellSizes,f=this.dataSeries.yCellSizes;d.CalculateStringBounds(null!==(i=this.getText(0,0))&&void 0!==i?i:"",s,null!==(r=this.style.lineSpacing)&&void 0!==r?r:2);const y=s.m_fHeight*this.cellSizeThresholdCoefficient,v=s.m_fWidth*this.cellSizeThresholdCoefficient;this.colorValue=(0,a.parseColorToUIntArgb)(this.color);for(let e=0;e<this.dataSeries.arrayHeight;e++){let i=p*f[e];if(i<y)continue;const r=this.dataSeries.getYValue(e),a=this.dataSeries.yCellOffsets[e+1];if(!(t.yCoordinateCalculator.visibleMin>r||t.yCoordinateCalculator.visibleMax<a))for(let a=0;a<this.dataSeries.arrayWidth;a++){let l=c*g[a];if(l<v)continue;const h=this.dataSeries.getXValue(a),u=this.dataSeries.xCellOffsets[a+1];if(console.log(a,h,u,t.xCoordinateCalculator.visibleMax),t.xCoordinateCalculator.visibleMin>h||t.xCoordinateCalculator.visibleMax<u)continue;const p=this.getText(a,e);if(!p)continue;d.CalculateStringBounds(null!=p?p:"",s,2);const f=new o.Size(s.m_fWidth,s.m_fHeight);if(t.isVerticalChart){const e=i;i=l,l=e}const y=this.getPosition(a,e,h,r,f,l,i,t),m={text:p,position:y,rect:new n.Rect(y.x,y.y-s.GetLineBounds(0).m_fHeight,f.width,f.height),color:this.getColor(a,e,p),dataX:h,dataY:r};this.shouldSkipLabel(a,e,m,l,i)||this.dataLabels.push(m)}}}}t.NonUniformHeatMapDataLabelProvider=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDataLabelProvider=void 0;const r=i(5),n=i(15),s=i(12),o=i(150),a=i(44),l=i(151),h=i(47);class u extends o.BaseDataLabelProvider{constructor(e){var t,i,r;super(Object.assign(Object.assign({},e),{style:Object.assign({fontFamily:"Arial",fontSize:12},null==e?void 0:e.style)})),this.type=a.EDataLabelProviderType.Text,this.calculateTextBounds=!1,this.horizontalTextPositionProperty=h.EHorizontalTextPosition.Right,this.verticalTextPositionProperty=h.EVerticalTextPosition.Above,this.calculateTextBounds=null!==(t=null==e?void 0:e.calculateTextBounds)&&void 0!==t?t:this.calculateTextBounds,this.horizontalTextPositionProperty=null!==(i=null==e?void 0:e.horizontalTextPosition)&&void 0!==i?i:this.horizontalTextPosition,this.verticalTextPositionProperty=null!==(r=null==e?void 0:e.verticalTextPosition)&&void 0!==r?r:this.verticalTextPosition}get horizontalTextPosition(){return this.horizontalTextPositionProperty}set horizontalTextPosition(e){this.horizontalTextPositionProperty=e,this.invalidateParent()}get verticalTextPosition(){return this.verticalTextPositionProperty}set verticalTextPosition(e){this.verticalTextPositionProperty=e,this.invalidateParent()}getPosition(e,t){var i,n,s,o,a,l,u,d;let c=e.xCoord();this.horizontalTextPosition===h.EHorizontalTextPosition.Center?c-=t.m_fWidth/2:this.horizontalTextPosition===h.EHorizontalTextPosition.Left?c-=t.m_fWidth+(null!==(n=null===(i=this.style.padding)||void 0===i?void 0:i.right)&&void 0!==n?n:0):c+=null!==(o=null===(s=this.style.padding)||void 0===s?void 0:s.right)&&void 0!==o?o:0;const p=t.m_fHeight-t.GetLineBounds(0).m_fHeight;let g=e.yCoord()-p;return this.verticalTextPosition===h.EVerticalTextPosition.Center?g+=t.m_fHeight/2:this.verticalTextPosition===h.EVerticalTextPosition.Below?g+=t.m_fHeight+(null!==(l=null===(a=this.style.padding)||void 0===a?void 0:a.top)&&void 0!==l?l:0):g-=null!==(d=null===(u=this.style.padding)||void 0===u?void 0:u.bottom)&&void 0!==d?d:0,new r.Point(c,g)}getColor(e,t){return e.color}generateDataLabels(e,t){var i,r,o,a,u;if(this.dataLabels=[],!this.style||!this.style.fontFamily||!this.style.fontSize)return;const d=this.parentSeries.dataSeries;if(!d||!d.textValues)return void console.warn("TextDataLabelProvider requires an XyTextDataSeries");const c=new l.DataLabelState(e,t,this.style,this.color,t.pointSeries.yValues,this.parentSeries),p=(0,s.getTextBounds)(this.webAssemblyContext),g=t.pointSeries.indexes,f=this.verticalTextPosition!==h.EVerticalTextPosition.Above||this.horizontalTextPosition!==h.EHorizontalTextPosition.Right||this.calculateTextBounds;if(d){c.font.CalculateStringBounds(null!==(i=d.textValues[0])&&void 0!==i?i:"",p,null!==(o=null===(r=this.style)||void 0===r?void 0:r.lineSpacing)&&void 0!==o?o:2);for(let e=0;e<g.size();e++){c.index=e;const t=g.get(c.index),i=d.textValues[t];f&&c.font.CalculateStringBounds(null!=i?i:"",p,null!==(u=null===(a=this.style)||void 0===a?void 0:a.lineSpacing)&&void 0!==u?u:2);const r=this.getPosition(c,p),s=p.GetLineBounds(0).m_fHeight,o={text:i,position:r,rect:new n.Rect(r.x,r.y-s,p.m_fWidth,p.m_fHeight),color:this.getColor(c,i),dataX:c.xCoord(),dataY:c.yCoord()};this.dataLabels.push(o)}}this.onAfterGenerate(this.dataLabels)}onAfterGenerate(e){}toJSON(){const e=super.toJSON(),t={calculateTextBounds:this.calculateTextBounds,horizontalTextPosition:this.horizontalTextPosition,verticalTextPosition:this.verticalTextPosition};return Object.assign(e.options,t),e}}t.TextDataLabelProvider=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyyPointSeriesResampled=void 0;const r=i(197);class n extends r.BasePointSeriesResampled{constructor(e,t){super(e,t),this.y1Values=new e.SCRTDoubleVector}delete(){super.delete(),this.y1Values.delete()}debugOutputForUnitTests(){console.log("points count "+this.count),console.log("xResampled at min",this.xValues.get(0)),console.log("yValues at min",this.yValues.get(0)),console.log("y1Values at min",this.y1Values.get(0));const e=Math.round(this.count/2);console.log("middle",e),console.log("xResampled at middle",this.xValues.get(e)),console.log("yValues at middle",this.yValues.get(e)),console.log("y1Values at middle",this.y1Values.get(e));const t=this.count-1;console.log("xResampled at end",this.xValues.get(t)),console.log("yValues at end",this.yValues.get(t)),console.log("y1Values at end",this.y1Values.get(t))}}t.XyyPointSeriesResampled=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BandSeriesDrawingProvider=void 0;const r=i(0),n=i(8),s=i(54),o=i(35),a=i(30),l=i(7),h=i(49);class u extends h.BaseSeriesDrawingProvider{constructor(e,t,i,r){super(e,t,i),this.y1Selector=null!=r?r:e=>e.y1Values,this.linesPenCache=new o.Pen2DCache(e),this.strokePenY1Cache=new o.Pen2DCache(e),this.fillBrushCache=new s.BrushCache(e),this.fillBrushY1Cache=new s.BrushCache(e)}onAttachSeries(){super.onAttachSeries(),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTBandSeriesDrawingProvider;const{stroke:e,strokeThickness:t,fill:i,strokeY1:r,fillY1:n,opacity:a,strokeDashArray:l,strokeY1DashArray:h}=this.parentSeries;(0,o.createPenInCache)(this.linesPenCache,e,t,a,l),(0,o.createPenInCache)(this.strokePenY1Cache,r,t,a,h),(0,s.createBrushInCache)(this.fillBrushCache,i,a),(0,s.createBrushInCache)(this.fillBrushY1Cache,n,a)}onDetachSeries(){super.onDetachSeries(),this.delete()}delete(){this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),this.linesPenCache=(0,r.deleteSafe)(this.linesPenCache),this.fillBrushCache=(0,r.deleteSafe)(this.fillBrushCache),this.strokePenY1Cache=(0,r.deleteSafe)(this.strokePenY1Cache),this.fillBrushY1Cache=(0,r.deleteSafe)(this.fillBrushY1Cache),super.delete()}draw(e,t){var i;const r=t.pointSeries,l=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN,h=new this.webAssemblyContext.SCRTBandDrawingParams;h.forceShaderMethod=!0,h.verticalChart=t.isVerticalChart,h.lineGaps=l?this.parentSeries.drawNaNAs===a.ELineDrawMode.DiscontinuousLine?this.webAssemblyContext.SCRTLineGapMode.DrawGaps:this.webAssemblyContext.SCRTLineGapMode.CloseGaps:this.webAssemblyContext.SCRTLineGapMode.Default,h.isDigitalLine=this.parentSeries.isDigitalLine;const u=(0,s.getScrtBrushFromCache)(this.fillBrushCache);u&&h.SetFillBrush(u);const d=(0,o.getScrtPenFromCache)(this.linesPenCache);d&&h.SetLinesPen(d);const c=(0,s.getScrtBrushFromCache)(this.fillBrushY1Cache);c&&h.SetFillBrush1(c);const p=(0,o.getScrtPenFromCache)(this.strokePenY1Cache);p&&h.SetLinesPen1(p);const g=t.xCoordinateCalculator.isCategoryCoordinateCalculator,f=r.xValues;let y=g?r.indexes:f,v=this.ySelector(r),m=this.y1Selector(r);if(this.parentSeries.type===n.ESeriesType.SplineBandSeries&&f.size()>1){const e=this.parentSeries;this.parentSeries.isRunningAnimation||e.updateSplineValues(),y=e.xSplineValues,v=e.ySplineValues,m=e.y1SplineValues}h.count=v.size(),super.applyStrokeFillPaletting(void 0,void 0,void 0,void 0,this.parentSeries.opacity,!0);const S=null===(i=this.palettingState.paletteTextureCache)||void 0===i?void 0:i.value;S&&h.SetPalette(S),h.isSmoothColors=this.palettingState.gradientPaletting;const P=e.getNativeContext();this.nativeDrawingProvider.DrawPointsVec(P,y,v,m,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,h),h.delete()}onDpiChanged(e){super.onDpiChanged(e),this.onSeriesPropertyChange(l.PROPERTY.STROKE),this.onSeriesPropertyChange(l.PROPERTY.STROKE_Y1)}onSeriesPropertyChange(e){super.onSeriesPropertyChange(e);const{stroke:t,strokeY1:i,strokeThickness:r,fill:n,fillY1:a,opacity:h,strokeDashArray:u,strokeY1DashArray:d}=this.parentSeries;e!==l.PROPERTY.STROKE&&e!==l.PROPERTY.STROKE_THICKNESS&&e!==l.PROPERTY.OPACITY&&e!==l.PROPERTY.STROKE_DASH_ARRAY||(0,o.createPenInCache)(this.linesPenCache,t,r,h,u),e!==l.PROPERTY.STROKE_Y1&&e!==l.PROPERTY.STROKE_THICKNESS&&e!==l.PROPERTY.OPACITY&&e!==l.PROPERTY.STROKE_Y1_DASH_ARRAY||(0,o.createPenInCache)(this.strokePenY1Cache,i,r,h,d),e!==l.PROPERTY.FILL&&e!==l.PROPERTY.OPACITY||(0,s.createBrushInCache)(this.fillBrushCache,n,h),e!==l.PROPERTY.FILL_Y1&&e!==l.PROPERTY.OPACITY||(0,s.createBrushInCache)(this.fillBrushY1Cache,a,h)}}t.BandSeriesDrawingProvider=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDataPointWidthMode=void 0,function(e){e.Absolute="Absolute",e.Relative="Relative"}(t.EDataPointWidthMode||(t.EDataPointWidthMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformContoursRenderableSeries=t.EContourColorMapMode=t.COLOR_MAP_PREFIX=void 0;const r=i(8),n=i(51),s=i(57),o=i(40),a=i(7),l=i(226),h=i(405),u=i(164);t.COLOR_MAP_PREFIX="colorMap.",function(e){e[e.AlternateColors=0]="AlternateColors",e[e.GradientColors=1]="GradientColors"}(t.EContourColorMapMode||(t.EContourColorMapMode={}));class d extends o.BaseRenderableSeries{constructor(e,t){var i,n,o;super(e,t),this.type=r.ESeriesType.UniformContoursSeries,this.colorMapPropertyChanged=this.colorMapPropertyChanged.bind(this),(null==t?void 0:t.colorMap)&&("toJSON"in t.colorMap||(t.colorMap=new u.HeatmapColorMap(t.colorMap))),this.colorMap=null==t?void 0:t.colorMap,this.dataSeries=null==t?void 0:t.dataSeries,this.xAxisId=null!==(i=null==t?void 0:t.xAxisId)&&void 0!==i?i:s.AxisCore.DEFAULT_AXIS_ID,this.xAxisId=(null==t?void 0:t.yAxisId)||s.AxisCore.DEFAULT_AXIS_ID,this.zMin=(null==t?void 0:t.zMin)||NaN,this.zMax=(null==t?void 0:t.zMax)||NaN,this.zStep=(null==t?void 0:t.zStep)||NaN,this.majorLineStyle=(null==t?void 0:t.majorLineStyle)||d.DEFAULT_MAJOR_LINE_STYLE,this.minorLineStyle=(null==t?void 0:t.minorLineStyle)||d.DEFAULT_MINOR_LINE_STYLE,this.minorsPerMajor=(null==t?void 0:t.minorsPerMajor)||0,(null===(n=this.paletteProvider)||void 0===n?void 0:n.onAttached)&&(null===(o=this.paletteProvider)||void 0===o||o.onAttached(this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new l.ContoursDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),this.drawingProviders=[],this.drawingProviders.push(new h.UniformContoursDrawingProvider(e,this))}get zMin(){return this.zMinProperty}set zMin(e){this.zMinProperty=e,this.notifyPropertyChanged(a.PROPERTY.Z_MIN)}get zMax(){return this.zMaxProperty}set zMax(e){this.zMaxProperty=e,this.notifyPropertyChanged(a.PROPERTY.Z_MAX)}get zStep(){return this.zStepProperty}set zStep(e){this.zStepProperty=e,this.notifyPropertyChanged(a.PROPERTY.Z_STEP)}get colorMap(){return this.colorMapProperty}set colorMap(e){var t,i;null===(t=this.colorMapProperty)||void 0===t||t.propertyChanged.unsubscribe(this.colorMapPropertyChanged),this.colorMapProperty=e,null===(i=this.colorMapProperty)||void 0===i||i.propertyChanged.subscribe(this.colorMapPropertyChanged),this.notifyPropertyChanged(a.PROPERTY.COLOR_MAP)}get colorMapMode(){return this.colorMapModeProperty}set colorMapMode(e){this.colorMapModeProperty=e,this.notifyPropertyChanged(a.PROPERTY.CONTOUR_COLOR_MAP_MODE)}get majorLineStyle(){return this.majorLineStyleProperty}set majorLineStyle(e){this.majorLineStyleProperty=e,this.notifyPropertyChanged(a.PROPERTY.CONTOUR_MAJOR_LINE_STYLE)}get minorLineStyle(){return this.minorLineStyleProperty}set minorLineStyle(e){this.minorLineStyleProperty=e,this.notifyPropertyChanged(a.PROPERTY.CONTOUR_MINOR_LINE_STYLE)}get minorsPerMajor(){return this.minorsPerMajorProperty}set minorsPerMajor(e){this.minorsPerMajorProperty=e,this.notifyPropertyChanged(a.PROPERTY.CONTOUR_MINORS_PER_MAJOR)}getContourDrawingParams(){var e,t;const i=this.dataSeries,r=i.zRange;let s=this.zMin&&(0,n.isRealNumber)(this.zMin)?this.zMin:r.min,o=this.zMax&&(0,n.isRealNumber)(this.zMax)?this.zMax:r.max;s=Math.max(s,r.min),o=Math.min(o,r.max);const a=this.zStep&&(0,n.isRealNumber)(this.zStep)?this.zStep:Math.abs(o-s)/d.DEFAULT_CONTOURS_COUNT,l=this.minorsPerMajor&&this.minorsPerMajor>0?a/(this.minorsPerMajor+1):a,h=null!==(e=this.minorLineStyle)&&void 0!==e?e:{strokeThickness:this.strokeThickness,color:this.stroke},u=null!==(t=this.majorLineStyle)&&void 0!==t?t:{strokeThickness:this.strokeThickness,color:this.stroke};return{xMax:i.xMax,yMin:i.yMin,yMax:i.yMax,xMin:i.xMin,zMin:s,zMax:o,majorStepZ:a,minorStepZ:l,minorLineStyle:h,majorLineStyle:u}}toPointSeries(e){}toJSON(e=!1){var t;const i=super.toJSON(e),r={colorMap:null===(t=this.colorMap)||void 0===t?void 0:t.toJSON(),majorLineStyle:this.majorLineStyle,minorLineStyle:this.minorLineStyle,zMax:this.zMax,zMin:this.zMin,zStep:this.zStep,minorsPerMajor:this.minorsPerMajor};return Object.assign(i.options,r),i}colorMapPropertyChanged(e){this.notifyPropertyChanged(t.COLOR_MAP_PREFIX+e.propertyName)}newHitTestProvider(){}}t.UniformContoursRenderableSeries=d,d.DEFAULT_CONTOURS_COUNT=15,d.DEFAULT_MAJOR_LINE_STYLE={strokeThickness:2,color:"white"},d.DEFAULT_MINOR_LINE_STYLE={strokeThickness:1,color:"white"}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformHeatmapRenderableSeries=void 0;const r=i(13),n=i(8),s=i(120),o=i(159),a=i(406),l=i(407);class h extends s.BaseHeatmapRenderableSeries{constructor(e,t){super(e,t),this.type=n.ESeriesType.UniformHeatmapSeries,this.drawingProviders=[],r.IS_TEST_ENV||this.drawingProviders.push(new a.UniformHeatmapDrawingProvider(e,this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new o.HeatMapDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this))}newHitTestProvider(){return new l.UniformHeatmapHitTestProvider(this,this.webAssemblyContext)}}t.UniformHeatmapRenderableSeries=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcAnimationStyle=void 0;const r=i(2),n=i(63);class s extends n.BaseAnimationStyle{constructor(e){var t,i,r;super(e),this.strokeUp=null!==(t=null==e?void 0:e.strokeUp)&&void 0!==t?t:this.strokeUpProperty,this.strokeDown=null!==(i=null==e?void 0:e.strokeDown)&&void 0!==i?i:this.strokeDownProperty,this.dataPointWidth=null!==(r=null==e?void 0:e.dataPointWidth)&&void 0!==r?r:this.dataPointWidth}set strokeUp(e){this.strokeUpProperty=e,e&&(this.strokeUpARGBProperty=(0,r.parseColorToUIntArgb)(e))}get strokeUp(){return this.strokeUpProperty}get strokeUpARGB(){return this.strokeUpARGBProperty}set strokeDown(e){this.strokeDownProperty=e,e&&(this.strokeDownARGBProperty=(0,r.parseColorToUIntArgb)(e))}get strokeDown(){return this.strokeDownProperty}get strokeDownARGB(){return this.strokeDownARGBProperty}}t.OhlcAnimationStyle=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChartModifierBase3D=void 0;const r=i(100);class n extends r.ChartModifierBase{constructor(e){super()}get modifierType(){return r.EModifierType.Chart3DModifier}}t.ChartModifierBase3D=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderableSeriesSceneEntityState=void 0;t.RenderableSeriesSceneEntityState=class{constructor(e=!0,t=!0,i=!0,r=!0,n={xVisibleMin:0,xVisibleMax:0,yVisibleMin:0,yVisibleMax:0,zVisibleMin:0,zVisibleMax:0,xWorldDimension:0,yWorldDimension:0,zWorldDimension:0}){this.isInitialStateProperty=e,this.isDataSeriesModifiedProperty=t,this.isRenderableSeriesPropertyChangedProperty=i,this.isAxisCubeStateChangedProperty=r,this.axisCubeState=n}get isInitialState(){return this.isInitialStateProperty}setInitialState(){this.isInitialStateProperty=!0}get isDataSeriesModified(){return this.isDataSeriesModifiedProperty}get isRenderableSeriesPropertyChanged(){return this.isRenderableSeriesPropertyChangedProperty}setRenderableSeriesPropertyChanged(){this.isRenderableSeriesPropertyChangedProperty=!0}get isAxisCubeStateChanged(){return this.isAxisCubeStateChangedProperty}validate(e,t){this.isDataSeriesModifiedProperty=e.dataSeries.isModified;return this.isAxisCubeStateChangedProperty=Math.abs(this.axisCubeState.xVisibleMin-t.xCalc.visibleMin)>.001||Math.abs(this.axisCubeState.xVisibleMax-t.xCalc.visibleMax)>.001||Math.abs(this.axisCubeState.yVisibleMin-t.yCalc.visibleMin)>.001||Math.abs(this.axisCubeState.yVisibleMax-t.yCalc.visibleMax)>.001||Math.abs(this.axisCubeState.zVisibleMin-t.zCalc.visibleMin)>.001||Math.abs(this.axisCubeState.zVisibleMax-t.zCalc.visibleMax)>.001||Math.abs(this.axisCubeState.xWorldDimension-t.worldDimensions.x)>.001||Math.abs(this.axisCubeState.yWorldDimension-t.worldDimensions.y)>.001||Math.abs(this.axisCubeState.zWorldDimension-t.worldDimensions.z)>.001,!(this.isInitialState||this.isDataSeriesModified||this.isDataSeriesModified||this.isAxisCubeStateChanged)}reset(e,t){this.isInitialStateProperty=!1,this.isDataSeriesModifiedProperty=!1,this.isRenderableSeriesPropertyChangedProperty=!1,this.isAxisCubeStateChangedProperty=!1,this.axisCubeState={xVisibleMin:t.xCalc.visibleMin,xVisibleMax:t.xCalc.visibleMax,yVisibleMin:t.yCalc.visibleMin,yVisibleMax:t.yCalc.visibleMax,zVisibleMin:t.zCalc.visibleMin,zVisibleMax:t.zCalc.visibleMax,xWorldDimension:t.worldDimensions.x,yWorldDimension:t.worldDimensions.y,zWorldDimension:t.worldDimensions.z},e.dataSeries.resetModified()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SurfaceMeshSceneEntity=t.SurfaceMeshSceneEntityState=void 0;const r=i(0),n=i(1),s=i(3),o=i(79),a=i(2),l=i(111),h=i(98),u=i(122),d=i(123),c=i(433),p=i(236);var g;!function(e){e[e.SCRT_GRID_DRAWING_FEATURES_SOLID=1]="SCRT_GRID_DRAWING_FEATURES_SOLID",e[e.SCRT_GRID_DRAWING_FEATURES_WIREFRAME=2]="SCRT_GRID_DRAWING_FEATURES_WIREFRAME",e[e.SCRT_GRID_DRAWING_FEATURES_CONTOURS=4]="SCRT_GRID_DRAWING_FEATURES_CONTOURS",e[e.SCRT_GRID_DRAWING_FEATURES_SKIRT=8]="SCRT_GRID_DRAWING_FEATURES_SKIRT"}(g||(g={}));class f extends p.RenderableSeriesSceneEntityState{get isColorMapTextureInvalid(){return this.isColorMapTextureInvalidProperty}setColorMapTextureInvalid(){this.isColorMapTextureInvalidProperty=!0}validate(e,t){return super.validate(e,t)&&this.isColorMapTextureInvalid}reset(e,t){super.reset(e,t),this.isColorMapTextureInvalidProperty=!1}}t.SurfaceMeshSceneEntityState=f;class y extends c.RenderableSeriesSceneEntity{constructor(e,t){var i;super(e,t,new f),this.type=o.ESceneEntityType.SurfaceMeshSceneEntity,this.setNativeEntity(e.SCRTGridMeshEntity.implement(this)),this.colorMapTexture=(0,r.deleteSafe)(this.colorMapTexture),this.colorMapTexture=null===(i=this.parentSeries.meshColorPalette)||void 0===i?void 0:i.getTexture(this.parentSeries.colorMapTextureSize)}notifySeriesPropertyChanged(e){e!==u.PROPERTY.MESH_COLOR_PALETTE&&e!==u.PROPERTY.MESH_PALETTE_MODE&&e!==u.PROPERTY.MESH_RESOLUTION&&e!==u.PROPERTY.COLOR_MAP_TEXTURE_SIZE||this.state.setColorMapTextureInvalid(),super.notifySeriesPropertyChanged(e)}delete(){super.delete(),this.colorMapTexture=(0,r.deleteSafe)(this.colorMapTexture)}Render(){if(!this.currentRenderPassData)return;if(!this.colorMapTexture||!this.parentSeries.dataSeries)return void console.log("Cannot draw a SurfaceMeshRenderableSeries3D without a meshColorPalette or dataSeries!");let e;this.nativeEntity.SetOpacity(this.parentSeries.opacity);try{e=new this.webAssemblyContext.SCRTGridDrawingProperties;let t=0;this.hasFlag(this.parentSeries.drawMeshAs,[d.EDrawMeshAs.SOLID_WIREFRAME,d.EDrawMeshAs.SOLID_WIREFRAME,d.EDrawMeshAs.SOLID_WIREFRAME_WITH_CONTOURS])&&(t|=g.SCRT_GRID_DRAWING_FEATURES_WIREFRAME),this.hasFlag(this.parentSeries.drawMeshAs,[d.EDrawMeshAs.SOLID_WIREFRAME,d.EDrawMeshAs.SOLID_MESH,d.EDrawMeshAs.SOLID_WITH_CONTOURS,d.EDrawMeshAs.SOLID_WIREFRAME_WITH_CONTOURS])&&(t|=g.SCRT_GRID_DRAWING_FEATURES_SOLID),this.hasFlag(this.parentSeries.drawMeshAs,[d.EDrawMeshAs.CONTOURS,d.EDrawMeshAs.SOLID_WITH_CONTOURS,d.EDrawMeshAs.SOLID_WIREFRAME_WITH_CONTOURS])&&(t|=g.SCRT_GRID_DRAWING_FEATURES_CONTOURS),this.parentSeries.drawSkirt&&(t|=g.SCRT_GRID_DRAWING_FEATURES_SKIRT);const i=this.hasFlag(this.parentSeries.meshPaletteMode,[d.EMeshPaletteMode.HEIGHT_MAP_INTERPOLATED,d.EMeshPaletteMode.HEIGHT_MAP_SOLID_CELLS]),n=this.hasFlag(this.parentSeries.meshPaletteMode,[d.EMeshPaletteMode.HEIGHT_MAP_SOLID_CELLS,d.EMeshPaletteMode.TEXTURED_SOLID_CELLS]);if(e.SetDrawMeshAsInteger(t),e.m_bUseGradient=i,e.m_bUseSolidCells=n,e.m_fStrokeThickness=this.parentSeries.strokeThickness,e.m_fContourThickness=this.parentSeries.contourStrokeThickness,e.m_fContourInterval=this.parentSeries.contourInterval,e.m_fContourOffset=this.parentSeries.contourOffset,this.parentSeries.stroke){const t=(0,a.parseColorToTArgb)(this.parentSeries.stroke);(0,l.updateTsrVector4)(t,e.GetWireframeStrokePtr())}this.parentSeries.contourStroke&&(0,l.updateTsrVector4)((0,a.parseColorToTArgb)(this.parentSeries.contourStroke),e.GetContourColorPtr()),e.m_fHardNormals=this.parentSeries.cellHardnessFactor,e.m_fHighlight=this.parentSeries.highlight,e.m_fShininess=this.parentSeries.shininess,e.m_fLightingAmount=this.parentSeries.lightingFactor,this.nativeEntity.SetGridDrawingProperties(e)}finally{(0,r.deleteSafe)(e)}const t=this.currentRenderPassData.xCalc,i=this.currentRenderPassData.yCalc,n=this.currentRenderPassData.zCalc;let o,h,u,c,p,f;try{const e=new s.NumberRange(this.parentSeries.minimum,this.parentSeries.maximum);o=this.rangeToSCRTAxisRange(this.webAssemblyContext,t,this.parentSeries.dataSeries.xRange),h=this.rangeToSCRTAxisRange(this.webAssemblyContext,i,e),u=this.rangeToSCRTAxisRange(this.webAssemblyContext,n,this.parentSeries.dataSeries.zRange),this.nativeEntity.SetMeshRange(o,h,u),c=this.toSCRTAxisRange(this.webAssemblyContext,t,t.visibleMin,t.visibleMax),p=this.toSCRTAxisRange(this.webAssemblyContext,i,i.visibleMin,i.visibleMax),f=this.toSCRTAxisRange(this.webAssemblyContext,n,n.visibleMin,n.visibleMax),this.nativeEntity.SetVisibleRange(c,p,f)}finally{(0,r.deleteSafe)(o),(0,r.deleteSafe)(h),(0,r.deleteSafe)(u),(0,r.deleteSafe)(c),(0,r.deleteSafe)(p),(0,r.deleteSafe)(f)}const y=this.parentSeries.yOffset?i.getCoordinate(this.parentSeries.yOffset):0;this.nativeEntity.SetHeightmapScaleOffset(this.parentSeries.heightScaleFactor,y),this.nativeEntity.SetTexture(this.colorMapTexture.getTexture()),super.Render()}updateSeries(){var e;const t=this.parentSeries.dataSeries;if(t){n.Guard.isTrue(t.type===h.EDataSeriesType3D.UniformGrid3D||t.type===h.EDataSeriesType3D.NonUniformGrid3D,"SurfaceMeshSceneEntity dataSeries must be type UniformGrid3D or NonUniformGrid3D");const i=t.xSize,s=t.zSize;n.Guard.notNull(this.currentRenderPassData,"SurfaceMeshSceneEntity.currentRenderPassData"),this.state.setColorMapTextureInvalid&&(this.colorMapTexture=(0,r.deleteSafe)(this.colorMapTexture),this.colorMapTexture=null===(e=this.parentSeries.meshColorPalette)||void 0===e?void 0:e.getTexture(this.parentSeries.colorMapTextureSize));const o=this.state.isInitialState,a=this.state.isDataSeriesModified;if(o){let e;switch(this.parentSeries.meshResolution){case d.EMeshResolution.MESH_RESOLUTION_X1:e=this.webAssemblyContext.eSCRTGridMeshResolution.SCRT_GRID_MESH_RES_X1;break;case d.EMeshResolution.MESH_RESOLUTION_X2:e=this.webAssemblyContext.eSCRTGridMeshResolution.SCRT_GRID_MESH_RES_X2;break;case d.EMeshResolution.MESH_RESOLUTION_X4:e=this.webAssemblyContext.eSCRTGridMeshResolution.SCRT_GRID_MESH_RES_X4;break;default:throw Error("Unknown SurfaceMeshSceneEntity.meshResolution "+this.parentSeries.meshResolution)}const t=new this.webAssemblyContext.FloatVector,n=new this.webAssemblyContext.FloatVector,o=new this.webAssemblyContext.UIntVector;t.resize(i*s,0),n.resize(i*s,0),o.resize(i*s,0),this.nativeEntity.UpdateMeshesVec(t,n,o,i,s,e),(0,r.deleteSafe)(t),(0,r.deleteSafe)(n),(0,r.deleteSafe)(o)}if(a){const e=new this.webAssemblyContext.FloatVector,n=i*s;e.reserve(n);const o=this.currentRenderPassData.yCalc;for(let i=0;i<t.zSize;i++)for(let r=0;r<t.xSize;r++)e.push_back(o.getCoordinate(t.getYValue(i,r)));this.nativeEntity.UpdateHeightCoordinatesVec(e,i,s),(0,r.deleteSafe)(e)}}}hasFlag(e,t){return t.some(t=>t===e)}toSCRTAxisRange(e,t,i,r){const n=new e.SCRTAxisRange;return n.m_fMin=t?t.getCoordinate(i):i,n.m_fMax=t?t.getCoordinate(r):r,n.m_fDiff=t?t.getCoordinate(r-i):r-i,n}rangeToSCRTAxisRange(e,t,i){return this.toSCRTAxisRange(e,t,i.min,i.max)}}t.SurfaceMeshSceneEntity=y},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESeriesType3D=void 0,function(e){e.ScatterRenderableSeries3D="ScatterRenderableSeries3D",e.SurfaceMeshRenderableSeries3D="SurfaceMeshRenderableSeries3D"}(t.ESeriesType3D||(t.ESeriesType3D={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisMarkerAnnotation=void 0;const r=i(1),n=i(5),s=i(11),o=i(9),a=i(64),l=i(6),h=i(28),u=i(34),d=i(46),c=i(23),p=i(130);class g extends p.RenderContextAnnotationBase{constructor(e){var t,i,r,n,s,o,a,l,h,u,d;super(e),this.type=c.EAnnotationType.RenderContextAxisMarkerAnnotation,this.fontSizeProperty=14,this.fontFamilyProperty="Arial",this.fontWeightProperty="Normal",this.fontStyleProperty="Normal",this.colorProperty="#FFFFFF",this.backgroundColorProperty="#b36200",this.fontSizeProperty=null!==(t=null==e?void 0:e.fontSize)&&void 0!==t?t:this.fontSizeProperty,this.fontFamilyProperty=null!==(i=null==e?void 0:e.fontFamily)&&void 0!==i?i:this.fontFamilyProperty,this.fontWeightProperty=null!==(r=null==e?void 0:e.fontWeight)&&void 0!==r?r:this.fontWeightProperty,this.fontStyleProperty=null!==(n=null==e?void 0:e.fontStyle)&&void 0!==n?n:this.fontStyleProperty,this.colorProperty=null!==(s=null==e?void 0:e.color)&&void 0!==s?s:this.colorProperty,this.paddingProperty=null!==(o=null==e?void 0:e.padding)&&void 0!==o?o:this.paddingProperty,this.backgroundColorProperty=null!==(a=null==e?void 0:e.backgroundColor)&&void 0!==a?a:this.backgroundColorProperty,this.formattedValueProperty=null!==(l=null==e?void 0:e.formattedValue)&&void 0!==l?l:this.formattedValueProperty,this.imageProperty=null!==(h=null==e?void 0:e.image)&&void 0!==h?h:this.imageProperty,this.imageWidthProperty=null!==(u=null==e?void 0:e.imageWidth)&&void 0!==u?u:this.imageWidthProperty,this.imageHeightProperty=null!==(d=null==e?void 0:e.imageHeight)&&void 0!==d?d:this.imageHeightProperty,(null==e?void 0:e.x1)&&(this.x1=e.x1),(null==e?void 0:e.x2)&&(this.x2=e.x2),(null==e?void 0:e.y2)&&(this.y2=e.y2)}delete(){}get y2(){throw Error("y2 property is not supported for AxisMarkerAnnotation")}set y2(e){throw Error("y2 property is not supported for AxisMarkerAnnotation")}get x2(){throw Error("x2 property is not supported for AxisMarkerAnnotation")}set x2(e){throw Error("x2 property is not supported for AxisMarkerAnnotation")}get backgroundColor(){return this.backgroundColorProperty}set backgroundColor(e){this.backgroundColorProperty=e,this.notifyPropertyChanged(d.PROPERTY.BACKGROUND_COLOR)}get color(){return this.colorProperty}set color(e){this.colorProperty=e,this.notifyPropertyChanged(d.PROPERTY.COLOR)}get fontSize(){return this.fontSizeProperty}set fontSize(e){this.fontSizeProperty=e,this.notifyPropertyChanged(d.PROPERTY.FONT_SIZE)}get fontFamily(){return this.fontFamilyProperty}set fontFamily(e){this.fontFamilyProperty=e,this.notifyPropertyChanged(d.PROPERTY.FONT_FAMILY)}get fontWeight(){return this.fontWeightProperty}set fontWeight(e){this.fontWeightProperty=e,this.notifyPropertyChanged(d.PROPERTY.FONT_WEIGHT)}get fontStyle(){return this.fontStyleProperty}set fontStyle(e){this.fontStyleProperty=e,this.notifyPropertyChanged(d.PROPERTY.FONT_STYLE)}get padding(){return this.paddingProperty}set padding(e){this.paddingProperty=e,this.notifyPropertyChanged(d.PROPERTY.PADDING)}get formattedValue(){return this.formattedValueProperty}set formattedValue(e){this.formattedValueProperty=e,this.notifyPropertyChanged(d.PROPERTY.FORMATTED_VALUE)}get image(){return this.imageProperty}set image(e){this.imageProperty=e,this.notifyPropertyChanged(d.PROPERTY.IMAGE)}get imageWidth(){return this.imageWidthProperty}set imageWidth(e){this.imageWidthProperty=e,this.notifyPropertyChanged(d.PROPERTY.IMAGE_WIDTH)}get imageHeight(){return this.imageHeightProperty}set imageHeight(e){this.imageHeightProperty=e,this.notifyPropertyChanged(d.PROPERTY.IMAGE_HEIGHT)}drawWithContext(e,t,i,s){r.Guard.notNull(e,"renderContext"),r.Guard.notNull(t,"xCalc"),r.Guard.notNull(i,"yCalc");const h=this.getX1Coordinate(t,i),u=this.getY1Coordinate(t,i),d=null==this.x1;const c=d?this.y1:this.x1;r.Guard.argumentIsRealNumber(c,"x1 or y1");const p=this.xAxisId,g=this.parentSurface.getXAxisById(p),f=this.yAxisId,y=this.parentSurface.getYAxisById(f),v=d?y:g;if(!v||!1===v.isVisible)return;const m=d?this.yCoordinateMode:this.xCoordinateMode,S=d?i:t,P=this.getCoordinate(c,S,m);if(v.isHorizontalAxis?P>=0&&P<=v.parentSurface.seriesViewRect.width:P>=0&&P<=v.parentSurface.seriesViewRect.height){const t={fontFamily:this.fontFamilyProperty,fontSize:this.fontSizeProperty*l.DpiHelper.PIXEL_RATIO,fontStyle:this.fontStyleProperty,color:this.colorProperty},i=(0,a.drawAxisMarkerAnnotation)(v,e,this.formattedValueProperty,P,h,u,t,this.backgroundColorProperty,this.opacity,this.image,this.imageWidth,this.imageHeight),r=(0,o.translateFromCanvasToSeriesViewRect)(new n.Point(i.xPosition,i.yPosition),s,!0),d=(0,o.translateFromCanvasToSeriesViewRect)(new n.Point(i.xPosition+i.textureWidth,i.yPosition+i.textureHeight),s,!0);this.setAnnotationBorders(r.x,d.x,r.y,d.y),this.updateAdornerInner()}else this.deleteAdorner()}onDragStarted(e){super.onDragStarted(e);const{x:t,y:i}=this.calculateAdornerCenter(),r=(0,o.translateFromCanvasToSeriesViewRect)(new n.Point(e.mousePoint.x,e.mousePoint.y),this.parentSurface.seriesViewRect,!0),a=(0,o.translateFromCanvasToSeriesViewRect)(new n.Point(t*l.DpiHelper.PIXEL_RATIO,i*l.DpiHelper.PIXEL_RATIO),this.parentSurface.seriesViewRect,!0);if(r){if(a){if((0,s.calcDistance)(a.x,a.y,r.x,r.y)<this.annotationsGripsRadius*l.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=h.EDraggingGripPoint.x1y1,!0}if(this.clickToSelect(e))return this.adornerDraggingPoint=h.EDraggingGripPoint.Body,!0}return!1}calcDragDistance(e){this.prevValue?(void 0!==this.x1?this.x1-=this.prevValue.x-e.x:void 0!==this.y1&&(this.y1-=this.prevValue.y-e.y),this.prevValue=e):this.prevValue=e}toJSON(){const e=super.toJSON(),t={backgroundColor:this.backgroundColor,color:this.color,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontWeight:this.fontWeight,formattedValue:this.formattedValue,padding:this.padding};return Object.assign(e.options,t),e}checkIsClickedOnAnnotationInternal(e,t){const{x1:i,x2:r,y1:n,y2:o}=this.getAnnotationBorders(!0);return(0,s.testIsInBounds)(e,t,i,o,r,n)}updateAdornerInner(){if(this.deleteAdorner(),this.isSelected){const{x1:e,x2:t,y1:i,y2:r}=this.getAdornerAnnotationBorders(!0,!0),n=this.svgStringAdornerTemplate(e,i,t,r),s=this.parentSurface.domSvgAdornerLayer;this.svgAdorner=u.annotationHelpers.createSvg(n,s)}}svgStringAdornerTemplate(e,t,i,r){const n=this.selectionBoxStroke,{x:s,y:o}=this.calculateAdornerCenter();return`<svg xmlns="http://www.w3.org/2000/svg">\n <rect x="${e}" y="${t}" width="${i-e}" height="${r-t}" stroke="${n}" stroke-width="${this.selectionBoxThickness}px" fill="none" />\n ${this.getAnnotationGripSvg(s,o)}\n </svg>`}calculateAdornerCenter(){const{x1:e,x2:t,y1:i,y2:r}=this.getAdornerAnnotationBorders();return{x:Math.abs((e+t)/2),y:Math.abs((i+r)/2)}}}t.AxisMarkerAnnotation=g},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localStorageApi=void 0;const r=()=>"undefined"==typeof localStorage;t.localStorageApi={getIsLicenseDebug:function(){if(!r())return"1"===localStorage.getItem("LICENSE_DEBUG")},setIsLicenseDebug:function(e){r()||localStorage.setItem("LICENSE_DEBUG",e?"1":"0")},clearLicensingDebug:function(){r()||localStorage.removeItem("LICENSE_DEBUG")},getLicenseWizardMaxPort:function(){if(r())return;const e=localStorage.getItem("LICENSE_WIZARD_MAXPORT"),t=Number(e);return isNaN(t)?void 0:t},getLicenseWizardPort:function(){if(r())return;const e=localStorage.getItem("LICENSE_WIZARD_PORT"),t=Number(e);return isNaN(t)?void 0:t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckStatus=t.LicenseType=void 0,function(e){e[e.NoLicense=0]="NoLicense",e[e.Trial=1]="Trial",e[e.Full=2]="Full",e[e.Full_Expired=3]="Full_Expired",e[e.Trial_Expired=4]="Trial_Expired",e[e.Subscription_Expired=5]="Subscription_Expired",e[e.Invalid_Developer=6]="Invalid_Developer",e[e.Requres_Validation=7]="Requres_Validation",e[e.Invalid=8]="Invalid"}(t.LicenseType||(t.LicenseType={})),function(e){e[e.NoLicense=0]="NoLicense",e[e.FetchingFromServer=1]="FetchingFromServer",e[e.LookingForLicenseWizard=2]="LookingForLicenseWizard",e[e.ValidatingDeveloperLicense=3]="ValidatingDeveloperLicense",e[e.NoLicenseInWizard=4]="NoLicenseInWizard",e[e.FailedToFindLicenseWizard=5]="FailedToFindLicenseWizard",e[e.FailedToValidateDeveloperLicense=6]="FailedToValidateDeveloperLicense",e[e.DevKeyInRuntimeKey=7]="DevKeyInRuntimeKey",e[e.LicenseOK=8]="LicenseOK"}(t.LicenseCheckStatus||(t.LicenseCheckStatus={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCookie=t.getCookie=t.setCookie=void 0,t.setCookie=function(e,t,i){const r=new Date,n=t;r.setTime(r.getTime()+24*i*60*60*1e3),"undefined"!=typeof document&&(document.cookie=e+"="+n+"; expires="+r.toUTCString()+"; path=/")},t.getCookie=function(e){if("undefined"==typeof document)return null;const t=("; "+document.cookie).split("; "+e+"=");return 2===t.length?t.pop().split(";").shift():""},t.deleteCookie=function(e){if("undefined"==typeof document)return;const t=new Date;t.setTime(t.getTime()+-864e5),document.cookie=e+"=; expires="+t.toUTCString()+"; path=/"}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EColor=void 0,function(e){e.Aqua="#00ffff",e.BackgroundColor="#1c1c1e",e.Blue="#368BC1",e.DarkGreen="#03925e",e.DarkRed="#be0000",e.DarkGrey="#7e8486",e.DefaultGridBandsColor="#202123",e.DefaultTextColor="#c8c7c3",e.DodgerBlue="#1E90FF",e.Green="#228B22",e.LightGrey="#eeeeee",e.LightSteelBlue="#b0c4de",e.LimeGreen="#32CD32",e.Orange="#ff6600",e.OrangeRed="#FF4500",e.Purple="#B200FF",e.Red="#ff0000",e.White="#ffffff",e.Yellow="#FFFF00"}(t.EColor||(t.EColor={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseManager=void 0;const r=i(245),n=i(4),s=i(6),o=i(45),a=i(1);var l;!function(e){e[e.Move=0]="Move",e[e.Down=1]="Down",e[e.Up=2]="Up",e[e.Wheel=3]="Wheel",e[e.Click=4]="Click",e[e.Leave=5]="Leave",e[e.Enter=6]="Enter",e[e.Cancel=7]="Cancel",e[e.Drop=8]="Drop"}(l||(l={}));t.MouseManager=class{constructor(e){this.isOver=!1,this.sciChartSurface=e,this.onPointerMove=this.onPointerMove.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onDoubleClick=this.onDoubleClick.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.onDrop=this.onDrop.bind(this)}subscribe(e){a.Guard.notNull(e,"source"),this.unsubscribe(),this.canvas=e,e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerCancel),e.addEventListener("wheel",this.onMouseWheel),e.addEventListener("dblclick",this.onDoubleClick),e.addEventListener("mouseleave",this.onMouseLeave),e.addEventListener("mouseenter",this.onMouseEnter),e.addEventListener("contextmenu",this.onContextMenu),e.addEventListener("drop",this.onDrop)}unsubscribe(){this.canvas&&(this.canvas.removeEventListener("pointermove",this.onPointerMove),this.canvas.removeEventListener("pointerdown",this.onPointerDown),this.canvas.removeEventListener("pointerup",this.onPointerUp),this.canvas.removeEventListener("pointercancel",this.onPointerCancel),this.canvas.removeEventListener("wheel",this.onMouseWheel),this.canvas.removeEventListener("dblclick",this.onDoubleClick),this.canvas.removeEventListener("mouseleave",this.onMouseLeave),this.canvas.removeEventListener("mouseenter",this.onMouseEnter),this.canvas.removeEventListener("contextmenu",this.onContextMenu),this.canvas.removeEventListener("drop",this.onDrop)),this.canvas=null}onPointerCancel(e){const t=r.ModifierMouseArgs.fromPointerEvent(e);this.modifierPointerCancel(t)}onPointerMove(e){const t=r.ModifierMouseArgs.fromPointerEvent(e);this.modifierMouseMove(t)}onPointerDown(e){const t=r.ModifierMouseArgs.fromPointerEvent(e);this.modifierMouseDown(t)}onPointerUp(e){const t=r.ModifierMouseArgs.fromPointerEvent(e);this.modifierMouseUp(t)}onDoubleClick(e){const t=r.ModifierMouseArgs.fromMouseEvent(e);this.modifierDoubleClick(t)}onMouseWheel(e){const t=r.ModifierMouseArgs.fromWheelEvent(e);this.modifierMouseWheel(t),t.handled&&e.preventDefault()}onMouseLeave(e){const t=r.ModifierMouseArgs.fromMouseEvent(e);this.modifierMouseLeave(t)}onMouseEnter(e){const t=r.ModifierMouseArgs.fromMouseEvent(e);this.modifierMouseEnter(t)}onContextMenu(e){e.preventDefault()}onDrop(e){const t=r.ModifierMouseArgs.fromMouseEvent(e);this.modifierDrop(t)}modifierPointerCancel(e){if(e.isMaster&&e.target.releasePointerCapture(e.pointerId),this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierPointerCancel(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierPointerCancel(s)})}),this.updateSubCharts(e,l.Cancel)}}modifierMouseMove(e){if(this.sciChartSurface.surfaceType===n.ESurfaceType.SciChartSurfaceType){const t=this.sciChartSurface;if(t.adornerLayer.isAnnotationSelected){const i=t.adornerLayer.selectedAnnotation;i.isDraggingStarted&&i.onDragAdorner(e)}}if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierMouseMove(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierMouseMove(s)})}),this.updateSubCharts(e,l.Move)}}modifierMouseDown(e){var t;e.isMaster&&(null===(t=e.target)||void 0===t||t.setPointerCapture(e.pointerId));const i=()=>{if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierMouseDown(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierMouseDown(s)})}),this.updateSubCharts(e,l.Down)}};if(e.isMaster){const t=t=>{t.adornerLayer.selectAnnotation(e);const r=t.adornerLayer.selectedAnnotation;r?r.onDragStarted(e)&&this.modifierMouseMove(e):i()};if(this.sciChartSurface.surfaceType===n.ESurfaceType.SciChartSurfaceType){const i=this.sciChartSurface,r=i.adornerLayer.selectedAnnotation;if(r){r.onDragStarted(e)||t(i)}else t(i)}else i()}}modifierMouseUp(e){var t;if(e.isMaster&&(null===(t=e.target)||void 0===t||t.releasePointerCapture(e.pointerId)),this.sciChartSurface.surfaceType===n.ESurfaceType.SciChartSurfaceType){const e=this.sciChartSurface;if(e.adornerLayer.isAnnotationSelected){const t=e.adornerLayer.selectedAnnotation;t.isDraggingStarted&&t.onDragEnded()}}if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierMouseUp(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierMouseUp(s)})}),this.updateSubCharts(e,l.Up)}}modifierMouseWheel(e){if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierMouseWheel(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierMouseWheel(s)})}),this.updateSubCharts(e,l.Wheel)}}modifierDoubleClick(e){if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierDoubleClick(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierDoubleClick(s)})}),this.updateSubCharts(e,l.Click)}}modifierMouseLeave(e){if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierMouseLeave(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierMouseLeave(s)})}),this.updateSubCharts(e,l.Leave)}}modifierMouseEnter(e){if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierMouseEnter(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierMouseEnter(s)})}),this.updateSubCharts(e,l.Enter)}}modifierDrop(e){if(this.chartModifiers.forEach(t=>{!t.canReceiveMouseEvents||e.handled&&!t.receiveHandledEvents||(e.isMaster||!e.isMaster&&t.modifierGroup===e.modifierGroup)&&t.modifierDrop(e,this.sciChartSurface)}),e.isMaster){const t=this.getMasterData(this.sciChartSurface,e);this.chartModifierGroups.forEach(i=>{this.sciChartSurface.otherSurfaces.forEach(n=>{const s=r.ModifierMouseArgs.copy(e,i,this.sciChartSurface.seriesViewRect,n.seriesViewRect,t);n.mouseManager.modifierDrop(s)})}),this.updateSubCharts(e,l.Drop)}}getMasterData(e,t){return{}}get chartModifiers(){return this.sciChartSurface.chartModifiers.asArray()}get chartModifierGroups(){const e=this.chartModifiers.filter(e=>void 0!==e.modifierGroup).map(e=>e.modifierGroup);return(0,o.getUniqueValues)(e)}updateSubCharts(e,t){const i=this.sciChartSurface.subCharts,n=null==i?void 0:i.find(t=>{const{top:i,left:r,bottom:n,right:o}=t.padding,{x:a,y:l}=e.mousePoint,h=a/s.DpiHelper.PIXEL_RATIO,u=l/s.DpiHelper.PIXEL_RATIO,{width:d,height:c}=this.sciChartSurface.renderSurface.viewportSize,p=d/s.DpiHelper.PIXEL_RATIO,g=c/s.DpiHelper.PIXEL_RATIO;return r<=h&&h<=p-o&&i<=u&&u<=g-n});null==i||i.forEach(s=>{let o=t;if(s.mouseManager.isOver){if(s!==n){if(s.mouseManager.isOver=!1,o===l.Move){const t=new r.ModifierMouseArgs(e.mousePoint,e);this.processSubChartEvent(l.Leave,s,t,i,void 0)}o!==l.Cancel&&o!==l.Up&&(o=void 0)}}else if(s===n){if(s.mouseManager.isOver=!0,o===l.Move){const t=new r.ModifierMouseArgs(e.mousePoint,e);this.processSubChartEvent(l.Enter,s,t,i,void 0)}}else o!==l.Cancel&&o!==l.Up&&(o=void 0);if(void 0!==o){const t=this.getMasterData(n,e);this.processSubChartEvent(o,s,e,i,t)}})}processSubChartEvent(e,t,i,n,s){this.callEvent(e,t,i),t.chartModifierGroups.forEach(o=>{n.filter(e=>e.id!==t.id).forEach(n=>{const a=r.ModifierMouseArgs.copyForSubChart(i,o,t.seriesViewRect,n.seriesViewRect,s);this.callEvent(e,n,a)})})}callEvent(e,t,i){switch(e){case l.Cancel:t.mouseManager.modifierPointerCancel(i);break;case l.Click:t.mouseManager.modifierDoubleClick(i);break;case l.Down:t.mouseManager.modifierMouseDown(i);break;case l.Enter:t.mouseManager.modifierMouseEnter(i);break;case l.Leave:t.mouseManager.modifierMouseLeave(i);break;case l.Move:t.mouseManager.modifierMouseMove(i);break;case l.Up:t.mouseManager.modifierMouseUp(i);break;case l.Wheel:t.mouseManager.modifierMouseWheel(i);break;case l.Drop:t.mouseManager.modifierDrop(i)}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModifierMouseArgs=void 0;const r=i(1),n=i(5),s=i(6),o=i(246);class a extends o.ModifierArgsBase{constructor(e,t){var i;super(),this.mousePoint=e,this.button=null==t?void 0:t.button,this.mouseWheelDelta=null!==(i=null==t?void 0:t.mouseWheelDelta)&&void 0!==i?i:0,this.pointerId=null==t?void 0:t.pointerId,this.pointerType=null==t?void 0:t.pointerType,this.target=null==t?void 0:t.target,this.isMaster=null==t?void 0:t.isMaster,this.modifierGroup=null==t?void 0:t.modifierGroup,this.shiftKey=null==t?void 0:t.shiftKey,this.altKey=null==t?void 0:t.altKey,this.ctrlKey=null==t?void 0:t.ctrlKey,this.nativeEvent=null==t?void 0:t.nativeEvent}static fromMouseEvent(e){r.Guard.notNull(e,"mouseEvent");const t=new n.Point(e.offsetX*s.DpiHelper.PIXEL_RATIO,e.offsetY*s.DpiHelper.PIXEL_RATIO),i={target:e.target,isMaster:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,nativeEvent:e};return new a(t,i)}static fromWheelEvent(e){r.Guard.notNull(e,"wheelEvent");const t=new n.Point(e.offsetX*s.DpiHelper.PIXEL_RATIO,e.offsetY*s.DpiHelper.PIXEL_RATIO),i={mouseWheelDelta:e.deltaY,target:e.target,isMaster:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,nativeEvent:e};return new a(t,i)}static fromPointerEvent(e){r.Guard.notNull(e,"pointerEvent");const t=new n.Point(e.offsetX*s.DpiHelper.PIXEL_RATIO,e.offsetY*s.DpiHelper.PIXEL_RATIO),i={button:e.button,pointerId:e.pointerId,pointerType:e.pointerType,target:e.target,isMaster:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,nativeEvent:e};return new a(t,i)}static copy(e,t,i,r,s){let o=e.mousePoint;if(i&&r){const t=e.mousePoint.x-i.x,s=e.mousePoint.y-i.y,a=r.width/i.width,l=r.height/i.height;o=new n.Point(r.x+t*a,r.y+s*l)}return Object.assign(Object.assign({},e),{isMaster:!1,masterData:s,handled:!1,modifierGroup:t,mousePoint:o})}static copyForSubChart(e,t,i,r,s){let o=e.mousePoint;if(i&&r){const t=r.width/i.width,s=r.height/i.height;o=new n.Point((e.mousePoint.x-i.x)*t+r.x,(e.mousePoint.y-i.y)*s+r.y)}return Object.assign(Object.assign({},e),{isMaster:!1,masterData:s,handled:!1,modifierGroup:t,mousePoint:o})}}t.ModifierMouseArgs=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModifierArgsBase=void 0;t.ModifierArgsBase=class{constructor(){this.handled=!1}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EExecuteOn=void 0,function(e){e[e.MouseLeftButton=0]="MouseLeftButton",e[e.MouseMiddleButton=1]="MouseMiddleButton",e[e.MouseRightButton=2]="MouseRightButton"}(t.EExecuteOn||(t.EExecuteOn={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EColorMapMode=void 0,function(e){e[e.Interpolated=0]="Interpolated",e[e.Stepped=1]="Stepped"}(t.EColorMapMode||(t.EColorMapMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VisibleRangeChangedArgs=void 0;t.VisibleRangeChangedArgs=class{constructor(e){this.visibleRange=e}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationClickEventArgs=void 0;t.AnnotationClickEventArgs=class{constructor(e,t,i){this.sender=e,this.mouseArgs=t,this.relativeCoords=i}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationDragDeltaEventArgs=void 0;t.AnnotationDragDeltaEventArgs=class{constructor(){}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxAnnotation=void 0;const r=i(13),n=i(0),s=i(1),o=i(5),a=i(15),l=i(29),h=i(11),u=i(9),d=i(54),c=i(35),p=i(6),g=i(28),f=i(34),y=i(46),v=i(23),m=i(130);class S extends m.RenderContextAnnotationBase{constructor(e){var t,i,r;super(e),this.type=v.EAnnotationType.RenderContextBoxAnnotation,this.strokeThicknessProperty=1,this.stroke=null!==(t=null==e?void 0:e.stroke)&&void 0!==t?t:"#ffffff",this.strokeThickness=null!==(i=null==e?void 0:e.strokeThickness)&&void 0!==i?i:1,this.fill=null!==(r=null==e?void 0:e.fill)&&void 0!==r?r:"#777777"}get stroke(){return this.strokeProperty}set stroke(e){this.strokeProperty=e,this.notifyPropertyChanged(y.PROPERTY.STROKE)}get strokeThickness(){return this.strokeThicknessProperty}set strokeThickness(e){this.strokeThicknessProperty=e,this.notifyPropertyChanged(y.PROPERTY.STROKE_THICKNESS)}get fill(){return this.fillProperty}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(y.PROPERTY.FILL)}delete(){this.strokePenCache=(0,n.deleteSafe)(this.strokePenCache),this.fillBrushCache=(0,n.deleteSafe)(this.fillBrushCache),this.nativeDrawingProvider=(0,n.deleteSafe)(this.nativeDrawingProvider)}drawWithContext(e,t,i,n){s.Guard.notNull(e,"renderContext"),s.Guard.notNull(t,"xCalc"),s.Guard.notNull(i,"yCalc");const l=this.stroke&&this.strokeThickness?(0,c.getWebGlPenFromCache)(this.strokePenCache):void 0;null==l||l.setOpacity(this.opacity);const h=this.fill?(0,d.getWebGlBrushFromCache)(this.fillBrushCache):void 0;null==h||h.setOpacity(this.opacity);const u=this.getX1Coordinate(t,i),p=this.getX2Coordinate(t,i),g=this.getY1Coordinate(t,i),f=this.getY2Coordinate(t,i);this.setAnnotationBorders(u,p,g,f);const y=a.Rect.createWithPoints(new o.Point(u,g),new o.Point(p,f));r.IS_TEST_ENV||(this.strokeThickness>3?this.drawWithProvider(e,l.scrtPen,h.scrtBrush,t,i,y,n):e.drawRect(y,n,l,h)),this.updateAdornerInner()}onAttach(e){super.onAttach(e),this.nativeDrawingProvider=new e.webAssemblyContext2D.SCRTColumnSeriesDrawingProvider,this.strokePenCache||(this.strokePenCache=new c.Pen2DCache(e.webAssemblyContext2D)),(0,c.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity),this.fillBrushCache||(this.fillBrushCache=new d.BrushCache(e.webAssemblyContext2D)),(0,d.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)}onDragStarted(e){super.onDragStarted(e);const{x1:t,x2:i,y1:r,y2:n}=this.getAnnotationBorders(!1,!0),{x1y1:s,x2y1:a,x1y2:l,x2y2:d}=f.annotationHelpers.calcNewApex(t,r,i,n,this.isVerticalChart),c=(0,u.translateFromCanvasToSeriesViewRect)(new o.Point(e.mousePoint.x,e.mousePoint.y),this.parentSurface.seriesViewRect);if(s&&this.canDragPoint(g.EDraggingGripPoint.x1y1)){if((0,h.calcDistance)(s.x,s.y,c.x,c.y)<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x1y1,!0}if(a&&this.canDragPoint(g.EDraggingGripPoint.x2y1)){if((0,h.calcDistance)(a.x,a.y,c.x,c.y)<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x2y1,!0}if(l&&this.canDragPoint(g.EDraggingGripPoint.x1y2)){if((0,h.calcDistance)(l.x,l.y,c.x,c.y)<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x1y2,!0}if(d&&this.canDragPoint(g.EDraggingGripPoint.x2y2)){if((0,h.calcDistance)(d.x,d.y,c.x,c.y)<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x2y2,!0}return!!(c&&this.canDragPoint(g.EDraggingGripPoint.Body)&&this.clickToSelect(e))&&(this.adornerDraggingPoint=g.EDraggingGripPoint.Body,!0)}calcDragDistance(e){this.prevValue?(this.adornerDraggingPoint===g.EDraggingGripPoint.Body?(this.x1=this.x1-(this.prevValue.x-e.x),this.x2=this.x2-(this.prevValue.x-e.x),this.y1=this.y1-(this.prevValue.y-e.y),this.y2=this.y2-(this.prevValue.y-e.y)):this.adornerDraggingPoint===g.EDraggingGripPoint.x1y1?this.resizeDirections===l.EXyDirection.XDirection?this.x1-=this.prevValue.x-e.x:(this.resizeDirections===l.EXyDirection.YDirection||(this.x1-=this.prevValue.x-e.x),this.y1-=this.prevValue.y-e.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x2y2?this.resizeDirections===l.EXyDirection.XDirection?this.x2-=this.prevValue.x-e.x:(this.resizeDirections===l.EXyDirection.YDirection||(this.x2-=this.prevValue.x-e.x),this.y2-=this.prevValue.y-e.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x2y1?this.resizeDirections===l.EXyDirection.XDirection?this.x2-=this.prevValue.x-e.x:(this.resizeDirections===l.EXyDirection.YDirection||(this.x2-=this.prevValue.x-e.x),this.y1-=this.prevValue.y-e.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x1y2&&(this.resizeDirections===l.EXyDirection.XDirection?this.x1-=this.prevValue.x-e.x:(this.resizeDirections===l.EXyDirection.YDirection||(this.x1-=this.prevValue.x-e.x),this.y2-=this.prevValue.y-e.y)),this.prevValue=e):this.prevValue=e}onDpiChanged(e){super.onDpiChanged(e),this.notifyPropertyChanged(y.PROPERTY.STROKE)}toJSON(){const e=super.toJSON(),t={fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness};return Object.assign(e.options,t),e}checkIsClickedOnAnnotationInternal(e,t){const{x1:i,x2:r,y1:n,y2:s}=this.getAnnotationBorders(!0);return(0,h.testIsInBounds)(e,t,i,s,r,n)}notifyPropertyChanged(e){super.notifyPropertyChanged(e);const t=[y.PROPERTY.STROKE,y.PROPERTY.STROKE_THICKNESS,y.PROPERTY.STROKE_DASH_ARRAY,y.PROPERTY.OPACITY];this.strokePenCache&&t.includes(e)&&(0,c.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity);const i=[y.PROPERTY.FILL,y.PROPERTY.OPACITY];this.fillBrushCache&&i.includes(e)&&(0,d.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)}updateAdornerInner(){const e=this.parentSurface.domSvgAdornerLayer;if(this.deleteAdorner(),this.isSelected){const{x1:t,x2:i,y1:r,y2:n}=this.getAdornerAnnotationBorders(!0,!0),s=this.svgStringAdornerTemplate(t,r,i,n);this.svgAdorner=f.annotationHelpers.createSvg(s,e)}}svgStringAdornerTemplate(e,t,i,r){let n=`<svg xmlns="http://www.w3.org/2000/svg">\n <rect x="${e}" y="${t}" width="${i-e}" height="${r-t}" stroke="${this.selectionBoxStroke}" stroke-width="${this.selectionBoxThickness}px" fill="none" />\n `;const s=this.getAdornerAnnotationBorders(!1,!0);return this.canDragPoint(g.EDraggingGripPoint.x1y1)&&(n+=this.getAnnotationGripSvg(s.x1,s.y1)),this.canDragPoint(g.EDraggingGripPoint.x2y2)&&(n+=this.getAnnotationGripSvg(s.x2,s.y2)),this.canDragPoint(g.EDraggingGripPoint.x2y1)&&(n+=this.getAnnotationGripSvg(s.x2,s.y1)),this.canDragPoint(g.EDraggingGripPoint.x1y2)&&(n+=this.getAnnotationGripSvg(s.x1,s.y2)),n+="</svg>",n}drawWithProvider(e,t,i,r,n,s,o){const a=this.parentSurface.webAssemblyContext2D,l=new a.SCRTColumnDrawingParams;l.forceShaderMethod=!0,l.verticalChart=this.isVerticalChart,l.zeroLineY=this.isVerticalChart?n.getDataValue(s.left):n.getDataValue(s.bottom),l.columnWidth=this.isVerticalChart?s.height:s.width,t&&l.SetLinesPen(t),i&&l.SetFillBrush(i),l.viewportWidth=o.width,l.viewportHeight=o.height;const h=this.isVerticalChart?(s.top+s.bottom)/2:(s.left+s.right)/2,u=r.getDataValue(h),d=new a.SCRTDoubleVector;d.push_back(u);const c=this.isVerticalChart?n.getDataValue(s.right):n.getDataValue(s.top),p=new a.SCRTDoubleVector;p.push_back(c),l.count=p.size();const g=e.getNativeContext();g.PushMatrix(),g.PushState(),g.Translate(o.x,o.y),g.SetClipRect(o.x,o.y,o.width,o.height),this.nativeDrawingProvider.DrawPointsVec(g,d,p,r.nativeCalculator,n.nativeCalculator,l),g.PopMatrix(),g.PopState(),d.delete(),p.delete(),l.delete()}}t.BoxAnnotation=S},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDrawingTypes=void 0,function(e){e.WasmBrush="WasmBrush",e.WasmPen="WasmPen"}(t.EDrawingTypes||(t.EDrawingTypes={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSCRTPen=void 0;const r=i(13),n=i(27),s=i(2);t.createSCRTPen=(e,t,i,o,a,l=!0)=>{if(r.IS_TEST_ENV||!t)return;const h=(0,n.uintArgbColorMultiplyOpacity)((0,s.parseColorToUIntArgb)(t),o);if(isNaN(h))throw new Error(`Color code ${t} cannot be converted to an ARGB integer`);if(a&&a.length){const t=new e.FloatVector;return a.forEach(e=>t.push_back(e)),e.SCRTCreateDahedPen(h,i,l,t)}return new e.SCRTPen(h,i,l)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalLineAnnotation=void 0;const r=i(1),n=i(5),s=i(15),o=i(33),a=i(11),l=i(9),h=i(35),u=i(64),d=i(6),c=i(28),p=i(23),g=i(88);class f extends g.LineAnnotation{constructor(e){var t,i,r;super(e),this.type=p.EAnnotationType.RenderContextHorizontalLineAnnotation,this.dragOnLine=!0,this.dragOnLabel=!0,(null==e?void 0:e.x2)&&(this.x2=e.x2),(null==e?void 0:e.y2)&&(this.y2=e.y2),this.dragOnLine=null!==(t=null==e?void 0:e.dragOnLine)&&void 0!==t?t:this.dragOnLine,this.dragOnLabel=null!==(i=null==e?void 0:e.dragOnLabel)&&void 0!==i?i:this.dragOnLabel,this.horizontalAlignment=null!==(r=null==e?void 0:e.horizontalAlignment)&&void 0!==r?r:this.horizontalAlignment}get y2(){throw Error("y2 property is not supported for HorizontalLineAnnotation")}set y2(e){throw Error("y2 property is not supported for HorizontalLineAnnotation")}get x2(){throw Error("x2 property is not supported for HorizontalLineAnnotation")}set x2(e){throw Error("x2 property is not supported for HorizontalLineAnnotation")}drawWithContext(e,t,i,o){r.Guard.notNull(e,"renderContext"),r.Guard.notNull(t,"xCalc"),r.Guard.notNull(i,"yCalc");const a=this.stroke&&this.strokeThickness?(0,h.getWebGlPenFromCache)(this.strokePenCache):void 0,{annotationCoord:c,lineAnnotationEdgeCoord:p,horizontalAxis:g,verticalAxis:f,horizontalAxisCoordinateMode:y,verticalAxisCoordinateMode:v,horizontalCoordinateCalculator:m,verticalCoordinateCalculator:S,isAlignmentRight:P}=this.getDrawConfig(t,i);if(!g||!f)return;let C=0,A=o.width;P&&(C=o.width,A=0);const x=this.getValue(p,m,y),b=x||0===x;b&&(A=A=this.getX1Coordinate(t,i));const T=this.getY1Coordinate(t,i),E=T;this.setAnnotationBorders(C,A,T,E);const w=this.getCoordinate(p,m,y),R=this.getCoordinate(c,S,v),D=R>=0&&R<=f.parentSurface.seriesViewRect.height,L=P?w<=g.parentSurface.seriesViewRect.width:w>=0;if(D&&(!b||L)){const t=Object.assign(Object.assign({},f.labelStyle),{color:this.axisLabelStroke,fontSize:this.axisFontSize*d.DpiHelper.PIXEL_RATIO,fontFamily:this.axisFontFamily}),i=(0,u.drawLineAnnotation)(f,e,this.labelPlacement,this.labelValue,C,A,T,E,t,this.axisLabelFill,a,o,this.showLabel,this.opacity,this.horizontalAlignment);if(i){const e=(0,l.translateFromCanvasToSeriesViewRect)(new n.Point(i.left,i.top),o,!0),t=(0,l.translateFromCanvasToSeriesViewRect)(new n.Point(i.right,i.bottom),o,!0);this.labelRect=s.Rect.createWithPoints(e,t)}}this.dragOnLine&&this.updateAdornerInner()}onDragStarted(e){return this.dragOnLine?super.onDragStarted(e):!!(this.dragOnLabel&&this.labelRect&&this.clickToSelect(e))&&(this.adornerDraggingPoint=c.EDraggingGripPoint.Body,!0)}checkIsClickedOnAnnotationInternal(e,t){if(this.dragOnLine&&super.checkIsClickedOnAnnotationInternal(e,t))return!0;if(this.dragOnLabel&&this.labelRect){const{left:i,top:r,right:n,bottom:s}=this.labelRect;if((0,a.testIsInBounds)(e,t,i,s,n,r))return!0}return!1}getDrawConfig(e,t){const i=this.xAxisId,r=this.parentSurface.getXAxisById(i),n=this.yAxisId,s=this.parentSurface.getYAxisById(n),a={annotationCoord:this.y1,lineAnnotationEdgeCoord:this.x1,horizontalAxis:r,verticalAxis:s,horizontalAxisCoordinateMode:this.xCoordinateMode,verticalAxisCoordinateMode:this.yCoordinateMode,horizontalCoordinateCalculator:e,verticalCoordinateCalculator:t,isAlignmentRight:(null==s?void 0:s.axisAlignment)===o.EAxisAlignment.Right},l={annotationCoord:this.x1,lineAnnotationEdgeCoord:this.y1,horizontalAxis:s,verticalAxis:r,horizontalAxisCoordinateMode:this.yCoordinateMode,verticalAxisCoordinateMode:this.xCoordinateMode,horizontalCoordinateCalculator:t,verticalCoordinateCalculator:e,isAlignmentRight:(null==r?void 0:r.axisAlignment)===o.EAxisAlignment.Right};return this.isVerticalChart?l:a}}t.HorizontalLineAnnotation=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapNativeText=void 0;t.wrapNativeText=(e,t,i,r)=>{if(0===t)return e;if(!e)return"";const n=[],s=e.split(" "),o=s[0].trim(),a=o+" "+o+"\n"+s.map(e=>e.trim()).join("\n");i.CalculateStringBounds(null!=a?a:"",r,2);let l="",h=0,u=r.GetLineBounds(0).m_fWidth-2*r.GetLineBounds(1).m_fWidth;for(let e=0;e<s.length;e++){const i=s[e],o=r.GetLineBounds(e+1).m_fWidth,a=l+(""!==l?" ":"")+i;h+=(""!==l?u:0)+o,h>t?""===l?(n.push(i),h=0):(n.push(l),l=i,h=o):l=a,l.endsWith("\n")&&(h=0)}return n.push(l),n.join("\n")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextAnnotation=void 0;const r=i(34),n=i(46),s=i(23),o=i(87);class a extends o.SvgAnnotationBase{constructor(e){var t,i,r,n,o;super(e),this.type=s.EAnnotationType.SVGTextAnnotation,this.textProperty="DEFAULT TEXT",this.textColorProperty="#ffffff",this.fontSizeProperty=14,this.fontFamilyProperty="Arial",this.fontWeightProperty="Normal",this.isDirty=!0,this.textProperty=null!==(t=null==e?void 0:e.text)&&void 0!==t?t:this.textProperty,this.textColorProperty=null!==(i=null==e?void 0:e.textColor)&&void 0!==i?i:this.textColorProperty,this.fontSizeProperty=null!==(r=null==e?void 0:e.fontSize)&&void 0!==r?r:this.fontSizeProperty,this.fontFamilyProperty=null!==(n=null==e?void 0:e.fontFamily)&&void 0!==n?n:this.fontFamilyProperty,this.fontWeight=null!==(o=null==e?void 0:e.fontWeight)&&void 0!==o?o:this.fontWeight}get text(){return this.textProperty}set text(e){this.textProperty!==e&&(this.textProperty=e,this.notifyPropertyChanged(n.PROPERTY.TEXT))}get textColor(){return this.textColorProperty}set textColor(e){this.textColorProperty!==e&&(this.textColorProperty=e,this.notifyPropertyChanged(n.PROPERTY.TEXT_STROKE))}get fontSize(){return this.fontSizeProperty}set fontSize(e){this.fontSizeProperty!==e&&(this.fontSizeProperty=e,this.notifyPropertyChanged(n.PROPERTY.FONT_SIZE))}get fontFamily(){return this.fontFamilyProperty}set fontFamily(e){this.fontFamilyProperty!==e&&(this.fontFamilyProperty=e,this.notifyPropertyChanged(n.PROPERTY.FONT_FAMILY))}get fontWeight(){return this.fontWeightProperty}set fontWeight(e){this.fontWeightProperty!==e&&(this.fontWeightProperty=e,this.notifyPropertyChanged(n.PROPERTY.FONT_WEIGHT))}toJSON(){const e=super.toJSON(),t={fontFamily:this.fontFamily,fontSize:this.fontSize,fontWeight:this.fontWeight,text:this.text,textColor:this.textColor};return Object.assign(e.options,t),e}notifyPropertyChanged(e){e!==n.PROPERTY.IS_HIDDEN&&e!==n.PROPERTY.X_COORD_SHIFT&&e!==n.PROPERTY.Y_COORD_SHIFT&&e!==n.PROPERTY.HORIZONTAL_ANCHOR_POINT&&e!==n.PROPERTY.VERTICAL_ANCHOR_POINT&&e!==n.PROPERTY.IS_HIDDEN&&e!==n.PROPERTY.X1&&e!==n.PROPERTY.X2&&e!==n.PROPERTY.Y1&&e!==n.PROPERTY.Y2&&(this.isDirty=!0),this.invalidateParentCallback&&this.invalidateParentCallback()}create(e,t,i,r){this.isDirty||this.isSelected?(this.svg&&this.delete(),this.setSvg(l(this.svgRoot,this.textProperty,this.textColorProperty,this.fontSizeProperty,this.fontFamilyProperty,this.fontWeight)),this.calcAndSetAnnotationBorders(e,t),this.updateAdornerInner(),this.isDirty=!1):this.calcAndSetAnnotationBorders(e,t)}}t.TextAnnotation=a;const l=(e,t,i,n,s,o)=>{const a=`<svg class="scichart__text-annotation">\n <text x="0" y="${n}" fill="${i}" font-size="${n}" font-family="${s}" font-weight="${o}">${t}</text>\n </svg>`;return r.annotationHelpers.createSvg(a,e)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerticalLineAnnotation=void 0;const r=i(1),n=i(5),s=i(15),o=i(33),a=i(11),l=i(9),h=i(35),u=i(64),d=i(6),c=i(28),p=i(23),g=i(88);class f extends g.LineAnnotation{constructor(e){var t,i,r;super(e),this.type=p.EAnnotationType.RenderContextVerticalLineAnnotation,this.dragOnLine=!0,this.dragOnLabel=!0,(null==e?void 0:e.x2)&&(this.x2=e.x2),(null==e?void 0:e.y2)&&(this.y2=e.y2),this.dragOnLine=null!==(t=null==e?void 0:e.dragOnLine)&&void 0!==t?t:this.dragOnLine,this.dragOnLabel=null!==(i=null==e?void 0:e.dragOnLabel)&&void 0!==i?i:this.dragOnLabel,this.verticalAlignment=null!==(r=null==e?void 0:e.verticalAlignment)&&void 0!==r?r:this.verticalAlignment}get y2(){throw Error("y2 property is not supported for VerticalLineAnnotation")}set y2(e){throw Error("y2 property is not supported for VerticalLineAnnotation")}get x2(){throw Error("x2 property is not supported for VerticalLineAnnotation")}set x2(e){throw Error("x2 property is not supported for VerticalLineAnnotation")}drawWithContext(e,t,i,o){r.Guard.notNull(e,"renderContext"),r.Guard.notNull(t,"xCalc"),r.Guard.notNull(i,"yCalc");const a=(0,h.getWebGlPenFromCache)(this.strokePenCache),{annotationCoord:c,lineAnnotationEdgeCoord:p,horizontalAxis:g,verticalAxis:f,horizontalAxisCoordinateMode:y,verticalAxisCoordinateMode:v,horizontalCoordinateCalculator:m,verticalCoordinateCalculator:S,isAlignmentTop:P}=this.getDrawConfig(t,i);if(!g||!f)return;let C=o.height,A=0;P&&(C=C=0,A=A=o.height);const x=this.getValue(p,S,v),b=x||0===x;b&&(A=A=this.getY1Coordinate(t,i));const T=this.getX1Coordinate(t,i),E=T;this.setAnnotationBorders(T,E,C,A);const w=this.getCoordinate(p,S,v),R=this.getCoordinate(c,m,y),D=R>=0&&R<=g.parentSurface.seriesViewRect.width,L=P?w>=0:w<=f.parentSurface.seriesViewRect.height;if(D&&(!b||L)){const t=Object.assign(Object.assign({},f.labelStyle),{color:this.axisLabelStroke,fontSize:this.axisFontSize*d.DpiHelper.PIXEL_RATIO,fontFamily:this.axisFontFamily}),i=(0,u.drawLineAnnotation)(g,e,this.labelPlacement,this.labelValue,T,E,C,A,t,this.axisLabelFill,a,o,this.showLabel,this.opacity,null,this.verticalAlignment);if(i){const e=(0,l.translateFromCanvasToSeriesViewRect)(new n.Point(i.left,i.top),o,!0),t=(0,l.translateFromCanvasToSeriesViewRect)(new n.Point(i.right,i.bottom),o,!0);this.labelRect=s.Rect.createWithPoints(e,t)}}this.dragOnLine&&this.updateAdornerInner()}onDragStarted(e){return this.dragOnLine?super.onDragStarted(e):!!(this.dragOnLabel&&this.labelRect&&this.clickToSelect(e))&&(this.adornerDraggingPoint=c.EDraggingGripPoint.Body,!0)}checkIsClickedOnAnnotationInternal(e,t){if(this.dragOnLine&&super.checkIsClickedOnAnnotationInternal(e,t))return!0;if(this.dragOnLabel&&this.labelRect){const{left:i,top:r,right:n,bottom:s}=this.labelRect;if((0,a.testIsInBounds)(e,t,i,s,n,r))return!0}return!1}getDrawConfig(e,t){const i=this.xAxisId,r=this.parentSurface.getXAxisById(i),n=this.yAxisId,s=this.parentSurface.getYAxisById(n),a={annotationCoord:this.x1,lineAnnotationEdgeCoord:this.y1,horizontalAxis:r,verticalAxis:s,horizontalAxisCoordinateMode:this.xCoordinateMode,verticalAxisCoordinateMode:this.yCoordinateMode,horizontalCoordinateCalculator:e,verticalCoordinateCalculator:t,isAlignmentTop:(null==r?void 0:r.axisAlignment)===o.EAxisAlignment.Top},l={annotationCoord:this.y1,lineAnnotationEdgeCoord:this.x1,horizontalAxis:s,verticalAxis:r,horizontalAxisCoordinateMode:this.yCoordinateMode,verticalAxisCoordinateMode:this.xCoordinateMode,horizontalCoordinateCalculator:t,verticalCoordinateCalculator:e,isAlignmentTop:(null==s?void 0:s.axisAlignment)===o.EAxisAlignment.Top};return this.isVerticalChart?l:a}}t.VerticalLineAnnotation=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CategoryCoordinateCalculator=void 0;const r=i(106);class n extends r.CoordinateCalculatorBase{constructor(e,t,i,r,n,s,o=0){super(e,t,i,r,o,!0,!0),this.indexMin=n,this.indexMax=s,this.nativeCalculator=new e.CategoryCoordinateCalculatorDouble(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset,this.indexMin,this.indexMax)}transformIndexToData(e){return this.nativeCalculator.TransformIndexToData(e,this.baseXValues)}transformDataToIndex(e){return this.nativeCalculator.TransformDataToIndex(e,this.baseXValues)}}t.CategoryCoordinateCalculator=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlippedCategoryCoordinateCalculator=void 0;const r=i(106);class n extends r.CoordinateCalculatorBase{constructor(e,t,i,r,n,s,o=0){super(e,t,i,r,o,!1,!0),this.indexMin=n,this.indexMax=s,this.nativeCalculator=new e.FlippedCategoryCoordinateCalculatorDouble(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset,this.indexMin,this.indexMax)}transformIndexToData(e){return this.nativeCalculator.TransformIndexToData(e,this.baseXValues)}transformDataToIndex(e){return this.nativeCalculator.TransformDataToIndex(e,this.baseXValues)}}t.FlippedCategoryCoordinateCalculator=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TickProvider=void 0;t.TickProvider=class{attachedToAxis(e){this.parentAxis=e}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolidBrushCache=void 0;const r=i(0),n=i(2);t.SolidBrushCache=class{constructor(e){this.webAssemblyContext=e}newBrush(e,t=!1){return this.brush&&e===this.color&&t===this.transparent||(this.brush&&this.brush.delete(),this.color=e,this.transparent=t,this.brush=new this.webAssemblyContext.SCRTSolidBrush((0,n.parseColorToUIntArgb)(e),t)),this.brush}delete(){this.brush=(0,r.deleteSafe)(this.brush)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultTickCoordinatesProvider=void 0;const r=i(444);class n extends r.TickCoordinatesProvider{getTickCoordinates(e,t){const i=this.parentAxis.getCurrentCoordinateCalculator();return{majorTickCoords:e.map(e=>Math.round(i.getCoordinate(e))+.5),minorTickCoords:t.map(e=>Math.round(i.getCoordinate(e))+.5)}}}t.DefaultTickCoordinatesProvider=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisLayoutState=void 0;t.AxisLayoutState=class{constructor(){this.axisSize=0,this.additionalLeftSize=0,this.additionalRightSize=0,this.additionalTopSize=0,this.additionalBottomSize=0}clear(){this.axisSize=0,this.additionalLeftSize=0,this.additionalRightSize=0,this.additionalTopSize=0,this.additionalBottomSize=0}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.layoutLabelsHelper=t.AxisRenderer=void 0;const r=i(13),n=i(0),s=i(15),o=i(52),a=i(33),l=i(104),h=i(2),u=i(30),d=i(86),c=i(12),p=i(4),g=i(6),f=i(76);t.AxisRenderer=class{constructor(e){this.viewRect=s.Rect.createZero(),this.drawDebug=!1,this.desiredLabelsSize=0,this.desiredTicksSize=0,this.desiredHeightProperty=0,this.desiredWidthProperty=0,this.axisThicknessProperty=0,this.keepLabelsWithinAxisProperty=!0,this.hideOverlappingLabelsProperty=!0,this.webAssemblyContext=e,this.textureManager=new f.TextureManager(e),this.vertices=(0,c.getVectorColorVertex)(e),r.IS_TEST_ENV||(this.measureTextCanvas=document.createElement("canvas"),this.measureTextCanvas.width=1,this.measureTextCanvas.height=1)}delete(){this.measureTextCanvas=void 0,this.textureManager=(0,n.deleteSafe)(this.textureManager)}attachedToAxis(e){this.parentAxis=e}measure(e,t,i,r,n,s,o){p.DebugForDpi&&console.log("AxisRenderer.measure. fontSize: "+t.fontSize),this.desiredLabelsSize=s?this.calcDesiredLabelsSize(e,n,t,i):0,this.desiredTicksSize=o?r:0;const a=Math.max(this.desiredLabelsSize,this.axisThicknessProperty*g.DpiHelper.PIXEL_RATIO)+this.desiredTicksSize;e?this.desiredHeightProperty=a:this.desiredWidthProperty=a}calcDesiredLabelsSize(e,t,i,n){if(r.IS_TEST_ENV)return 0;let s;const o=this.measureTextCanvas.getContext("2d");return s=e?t.getMaxLabelHeightForHorizontalAxis(n,o,i):t.getMaxLabelWidthForVerticalAxis(n,o,i),s}get desiredHeight(){return this.desiredHeightProperty}set desiredHeight(e){this.desiredHeightProperty=e}get desiredWidth(){return this.desiredWidthProperty}set desiredWidth(e){this.desiredWidthProperty=e}get keepLabelsWithinAxis(){return this.keepLabelsWithinAxisProperty}set keepLabelsWithinAxis(e){this.keepLabelsWithinAxisProperty=e,this.invalidateParent()}get hideOverlappingLabels(){return this.hideOverlappingLabelsProperty}set hideOverlappingLabels(e){this.hideOverlappingLabelsProperty=e,this.invalidateParent()}get axisThickness(){return this.axisThicknessProperty}set axisThickness(e){this.axisThicknessProperty=e,this.invalidateParent()}layout(e){this.viewRect=e}drawLabels(e,t,i,r,n,o,l,u,d,g){p.DebugForDpi&&console.log("AxisRenderer.drawLabels. fontSize: "+l.fontSize);const{viewRect:f,textureManager:v}=this,m=e.getNativeContext(),S=u?(0,a.getIsHorizontal)(t):(0,a.getIsVertical)(t),P=Math.floor(f.width),C=Math.floor(f.height),A=this.desiredTicksSize;let x;const{padding:b,alignment:T}=l;S&&(n=n.reverse(),r=r.reverse());const E=[],w=(0,h.parseColorToUIntArgb)(l.color),R=g.useNativeText?e.getFont(l,0!==g.rotation):null,D=g.useNativeText?(0,c.getTextBounds)(this.webAssemblyContext):null;R||(x=v.getTextureContext(P,C));let L=g.rotation;L>90?L-=180:L<-90&&(L+=180);const M=-L*Math.PI/180;n=n.map(e=>e-o);const I=y(T,this.webAssemblyContext),O=g.lineSpacing;let k=0;if(R&&(R.CalculateStringBounds("Ag",D,0),k=D.GetLineBounds(0).m_fHeight),(0,a.getIsHorizontal)(t)){let e=[],o=[];if(!g.useCache&&g.useNativeText)for(const t of r)R.CalculateStringBounds(null!=t?t:"",D,2),e.push(D.m_fHeight+l.padding.top+l.padding.bottom),o.push(D.m_fWidth+l.padding.left+l.padding.right);else e=r.map(e=>g.getLabelHeight(x,e,l)),o=r.map(e=>g.getLabelWidth(x,e,l));const{labelCoords:h,labelIndexes:u}=this.layoutLabels(P,n,o,d,null==b?void 0:b.top,null==b?void 0:b.bottom);for(let d=0;d<u.length;d++){const p=h[d];let y=r[u[d]];const S=e[u[d]];let P=0;t===a.EAxisAlignment.Bottom&&!i||t===a.EAxisAlignment.Top&&i?P+=A:P+=C-S-A,this.drawDebug&&E.push(s.Rect.create(p,P,o[u[d]],S));try{if(R){let e=p+f.left+b.left,t=P+f.top+k-b.bottom,i=e,r=t-k;if(0!==M){const{textWidth:t,textHeight:r}=g.getNativeLabelInfo(y);e=n[u[d]]+f.left-r*Math.sin(M)/2,i=e,M>0&&(e-=t)}R.DrawStringAdvanced(null!=y?y:"",w,Math.round(e),Math.round(t),(0,c.getVector4)(this.webAssemblyContext,i,r,M,0),I,O)}else{const{bitmapTexture:e,textureHeight:t,textureWidth:i}=g.getCachedLabelTexture(y,v,l);e&&(m.DrawTexture(e,Math.round(p+f.left),Math.round(P+f.top),i,t),g.useCache||e.delete())}}catch(e){g.delete()}}}else{let e=[],o=[];if(!g.useCache&&g.useNativeText)for(const t of r)R.CalculateStringBounds(null!=t?t:"",D,2),e.push(D.m_fHeight+l.padding.top+l.padding.bottom),o.push(D.m_fWidth+l.padding.left+l.padding.right);else e=r.map(e=>g.getLabelHeight(x,e,l)),o=r.map(e=>g.getLabelWidth(x,e,l));const{labelCoords:a,labelIndexes:h}=this.layoutLabels(C,n,e,d,null==b?void 0:b.left,null==b?void 0:b.right);for(let n=0;n<h.length;n++){let u=0;const d=r[h[n]],p=o[h[n]];u=this.adjustForLabelAlignment(u,p,T,t,i,P,A);const y=a[n];this.drawDebug&&E.push(s.Rect.create(u,y,p,e[h[n]]));try{if(R){const e=u+f.left+b.left,t=y+f.top+k-b.bottom;R.DrawStringAdvanced(null!=d?d:"",w,Math.round(e),Math.round(t),(0,c.getVector4)(this.webAssemblyContext,e,t,M,0),I,O)}else{const{bitmapTexture:e,textureHeight:t,textureWidth:i}=g.getCachedLabelTexture(d,v,l);e&&(m.DrawTexture(e,Math.round(u+f.left),Math.round(y+f.top),i,t),g.useCache||e.delete())}}catch(e){g.delete()}}}this.drawDebug&&this.drawLabelViewRects(e,f,E)}adjustForLabelAlignment(e,t,i,r,n,s,o){const h=s-o-t;return r===a.EAxisAlignment.Left&&!n||r===a.EAxisAlignment.Right&&n?i===l.ELabelAlignment.Right||i===l.ELabelAlignment.Auto?e+=h:i===l.ELabelAlignment.Center&&(e+=h/2):i===l.ELabelAlignment.Left||i===l.ELabelAlignment.Auto?e+=o:i===l.ELabelAlignment.Center?e+=o+h/2:e+=s-t,e}layoutLabels(e,i,r,n,s,o){return(0,t.layoutLabelsHelper)(this.keepLabelsWithinAxis,this.hideOverlappingLabels,e,i,r,n)}drawTicks(e,t,i,r,n,s,o){if(!r||0===r.length)return;const{viewRect:l}=this,{tickSize:h}=o;this.vertices.clear();const d=(0,a.getIsHorizontal)(t);if(void 0===d)return;r.forEach(e=>{let r,n,s,o;i?d?(r=e,n=e,s=t===a.EAxisAlignment.Top?0:l.height,o=t===a.EAxisAlignment.Top?h:l.height-h):(r=t===a.EAxisAlignment.Left?0:l.width,n=t===a.EAxisAlignment.Left?h:l.width-h,s=e,o=e):d?(r=e,n=e,s=t===a.EAxisAlignment.Bottom?0:l.height,o=t===a.EAxisAlignment.Bottom?h:l.height-h):(r=t===a.EAxisAlignment.Right?0:l.width,n=t===a.EAxisAlignment.Right?h:l.width-h,s=e,o=e);const u=(0,c.getVertex)(this.webAssemblyContext,r,s);this.vertices.push_back(u);const p=(0,c.getVertex)(this.webAssemblyContext,n,o);this.vertices.push_back(p)});const p=l.left-(d?n:0),g=l.top-(d?0:n);e.drawLinesNative(this.vertices,s,u.ELineDrawMode.DiscontinuousLine,p,g)}drawModifiersAxisLabel(e,t,i,r,n,l){if(!t)return;const h=e.getNativeContext(),{bitmapTexture:u,textureHeight:d,textureWidth:c}=this.textureManager.createSimpleTextTexture(t,Object.assign(Object.assign({},n),{padding:new o.Thickness(2,2,2,2)}),l),p={height:this.parentAxis.parentSurface.domCanvas2D.height,width:this.parentAxis.parentSurface.domCanvas2D.width},g=(e,t,i,r)=>e+t<r/2?0:e+t>i-r/2?i-r:e+t-r/2;let f,y;return r===a.EAxisAlignment.Bottom?(f=g(this.viewRect.x,i,p.width,c),y=this.viewRect.y,p.height-y<d&&(y=p.height-d)):r===a.EAxisAlignment.Top?(f=g(this.viewRect.x,i,p.width,c),y=this.viewRect.y+this.viewRect.height-d,this.parentAxis.axisLayoutState.axisSize<d&&(y=0)):r===a.EAxisAlignment.Left?(f=this.viewRect.x+this.viewRect.width-c,y=g(this.viewRect.y,i,p.height,d),this.parentAxis.axisLayoutState.axisSize<c&&(f=0)):r===a.EAxisAlignment.Right&&(f=this.viewRect.x,y=g(this.viewRect.y,i,p.height,d),p.width-f<c&&(f=p.width-c)),h.DrawTexture(u,Math.round(f),Math.round(y),c,d),u.delete(),new s.Rect(f,y,c,d)}createAxisMarker(e,t,i,r,n){const{fontStyle:s,fontWeight:o,fontSize:a,fontFamily:l,color:h}=i;return this.textureManager.createAxisMarkerTexture(e,t,s,o,a,l,h,2*g.DpiHelper.PIXEL_RATIO,r,n)}createAxisMarkerFromImage(e,t,i){return this.textureManager.createTextureFromImage(e,t,i)}createAnnotationLabelTexture(e,t,i,r,n,s){return this.textureManager.createSimpleTextTexture(e,Object.assign(Object.assign({},t),{padding:new o.Thickness(2,2,2,2)}),i,r,n,s)}invalidateParent(){this.parentAxis&&this.parentAxis.invalidateParentCallback&&this.parentAxis.invalidateParentCallback()}drawLabelViewRects(e,t,i){const r=(0,c.getVectorRectVertex)(this.webAssemblyContext),n=new this.webAssemblyContext.SCRTSolidBrush((0,h.parseColorToUIntArgb)("rgba(30,30,255,0.3)"),!1);for(const e of i){const t=(0,d.createNativeRect)(this.webAssemblyContext,e.left,e.top,e.right,e.bottom);r.push_back(t)}e.drawRects(r,n,t.left,t.top),n.delete()}};t.layoutLabelsHelper=(e,t,i,r,n,s)=>{const o=[],a=[],l=n.length,h=e=>s?r[l-1-e]:r[e],u=e=>s?n[l-1-e]:n[e];let d=0;for(let r=0;r<l;r++){const n=0===r,p=r===l-1,g=u(r),f=Math.ceil(g/2);let y=h(r),v=0;if(e&&n){y>f?(v=y+f,y-=f):(y=0,v=y+g);const e=h(1),i=u(1)/2;if(t&&v>=e-i-0)continue}else e&&p?y=y+f<i?y-f:i-g:(v=y+f,y-=f);t&&r>0&&y<d+0||(d=v,o.push(y),c=r,s?a.push(l-1-c):a.push(c))}var c;return{labelCoords:o,labelIndexes:a}};const y=(e,t)=>{let i=t.eTSRTextAlignMode.Left;switch(e){case l.ELabelAlignment.Left:i=t.eTSRTextAlignMode.Left;break;case l.ELabelAlignment.Right:i=t.eTSRTextAlignMode.Right;break;case l.ELabelAlignment.Center:i=t.eTSRTextAlignMode.Center;break;default:i=t.eTSRTextAlignMode.Left}return i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontString=void 0;t.getFontString=(e,t,i,r)=>t?`${e} ${t} ${i}px ${r}`:`${e} ${i}px ${r}`},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisTitleRenderer=void 0;const r=i(15),n=i(52),s=i(33),o=i(2),a=i(134),l=i(76),h=0;t.AxisTitleRenderer=class{constructor(e){this.viewRect=r.Rect.createZero(),this.text="",this.lineSpacing=1.1,this.desiredHeightProperty=0,this.desiredWidthProperty=0,this.webAssemblyContext=e,this.textureManager=new l.TextureManager(e)}measure(e,t){var i,r,n,s;let o=Array.isArray(this.text)?this.text.length:1;const a=o>1?1+this.lineSpacing*(o-1):o;t?this.desiredHeightProperty=this.text?a*(0,l.measureTextHeight)(e.fontSize)+(null===(i=null==e?void 0:e.padding)||void 0===i?void 0:i.bottom)+(null===(r=null==e?void 0:e.padding)||void 0===r?void 0:r.top):h:this.desiredWidthProperty=this.text?a*(0,l.measureTextHeight)(e.fontSize)+(null===(n=null==e?void 0:e.padding)||void 0===n?void 0:n.left)+(null===(s=null==e?void 0:e.padding)||void 0===s?void 0:s.right):h}get desiredHeight(){return this.desiredHeightProperty}set desiredHeight(e){this.desiredHeightProperty=e}get desiredWidth(){return this.desiredWidthProperty}set desiredWidth(e){this.desiredWidthProperty=e}layout(e){this.viewRect=e}getTitleTexture(e,t,i){const r=Array.isArray(e)?e:[e];return i.createTextTexture(r,Object.assign(Object.assign({},t),{padding:new n.Thickness(0,0,0,0)}),0,this.lineSpacing)}draw(e,t,i,n){if(!this.text)return;const l=e.getNativeContext(),{bitmapTexture:h,textureHeight:u,textureWidth:d}=this.getTitleTexture(this.text,t,this.textureManager),{padding:c}=t;if(i===s.EAxisAlignment.Top||i===s.EAxisAlignment.Bottom){const t=(this.viewRect.width-d)/2,i=this.viewRect.x+t,s=this.viewRect.y+(null==c?void 0:c.top);if(l.DrawTexture(h,Math.round(i),Math.round(s),d,u),n){const t=new a.WebGlPen(new this.webAssemblyContext.SCRTPen((0,o.parseColorToUIntArgb)("Red"),1,!0));e.drawRect(new r.Rect(i,s,d,u),r.Rect.create(0,0,999,999),t),t.delete()}}if(i===s.EAxisAlignment.Left){l.PushMatrix(),l.Rotate(-90);const e=(this.viewRect.height-d)/2,t=-(this.viewRect.y+this.viewRect.height)+e;l.Translate(Math.round(t),Math.round(this.viewRect.x+(null==c?void 0:c.left))),l.DrawTexture(h,0,0,d,u),l.PopMatrix()}if(i===s.EAxisAlignment.Right){l.PushMatrix(),l.Rotate(90);const e=(this.viewRect.height-d)/2,t=this.viewRect.y+e;l.Translate(Math.round(t),Math.round(-(this.viewRect.x+this.viewRect.width)+(null==c?void 0:c.right))),l.DrawTexture(h,0,0,d,u),l.PopMatrix()}h.delete()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CategoryDeltaCalculator=void 0;const r=i(1),n=i(3),s=i(108);class o extends s.NumericDeltaCalculator{constructor(e){super(e)}getDeltaFromRange(e,t,i,s){return r.Guard.argumentIsRealNumber(e,"min"),r.Guard.argumentIsRealNumber(t,"max"),t<=s?new n.NumberRange(1/i,1):super.getDeltaFromRange(e,t,i,s)}}t.CategoryDeltaCalculator=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeltaCalculator=void 0;t.DeltaCalculator=class{attachedToAxis(e){this.parentAxis=e}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LabelProvider=void 0;t.LabelProvider=class{constructor(e){this.numericFormatProperty=null==e?void 0:e.labelFormat,this.precisionProperty=null==e?void 0:e.labelPrecision,this.cursorNumericFormatProperty=null==e?void 0:e.cursorLabelFormat,this.cursorPrecisionProperty=null==e?void 0:e.cursorLabelPrecision,this.prefixProperty=null==e?void 0:e.labelPrefix,this.postfixProperty=null==e?void 0:e.labelPostfix}attachedToAxis(e){this.parentAxis=e}get numericFormat(){return this.numericFormatProperty}set numericFormat(e){this.numericFormatProperty=e,this.invalidateParent()}get precision(){return this.precisionProperty}set precision(e){this.precisionProperty=e,this.invalidateParent()}get cursorNumericFormat(){return this.cursorNumericFormatProperty}set cursorNumericFormat(e){this.cursorNumericFormatProperty=e,this.invalidateParent()}get cursorPrecision(){return this.cursorPrecisionProperty}set cursorPrecision(e){this.cursorPrecisionProperty=e,this.invalidateParent()}get prefix(){return this.prefixProperty}set prefix(e){this.prefixProperty=e,this.invalidateParent()}get postfix(){return this.postfixProperty}set postfix(e){this.postfixProperty=e,this.invalidateParent()}get formatLabel(){return this.formatLabelProperty}set formatLabel(e){this.formatLabelProperty=e,this.invalidateParent()}get formatCursorLabel(){return this.formatCursorLabelProperty}set formatCursorLabel(e){this.formatCursorLabelProperty=e,this.invalidateParent()}applyFormat(e){var t,i;return(null!==(t=this.prefix)&&void 0!==t?t:"")+e+(null!==(i=this.postfix)&&void 0!==i?i:"")}toJSON(){const e={cursorLabelFormat:this.cursorNumericFormat,cursorLabelPrecision:this.cursorPrecision,labelFormat:this.numericFormat,labelPrecision:this.precision,labelPrefix:this.prefix,labelPostfix:this.postfix};return{type:this.type,options:e}}invalidateParent(){this.parentAxis&&this.parentAxis.invalidateParentCallback&&this.parentAxis.invalidateParentCallback()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimeNumericAxis=void 0;const r=i(272),n=i(138),s=i(89);class o extends s.NumericAxis{constructor(e,t){var i;super(e,t),this.labelProvider=null!==(i=null==t?void 0:t.labelProvider)&&void 0!==i?i:new n.SmartDateLabelProvider,this.deltaCalculator=new r.DateTimeDeltaCalculator(e,{possibleDeltas:null==t?void 0:t.possibleDeltas,minTicks:null==t?void 0:t.minTicks})}}t.DateTimeNumericAxis=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimeDeltaCalculator=void 0;const r=i(3),n=i(108);class s extends n.NumericDeltaCalculator{constructor(e,t){var i;super(e),this.possibleDeltasProperty=[1,2,5,10,15,30,60,120,300,600,900,1800,3600,10800,21600,43200,86400,259200,432e3,864e3,1296e3,1728e3,2592e3,5184e3,10368e3,15552e3,31557600],this.currIndex=12,this.possibleDeltasProperty=null!==(i=null==t?void 0:t.possibleDeltas)&&void 0!==i?i:this.possibleDeltasProperty,this.minTicks=null==t?void 0:t.minTicks}get possibleDeltas(){return this.possibleDeltasProperty}set possibleDeltas(e){this.possibleDeltasProperty!==e&&(this.possibleDeltasProperty=e)}get minTicks(){return this.minTicksProperty}set minTicks(e){this.minTicksProperty!==e&&(this.minTicksProperty=e)}getDeltaFromRange(e,t,i,n){const s=t-e;this.prevIndex=void 0;const o=(r,a)=>{var l;let h=r[a];const u=Math.floor(s/h);if(u<(null!==(l=this.minTicks)&&void 0!==l?l:n/3)&&a>0&&a!==this.prevIndex)return this.prevIndex||(this.prevIndex=a),o(r,a-1);if(u>n&&a<r.length-1&&a!==this.prevIndex)return this.prevIndex||(this.prevIndex=a),o(r,a+1);if(u>n&&a===r.length-1){return super.getDeltaFromRange(e/h,t/h,i,n).max*h}return this.currIndex!==a&&(this.currIndex=a),h},a=o(this.possibleDeltasProperty,this.currIndex);return new r.NumberRange(a/i,a)}}t.DateTimeDeltaCalculator=s},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sciChartDestinations=t.createMultichart3d=void 0;const n=i(274),s=i(36),o=i(91),a=i(92),l=i(4),h=i(53),u=i(277),d=i(140),c={wasmContext:void 0,getChildSurfaces:void 0,createChildSurface:void 0};let p;t.createMultichart3d=(e,t)=>r(void 0,void 0,void 0,(function*(){var i,r,n,u,d;(0,s.ensureRegistrations)(),a.default.checkChartDivExists(e);const f=a.default.initCanvas(e,null!==(i=null==t?void 0:t.widthAspect)&&void 0!==i?i:0,null!==(r=null==t?void 0:t.heightAspect)&&void 0!==r?r:0,a.default.ECanvasType.canvas2D),y=null!==(n=null==t?void 0:t.loader)&&void 0!==n?n:new o.DefaultSciChartLoader,v=y.addChartLoader(f.domDivContainer,null!==(u=null==t?void 0:t.theme)&&void 0!==u?u:l.SciChartSurfaceBase.DEFAULT_THEME);try{if(!c.wasmContext||!c.createChildSurface||!c.getChildSurfaces){p||(p=g());const e=yield p;(0,h.checkBuildStamp)(e.wasmContext),c.wasmContext=e.wasmContext,c.createChildSurface=e.createChildSurface,c.getChildSurfaces=e.getChildSurfaces}const{createChildSurface:e,wasmContext:i}=c,r=e(f.domChartRoot.id,f,null!==(d=null==t?void 0:t.theme)&&void 0!==d?d:l.SciChartSurfaceBase.DEFAULT_THEME);return new Promise(e=>{setTimeout(()=>{y.removeChartLoader(f.domDivContainer,v),r.setIsInitialized(),e({wasmContext:i,sciChart3DSurface:r})},0)})}catch(e){return console.error(e),y.removeChartLoader(f.domDivContainer,v),Promise.reject(e)}})),t.sciChartDestinations=[];const g=()=>{const e=(e,i,r,n,s,o)=>{const a=(0,l.createChartDestination)(r.domCanvas2D);if(!a)return void r.delete();const h=e.SCRTSurfaceDestination.implement(a);o.AddDestination(h),t.sciChartDestinations.push({canvasElementId:i,sciChartSurface:r,width:n,height:s})};return new Promise((i,r)=>{const s=(0,l.getLocateFile)(d.sciChartConfig3D);new n({locateFile:s,noInitialRun:!0}).then(r=>{const n=()=>t.sciChartDestinations.map(e=>e.sciChartSurface),s=(i,n,s)=>{const o=a.default.getCanvas2dId(i),l=t.sciChartDestinations.filter(e=>e.canvasElementId!==o);h.ClearDestinations();for(t.sciChartDestinations.filter(e=>e.canvasElementId===o).forEach(e=>e.sciChartSurface.delete());t.sciChartDestinations.length>0;)t.sciChartDestinations.pop();l.forEach(t=>e(r,t.canvasElementId,t.sciChartSurface,t.width,t.height,h));const c=((e,i,r,n)=>{const s=new d.SciChart3DSurface(e,{canvases:r});s.applyTheme(n),s.setDestinations(t.sciChartDestinations);const o=a.default.subscribeToResize(r.domChartRoot,r.aspect,s);return s.addDeletable(o),s})(r,0,n,s);return e(r,o,c,n.domCanvas2D.width,n.domCanvas2D.height,h),(0,u.applyLicense3D)(r,c,!1),c};r.canvas=(0,l.getMasterCanvas)();const o={InitializeChart(){i({getChildSurfaces:n,createChildSurface:s,wasmContext:r})},Draw(e){const i=t.sciChartDestinations.find(t=>t.canvasElementId===e);i&&i.sciChartSurface.doDrawingLoop()},Update(e){},ShutDownChart(){}},h=r.SCRTSampleChartInterface.implement(o),c=new r.SCRTFrameRenderer3D;h.SetFrameRenderer(c),h.SetFPSCounterEnabled(!1),r.SCRTSetGlobalSampleChartInterface(h);const p=r.SCRTCopyToDestinationInterface.implement({CopyToDestination:(0,l.copyToCanvas)(l.SciChartSurfaceBase.domMasterCanvas,f)});r.SCRTSetGlobalCopyToDestinationInterface(p),r.TSRSetDrawRequestsEnabled(!0),l.SciChartSurfaceBase.domMasterCanvas&&r.TSRSetMainWindowSize(l.SciChartSurfaceBase.domMasterCanvas.width,l.SciChartSurfaceBase.domMasterCanvas.height),r.callMain()}).catch(()=>{r("Could not load SciChart WebAssembly module.\n Check your build process and ensure that your scichart3d.wasm, scichart3d.data and scichart3d.js files are from the same version")})})},f=e=>t.sciChartDestinations.find(t=>t.canvasElementId===e)},function(e,t,i){(function(t,i){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var n,s,o;e=e||{},n||(n=void 0!==e?e:{}),n.ready=new Promise((function(e,t){s=e,o=t})),n.wj||(n.wj=0),n.wj++,function(e){function i(){function t(e,t,i){this.start=e,this.end=t,this.audio=i}function i(i){if(!i)throw"Loading data file failed."+Error().stack;if(!(i instanceof ArrayBuffer))throw"bad input to processPackageData"+Error().stack;i=new Uint8Array(i),t.prototype.Hj=i,i=e.files;for(var r=0;r<i.length;++r)t.prototype.Ci[i[r].filename].onload();n.removeRunDependency("datafile_scichart3d.data")}n.FS_createPath("/","assets",!0,!0),t.prototype={Ci:{},open:function(e,t){this.name=t,this.Ci[t]=this,n.addRunDependency("fp "+this.name)},onload:function(){this.dj(this.Hj.subarray(this.start,this.end))},dj:function(e){n.FS_createDataFile(this.name,null,e,!0,!0,!0),n.removeRunDependency("fp "+this.name),this.Ci[this.name]=null}};for(var r=e.files,s=0;s<r.length;++s)new t(r[s].start,r[s].end,r[s].audio).open("GET",r[s].filename);n.addRunDependency("datafile_scichart3d.data"),n.ak||(n.ak={}),n.ak["scichart3d.data"]={ol:!1},a?(i(a),a=null):o=i}"object"==typeof window?window.encodeURIComponent(window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/"):void 0===t&&"undefined"!=typeof location&&encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"),"function"!=typeof n.locateFilePackage||n.locateFile||(n.locateFile=n.locateFilePackage,v("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r=n.locateFile?n.locateFile("scichart3d.data",""):"scichart3d.data",s=e.remote_package_size,o=null,a=n.getPreloadedPackage?n.getPreloadedPackage(r,s):null;a||function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onprogress=function(i){var s=t;if(i.total&&(s=i.total),i.loaded){r.Ci?n.Qi[e].loaded=i.loaded:(r.Ci=!0,n.Qi||(n.Qi={}),n.Qi[e]={loaded:i.loaded,total:s});var o,a=s=i=0;for(o in n.Qi){var l=n.Qi[o];i+=l.total,s+=l.loaded,a++}i=Math.ceil(i*n.wj/a),n.setStatus&&n.setStatus("Downloading data... ("+s+"/"+i+")")}else!n.Qi&&n.setStatus&&n.setStatus("Downloading data...")},r.onerror=function(){throw Error("NetworkError for: "+e)},r.onload=function(){if(!(200==r.status||304==r.status||206==r.status||0==r.status&&r.response))throw Error(r.statusText+" : "+r.responseURL);i(r.response)},r.send(null)}(r,s,(function(e){o?(o(e),o=null):a=e})),n.calledRun?i():(n.preRun||(n.preRun=[]),n.preRun.push(i))}({files:[{filename:"/assets/TSRAssets.web.pkg",start:0,end:615464,audio:0},{filename:"/assets/SCRTAssets.web.pkg",start:615464,end:1123273,audio:0}],remote_package_size:1123273,package_uuid:"4ac65982-c047-4f63-8990-38a930a4eafd"}),En&&(En=function(e){e=bn(e);var t=Tn[e]||document.querySelector(e);return"#canvas"===e&&(t=t||n.canvas),t});var a,l={};for(a in n)n.hasOwnProperty(a)&&(l[a]=n[a]);var h=[],u="./this.program";function d(e,t){throw t}var c,p,g,f="";"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",c=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p=function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i()},r.onerror=i,r.send(null)},g=function(e){document.title=e};var y=n.print||console.log.bind(console),v=n.printErr||console.warn.bind(console);for(a in l)l.hasOwnProperty(a)&&(n[a]=l[a]);l=null,n.arguments&&(h=n.arguments),n.thisProgram&&(u=n.thisProgram),n.quit&&(d=n.quit);var m,S,P=0;n.wasmBinary&&(S=n.wasmBinary);var C=n.noExitRuntime||!0;function A(e,t){var i="float";switch("*"===i.charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":_[e>>0]=t;break;case"i16":F[e>>1]=t;break;case"i32":H[e>>2]=t;break;case"i64":me=[t>>>0,(ve=t,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[e>>2]=me[0],H[e+4>>2]=me[1];break;case"float":z[e>>2]=t;break;case"double":j[e>>3]=t;break;default:pe("invalid type for setValue: "+i)}}"object"!=typeof WebAssembly&&pe("no native wasm support detected");var x,b,T=!1;function E(e,t){e||pe("Assertion failed: "+t)}function w(e){var t=n["_"+e];return E(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function R(e,t,i,r){var n,s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);O(e,t=Bs(i),i)}return t},array:function(e){var t=Bs(e.length);return _.set(e,t),t}},o=w(e),a=[];if(e=0,r)for(var l=0;l<r.length;l++){var h=s[i[l]];h?(0===e&&(e=Ns()),a[l]=h(r[l])):a[l]=r[l]}return i=o.apply(null,a),n=i,i="string"===t?M(n):"boolean"===t?!!n:n,0!==e&&Fs(e),i}var D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(e,t,i){var r=t+i;for(i=t;e[i]&&!(i>=r);)++i;if(16<i-t&&e.subarray&&D)return D.decode(e.subarray(t,i));for(r="";t<i;){var n=e[t++];if(128&n){var s=63&e[t++];if(192==(224&n))r+=String.fromCharCode((31&n)<<6|s);else{var o=63&e[t++];65536>(n=224==(240&n)?(15&n)<<12|s<<6|o:(7&n)<<18|s<<12|o<<6|63&e[t++])?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else r+=String.fromCharCode(n)}return r}function M(e,t){return e?L(N,e,t):""}function I(e,t,i,r){if(!(0<r))return 0;var n=i;r=i+r-1;for(var s=0;s<e.length;++s){var o=e.charCodeAt(s);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),127>=o){if(i>=r)break;t[i++]=o}else{if(2047>=o){if(i+1>=r)break;t[i++]=192|o>>6}else{if(65535>=o){if(i+2>=r)break;t[i++]=224|o>>12}else{if(i+3>=r)break;t[i++]=240|o>>18,t[i++]=128|o>>12&63}t[i++]=128|o>>6&63}t[i++]=128|63&o}}return t[i]=0,i-n}function O(e,t,i){return I(e,N,t,i)}function k(e){for(var t=0,i=0;i<e.length;++i){var r=e.charCodeAt(i);55296<=r&&57343>=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),127>=r?++t:t=2047>=r?t+2:65535>=r?t+3:t+4}return t}var V,_,N,F,B,H,Y,z,j,G="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function X(e,t){for(var i=e>>1,r=i+t/2;!(i>=r)&&B[i];)++i;if(32<(i<<=1)-e&&G)return G.decode(N.subarray(e,i));for(i="",r=0;!(r>=t/2);++r){var n=F[e+2*r>>1];if(0==n)break;i+=String.fromCharCode(n)}return i}function W(e,t,i){if(void 0===i&&(i=2147483647),2>i)return 0;var r=t;i=(i-=2)<2*e.length?i/2:e.length;for(var n=0;n<i;++n)F[t>>1]=e.charCodeAt(n),t+=2;return F[t>>1]=0,t-r}function U(e){return 2*e.length}function $(e,t){for(var i=0,r="";!(i>=t/4);){var n=H[e+4*i>>2];if(0==n)break;++i,65536<=n?(n-=65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n)):r+=String.fromCharCode(n)}return r}function Z(e,t,i){if(void 0===i&&(i=2147483647),4>i)return 0;var r=t;i=r+i-4;for(var n=0;n<e.length;++n){var s=e.charCodeAt(n);if(55296<=s&&57343>=s&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++n)),H[t>>2]=s,(t+=4)+4>i)break}return H[t>>2]=0,t-r}function K(e){for(var t=0,i=0;i<e.length;++i){var r=e.charCodeAt(i);55296<=r&&57343>=r&&++i,t+=4}return t}function J(e){var t=k(e)+1,i=Ds(t);return i&&I(e,_,i,t),i}function q(e){var t=k(e)+1,i=Bs(t);return I(e,_,i,t),i}function Q(){var e=x.buffer;V=e,n.HEAP8=_=new Int8Array(e),n.HEAP16=F=new Int16Array(e),n.HEAP32=H=new Int32Array(e),n.HEAPU8=N=new Uint8Array(e),n.HEAPU16=B=new Uint16Array(e),n.HEAPU32=Y=new Uint32Array(e),n.HEAPF32=z=new Float32Array(e),n.HEAPF64=j=new Float64Array(e)}var ee,te=[],ie=[],re=[],ne=[],se=[];function oe(){var e=n.preRun.shift();te.unshift(e)}var ae,le=0,he=null,ue=null;function de(){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le)}function ce(){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),0==le&&(null!==he&&(clearInterval(he),he=null),ue)){var e=ue;ue=null,e()}}function pe(e){throw n.onAbort&&n.onAbort(e),v(e),T=!0,b=1,e=new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info."),o(e),e}function ge(){return ae.startsWith("data:application/octet-stream;base64,")}if(n.preloadedImages={},n.preloadedAudios={},ae="scichart3d.wasm",!ge()){var fe=ae;ae=n.locateFile?n.locateFile(fe,f):f+fe}function ye(){var e=ae;try{if(e==ae&&S)return new Uint8Array(S);throw"both async and sync fetching of the wasm failed"}catch(e){pe(e)}}var ve,me,Se,Pe={496272:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/windows phone/i.test(e)?0:/android/i.test(e)?1:/iPad|iPhone|iPod/.test(e)&&!window.Ci?2:0},496542:function(){return n.xj()},496578:function(){if(void 0===n.xj)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto;(e=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0})(),n.xj=e}catch(t){try{var i=Math.pow(2,32);(e=function(){return Math.floor(Math.random()*Math.floor(i))>>>0})(),n.xj=e}catch(e){throw"No secure random number generator found"}}},497260:function(e){e=M(e)+"\n\nAbort/Retry/Ignore/AlwaysIgnore? [ariA] :",null===(e=window.prompt(e,"i"))&&(e="i"),e=ws(e);var t=Ds(e.length);return e.subarray||e.slice?N.set(e,t):N.set(new Uint8Array(e),t),t},497485:function(e,t,i){n.SDL2||(n.SDL2={});var r=n.SDL2;r.mk!==n.canvas&&(r.xi=n.createContext(n.canvas,!1,!0),r.mk=n.canvas),r.w===e&&r.Ak===t&&r.Dk===r.xi||(r.image=r.xi.createImageData(e,t),r.w=e,r.Ak=t,r.Dk=r.xi),e=r.image.data,t=i>>2;var s=0;if("undefined"!=typeof CanvasPixelArray&&e instanceof CanvasPixelArray)for(i=e.length;s<i;){var o=H[t];e[s]=255&o,e[s+1]=o>>8&255,e[s+2]=o>>16&255,e[s+3]=255,t++,s+=4}else if(r.ll!==e&&(r.nk=new Int32Array(e.buffer),r.pk=new Uint8Array(e.buffer)),i=(e=r.nk).length,e.set(H.subarray(t,t+i)),e=r.pk,s=(t=3)+4*i,0==i%8)for(;t<s;)e[t]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,t=t+4|0;else for(;t<s;)e[t]=255,t=t+4|0;return r.xi.putImageData(r.image,0,0),0},498940:function(e,t,i,r,n){var s=document.createElement("canvas");s.width=e,s.height=t;var o=s.getContext("2d");t=(e=o.createImageData(e,t)).data,n>>=2;var a,l=0;if("undefined"!=typeof CanvasPixelArray&&t instanceof CanvasPixelArray)for(a=t.length;l<a;){var h=H[n];t[l]=255&h,t[l+1]=h>>8&255,t[l+2]=h>>16&255,t[l+3]=h>>24&255,n++,l+=4}else a=(t=new Int32Array(t.buffer)).length,t.set(H.subarray(n,n+a));return o.putImageData(e,0,0),O(i=0===i&&0===r?"url("+s.toDataURL()+"), auto":"url("+s.toDataURL()+") "+i+" "+r+", auto",r=Ds(i.length+1),i.length+1),r},499929:function(e){return n.canvas&&(n.canvas.style.cursor=M(e)),0},500022:function(){n.canvas&&(n.canvas.style.cursor="none")},500091:function(){return screen.width},500116:function(){return screen.height},500142:function(){return window.innerWidth},500172:function(){return window.innerHeight},500203:function(e){return void 0!==g&&g(M(e)),0},500298:function(){return"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?1:0},500435:function(){return void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia||void 0!==navigator.webkitGetUserMedia?1:0},500659:function(e){void 0===n.SDL2&&(n.SDL2={});var t=n.SDL2;return e?t.capture={}:t.audio={},t.gi||("undefined"!=typeof AudioContext?t.gi=new AudioContext:"undefined"!=typeof webkitAudioContext&&(t.gi=new webkitAudioContext),t.gi&&function(e){var t;t||(t=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach((function(i){t.forEach((function(t){t&&function(e,t,i){e.addEventListener(t,i,{once:!0})}(t,i,(function(){"suspended"===e.state&&e.resume()}))}))}))}(t.gi)),void 0===t.gi?-1:0},501152:function(){return n.SDL2.gi.sampleRate},501220:function(e,t,i,r){function s(){}function o(n){void 0!==a.capture.aj&&(clearTimeout(a.capture.aj),a.capture.aj=void 0),a.capture.jj=a.gi.createMediaStreamSource(n),a.capture.ni=a.gi.createScriptProcessor(t,e,1),a.capture.ni.onaudioprocess=function(e){void 0!==a&&void 0!==a.capture&&(e.outputBuffer.getChannelData(0).fill(0),a.capture.vj=e.inputBuffer,Ae("vi",i,[r]))},a.capture.jj.connect(a.capture.ni),a.capture.ni.connect(a.gi.destination),a.capture.stream=n}var a=n.SDL2;a.capture.mj=a.gi.createBuffer(e,t,a.gi.sampleRate),a.capture.mj.getChannelData(0).fill(0),a.capture.aj=setTimeout((function(){a.capture.vj=a.capture.mj,Ae("vi",i,[r])}),t/a.gi.sampleRate*1e3),void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(o).catch(s):void 0!==navigator.webkitGetUserMedia&&navigator.webkitGetUserMedia({audio:!0,video:!1},o,s)},502872:function(e,t,i,r){var s=n.SDL2;s.audio.ni=s.gi.createScriptProcessor(t,0,e),s.audio.ni.onaudioprocess=function(e){void 0!==s&&void 0!==s.audio&&(s.audio.Mj=e.outputBuffer,Ae("vi",i,[r]))},s.audio.ni.connect(s.gi.destination)},503282:function(e,t){for(var i=n.SDL2,r=i.capture.vj.numberOfChannels,s=0;s<r;++s){var o=i.capture.vj.getChannelData(s);if(o.length!=t)throw"Web Audio capture buffer length mismatch! Destination size: "+o.length+" samples vs expected "+t+" samples!";if(1==r)for(var a=0;a<t;++a)A(e+4*a,o[a]);else for(a=0;a<t;++a)A(e+4*(a*r+s),o[a])}},503887:function(e,t){for(var i=n.SDL2,r=i.audio.Mj.numberOfChannels,s=0;s<r;++s){var o=i.audio.Mj.getChannelData(s);if(o.length!=t)throw"Web Audio output buffer length mismatch! Destination size: "+o.length+" samples vs expected "+t+" samples!";for(var a=0;a<t;++a)o[a]=z[e+(a*r+s<<2)>>2]}},504367:function(e){var t=n.SDL2;if(e){if(void 0!==t.capture.aj&&clearTimeout(t.capture.aj),void 0!==t.capture.stream){e=t.capture.stream.getAudioTracks();for(var i=0;i<e.length;i++)t.capture.stream.removeTrack(e[i]);t.capture.stream=void 0}void 0!==t.capture.ni&&(t.capture.ni.onaudioprocess=function(){},t.capture.ni.disconnect(),t.capture.ni=void 0),void 0!==t.capture.jj&&(t.capture.jj.disconnect(),t.capture.jj=void 0),void 0!==t.capture.mj&&(t.capture.mj=void 0),t.capture=void 0}else null!=t.audio.ni&&(t.audio.ni.disconnect(),t.audio.ni=void 0),t.audio=void 0;void 0!==t.gi&&void 0===t.audio&&void 0===t.capture&&(t.gi.close(),t.gi=void 0)}};function Ce(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(n);else{var i=t.wk;"number"==typeof i?void 0===t.ej?ee.get(i)():ee.get(i)(t.ej):i(void 0===t.ej?null:t.ej)}}}function Ae(e,t,i){return e.includes("j")?(e=n["dynCall_"+e],t=i&&i.length?e.apply(null,[t].concat(i)):e.call(null,t)):t=ee.get(t).apply(null,i),t}function xe(e){this.bi=e-16,this.Yk=function(e){H[this.bi+4>>2]=e},this.Vk=function(e){H[this.bi+8>>2]=e},this.Wk=function(){H[this.bi>>2]=0},this.Uk=function(){_[this.bi+12>>0]=0},this.Xk=function(){_[this.bi+13>>0]=0},this.Ek=function(e,t){this.Yk(e),this.Vk(t),this.Wk(),this.Uk(),this.Xk()}}function be(e,t){for(var i=0,r=e.length-1;0<=r;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e}function Te(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=be(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e}function Ee(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function we(e){if("/"===e)return"/";var t=(e=(e=Te(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function Re(){for(var e="",t=!1,i=arguments.length-1;-1<=i&&!t;i--){if("string"!=typeof(t=0<=i?arguments[i]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=be(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}var De=[];function Le(e,t){De[e]={input:[],ki:[],Ti:t},it(e,Me)}var Me={open:function(e){var t=De[e.node.Zi];if(!t)throw new ze(43);e.fi=t,e.seekable=!1},close:function(e){e.fi.Ti.flush(e.fi)},flush:function(e){e.fi.Ti.flush(e.fi)},read:function(e,t,i,r){if(!e.fi||!e.fi.Ti.Sj)throw new ze(60);for(var n=0,s=0;s<r;s++){try{var o=e.fi.Ti.Sj(e.fi)}catch(e){throw new ze(29)}if(void 0===o&&0===n)throw new ze(6);if(null==o)break;n++,t[i+s]=o}return n&&(e.node.timestamp=Date.now()),n},write:function(e,t,i,r){if(!e.fi||!e.fi.Ti.Cj)throw new ze(60);try{for(var n=0;n<r;n++)e.fi.Ti.Cj(e.fi,t[i+n])}catch(e){throw new ze(29)}return r&&(e.node.timestamp=Date.now()),n}},Ie={Sj:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=ws(t,!0)}return e.input.shift()},Cj:function(e,t){null===t||10===t?(y(L(e.ki,0)),e.ki=[]):0!=t&&e.ki.push(t)},flush:function(e){e.ki&&0<e.ki.length&&(y(L(e.ki,0)),e.ki=[])}},Oe={Cj:function(e,t){null===t||10===t?(v(L(e.ki,0)),e.ki=[]):0!=t&&e.ki.push(t)},flush:function(e){e.ki&&0<e.ki.length&&(v(L(e.ki,0)),e.ki=[])}},ke={Bi:null,Gi:function(){return ke.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(24576==(61440&i)||4096==(61440&i))throw new ze(63);return ke.Bi||(ke.Bi={dir:{node:{zi:ke.$h.zi,pi:ke.$h.pi,Xi:ke.$h.Xi,kj:ke.$h.kj,ek:ke.$h.ek,tj:ke.$h.tj,fk:ke.$h.fk,dk:ke.$h.dk,nj:ke.$h.nj},stream:{Mi:ke.ai.Mi}},file:{node:{zi:ke.$h.zi,pi:ke.$h.pi},stream:{Mi:ke.ai.Mi,read:ke.ai.read,write:ke.ai.write,Ij:ke.ai.Ij,Wj:ke.ai.Wj,Yj:ke.ai.Yj}},link:{node:{zi:ke.$h.zi,pi:ke.$h.pi,$i:ke.$h.$i},stream:{}},Lj:{node:{zi:ke.$h.zi,pi:ke.$h.pi},stream:tt}}),16384==(61440&(i=$e(e,t,i,r)).mode)?(i.$h=ke.Bi.dir.node,i.ai=ke.Bi.dir.stream,i.Zh={}):32768==(61440&i.mode)?(i.$h=ke.Bi.file.node,i.ai=ke.Bi.file.stream,i.di=0,i.Zh=null):40960==(61440&i.mode)?(i.$h=ke.Bi.link.node,i.ai=ke.Bi.link.stream):8192==(61440&i.mode)&&(i.$h=ke.Bi.Lj.node,i.ai=ke.Bi.Lj.stream),i.timestamp=Date.now(),e&&(e.Zh[t]=i,e.timestamp=i.timestamp),i},pl:function(e){return e.Zh?e.Zh.subarray?e.Zh.subarray(0,e.di):new Uint8Array(e.Zh):new Uint8Array(0)},Pj:function(e,t){var i=e.Zh?e.Zh.length:0;i>=t||(t=Math.max(t,i*(1048576>i?2:1.125)>>>0),0!=i&&(t=Math.max(t,256)),i=e.Zh,e.Zh=new Uint8Array(t),0<e.di&&e.Zh.set(i.subarray(0,e.di),0))},Sk:function(e,t){if(e.di!=t)if(0==t)e.Zh=null,e.di=0;else{var i=e.Zh;e.Zh=new Uint8Array(t),i&&e.Zh.set(i.subarray(0,Math.min(t,e.di))),e.di=t}},$h:{zi:function(e){var t={};return t.rk=8192==(61440&e.mode)?e.id:1,t.zj=e.id,t.mode=e.mode,t.Mk=1,t.uid=0,t.zk=0,t.Zi=e.Zi,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.di:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.hk=new Date(e.timestamp),t.Lk=new Date(e.timestamp),t.lk=new Date(e.timestamp),t.ik=4096,t.jk=Math.ceil(t.size/t.ik),t},pi:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ke.Sk(e,t.size)},Xi:function(){throw je[44]},kj:function(e,t,i,r){return ke.createNode(e,t,i,r)},ek:function(e,t,i){if(16384==(61440&e.mode)){try{var r=Ue(t,i)}catch(e){}if(r)for(var n in r.Zh)throw new ze(55)}delete e.parent.Zh[e.name],e.parent.timestamp=Date.now(),e.name=i,t.Zh[i]=e,t.timestamp=e.parent.timestamp,e.parent=t},tj:function(e,t){delete e.Zh[t],e.timestamp=Date.now()},fk:function(e,t){var i,r=Ue(e,t);for(i in r.Zh)throw new ze(55);delete e.Zh[t],e.timestamp=Date.now()},dk:function(e){var t,i=[".",".."];for(t in e.Zh)e.Zh.hasOwnProperty(t)&&i.push(t);return i},nj:function(e,t,i){return(e=ke.createNode(e,t,41471,0)).link=i,e},$i:function(e){if(40960!=(61440&e.mode))throw new ze(28);return e.link}},ai:{read:function(e,t,i,r,n){var s=e.node.Zh;if(n>=e.node.di)return 0;if(8<(e=Math.min(e.node.di-n,r))&&s.subarray)t.set(s.subarray(n,n+e),i);else for(r=0;r<e;r++)t[i+r]=s[n+r];return e},write:function(e,t,i,r,n,s){if(t.buffer===_.buffer&&(s=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Zh||e.Zh.subarray)){if(s)return e.Zh=t.subarray(i,i+r),e.di=r;if(0===e.di&&0===n)return e.Zh=t.slice(i,i+r),e.di=r;if(n+r<=e.di)return e.Zh.set(t.subarray(i,i+r),n),r}if(ke.Pj(e,n+r),e.Zh.subarray&&t.subarray)e.Zh.set(t.subarray(i,i+r),n);else for(s=0;s<r;s++)e.Zh[n+s]=t[i+s];return e.di=Math.max(e.di,n+r),r},Mi:function(e,t,i){if(1===i?t+=e.position:2===i&&32768==(61440&e.node.mode)&&(t+=e.node.di),0>t)throw new ze(28);return t},Ij:function(e,t,i){ke.Pj(e.node,t+i),e.node.di=Math.max(e.node.di,t+i)},Wj:function(e,t,i,r,n,s){if(0!==t)throw new ze(28);if(32768!=(61440&e.node.mode))throw new ze(43);if(e=e.node.Zh,2&s||e.buffer!==V){if((0<r||r+i<e.length)&&(e=e.subarray?e.subarray(r,r+i):Array.prototype.slice.call(e,r,r+i)),r=!0,pe(),!(i=void 0))throw new ze(48);_.set(e,i)}else r=!1,i=e.byteOffset;return{bi:i,il:r}},Yj:function(e,t,i,r,n){if(32768!=(61440&e.node.mode))throw new ze(43);return 2&n||ke.ai.write(e,t,0,r,i,!1),0}}},Ve=null,_e={},Ne=[],Fe=1,Be=null,He=!0,Ye={},ze=null,je={};function Ge(e,t){if(t=t||{},!(e=Re("/",e)))return{path:"",node:null};var i,r={Qj:!0,Dj:0};for(i in r)void 0===t[i]&&(t[i]=r[i]);if(8<t.Dj)throw new ze(32);e=be(e.split("/").filter((function(e){return!!e})),!1);var n=Ve;for(r="/",i=0;i<e.length;i++){var s=i===e.length-1;if(s&&t.parent)break;if(n=Ue(n,e[i]),r=Te(r+"/"+e[i]),n.Yi&&(!s||s&&t.Qj)&&(n=n.Yi.root),!s||t.gj)for(s=0;40960==(61440&n.mode);)if(n=ht(r),n=Ge(r=Re(Ee(r),n),{Dj:t.Dj}).node,40<s++)throw new ze(32)}return{path:r,node:n}}function Xe(e){for(var t;;){if(e===e.parent)return e=e.Gi.Xj,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function We(e,t){for(var i=0,r=0;r<t.length;r++)i=(i<<5)-i+t.charCodeAt(r)|0;return(e+i>>>0)%Be.length}function Ue(e,t){var i;if(i=(i=Je(e,"x"))?i:e.$h.Xi?0:2)throw new ze(i,e);for(i=Be[We(e.id,t)];i;i=i.Si){var r=i.name;if(i.parent.id===e.id&&r===t)return i}return e.$h.Xi(e,t)}function $e(e,t,i,r){return t=We((e=new Ps(e,t,i,r)).parent.id,e.name),e.Si=Be[t],Be[t]=e}var Ze={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Ke(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Je(e,t){return He?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function qe(e,t){try{return Ue(e,t),20}catch(e){}return Je(e,"wx")}function Qe(e,t){xt||((xt=function(){}).prototype={});var i,r=new xt;for(i in e)r[i]=e[i];return e=r,t=function(e){for(e=e||0;e<=4096;e++)if(!Ne[e])return e;throw new ze(33)}(t),e.Ii=t,Ne[t]=e}var et,tt={open:function(e){e.ai=_e[e.node.Zi].ai,e.ai.open&&e.ai.open(e)},Mi:function(){throw new ze(70)}};function it(e,t){_e[e]={ai:t}}function rt(e,t){var i="/"===t,r=!t;if(i&&Ve)throw new ze(10);if(!i&&!r){var n=Ge(t,{Qj:!1});if(t=n.path,(n=n.node).Yi)throw new ze(10);if(16384!=(61440&n.mode))throw new ze(54)}t={type:e,xl:{},Xj:t,Kk:[]},(e=e.Gi(t)).Gi=t,t.root=e,i?Ve=e:n&&(n.Yi=t,n.Gi&&n.Gi.Kk.push(t))}function nt(e,t,i){var r=Ge(e,{parent:!0}).node;if(!(e=we(e))||"."===e||".."===e)throw new ze(28);var n=qe(r,e);if(n)throw new ze(n);if(!r.$h.kj)throw new ze(63);return r.$h.kj(r,e,t,i)}function st(e){return nt(e,16895,0)}function ot(e,t,i){return void 0===i&&(i=t,t=438),nt(e,8192|t,i)}function at(e,t){if(!Re(e))throw new ze(44);var i=Ge(t,{parent:!0}).node;if(!i)throw new ze(44);var r=qe(i,t=we(t));if(r)throw new ze(r);if(!i.$h.nj)throw new ze(63);i.$h.nj(i,t,e)}function lt(e){var t=Ge(e,{parent:!0}).node,i=we(e),r=Ue(t,i);e:{try{var n=Ue(t,i)}catch(e){n=e.ui;break e}var s=Je(t,"wx");n=s||(16384==(61440&n.mode)?31:0)}if(n)throw new ze(n);if(!t.$h.tj)throw new ze(63);if(r.Yi)throw new ze(10);try{Ye.willDeletePath&&Ye.willDeletePath(e)}catch(t){v("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}if(t.$h.tj(t,i),t=We(r.parent.id,r.name),Be[t]===r)Be[t]=r.Si;else for(t=Be[t];t;){if(t.Si===r){t.Si=r.Si;break}t=t.Si}try{Ye.onDeletePath&&Ye.onDeletePath(e)}catch(t){v("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}}function ht(e){if(!(e=Ge(e).node))throw new ze(44);if(!e.$h.$i)throw new ze(28);return Re(Xe(e.parent),e.$h.$i(e))}function ut(e,t){if(!(e="string"==typeof e?Ge(e,{gj:!0}).node:e).$h.pi)throw new ze(63);e.$h.pi(e,{mode:4095&t|-4096&e.mode,timestamp:Date.now()})}function dt(e,t,i,r){if(""===e)throw new ze(44);if("string"==typeof t){var s=Ze[t];if(void 0===s)throw Error("Unknown file open mode: "+t);t=s}if(i=64&t?4095&(void 0===i?438:i)|32768:0,"object"==typeof e)var o=e;else{e=Te(e);try{o=Ge(e,{gj:!(131072&t)}).node}catch(e){}}if(s=!1,64&t)if(o){if(128&t)throw new ze(20)}else o=nt(e,i,0),s=!0;if(!o)throw new ze(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new ze(54);if(!s&&(i=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Ke(t)||512&t)?31:Je(o,Ke(t)):44))throw new ze(i);if(512&t){if(!(i="string"==typeof(i=o)?Ge(i,{gj:!0}).node:i).$h.pi)throw new ze(63);if(16384==(61440&i.mode))throw new ze(31);if(32768!=(61440&i.mode))throw new ze(28);if(s=Je(i,"w"))throw new ze(s);i.$h.pi(i,{size:0,timestamp:Date.now()})}t&=-131713,(r=Qe({node:o,path:Xe(o),flags:t,seekable:!0,position:0,ai:o.ai,el:[],error:!1},r)).ai.open&&r.ai.open(r),!n.logReadFiles||1&t||(bt||(bt={}),e in bt||(bt[e]=1,v("FS.trackingDelegate error on read file: "+e)));try{Ye.onOpenFile&&(o=0,1!=(2097155&t)&&(o|=1),0!=(2097155&t)&&(o|=2),Ye.onOpenFile(e,o))}catch(t){v("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return r}function ct(e){if(null===e.Ii)throw new ze(8);e.yj&&(e.yj=null);try{e.ai.close&&e.ai.close(e)}catch(e){throw e}finally{Ne[e.Ii]=null}e.Ii=null}function pt(e,t,i){if(null===e.Ii)throw new ze(8);if(!e.seekable||!e.ai.Mi)throw new ze(70);if(0!=i&&1!=i&&2!=i)throw new ze(28);e.position=e.ai.Mi(e,t,i),e.el=[]}function gt(e,t,i,r,n,s){if(0>r||0>n)throw new ze(28);if(null===e.Ii)throw new ze(8);if(0==(2097155&e.flags))throw new ze(8);if(16384==(61440&e.node.mode))throw new ze(31);if(!e.ai.write)throw new ze(28);e.seekable&&1024&e.flags&&pt(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new ze(70)}else n=e.position;t=e.ai.write(e,t,i,r,n,s),o||(e.position+=t);try{e.path&&Ye.onWriteToFile&&Ye.onWriteToFile(e.path)}catch(t){v("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+t.message)}return t}function ft(){ze||((ze=function(e,t){this.node=t,this.Tk=function(e){this.ui=e},this.Tk(e),this.message="FS error"}).prototype=Error(),ze.prototype.constructor=ze,[44].forEach((function(e){je[e]=new ze(e),je[e].stack="<generic error, no stack>"})))}function yt(e,t){var i=0;return e&&(i|=365),t&&(i|=146),i}function vt(e,t){for(e="string"==typeof e?e:Xe(e),t=t.split("/").reverse();t.length;){var i=t.pop();if(i){var r=Te(e+"/"+i);try{st(r)}catch(e){}e=r}}return r}function mt(e,t,i,r,n,s){if(n=nt(e=t?Te(("string"==typeof e?e:Xe(e))+"/"+t):e,4095&(void 0!==(r=yt(r,n))?r:438)|32768,0),i){if("string"==typeof i){e=Array(i.length),t=0;for(var o=i.length;t<o;++t)e[t]=i.charCodeAt(t);i=e}ut(n,146|r),gt(e=dt(n,577),i,0,i.length,0,s),ct(e),ut(n,r)}return n}function St(e,t,i,r){e=Te(("string"==typeof e?e:Xe(e))+"/"+t),t=yt(!!i,!!r),St.Vj||(St.Vj=64);var n=St.Vj++<<8|0;return it(n,{open:function(e){e.seekable=!1},close:function(){r&&r.buffer&&r.buffer.length&&r(10)},read:function(e,t,r,n){for(var s=0,o=0;o<n;o++){try{var a=i()}catch(e){throw new ze(29)}if(void 0===a&&0===s)throw new ze(6);if(null==a)break;s++,t[r+o]=a}return s&&(e.node.timestamp=Date.now()),s},write:function(e,t,i,n){for(var s=0;s<n;s++)try{r(t[i+s])}catch(e){throw new ze(29)}return n&&(e.node.timestamp=Date.now()),s}}),ot(e,t,n)}function Pt(e){if(!(e.Uj||e.Ik||e.link||e.Zh)){if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!c)throw Error("Cannot load without read() or XMLHttpRequest.");try{e.Zh=ws(c(e.url),!0),e.di=e.Zh.length}catch(e){throw new ze(29)}}}function Ct(e,t,i,r,n){if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";i={Uj:!1,url:i};var s=function(e,t,i,r){return nt(e=Te(("string"==typeof e?e:Xe(e))+"/"+t),4095&(void 0!==(i=yt(i,r))?i:438)|32768,0)}(e,t,r,n);i.Zh?s.Zh=i.Zh:i.url&&(s.Zh=null,s.url=i.url),Object.defineProperties(s,{di:{get:function(){return this.Zh.length}}});var o={};return Object.keys(s.ai).forEach((function(e){var t=s.ai[e];o[e]=function(){return Pt(s),t.apply(null,arguments)}})),o.read=function(e,t,i,r,n){if(Pt(s),n>=(e=e.node.Zh).length)return 0;if(r=Math.min(e.length-n,r),e.slice)for(var o=0;o<r;o++)t[i+o]=e[n+o];else for(o=0;o<r;o++)t[i+o]=e.get(n+o);return r},s.ai=o,s}function At(e,t,i,r,s,o,a,l,h,u){function d(i){function d(i){u&&u(),l||mt(e,t,i,r,s,h),o&&o(),ce()}var p=!1;n.preloadPlugins.forEach((function(e){!p&&e.canHandle(c)&&(e.handle(i,c,d,(function(){a&&a(),ce()})),p=!0)})),p||d(i)}ir();var c=t?Re(Te(e+"/"+t)):e;de(),"string"==typeof i?function(e,t,i){var r="al "+e;p(e,(function(i){E(i,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(i)),r&&ce()}),(function(){if(!i)throw'Loading data file "'+e+'" failed.';i()})),r&&de()}(i,(function(e){d(e)}),a):d(i)}var xt,bt,Tt={},Et=void 0;function wt(){return H[(Et+=4)-4>>2]}function Rt(e){if(!(e=Ne[e]))throw new ze(8);return e}function Dt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?"_"+e:e}function Lt(e,t){return e=Dt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}var Mt=[],It=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ot(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Mt.length?Mt.pop():It.length;return It[t]={Ej:1,value:e},t}}function kt(e){var t=Error,i=Lt(e,(function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return i.prototype=Object.create(t.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},i}var Vt=void 0,_t=void 0;function Nt(e){for(var t="";N[e];)t+=_t[N[e++]];return t}var Ft=[];function Bt(){for(;Ft.length;){var e=Ft.pop();e.Yh.Ri=!1,e.delete()}}var Ht=void 0,Yt={},zt=void 0;function jt(e){throw new zt(e)}function Gt(e,t){for(void 0===t&&jt("ptr should not be undefined");e.li;)t=e.cj(t),e=e.li;return t}function Xt(e){return e||jt("Cannot use deleted val. handle = "+e),It[e].value}var Wt={};function Ut(e){var t=Nt(e=Is(e));return Ls(e),t}function $t(e,t){var i=Wt[e];return void 0===i&&jt(t+" has unknown type "+Ut(e)),i}function Zt(){}var Kt=!1;function Jt(e){--e.count.value,0===e.count.value&&(e.ri?e.wi.Ni(e.ri):e.ei.ci.Ni(e.bi))}function qt(e){return"undefined"==typeof FinalizationGroup?(qt=function(e){return e},e):(Kt=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next())(t=t.value).bi?Jt(t):console.warn("object already deleted: "+t.bi)})),Zt=function(e){Kt.unregister(e.Yh)},(qt=function(e){return Kt.register(e,e.Yh,e.Yh),e})(e))}function Qt(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ei={},ti={},ii=void 0;function ri(e){throw new ii(e)}function ni(e,t,i){function r(t){(t=i(t)).length!==e.length&&ri("Mismatched type converter count");for(var r=0;r<e.length;++r)si(e[r],t[r])}e.forEach((function(e){ti[e]=t}));var n=Array(t.length),s=[],o=0;t.forEach((function(e,t){Wt.hasOwnProperty(e)?n[t]=Wt[e]:(s.push(e),ei.hasOwnProperty(e)||(ei[e]=[]),ei[e].push((function(){n[t]=Wt[e],++o===s.length&&r(n)})))})),0===s.length&&r(n)}function si(e,t,i){if(i=i||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=t.name;if(e||jt('type "'+r+'" must have a positive integer typeid pointer'),Wt.hasOwnProperty(e)){if(i.Ck)return;jt("Cannot register type '"+r+"' twice")}Wt[e]=t,delete ti[e],ei.hasOwnProperty(e)&&(t=ei[e],delete ei[e],t.forEach((function(e){e()})))}function oi(e){jt(e.Yh.ei.ci.name+" instance already deleted")}function ai(){}var li={};function hi(e,t,i){if(void 0===e[t].hi){var r=e[t];e[t]=function(){return e[t].hi.hasOwnProperty(arguments.length)||jt("Function '"+i+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].hi+")!"),e[t].hi[arguments.length].apply(this,arguments)},e[t].hi=[],e[t].hi[r.Pi]=r}}function ui(e,t,i){n.hasOwnProperty(e)?((void 0===i||void 0!==n[e].hi&&void 0!==n[e].hi[i])&&jt("Cannot register public name '"+e+"' twice"),hi(n,e,e),n.hasOwnProperty(i)&&jt("Cannot register multiple overloads of a function with the same number of arguments ("+i+")!"),n[e].hi[i]=t):(n[e]=t,void 0!==i&&(n[e].wl=i))}function di(e,t,i,r,n,s,o,a){this.name=e,this.constructor=t,this.Ai=i,this.Ni=r,this.li=n,this.xk=s,this.cj=o,this.sk=a,this.bk=[]}function ci(e,t,i){for(;t!==i;)t.cj||jt("Expected null or instance of "+i.name+", got an instance of "+t.name),e=t.cj(e),t=t.li;return e}function pi(e,t){return null===t?(this.Aj&&jt("null is not a valid "+this.name),0):(t.Yh||jt('Cannot pass "'+Li(t)+'" as a '+this.name),t.Yh.bi||jt("Cannot pass deleted object as a pointer of type "+this.name),ci(t.Yh.bi,t.Yh.ei.ci,this.ci))}function gi(e,t){if(null===t){if(this.Aj&&jt("null is not a valid "+this.name),this.ij){var i=this.Qk();return null!==e&&e.push(this.Ni,i),i}return 0}if(t.Yh||jt('Cannot pass "'+Li(t)+'" as a '+this.name),t.Yh.bi||jt("Cannot pass deleted object as a pointer of type "+this.name),!this.hj&&t.Yh.ei.hj&&jt("Cannot convert argument of type "+(t.Yh.wi?t.Yh.wi.name:t.Yh.ei.name)+" to parameter type "+this.name),i=ci(t.Yh.bi,t.Yh.ei.ci,this.ci),this.ij)switch(void 0===t.Yh.ri&&jt("Passing raw pointer to smart pointer is illegal"),this.Zk){case 0:t.Yh.wi===this?i=t.Yh.ri:jt("Cannot convert argument of type "+(t.Yh.wi?t.Yh.wi.name:t.Yh.ei.name)+" to parameter type "+this.name);break;case 1:i=t.Yh.ri;break;case 2:if(t.Yh.wi===this)i=t.Yh.ri;else{var r=t.clone();i=this.Rk(i,Ot((function(){r.delete()}))),null!==e&&e.push(this.Ni,i)}break;default:jt("Unsupporting sharing policy")}return i}function fi(e,t){return null===t?(this.Aj&&jt("null is not a valid "+this.name),0):(t.Yh||jt('Cannot pass "'+Li(t)+'" as a '+this.name),t.Yh.bi||jt("Cannot pass deleted object as a pointer of type "+this.name),t.Yh.ei.hj&&jt("Cannot convert argument of type "+t.Yh.ei.name+" to parameter type "+this.name),ci(t.Yh.bi,t.Yh.ei.ci,this.ci))}function yi(e){return this.fromWireType(Y[e>>2])}function vi(e,t){return t.ei&&t.bi||ri("makeClassHandle requires ptr and ptrType"),!!t.wi!=!!t.ri&&ri("Both smartPtrType and smartPtr must be specified"),t.count={value:1},qt(Object.create(e,{Yh:{value:t}}))}function mi(e,t,i,r){this.name=e,this.ci=t,this.Aj=i,this.hj=r,this.ij=!1,this.Ni=this.Rk=this.Qk=this.ck=this.Zk=this.Ok=void 0,void 0!==t.li?this.toWireType=gi:(this.toWireType=r?pi:fi,this.yi=null)}function Si(e,t,i){n.hasOwnProperty(e)||ri("Replacing nonexistant public symbol"),void 0!==n[e].hi&&void 0!==i?n[e].hi[i]=t:(n[e]=t,n[e].Pi=i)}function Pi(e,t){var i=(e=Nt(e)).includes("j")?function(e,t){var i=[];return function(){i.length=arguments.length;for(var r=0;r<arguments.length;r++)i[r]=arguments[r];return Ae(e,t,i)}}(e,t):ee.get(t);return"function"!=typeof i&&jt("unknown function pointer with signature "+e+": "+t),i}var Ci=void 0;function Ai(e,t){var i=[],r={};throw t.forEach((function e(t){r[t]||Wt[t]||(ti[t]?ti[t].forEach(e):(i.push(t),r[t]=!0))})),new Ci(e+": "+i.map(Ut).join([", "]))}function xi(e){var t=Function;if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var i=Lt(t.name||"unknownFunctionName",(function(){}));return i.prototype=t.prototype,i=new i,(e=t.apply(i,e))instanceof Object?e:i}function bi(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ti(e,t,i,r,n){var s=t.length;2>s&&jt("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==i,a=!1;for(i=1;i<t.length;++i)if(null!==t[i]&&void 0===t[i].yi){a=!0;break}var l="void"!==t[0].name,h="",u="";for(i=0;i<s-2;++i)h+=(0!==i?", ":"")+"arg"+i,u+=(0!==i?", ":"")+"arg"+i+"Wired";e="return function "+Dt(e)+"("+h+") {\nif (arguments.length !== "+(s-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(s-2)+" args!');\n}\n",a&&(e+="var destructors = [];\n");var d=a?"destructors":"null";for(h="throwBindingError invoker fn runDestructors retType classParam".split(" "),r=[jt,r,n,bi,t[0],t[1]],o&&(e+="var thisWired = classParam.toWireType("+d+", this);\n"),i=0;i<s-2;++i)e+="var arg"+i+"Wired = argType"+i+".toWireType("+d+", arg"+i+"); // "+t[i+2].name+"\n",h.push("argType"+i),r.push(t[i+2]);if(o&&(u="thisWired"+(0<u.length?", ":"")+u),e+=(l?"var rv = ":"")+"invoker(fn"+(0<u.length?", ":"")+u+");\n",a)e+="runDestructors(destructors);\n";else for(i=o?1:2;i<t.length;++i)s=1===i?"thisWired":"arg"+(i-2)+"Wired",null!==t[i].yi&&(e+=s+"_dtor("+s+"); // "+t[i].name+"\n",h.push(s+"_dtor"),r.push(t[i].yi));return l&&(e+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h.push(e+"}\n"),xi(h).apply(null,r)}function Ei(e,t){for(var i=[],r=0;r<e;r++)i.push(H[(t>>2)+r]);return i}function wi(e,t,i){return e instanceof Object||jt(i+' with invalid "this": '+e),e instanceof t.ci.constructor||jt(i+' incompatible with "this" of type '+e.constructor.name),e.Yh.bi||jt("cannot call emscripten binding method "+i+" on deleted object"),ci(e.Yh.bi,e.Yh.ei.ci,t.ci)}function Ri(e){4<e&&0==--It[e].Ej&&(It[e]=void 0,Mt.push(e))}function Di(e,t,i){switch(t){case 0:return function(e){return this.fromWireType((i?_:N)[e])};case 1:return function(e){return this.fromWireType((i?F:B)[e>>1])};case 2:return function(e){return this.fromWireType((i?H:Y)[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Li(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Mi(e,t){switch(t){case 2:return function(e){return this.fromWireType(z[e>>2])};case 3:return function(e){return this.fromWireType(j[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Ii(e,t,i){switch(t){case 0:return i?function(e){return _[e]}:function(e){return N[e]};case 1:return i?function(e){return F[e>>1]}:function(e){return B[e>>1]};case 2:return i?function(e){return H[e>>2]}:function(e){return Y[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Oi={};function ki(e){var t=Oi[e];return void 0===t?Nt(e):t}var Vi,_i=[];function Ni(e,t){if($i=e,Zi=t,Wi)if(ji||(ji=!0),0==e)Gi=function(){var e=0|Math.max(0,Hi+t-Vi());setTimeout(Yi,e)};else if(1==e)Gi=function(){lr(Yi)};else if(2==e){if(void 0===i){var r=[];addEventListener("message",(function(e){"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),r.shift()())}),!0),i=function(e){r.push(e),postMessage("setimmediate","*")}}Gi=function(){i(Yi)}}}function Fi(e,t,i,r,s){function o(){if(a<Xi){if(!C)try{Gs(b)}catch(e){if(!(e instanceof Ys))throw e}return!1}return!0}E(!Wi,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Wi=e,Ui=r;var a=Xi;if(ji=!1,Yi=function(){if(!T)if(0<Ji.length){var t=Date.now(),i=Ji.shift();if(i.wk(i.ej),zi){var r=zi,s=0==r%1?r-1:Math.floor(r);zi=i.kl?s:(8*r+(s+.5))/9}console.log('main loop blocker "'+i.name+'" took '+(Date.now()-t)+" ms"),n.setStatus&&(t=n.statusMessage||"Please wait...",i=zi,r=qi.nl,i?i<r?n.setStatus(t+" ("+(r-i)+"/"+r+")"):n.setStatus(t):n.setStatus("")),o()&&setTimeout(Yi,0)}else o()&&(Ki=Ki+1|0,1==$i&&1<Zi&&0!=Ki%Zi?Gi():(0==$i&&(Hi=Vi()),T||n.preMainLoop&&!1===n.preMainLoop()||(Bi(e),n.postMainLoop&&n.postMainLoop()),o()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.Pk&&SDL.audio.Pk(),Gi())))},s||(t&&0<t?Ni(0,1e3/t):Ni(1,1),Gi()),i)throw"unwind"}function Bi(e,t){if(!T)if(t)e();else try{e()}catch(e){if(!(e instanceof Ys)&&"unwind"!==e)throw e&&"object"==typeof e&&e.stack&&v("exception thrown: "+[e,e.stack]),e}}Vi=function(){return performance.now()};var Hi,Yi,zi,ji=!1,Gi=null,Xi=0,Wi=null,Ui=0,$i=0,Zi=0,Ki=0,Ji=[],qi={},Qi=!1,er=!1,tr=[];function ir(){function e(){er=document.pointerLockElement===n.canvas||document.mozPointerLockElement===n.canvas||document.webkitPointerLockElement===n.canvas||document.msPointerLockElement===n.canvas}if(n.preloadPlugins||(n.preloadPlugins=[]),!pr){pr=!0;try{gr=!0}catch(e){gr=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}fr="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:gr?null:console.log("warning: no BlobBuilder"),yr="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,n.Zj||void 0!==yr||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),n.Zj=!0),n.preloadPlugins.push({canHandle:function(e){return!n.Zj&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,i,r){var s=null;if(gr)try{(s=new Blob([e],{type:hr(t)})).size!==e.length&&(s=new Blob([new Uint8Array(e).buffer],{type:hr(t)}))}catch(e){!function(e){m||(m={}),m[e]||(m[e]=1,v(e))}("Blob constructor present but fails: "+e+"; falling back to blob builder")}s||((s=new fr).append(new Uint8Array(e).buffer),s=s.getBlob());var o=yr.createObjectURL(s),a=new Image;a.onload=function(){E(a.complete,"Image "+t+" could not be decoded");var r=document.createElement("canvas");r.width=a.width,r.height=a.height,r.getContext("2d").drawImage(a,0,0),n.preloadedImages[t]=r,yr.revokeObjectURL(o),i&&i(e)},a.onerror=function(){console.log("Image "+o+" could not be decoded"),r&&r()},a.src=o}}),n.preloadPlugins.push({canHandle:function(e){return!n.vl&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,i,r){function s(r){a||(a=!0,n.preloadedAudios[t]=r,i&&i(e))}function o(){a||(a=!0,n.preloadedAudios[t]=new Audio,r&&r())}var a=!1;if(!gr)return o();try{var l=new Blob([e],{type:hr(t)})}catch(e){return o()}l=yr.createObjectURL(l);var h=new Audio;h.addEventListener("canplaythrough",(function(){s(h)}),!1),h.onerror=function(){if(!a){console.log("warning: browser could not fully decode audio "+t+", trying slower base64 approach");for(var i="",r=0,n=0,o=0;o<e.length;o++)for(r=r<<8|e[o],n+=8;6<=n;){var l=r>>n-6&63;n-=6,i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[l]}2==n?(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&r)<<4],i+="=="):4==n&&(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&r)<<2],i+="="),h.src="data:audio/x-"+t.substr(-3)+";base64,"+i,s(h)}},h.src=l,function(e){setTimeout((function(){Bi(e)}),1e4)}((function(){s(h)}))}});var t=n.canvas;t&&(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock||t.msRequestPointerLock||function(){},t.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},t.exitPointerLock=t.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",e,!1),document.addEventListener("mozpointerlockchange",e,!1),document.addEventListener("webkitpointerlockchange",e,!1),document.addEventListener("mspointerlockchange",e,!1),n.elementPointerLock&&t.addEventListener("click",(function(e){!er&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),e.preventDefault())}),!1))}}var rr=!1,nr=void 0,sr=void 0;function or(){return!!Qi&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var ar=0;function lr(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===ar)ar=t+1e3/60;else for(;t+2>=ar;)ar+=1e3/60;setTimeout(e,Math.max(ar-t,0))}}function hr(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}var ur=[];function dr(){var e=n.canvas;ur.forEach((function(t){t(e.width,e.height)}))}function cr(e,t,i){t&&i?(e.gl=t,e.Bk=i):(t=e.gl,i=e.Bk);var r=t,s=i;if(n.forcedAspectRatio&&0<n.forcedAspectRatio&&(r/s<n.forcedAspectRatio?r=Math.round(s*n.forcedAspectRatio):s=Math.round(r/n.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var o=Math.min(screen.width/r,screen.height/s);r=Math.round(r*o),s=Math.round(s*o)}sr?(e.width!=r&&(e.width=r),e.height!=s&&(e.height=s),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=i&&(e.height=i),void 0!==e.style&&(r!=t||s!=i?(e.style.setProperty("width",r+"px","important"),e.style.setProperty("height",s+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}var pr,gr,fr,yr,vr,mr=12288,Sr=!1,Pr=0,Cr=0,Ar=0,xr={alpha:!1,depth:!1,stencil:!1,antialias:!1},br={},Tr=1,Er=[],wr=[],Rr=[],Dr=[],Lr=[],Mr=[],Ir=[],Or=[],kr=[],Vr=[],_r=[],Nr=[],Fr={},Br={},Hr=4;function Yr(e){Wr||(Wr=e)}function zr(e){for(var t=Tr++,i=e.length;i<t;i++)e[i]=null;return t}function jr(e,t,i){for(var r="",n=0;n<e;++n){var s=i?H[i+4*n>>2]:-1;r+=M(H[t+4*n>>2],0>s?void 0:s)}return r}function Gr(e,t){e.Rj||(e.Rj=e.getContext,e.getContext=function(t,i){return"webgl"==t==(i=e.Rj(t,i))instanceof WebGLRenderingContext?i:null});var i=1<t.Bj?e.getContext("webgl2",t):e.getContext("webgl",t);return i?function(e,t){var i=zr(Or),r={ql:i,attributes:t,version:t.Bj,Hi:e};return e.canvas&&(e.canvas.Wi=r),Or[i]=r,(void 0===t.tk||t.tk)&&function(e){if(e||(e=Ur),!e.Fk){e.Fk=!0;var t=e.Hi;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,i){t.vertexAttribDivisorANGLE(e,i)},e.drawArraysInstanced=function(e,i,r,n){t.drawArraysInstancedANGLE(e,i,r,n)},e.drawElementsInstanced=function(e,i,r,n,s){t.drawElementsInstancedANGLE(e,i,r,n,s)})}(t),function(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)})}(t),function(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(e,i){t.drawBuffersWEBGL(e,i)})}(t),t.ml=t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),t.sl=t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"),2<=e.version&&(t.mi=t.getExtension("EXT_disjoint_timer_query_webgl2")),(2>e.version||!t.mi)&&(t.mi=t.getExtension("EXT_disjoint_timer_query")),t.ul=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}(r),i}(i,t):0}function Xr(e){Ur=Or[e],n.xi=xs=Ur&&Ur.Hi}var Wr,Ur,$r={},Zr=[],Kr=0;function Jr(){for(var e=rn.length-1;0<=e;--e)nn(e);rn=[],qr=[]}var qr=[];function Qr(e,t,i){function r(e,t){if(e.length!=t.length)return!1;for(var i in e)if(e[i]!=t[i])return!1;return!0}for(var n in qr){var s=qr[n];if(s.Gj==e&&r(s.Jj,i))return}qr.push({Gj:e,$j:t,Jj:i}),qr.sort((function(e,t){return e.$j<t.$j}))}function en(e){for(var t=0;t<qr.length;++t)qr[t].Gj==e&&(qr.splice(t,1),--t)}function tn(){if(Kr&&hn.Ji)for(var e=0;e<qr.length;++e){var t=qr[e];qr.splice(e,1),--e,t.Gj.apply(null,t.Jj)}}var rn=[];function nn(e){var t=rn[e];t.target.removeEventListener(t.ji,t.uk,t.si),rn.splice(e,1)}function sn(e){function t(t){++Kr,hn=e,tn(),e.vi(t),tn(),--Kr}if(e.ti)e.uk=t,e.target.addEventListener(e.ji,t,e.si),rn.push(e),ln||(ne.push(Jr),ln=!0);else for(var i=0;i<rn.length;++i)rn[i].target==e.target&&rn[i].ji==e.ji&&nn(i--)}function on(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""}function an(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}var ln,hn,un,dn,cn,pn,gn,fn,yn,vn,mn,Sn,Pn,Cn,An={},xn={};function bn(e){return 2<e?M(e):e}var Tn=[0,document,window];function En(e){return e=bn(e),Tn[e]||document.querySelector(e)}function wn(e){var t=Ns(),i=Bs(8),r=i+4,n=Bs(e.id.length+1);return O(e.id,n,e.id.length+1),(e=En(n))&&(H[i>>2]=e.width,H[r>>2]=e.height),i=[H[i>>2],H[r>>2]],Fs(t),i}function Rn(e,t,i){return(e=En(e))?(e.width=t,e.height=i,0):-4}function Dn(e,t,i){if(e.jl){var r=Ns(),n=Bs(e.id.length+1);O(e.id,n,e.id.length+1),Rn(n,t,i),Fs(r)}else e.width=t,e.height=i}function Ln(e,t,i){e.style.paddingLeft=e.style.paddingRight=i+"px",e.style.paddingTop=e.style.paddingBottom=t+"px"}function Mn(e){return 0>Tn.indexOf(e)?e.getBoundingClientRect():{left:0,top:0}}function In(e,t){if(0!=t.Fj||0!=t.uj){!function(e){function t(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||(document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),Dn(e,r,n),e.style.width=s,e.style.height=o,e.style.backgroundColor=a,l||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=l,e.style.paddingLeft=h,e.style.paddingRight=u,e.style.paddingTop=d,e.style.paddingBottom=c,e.style.marginLeft=p,e.style.marginRight=g,e.style.marginTop=f,e.style.marginBottom=y,document.body.style.margin=v,document.documentElement.style.overflow=m,document.body.scroll=S,e.style.Tj=P,e.Wi&&e.Wi.Hi.viewport(0,0,r,n),xn.fj&&ee.get(xn.fj)(37,0,xn.Kj))}var i=wn(e),r=i[0],n=i[1],s=e.style.width,o=e.style.height,a=e.style.backgroundColor,l=document.body.style.backgroundColor,h=e.style.paddingLeft,u=e.style.paddingRight,d=e.style.paddingTop,c=e.style.paddingBottom,p=e.style.marginLeft,g=e.style.marginRight,f=e.style.marginTop,y=e.style.marginBottom,v=document.body.style.margin,m=document.documentElement.style.overflow,S=document.body.scroll,P=e.style.Tj;document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t)}(e);var i=t.$k?innerWidth:screen.width,r=t.$k?innerHeight:screen.height,n=Mn(e),s=n.width;n=n.height;var o=wn(e),a=o[0];o=o[1],3==t.Fj?(Ln(e,(r-n)/2,(i-s)/2),i=s,r=n):2==t.Fj&&(i*o<a*r?(Ln(e,(r-(s=o*i/a))/2,0),r=s):(Ln(e,0,(i-(s=a*r/o))/2),i=s)),e.style.backgroundColor||(e.style.backgroundColor="black"),document.body.style.backgroundColor||(document.body.style.backgroundColor="black"),e.style.width=i+"px",e.style.height=r+"px",1==t.vk&&(e.style.Tj="pixelated"),s=2==t.uj?devicePixelRatio:1,0!=t.uj&&(Dn(e,i=i*s|0,r=r*s|0),e.Wi&&e.Wi.Hi.viewport(0,0,i,r))}if(e.requestFullscreen)e.requestFullscreen();else{if(!e.webkitRequestFullscreen)return an()?-3:-1;e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}return xn=t,t.fj&&ee.get(t.fj)(37,0,t.Kj),0}function On(e){if(e.requestPointerLock)e.requestPointerLock();else{if(!e.lj)return document.body.requestPointerLock||document.body.lj?-3:-1;e.lj()}return 0}function kn(e,t){j[e>>3]=t.timestamp;for(var i=0;i<t.axes.length;++i)j[e+8*i+16>>3]=t.axes[i];for(i=0;i<t.buttons.length;++i)j[e+8*i+528>>3]="object"==typeof t.buttons[i]?t.buttons[i].value:t.buttons[i];for(i=0;i<t.buttons.length;++i)H[e+4*i+1040>>2]="object"==typeof t.buttons[i]?t.buttons[i].pressed:1==t.buttons[i];H[e+1296>>2]=t.connected,H[e+1300>>2]=t.index,H[e+8>>2]=t.axes.length,H[e+12>>2]=t.buttons.length,O(t.id,e+1304,64),O(t.mapping,e+1368,64)}var Vn=[];function _n(e,t,i,r){xs.drawElements(e,t,i,r)}function Nn(e,t,i,r){for(var n=0;n<e;n++){var s=xs[i](),o=s&&zr(r);s?(s.name=o,r[o]=s):Yr(1282),H[t+4*n>>2]=o}}function Fn(e,t,i,r,n,s,o,a){t=wr[t],(e=xs[e](t,i))&&(r=a&&O(e.name,a,r),n&&(H[n>>2]=r),s&&(H[s>>2]=e.size),o&&(H[o>>2]=e.type))}function Bn(e,t){Y[e>>2]=t,Y[e+4>>2]=(t-Y[e>>2])/4294967296}function Hn(e,t,i){if(t){var r=void 0;switch(e){case 36346:r=1;break;case 36344:return void(0!=i&&1!=i&&Yr(1280));case 34814:case 36345:r=0;break;case 34466:var n=xs.getParameter(34467);r=n?n.length:0;break;case 33309:if(2>Ur.version)return void Yr(1282);r=2*(xs.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>Ur.version)return void Yr(1280);r=33307==e?3:0}if(void 0===r)switch(n=xs.getParameter(e),typeof n){case"number":r=n;break;case"boolean":r=n?1:0;break;case"string":return void Yr(1280);case"object":if(null===n)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:r=0;break;default:return void Yr(1280)}else{if(n instanceof Float32Array||n instanceof Uint32Array||n instanceof Int32Array||n instanceof Array){for(e=0;e<n.length;++e)switch(i){case 0:H[t+4*e>>2]=n[e];break;case 2:z[t+4*e>>2]=n[e];break;case 4:_[t+e>>0]=n[e]?1:0}return}try{r=0|n.name}catch(t){return Yr(1280),void v("GL_INVALID_ENUM in glGet"+i+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Yr(1280),void v("GL_INVALID_ENUM in glGet"+i+"v: Native code calling glGet"+i+"v("+e+") and it returns "+n+" of type "+typeof n+"!")}switch(i){case 1:Bn(t,r);break;case 0:H[t>>2]=r;break;case 2:z[t>>2]=r;break;case 4:_[t>>0]=r?1:0}}else Yr(1281)}function Yn(e,t,i,r){if(i){switch(typeof(t=xs.getIndexedParameter(e,t))){case"boolean":e=t?1:0;break;case"number":e=t;break;case"object":if(null===t)switch(e){case 35983:case 35368:e=0;break;default:return void Yr(1280)}else{if(!(t instanceof WebGLBuffer))return void Yr(1280);e=0|t.name}break;default:return void Yr(1280)}switch(r){case 1:Bn(i,e);break;case 0:H[i>>2]=e;break;case 2:z[i>>2]=e;break;case 4:_[i>>0]=e?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+r}}else Yr(1281)}function zn(e){var t=k(e)+1,i=Ds(t);return O(e,i,t),i}function jn(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Gn(e){var t,i=e.Oi,r=e.sj;if(!i)for(e.Oi=i={},e.gk={},t=0;t<xs.getProgramParameter(e,35718);++t){var n=xs.getActiveUniform(e,t),s=n.name;n=n.size;var o=jn(s);o=0<o?s.slice(0,o):s;var a=e.rj;for(e.rj+=n,r[o]=[n,a],s=0;s<n;++s)i[a]=s,e.gk[a++]=o}}function Xn(e){var t=xs.Nj;if(t){var i=t.Oi[e];return"number"==typeof i&&(t.Oi[e]=i=xs.getUniformLocation(t,t.gk[e]+(0<i?"["+i+"]":""))),i}Yr(1282)}function Wn(e,t,i,r){if(i)if(Gn(e=wr[e]),"number"==typeof(e=xs.getUniform(e,Xn(t)))||"boolean"==typeof e)switch(r){case 0:H[i>>2]=e;break;case 2:z[i>>2]=e}else for(t=0;t<e.length;t++)switch(r){case 0:H[i+4*t>>2]=e[t];break;case 2:z[i+4*t>>2]=e[t]}else Yr(1281)}function Un(e,t,i,r){if(i)if(e=xs.getVertexAttrib(e,t),34975==t)H[i>>2]=e&&e.name;else if("number"==typeof e||"boolean"==typeof e)switch(r){case 0:H[i>>2]=e;break;case 2:z[i>>2]=e;break;case 5:H[i>>2]=Math.fround(e)}else for(t=0;t<e.length;t++)switch(r){case 0:H[i+4*t>>2]=e[t];break;case 2:z[i+4*t>>2]=e[t];break;case 5:H[i+4*t>>2]=Math.fround(e[t])}else Yr(1281)}function $n(e){return 0==(e-=5120)?_:1==e?N:2==e?F:4==e?H:6==e?z:5==e||28922==e||28520==e||30779==e||30782==e?Y:B}function Zn(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Kn(e,t,i,r,n){var s=Zn(e=$n(e)),o=Hr;return e.subarray(n>>s,n+r*(i*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[t-6402]||1)*(1<<s)+o-1&-o)>>s)}var Jn=[],qn=[];function Qn(e,t,i,r,n,s){dn||(dn=Ds(256)),sn(e={target:En(e),ji:s,ti:r,vi:function(e){var i=(e=e||event).target.id?e.target.id:"",s=dn;O(on(e.target),s+0,128),O(i,s+128,128),ee.get(r)(n,s,t)&&e.preventDefault()},si:i})}function es(e,t,i,r,n){pn||(pn=Ds(280)),sn({target:e,ji:n,ti:r,vi:function(e){e=e||event;var i=pn,n=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,s=!!n;H[i>>2]=s,H[i+4>>2]=an();var o=s?n:cn,a=o&&o.id?o.id:"";O(on(o),i+8,128),O(a,i+136,128),H[i+264>>2]=o?o.clientWidth:0,H[i+268>>2]=o?o.clientHeight:0,H[i+272>>2]=screen.width,H[i+276>>2]=screen.height,s&&(cn=n),ee.get(r)(19,i,t)&&e.preventDefault()},si:i})}function ts(e,t,i,r,n){gn||(gn=Ds(1432)),sn(t={target:En(2),Ji:!0,ji:n,ti:i,vi:function(t){t=t||event;var n=gn;kn(n,t.gamepad),ee.get(i)(r,n,e)&&t.preventDefault()},si:t})}function is(e,t,i,r,n,s){fn||(fn=Ds(164)),sn(e={target:En(e),Ji:!0,ji:s,ti:r,vi:function(e){var i=fn,s=i>>2;H[s]=e.location,H[s+1]=e.ctrlKey,H[s+2]=e.shiftKey,H[s+3]=e.altKey,H[s+4]=e.metaKey,H[s+5]=e.repeat,H[s+6]=e.charCode,H[s+7]=e.keyCode,H[s+8]=e.which,O(e.key||"",i+36,32),O(e.code||"",i+68,32),O(e.char||"",i+100,32),O(e.locale||"",i+132,32),ee.get(r)(n,i,t)&&e.preventDefault()},si:i})}function rs(e,t,i){H[e>>=2]=t.screenX,H[e+1]=t.screenY,H[e+2]=t.clientX,H[e+3]=t.clientY,H[e+4]=t.ctrlKey,H[e+5]=t.shiftKey,H[e+6]=t.altKey,H[e+7]=t.metaKey,F[2*e+16]=t.button,F[2*e+17]=t.buttons,H[e+9]=t.movementX,H[e+10]=t.movementY,i=Mn(i),H[e+11]=t.clientX-i.left,H[e+12]=t.clientY-i.top}function ns(e,t,i,r,n,s){yn||(yn=Ds(64)),sn({target:e=En(e),Ji:"mousemove"!=s&&"mouseenter"!=s&&"mouseleave"!=s,ji:s,ti:r,vi:function(i){i=i||event,rs(yn,i,e),ee.get(r)(n,yn,t)&&i.preventDefault()},si:i})}function ss(e,t,i,r,n){vn||(vn=Ds(260)),sn({target:e,ji:n,ti:r,vi:function(e){e=e||event;var i=vn,n=document.pointerLockElement||document.dj||document.hl||document.Hj;H[i>>2]=!!n;var s=n&&n.id?n.id:"";O(on(n),i+4,128),O(s,i+132,128),ee.get(r)(20,i,t)&&e.preventDefault()},si:i})}function os(e,t,i,r,n,s){Sn||(Sn=Ds(1684)),sn({target:e=En(e),Ji:"touchstart"==s||"touchend"==s,ji:s,ti:r,vi:function(i){for(var s={},o=i.touches,a=0;a<o.length;++a){var l=o[a];s[l.identifier]=l}for(o=i.changedTouches,a=0;a<o.length;++a)(l=o[a]).Hk=1,s[l.identifier]=l;for(o=i.targetTouches,a=0;a<o.length;++a)s[o[a].identifier].Nk=1;H[1+(l=(o=Sn)>>2)]=i.ctrlKey,H[l+2]=i.shiftKey,H[l+3]=i.altKey,H[l+4]=i.metaKey,l+=5;var h=Mn(e),u=0;for(a in s){var d=s[a];if(H[l]=d.identifier,H[l+1]=d.screenX,H[l+2]=d.screenY,H[l+3]=d.clientX,H[l+4]=d.clientY,H[l+5]=d.pageX,H[l+6]=d.pageY,H[l+7]=d.Hk,H[l+8]=d.Nk,H[l+9]=d.clientX-h.left,H[l+10]=d.clientY-h.top,l+=13,31<++u)break}H[o>>2]=u,ee.get(r)(n,o,t)&&i.preventDefault()},si:i})}var as,ls=[];function hs(e,t){Y[e>>2]=t,Y[e+4>>2]=t/4294967296|0}function us(e,t,i,r,n){function s(t){var i=0,r=0;t&&(r=P.response?P.response.byteLength:0,i=Ds(r),N.set(new Uint8Array(P.response),i)),Y[e+12>>2]=i,hs(e+16,r)}var o=Y[e+8>>2];if(o){var a=M(o),l=e+112,h=M(l);h||(h="GET");var u=Y[l+52>>2],d=Y[l+56>>2],c=!!Y[l+60>>2],p=Y[l+68>>2],g=Y[l+72>>2];o=Y[l+76>>2];var f=Y[l+80>>2],y=Y[l+84>>2];l=Y[l+88>>2];var v=!!(1&u),m=!!(2&u);u=!!(64&u),p=p?M(p):void 0,g=g?M(g):void 0;var S=f?M(f):void 0,P=new XMLHttpRequest;if(P.withCredentials=c,P.open(h,a,!u,p,g),u||(P.timeout=d),P.dj=a,P.responseType="arraybuffer",f&&P.overrideMimeType(S),o)for(;(h=Y[o>>2])&&(a=Y[o+4>>2]);)o+=8,h=M(h),a=M(a),P.setRequestHeader(h,a);ls.push(P),Y[e+0>>2]=ls.length,o=y&&l?N.slice(y,y+l):null,P.onload=function(r){s(v&&!m);var n=P.response?P.response.byteLength:0;hs(e+24,0),n&&hs(e+32,n),B[e+40>>1]=P.readyState,B[e+42>>1]=P.status,P.statusText&&O(P.statusText,e+44,64),200<=P.status&&300>P.status?t&&t(e,P,r):i&&i(e,P,r)},P.onerror=function(t){s(v);var r=P.status;hs(e+24,0),hs(e+32,P.response?P.response.byteLength:0),B[e+40>>1]=P.readyState,B[e+42>>1]=r,i&&i(e,P,t)},P.ontimeout=function(t){i&&i(e,P,t)},P.onprogress=function(t){var i=v&&m&&P.response?P.response.byteLength:0,n=0;v&&m&&(n=Ds(i),N.set(new Uint8Array(P.response),n)),Y[e+12>>2]=n,hs(e+16,i),hs(e+24,t.loaded-i),hs(e+32,t.total),B[e+40>>1]=P.readyState,3<=P.readyState&&0===P.status&&0<t.loaded&&(P.status=200),B[e+42>>1]=P.status,P.statusText&&O(P.statusText,e+44,64),r&&r(e,P,t),n&&Ls(n)},P.onreadystatechange=function(t){B[e+40>>1]=P.readyState,2<=P.readyState&&(B[e+42>>1]=P.status),n&&n(e,P,t)};try{P.send(o)}catch(t){i&&i(e,P,t)}}else i(e,0,"no url specified!")}function ds(e,t,i,r){var n=as;if(n){var s=Y[e+112+64>>2];s||(s=Y[e+8>>2]);var o=M(s);try{var a=n.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);a.onsuccess=function(){B[e+40>>1]=4,B[e+42>>1]=200,O("OK",e+44,64),i(e,0,o)},a.onerror=function(t){B[e+40>>1]=4,B[e+42>>1]=413,O("Payload Too Large",e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}var cs,ps={};function gs(){if(!cs){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(e in ps)void 0===ps[e]?delete t[e]:t[e]=ps[e];var i=[];for(e in t)i.push(e+"="+t[e]);cs=i}return cs}function fs(e){return 0==e%4&&(0!=e%100||0==e%400)}function ys(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var vs=[31,29,31,30,31,30,31,31,30,31,30,31],ms=[31,28,31,30,31,30,31,31,30,31,30,31];function Ss(e,t){for(e=new Date(e.getTime());0<t;){var i=e.getMonth(),r=(fs(e.getFullYear())?vs:ms)[i];if(!(t>r-e.getDate())){e.setDate(e.getDate()+t);break}t-=r-e.getDate()+1,e.setDate(1),11>i?e.setMonth(i+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Ps(e,t,i,r){e||(e=this),this.parent=e,this.Gi=e.Gi,this.Yi=null,this.id=Fe++,this.name=t,this.mode=i,this.$h={},this.ai={},this.Zi=r}Object.defineProperties(Ps.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},Ik:{get:function(){return 16384==(61440&this.mode)}},Uj:{get:function(){return 8192==(61440&this.mode)}}}),ft(),Be=Array(4096),rt(ke,"/"),st("/tmp"),st("/home"),st("/home/web_user"),function(){st("/dev"),it(259,{read:function(){return 0},write:function(e,t,i,r){return r}}),ot("/dev/null",259),Le(1280,Ie),Le(1536,Oe),ot("/dev/tty",1280),ot("/dev/tty1",1536);var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){pe("randomDevice")}}();St("/dev","random",e),St("/dev","urandom",e),st("/dev/shm"),st("/dev/shm/tmp")}(),function(){st("/proc");var e=st("/proc/self");st("/proc/self/fd"),rt({Gi:function(){var t=$e(e,"fd",16895,73);return t.$h={Xi:function(e,t){var i=Ne[+t];if(!i)throw new ze(8);return(e={parent:null,Gi:{Xj:"fake"},$h:{$i:function(){return i.path}}}).parent=e}},t}},"/proc/self/fd")}(),n.FS_createPath=vt,n.FS_createDataFile=mt,n.FS_createPreloadedFile=At,n.FS_createLazyFile=Ct,n.FS_createDevice=St,n.FS_unlink=lt,n.count_emval_handles=function(){for(var e=0,t=5;t<It.length;++t)void 0!==It[t]&&++e;return e},n.get_first_emval=function(){for(var e=5;e<It.length;++e)if(void 0!==It[e])return It[e];return null},Vt=n.PureVirtualError=kt("PureVirtualError");for(var Cs=Array(256),As=0;256>As;++As)Cs[As]=String.fromCharCode(As);_t=Cs,n.getInheritedInstanceCount=function(){return Object.keys(Yt).length},n.getLiveInheritedInstances=function(){var e,t=[];for(e in Yt)Yt.hasOwnProperty(e)&&t.push(Yt[e]);return t},n.flushPendingDeletes=Bt,n.setDelayFunction=function(e){Ht=e,Ft.length&&Ht&&Ht(Bt)},zt=n.BindingError=kt("BindingError"),ii=n.InternalError=kt("InternalError"),ai.prototype.isAliasOf=function(e){if(!(this instanceof ai&&e instanceof ai))return!1;var t=this.Yh.ei.ci,i=this.Yh.bi,r=e.Yh.ei.ci;for(e=e.Yh.bi;t.li;)i=t.cj(i),t=t.li;for(;r.li;)e=r.cj(e),r=r.li;return t===r&&i===e},ai.prototype.clone=function(){if(this.Yh.bi||oi(this),this.Yh.Ui)return this.Yh.count.value+=1,this;var e=qt,t=Object,i=t.create,r=Object.getPrototypeOf(this),n=this.Yh;return(e=e(i.call(t,r,{Yh:{value:{count:n.count,Ri:n.Ri,Ui:n.Ui,bi:n.bi,ei:n.ei,ri:n.ri,wi:n.wi}}}))).Yh.count.value+=1,e.Yh.Ri=!1,e},ai.prototype.delete=function(){this.Yh.bi||oi(this),this.Yh.Ri&&!this.Yh.Ui&&jt("Object already scheduled for deletion"),Zt(this),Jt(this.Yh),this.Yh.Ui||(this.Yh.ri=void 0,this.Yh.bi=void 0)},ai.prototype.isDeleted=function(){return!this.Yh.bi},ai.prototype.deleteLater=function(){return this.Yh.bi||oi(this),this.Yh.Ri&&!this.Yh.Ui&&jt("Object already scheduled for deletion"),Ft.push(this),1===Ft.length&&Ht&&Ht(Bt),this.Yh.Ri=!0,this},mi.prototype.yk=function(e){return this.ck&&(e=this.ck(e)),e},mi.prototype.Oj=function(e){this.Ni&&this.Ni(e)},mi.prototype.argPackAdvance=8,mi.prototype.readValueFromPointer=yi,mi.prototype.deleteObject=function(e){null!==e&&e.delete()},mi.prototype.fromWireType=function(e){function t(){return this.ij?vi(this.ci.Ai,{ei:this.Ok,bi:i,wi:this,ri:e}):vi(this.ci.Ai,{ei:this,bi:e})}var i=this.yk(e);if(!i)return this.Oj(e),null;var r=function(e,t){return t=Gt(e,t),Yt[t]}(this.ci,i);if(void 0!==r)return 0===r.Yh.count.value?(r.Yh.bi=i,r.Yh.ri=e,r.clone()):(r=r.clone(),this.Oj(e),r);if(r=this.ci.xk(i),!(r=li[r]))return t.call(this);r=this.hj?r.kk:r.pointerType;var n=function e(t,i,r){return i===r?t:void 0===r.li||null===(t=e(t,i,r.li))?null:r.sk(t)}(i,this.ci,r.ci);return null===n?t.call(this):this.ij?vi(r.ci.Ai,{ei:r,bi:n,wi:this,ri:e}):vi(r.ci.Ai,{ei:r,bi:n})},Ci=n.UnboundTypeError=kt("UnboundTypeError"),n.requestFullscreen=function(e,t){!function(e,t){function i(){Qi=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=or,nr&&r.requestPointerLock(),Qi=!0,sr?("undefined"!=typeof SDL&&(H[SDL.screen>>2]=8388608|Y[SDL.screen>>2]),cr(n.canvas),dr()):cr(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),sr?("undefined"!=typeof SDL&&(H[SDL.screen>>2]=-8388609&Y[SDL.screen>>2]),cr(n.canvas),dr()):cr(r)),n.onFullScreen&&n.onFullScreen(Qi),n.onFullscreen&&n.onFullscreen(Qi)}void 0===(nr=e)&&(nr=!0),void 0===(sr=t)&&(sr=!1);var r=n.canvas;rr||(rr=!0,document.addEventListener("fullscreenchange",i,!1),document.addEventListener("mozfullscreenchange",i,!1),document.addEventListener("webkitfullscreenchange",i,!1),document.addEventListener("MSFullscreenChange",i,!1));var s=document.createElement("div");r.parentNode.insertBefore(s,r),s.appendChild(r),s.requestFullscreen=s.requestFullscreen||s.mozRequestFullScreen||s.msRequestFullscreen||(s.webkitRequestFullscreen?function(){s.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(s.webkitRequestFullScreen?function(){s.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),s.requestFullscreen()}(e,t)},n.requestAnimationFrame=function(e){lr(e)},n.setCanvasSize=function(e,t,i){cr(n.canvas,e,t),i||dr()},n.pauseMainLoop=function(){Gi=null,Xi++},n.resumeMainLoop=function(){Xi++;var e=$i,t=Zi,i=Wi;Wi=null,Fi(i,0,!1,Ui,!0),Ni(e,t),Gi()},n.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},n.createContext=function(e,t,i,r){return function(e,t,i,r){if(t&&n.xi&&e==n.canvas)return n.xi;var s;if(t){var o={antialias:!1,alpha:!1,Bj:"undefined"!=typeof WebGL2RenderingContext?2:1};if(r)for(var a in r)o[a]=r[a];if(void 0!==$r&&(s=Gr(e,o)))var l=Or[s].Hi}else l=e.getContext("2d");return l?(i&&(t||E(void 0===xs,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),n.xi=l,t&&Xr(s),n.fl=t,tr.forEach((function(e){e()})),ir()),l):null}(e,t,i,r)};for(var xs,bs=0;32>bs;++bs)Vn.push(Array(bs));var Ts=new Float32Array(288);for(bs=0;288>bs;++bs)Jn[bs]=Ts.subarray(0,bs+1);var Es=new Int32Array(288);for(bs=0;288>bs;++bs)qn[bs]=Es.subarray(0,bs+1);function ws(e,t){var i=Array(k(e)+1);return e=I(e,i,0,i.length),t&&(i.length=e),i}!function(e,t){try{var i=indexedDB.open("emscripten_filesystem",1)}catch(e){return void t()}i.onupgradeneeded=function(e){(e=e.target.result).objectStoreNames.contains("FILES")&&e.deleteObjectStore("FILES"),e.createObjectStore("FILES")},i.onsuccess=function(e){!function(e){as=e,ce()}(e.target.result)},i.onerror=function(e){t()}}(0,(function(){as=!1,ce()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||de();var Rs={e:function(e){return Ds(e+16)+16},f:function(e,t,i){throw new xe(e).Ek(t,i),e},xb:function(e,t){!function(){function e(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}if(!Se){Se=!0;var t=(new Date).getFullYear(),i=new Date(t,0,1),r=new Date(t,6,1);t=i.getTimezoneOffset();var n=r.getTimezoneOffset(),s=Math.max(t,n);H[_s()>>2]=60*s,H[Vs()>>2]=Number(t!=n),i=e(i),r=e(r),i=J(i),r=J(r),n<t?(H[ks()>>2]=i,H[ks()+4>>2]=r):(H[ks()>>2]=r,H[ks()+4>>2]=i)}}(),e=new Date(1e3*H[e>>2]),H[t>>2]=e.getSeconds(),H[t+4>>2]=e.getMinutes(),H[t+8>>2]=e.getHours(),H[t+12>>2]=e.getDate(),H[t+16>>2]=e.getMonth(),H[t+20>>2]=e.getFullYear()-1900,H[t+24>>2]=e.getDay();var i=new Date(e.getFullYear(),0,1);H[t+28>>2]=(e.getTime()-i.getTime())/864e5|0,H[t+36>>2]=-60*e.getTimezoneOffset();var r=new Date(e.getFullYear(),6,1).getTimezoneOffset();return e=0|(r!=(i=i.getTimezoneOffset())&&e.getTimezoneOffset()==Math.min(i,r)),H[t+32>>2]=e,e=H[ks()+(e?4:0)>>2],H[t+40>>2]=e,t},tb:function(){return 0},ga:function(e,t,i){Et=i;try{var r=Rt(e);switch(t){case 0:var n=wt();return 0>n?-28:dt(r.path,r.flags,0,n).Ii;case 1:case 2:return 0;case 3:return r.flags;case 4:return n=wt(),r.flags|=n,0;case 12:return n=wt(),F[n+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return H[Ms()>>2]=28,-1;default:return-28}}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},zb:function(e,t,i){Et=i;try{var r=Rt(e);switch(t){case 21509:case 21505:return r.fi?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.fi?0:-59;case 21519:if(!r.fi)return-59;var n=wt();return H[n>>2]=0;case 21520:return r.fi?-28:-59;case 21531:if(e=n=wt(),!r.ai.Gk)throw new ze(59);return r.ai.Gk(r,t,e);case 21523:case 21524:return r.fi?0:-59;default:pe("bad ioctl syscall "+t)}}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},Bb:function(e,t,i){Et=i;try{return dt(M(e),t,i?wt():0).Ii}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},Ab:function(e,t){try{e=M(e);e:{try{var i=Ge(e,{gj:!0}).node;if(!i)throw new ze(44);if(!i.$h.zi)throw new ze(63);var r=i.$h.zi(i)}catch(t){if(t&&t.node&&Te(e)!==Te(Xe(t.node))){var n=-54;break e}throw t}H[t>>2]=r.rk,H[t+4>>2]=0,H[t+8>>2]=r.zj,H[t+12>>2]=r.mode,H[t+16>>2]=r.Mk,H[t+20>>2]=r.uid,H[t+24>>2]=r.zk,H[t+28>>2]=r.Zi,H[t+32>>2]=0,me=[r.size>>>0,(ve=r.size,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[t+40>>2]=me[0],H[t+44>>2]=me[1],H[t+48>>2]=4096,H[t+52>>2]=r.jk,H[t+56>>2]=r.hk.getTime()/1e3|0,H[t+60>>2]=0,H[t+64>>2]=r.Lk.getTime()/1e3|0,H[t+68>>2]=0,H[t+72>>2]=r.lk.getTime()/1e3|0,H[t+76>>2]=0,me=[r.zj>>>0,(ve=r.zj,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[t+80>>2]=me[0],H[t+84>>2]=me[1],n=0}return n}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},r:function(e,t,i){e=Nt(e),t=$t(t,"wrapper"),i=Xt(i);var r=[].slice,n=t.ci,s=n.Ai,o=n.li.Ai,a=n.li.constructor;for(var l in e=Lt(e,(function(){n.li.bk.forEach(function(e){if(this[e]===o[e])throw new Vt("Pure virtual function "+e+" must be implemented in JavaScript")}.bind(this)),Object.defineProperty(this,"__parent",{value:s}),this.__construct.apply(this,r.call(arguments))})),s.__construct=function(){this===s&&jt("Pass correct 'this' to __construct");var e=a.implement.apply(void 0,[this].concat(r.call(arguments)));Zt(e);var t=e.Yh;e.notifyOnDestruction(),t.Ui=!0,Object.defineProperties(this,{Yh:{value:t}}),qt(this),e=t.bi,e=Gt(n,e),Yt.hasOwnProperty(e)?jt("Tried to register registered instance: "+e):Yt[e]=this},s.__destruct=function(){this===s&&jt("Pass correct 'this' to __destruct"),Zt(this);var e=this.Yh.bi;e=Gt(n,e),Yt.hasOwnProperty(e)?delete Yt[e]:jt("Tried to unregister unregistered instance: "+e)},e.prototype=Object.create(s),i)e.prototype[l]=i[l];return Ot(e)},nb:function(){},Xg:function(e,t,i,r,n){var s=Qt(i);si(e,{name:t=Nt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:8,readValueFromPointer:function(e){if(1===i)var r=_;else if(2===i)r=F;else{if(4!==i)throw new TypeError("Unknown boolean type size: "+t);r=H}return this.fromWireType(r[e>>s])},yi:null})},b:function(e,t,i,r,n,s,o,a,l,h,u,d,c){u=Nt(u),s=Pi(n,s),a&&(a=Pi(o,a)),h&&(h=Pi(l,h)),c=Pi(d,c);var p=Dt(u);ui(p,(function(){Ai("Cannot construct "+u+" due to unbound types",[r])})),ni([e,t,i],r?[r]:[],(function(t){if(t=t[0],r)var i=t.ci,n=i.Ai;else n=ai.prototype;t=Lt(p,(function(){if(Object.getPrototypeOf(this)!==o)throw new zt("Use 'new' to construct "+u);if(void 0===l.Ki)throw new zt(u+" has no accessible constructor");var e=l.Ki[arguments.length];if(void 0===e)throw new zt("Tried to invoke ctor of "+u+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.Ki).toString()+") parameters instead!");return e.apply(this,arguments)}));var o=Object.create(n,{constructor:{value:t}});t.prototype=o;var l=new di(u,t,o,c,i,s,a,h);i=new mi(u,l,!0,!1),n=new mi(u+"*",l,!1,!1);var d=new mi(u+" const*",l,!1,!0);return li[e]={pointerType:n,kk:d},Si(p,t),[i,n,d]}))},c:function(e,t,i,r,n,s,o){var a=Ei(i,r);t=Nt(t),s=Pi(n,s),ni([],[e],(function(e){function r(){Ai("Cannot call "+n+" due to unbound types",a)}var n=(e=e[0]).name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var l=e.ci.constructor;return void 0===l[t]?(r.Pi=i-1,l[t]=r):(hi(l,t,n),l[t].hi[i-1]=r),ni([],a,(function(e){return e=Ti(n,[e[0],null].concat(e.slice(1)),null,s,o),void 0===l[t].hi?(e.Pi=i-1,l[t]=e):l[t].hi[i-1]=e,[]})),[]}))},g:function(e,t,i,r,n,s){E(0<t);var o=Ei(t,i);n=Pi(r,n);var a=[s],l=[];ni([],[e],(function(e){var i="constructor "+(e=e[0]).name;if(void 0===e.ci.Ki&&(e.ci.Ki=[]),void 0!==e.ci.Ki[t-1])throw new zt("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.ci.Ki[t-1]=function(){Ai("Cannot construct "+e.name+" due to unbound types",o)},ni([],o,(function(r){return e.ci.Ki[t-1]=function(){arguments.length!==t-1&&jt(i+" called with "+arguments.length+" arguments, expected "+(t-1)),l.length=0,a.length=t;for(var e=1;e<t;++e)a[e]=r[e].toWireType(l,arguments[e-1]);return e=n.apply(null,a),bi(l),r[0].fromWireType(e)},[]})),[]}))},a:function(e,t,i,r,n,s,o,a){var l=Ei(i,r);t=Nt(t),s=Pi(n,s),ni([],[e],(function(e){function r(){Ai("Cannot call "+n+" due to unbound types",l)}var n=(e=e[0]).name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.ci.bk.push(t);var h=e.ci.Ai,u=h[t];return void 0===u||void 0===u.hi&&u.className!==e.name&&u.Pi===i-2?(r.Pi=i-2,r.className=e.name,h[t]=r):(hi(h,t,n),h[t].hi[i-2]=r),ni([],l,(function(r){return r=Ti(n,r,e,s,o),void 0===h[t].hi?(r.Pi=i-2,h[t]=r):h[t].hi[i-2]=r,[]})),[]}))},d:function(e,t,i,r,n,s,o,a,l,h){t=Nt(t),n=Pi(r,n),ni([],[e],(function(e){var r=(e=e[0]).name+"."+t,u={get:function(){Ai("Cannot access "+r+" due to unbound types",[i,o])},enumerable:!0,configurable:!0};return u.set=l?function(){Ai("Cannot access "+r+" due to unbound types",[i,o])}:function(){jt(r+" is a read-only property")},Object.defineProperty(e.ci.Ai,t,u),ni([],l?[i,o]:[i],(function(i){var o=i[0],u={get:function(){var t=wi(this,e,r+" getter");return o.fromWireType(n(s,t))},enumerable:!0};if(l){l=Pi(a,l);var d=i[1];u.set=function(t){var i=wi(this,e,r+" setter"),n=[];l(h,i,d.toWireType(n,t)),bi(n)}}return Object.defineProperty(e.ci.Ai,t,u),[]})),[]}))},Wg:function(e,t){si(e,{name:t=Nt(t),fromWireType:function(e){var t=It[e].value;return Ri(e),t},toWireType:function(e,t){return Ot(t)},argPackAdvance:8,readValueFromPointer:yi,yi:null})},j:function(e,t,i,r){function n(){}i=Qt(i),t=Nt(t),n.values={},si(e,{name:t,constructor:n,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:Di(t,i,r),yi:null}),ui(t,n)},i:function(e,t,i){var r=$t(e,"enum");t=Nt(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:i},constructor:{value:Lt(r.name+"_"+t,(function(){}))}}),e.values[i]=r,e[t]=r},ma:function(e,t,i){i=Qt(i),si(e,{name:t=Nt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Li(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:Mi(t,i),yi:null})},l:function(e,t,i,r,n,s){var o=Ei(t,i);e=Nt(e),n=Pi(r,n),ui(e,(function(){Ai("Cannot call "+e+" due to unbound types",o)}),t-1),ni([],o,(function(i){return Si(e,Ti(e,[i[0],null].concat(i.slice(1)),null,n,s),t-1),[]}))},t:function(e,t,i,r,n){function s(e){return e}t=Nt(t),-1===n&&(n=4294967295);var o=Qt(i);if(0===r){var a=32-8*i;s=function(e){return e<<a>>>a}}var l=t.includes("unsigned");si(e,{name:t,fromWireType:s,toWireType:function(e,i){if("number"!=typeof i&&"boolean"!=typeof i)throw new TypeError('Cannot convert "'+Li(i)+'" to '+this.name);if(i<r||i>n)throw new TypeError('Passing a number "'+Li(i)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+n+"]!");return l?i>>>0:0|i},argPackAdvance:8,readValueFromPointer:Ii(t,o,0!==r),yi:null})},p:function(e,t,i){function r(e){var t=Y;return new n(V,t[1+(e>>=2)],t[e])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];si(e,{name:i=Nt(i),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Ck:!0})},na:function(e,t){var i="std::string"===(t=Nt(t));si(e,{name:t,fromWireType:function(e){var t=Y[e>>2];if(i)for(var r=e+4,n=0;n<=t;++n){var s=e+4+n;if(n==t||0==N[s]){if(r=M(r,s-r),void 0===o)var o=r;else o+=String.fromCharCode(0),o+=r;r=s+1}}else{for(o=Array(t),n=0;n<t;++n)o[n]=String.fromCharCode(N[e+4+n]);o=o.join("")}return Ls(e),o},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||jt("Cannot pass non-string to std::string");var n=(i&&r?function(){return k(t)}:function(){return t.length})(),s=Ds(4+n+1);if(Y[s>>2]=n,i&&r)O(t,s+4,n+1);else if(r)for(r=0;r<n;++r){var o=t.charCodeAt(r);255<o&&(Ls(s),jt("String has UTF-16 code units that do not fit in 8 bits")),N[s+4+r]=o}else for(r=0;r<n;++r)N[s+4+r]=t[r];return null!==e&&e.push(Ls,s),s},argPackAdvance:8,readValueFromPointer:yi,yi:function(e){Ls(e)}})},T:function(e,t,i){if(i=Nt(i),2===t)var r=X,n=W,s=U,o=function(){return B},a=1;else 4===t&&(r=$,n=Z,s=K,o=function(){return Y},a=2);si(e,{name:i,fromWireType:function(e){for(var i,n=Y[e>>2],s=o(),l=e+4,h=0;h<=n;++h){var u=e+4+h*t;h!=n&&0!=s[u>>a]||(l=r(l,u-l),void 0===i?i=l:(i+=String.fromCharCode(0),i+=l),l=u+t)}return Ls(e),i},toWireType:function(e,r){"string"!=typeof r&&jt("Cannot pass non-string to C++ string type "+i);var o=s(r),l=Ds(4+o+t);return Y[l>>2]=o>>a,n(r,l+4,o+t),null!==e&&e.push(Ls,l),l},argPackAdvance:8,readValueFromPointer:yi,yi:function(e){Ls(e)}})},Yg:function(e,t){si(e,{Jk:!0,name:t=Nt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},Zg:function(e){delete ls[e-1]},sb:function(){throw"longjmp"},X:function(e,t,i,r,n){e=_i[e],t=Xt(t),i=ki(i);var s=[];return H[r>>2]=Ot(s),e(t,i,s,n)},F:function(e,t,i,r){(e=_i[e])(t=Xt(t),i=ki(i),null,r)},Ra:Ri,z:function(e,t){for(var i=(t=function(e,t){for(var i=Array(e),r=0;r<e;++r)i[r]=$t(H[(t>>2)+r],"parameter "+r);return i}(e,t))[0],r=i.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",n=["retType"],s=[i],o="",a=0;a<e-1;++a)o+=(0!==a?", ":"")+"arg"+a,n.push("argType"+a),s.push(t[1+a]);r="return function "+Dt("methodCaller_"+r)+"(handle, name, destructors, args) {\n";var l=0;for(a=0;a<e-1;++a)r+=" var arg"+a+" = argType"+a+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=t[a+1].argPackAdvance;for(r+=" var rv = handle[name]("+o+");\n",a=0;a<e-1;++a)t[a+1].deleteObject&&(r+=" argType"+a+".deleteObject(arg"+a+");\n");return i.Jk||(r+=" return retType.toWireType(destructors, rv);\n"),n.push(r+"};\n"),function(e){var t=_i.length;return _i.push(e),t}(e=xi(n).apply(null,s))},Sa:function(e){4<e&&(It[e].Ej+=1)},Qa:function(e){bi(It[e].value),Ri(e)},A:function(e,t){return Ot(e=(e=$t(e,"_emval_take_value")).readValueFromPointer(t))},C:function(){pe()},D:function(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return H[Ms()>>2]=28,-1;e=Vi()}return H[t>>2]=e/1e3|0,H[t+4>>2]=e%1e3*1e6|0,0},Ta:function(e,t){return e-t},bh:function(){pe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},rh:function(e){return 12448==e?(mr=12288,1):(mr=12300,0)},uh:function(e,t,i,r,n){if(62e3!=e)mr=12296,i=0;else{if(t)for(;;){if(12321==(e=H[t>>2]))xr.alpha=0<H[t+4>>2];else if(12325==e)xr.depth=0<H[t+4>>2];else if(12326==e)xr.stencil=0<H[t+4>>2];else if(12337==e)e=H[t+4>>2],xr.antialias=0<e;else if(12338==e)e=H[t+4>>2],xr.antialias=1==e;else if(12544==e)xr.rl=12547!=H[t+4>>2];else if(12344==e)break;t+=8}i&&r||n?(n&&(H[n>>2]=1),i&&0<r&&(H[i>>2]=62002),mr=12288,i=1):(mr=12300,i=0)}return i},hh:function(e,t,i,r){if(62e3!=e)return mr=12296,0;for(e=1;;){if(12440!=(t=H[r>>2])){if(12344==t)break;return mr=12292,0}e=H[r+4>>2],r+=8}return 2>e||3<e?(mr=12293,0):(xr.Bj=e-1,xr.tl=0,0!=(vr=Gr(n.canvas,xr))?(mr=12288,Xr(vr),n.fl=!0,tr.forEach((function(e){e()})),Xr(null),62004):(mr=12297,0))},jh:function(e,t){return 62e3!=e?(mr=12296,0):62002!=t?(mr=12293,0):(mr=12288,62006)},ih:function(e,t){if(62e3!=e)return mr=12296,0;if(62004!=t)return mr=12294,0;if(Ur===Or[e=vr]&&(Ur=null),"object"==typeof An)for(var i=Or[e].Hi.canvas,r=0;r<rn.length;++r)rn[r].target!=i||nn(r--);return Or[e]&&Or[e].Hi.canvas&&(Or[e].Hi.canvas.Wi=void 0),Or[e]=null,mr=12288,Pr==t&&(Pr=0),1},kh:function(e,t){return 62e3!=e?(mr=12296,0):62006!=t?(mr=12301,1):(Cr==t&&(Cr=0),Ar==t&&(Ar=0),mr=12288,1)},Pa:function(e,t,i,r){if(62e3!=e)return mr=12296,0;if(62002!=t)return mr=12293,0;if(!r)return mr=12300,0;switch(mr=12288,i){case 12320:return H[r>>2]=xr.alpha?32:24,1;case 12321:return H[r>>2]=xr.alpha?8:0,1;case 12322:case 12323:case 12324:return H[r>>2]=8,1;case 12325:return H[r>>2]=xr.depth?24:0,1;case 12326:return H[r>>2]=xr.stencil?8:0,1;case 12327:return H[r>>2]=12344,1;case 12328:return H[r>>2]=62002,1;case 12329:return H[r>>2]=0,1;case 12330:return H[r>>2]=4096,1;case 12331:return H[r>>2]=16777216,1;case 12332:return H[r>>2]=4096,1;case 12333:case 12334:return H[r>>2]=0,1;case 12335:return H[r>>2]=12344,1;case 12337:return H[r>>2]=xr.antialias?4:0,1;case 12338:return H[r>>2]=xr.antialias?1:0,1;case 12339:return H[r>>2]=4,1;case 12340:return H[r>>2]=12344,1;case 12341:case 12342:case 12343:return H[r>>2]=-1,1;case 12345:case 12346:case 12347:return H[r>>2]=0,1;case 12348:return H[r>>2]=1;case 12349:case 12350:return H[r>>2]=0,1;case 12351:return H[r>>2]=12430,1;case 12352:return H[r>>2]=4,1;case 12354:return H[r>>2]=0,1;default:return mr=12292,0}},Na:function(){return mr=12288,62e3},gh:function(){return mr},sh:function(e,t,i){return 62e3==e?(t&&(H[t>>2]=1),i&&(H[i>>2]=4),Sr=!0,mr=12288,1):(mr=12296,0)},mh:function(e,t,i,r){return 62e3!=e?(mr=12296,0):0!=r&&62004!=r?(mr=12294,0):0!=i&&62006!=i||0!=t&&62006!=t?(mr=12301,0):(Xr(r?vr:null),Pr=r,Ar=t,Cr=i,mr=12288,1)},fh:function(e,t){if(62e3!=e)return mr=12296,0;if(mr=12288,br[t])return br[t];switch(t){case 12371:e=J("Emscripten");break;case 12372:e=J("1.4 Emscripten EGL");break;case 12373:e=J("");break;case 12429:e=J("OpenGL_ES");break;default:return mr=12300,0}return br[t]=e},nh:function(){if(Sr)if(n.xi){if(!n.xi.isContextLost())return mr=12288,1;mr=12302}else mr=12290;else mr=12289;return 0},oh:function(e,t){return 62e3!=e?(mr=12296,0):(0==t?Ni(0,0):Ni(1,t),mr=12288,1)},th:function(e){return 62e3!=e?(mr=12296,0):(Ar=Cr=Pr=0,Sr=!1,mr=12288,1)},qh:function(){return mr=12288,1},ph:function(){return mr=12288,1},k:function(e,t,i){var r;for(Zr.length=0,i>>=2;r=N[t++];)(r=105>r)&&1&i&&i++,Zr.push(r?j[i++>>1]:H[i]),++i;return Pe[e].apply(null,Zr)},vh:function(){Gi=null,Xi++,Wi=null},ch:function(){if(!an())return-1;en(In);var e=Tn[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else{if(!e.webkitExitFullscreen)return-1;e.webkitFullscreenElement&&e.webkitExitFullscreen()}return 0},eh:function(){if(en(On),document.exitPointerLock)document.exitPointerLock();else{if(!document.Ci)return-1;document.Ci()}return 0},N:function(){return devicePixelRatio},y:function(e,t,i){return(e=En(e))?(e=Mn(e),j[t>>3]=e.width,j[i>>3]=e.height,0):-4},qa:function(e,t){return 0>e||e>=un.length?-5:un[e]?(kn(t,un[e]),0):-7},ah:function(){return un.length},Bg:function(e){xs.activeTexture(e)},Ag:function(e,t){xs.attachShader(wr[e],Mr[t])},wd:function(e,t){xs.beginQuery(e,kr[t])},Sg:function(e,t){xs.mi.beginQueryEXT(e,kr[t])},bd:function(e){xs.beginTransformFeedback(e)},zg:function(e,t,i){xs.bindAttribLocation(wr[e],t,M(i))},yg:function(e,t){35051==e?xs.Li=t:35052==e&&(xs.ii=t),xs.bindBuffer(e,Er[t])},Zc:function(e,t,i){xs.bindBufferBase(e,t,Er[i])},_c:function(e,t,i,r,n){xs.bindBufferRange(e,t,Er[i],r,n)},xg:function(e,t){xs.bindFramebuffer(e,Rr[t])},wg:function(e,t){xs.bindRenderbuffer(e,Dr[t])},cc:function(e,t){xs.bindSampler(e,Vr[t])},vg:function(e,t){xs.bindTexture(e,Lr[t])},Wb:function(e,t){xs.bindTransformFeedback(e,_r[t])},gd:function(e){xs.bindVertexArray(Ir[e])},Kg:function(e){xs.bindVertexArray(Ir[e])},tg:function(e,t,i,r){xs.blendColor(e,t,i,r)},sg:function(e){xs.blendEquation(e)},rg:function(e,t){xs.blendEquationSeparate(e,t)},qg:function(e,t){xs.blendFunc(e,t)},pg:function(e,t,i,r){xs.blendFuncSeparate(e,t,i,r)},jd:function(e,t,i,r,n,s,o,a,l,h){xs.blitFramebuffer(e,t,i,r,n,s,o,a,l,h)},og:function(e,t,i,r){2<=Ur.version?i?xs.bufferData(e,N,r,i,t):xs.bufferData(e,t,r):xs.bufferData(e,i?N.subarray(i,i+t):t,r)},ng:function(e,t,i,r){2<=Ur.version?xs.bufferSubData(e,t,N,r,i):xs.bufferSubData(e,t,N.subarray(r,r+i))},mg:function(e){return xs.checkFramebufferStatus(e)},lg:function(e){xs.clear(e)},Ac:function(e,t,i,r){xs.clearBufferfi(e,t,i,r)},Bc:function(e,t,i){xs.clearBufferfv(e,t,z,i>>2)},Dc:function(e,t,i){xs.clearBufferiv(e,t,H,i>>2)},Cc:function(e,t,i){xs.clearBufferuiv(e,t,Y,i>>2)},kg:function(e,t,i,r){xs.clearColor(e,t,i,r)},jg:function(e){xs.clearDepth(e)},ig:function(e){xs.clearStencil(e)},mc:function(e,t,i,r){return xs.clientWaitSync(Nr[e],t,(i>>>0)+4294967296*r)},hg:function(e,t,i,r){xs.colorMask(!!e,!!t,!!i,!!r)},gg:function(e){xs.compileShader(Mr[e])},fg:function(e,t,i,r,n,s,o,a){2<=Ur.version?xs.ii?xs.compressedTexImage2D(e,t,i,r,n,s,o,a):xs.compressedTexImage2D(e,t,i,r,n,s,N,a,o):xs.compressedTexImage2D(e,t,i,r,n,s,a?N.subarray(a,a+o):null)},Bd:function(e,t,i,r,n,s,o,a,l){xs.ii?xs.compressedTexImage3D(e,t,i,r,n,s,o,a,l):xs.compressedTexImage3D(e,t,i,r,n,s,o,N,l,a)},eg:function(e,t,i,r,n,s,o,a,l){2<=Ur.version?xs.ii?xs.compressedTexSubImage2D(e,t,i,r,n,s,o,a,l):xs.compressedTexSubImage2D(e,t,i,r,n,s,o,N,l,a):xs.compressedTexSubImage2D(e,t,i,r,n,s,o,l?N.subarray(l,l+a):null)},Ad:function(e,t,i,r,n,s,o,a,l,h,u){xs.ii?xs.compressedTexSubImage3D(e,t,i,r,n,s,o,a,l,h,u):xs.compressedTexSubImage3D(e,t,i,r,n,s,o,a,l,N,u,h)},yc:function(e,t,i,r,n){xs.copyBufferSubData(e,t,i,r,n)},dg:function(e,t,i,r,n,s,o,a){xs.copyTexImage2D(e,t,i,r,n,s,o,a)},cg:function(e,t,i,r,n,s,o,a){xs.copyTexSubImage2D(e,t,i,r,n,s,o,a)},Cd:function(e,t,i,r,n,s,o,a,l){xs.copyTexSubImage3D(e,t,i,r,n,s,o,a,l)},bg:function(){var e=zr(wr),t=xs.createProgram();return t.name=e,t.Fi=t.Di=t.Ei=0,t.rj=1,wr[e]=t,e},ag:function(e){var t=zr(Mr);return Mr[t]=xs.createShader(e),t},$f:function(e){xs.cullFace(e)},_f:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Er[r];n&&(xs.deleteBuffer(n),n.name=0,Er[r]=null,r==xs.Li&&(xs.Li=0),r==xs.ii&&(xs.ii=0))}},Zf:function(e,t){for(var i=0;i<e;++i){var r=H[t+4*i>>2],n=Rr[r];n&&(xs.deleteFramebuffer(n),n.name=0,Rr[r]=null)}},Yf:function(e){if(e){var t=wr[e];t?(xs.deleteProgram(t),t.name=0,wr[e]=null):Yr(1281)}},yd:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=kr[r];n&&(xs.deleteQuery(n),kr[r]=null)}},Ug:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=kr[r];n&&(xs.mi.deleteQueryEXT(n),kr[r]=null)}},Xf:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Dr[r];n&&(xs.deleteRenderbuffer(n),n.name=0,Dr[r]=null)}},ec:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Vr[r];n&&(xs.deleteSampler(n),n.name=0,Vr[r]=null)}},Wf:function(e){if(e){var t=Mr[e];t?(xs.deleteShader(t),Mr[e]=null):Yr(1281)}},nc:function(e){if(e){var t=Nr[e];t?(xs.deleteSync(t),t.name=0,Nr[e]=null):Yr(1281)}},Vf:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Lr[r];n&&(xs.deleteTexture(n),n.name=0,Lr[r]=null)}},Vb:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=_r[r];n&&(xs.deleteTransformFeedback(n),n.name=0,_r[r]=null)}},fd:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2];xs.deleteVertexArray(Ir[r]),Ir[r]=null}},Jg:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2];xs.deleteVertexArray(Ir[r]),Ir[r]=null}},Uf:function(e){xs.depthFunc(e)},Tf:function(e){xs.depthMask(!!e)},Sf:function(e,t){xs.depthRange(e,t)},Qf:function(e,t){xs.detachShader(wr[e],Mr[t])},Pf:function(e){xs.disable(e)},Of:function(e){xs.disableVertexAttribArray(e)},Nf:function(e,t,i){xs.drawArrays(e,t,i)},rc:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Eg:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Eb:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Kd:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Fb:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},rd:function(e,t){for(var i=Vn[e],r=0;r<e;r++)i[r]=H[t+4*r>>2];xs.drawBuffers(i)},Id:function(e,t){for(var i=Vn[e],r=0;r<e;r++)i[r]=H[t+4*r>>2];xs.drawBuffers(i)},Gg:function(e,t){for(var i=Vn[e],r=0;r<e;r++)i[r]=H[t+4*r>>2];xs.drawBuffers(i)},Mf:function(e,t,i,r){xs.drawElements(e,t,i,r)},qc:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Dg:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Cb:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Db:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Jd:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Fd:function(e,t,i,r,n,s){_n(e,r,n,s)},Lf:function(e){xs.enable(e)},Kf:function(e){xs.enableVertexAttribArray(e)},ud:function(e){xs.endQuery(e)},Rg:function(e){xs.mi.endQueryEXT(e)},ad:function(){xs.endTransformFeedback()},pc:function(e,t){return(e=xs.fenceSync(e,t))?(t=zr(Nr),e.name=t,Nr[t]=e,t):0},Jf:function(){xs.finish()},If:function(){xs.flush()},Hf:function(e,t,i,r){xs.framebufferRenderbuffer(e,t,i,Dr[r])},Ff:function(e,t,i,r,n){xs.framebufferTexture2D(e,t,i,Lr[r],n)},hd:function(e,t,i,r,n){xs.framebufferTextureLayer(e,t,Lr[i],r,n)},Ef:function(e){xs.frontFace(e)},Df:function(e,t){Nn(e,t,"createBuffer",Er)},Bf:function(e,t){Nn(e,t,"createFramebuffer",Rr)},zd:function(e,t){Nn(e,t,"createQuery",kr)},Vg:function(e,t){for(var i=0;i<e;i++){var r=xs.mi.createQueryEXT();if(!r){for(Yr(1282);i<e;)H[t+4*i++>>2]=0;break}var n=zr(kr);r.name=n,kr[n]=r,H[t+4*i>>2]=n}},Af:function(e,t){Nn(e,t,"createRenderbuffer",Dr)},fc:function(e,t){Nn(e,t,"createSampler",Vr)},zf:function(e,t){Nn(e,t,"createTexture",Lr)},Ub:function(e,t){Nn(e,t,"createTransformFeedback",_r)},ed:function(e,t){Nn(e,t,"createVertexArray",Ir)},Ig:function(e,t){Nn(e,t,"createVertexArray",Ir)},Cf:function(e){xs.generateMipmap(e)},yf:function(e,t,i,r,n,s,o){Fn("getActiveAttrib",e,t,i,r,n,s,o)},xf:function(e,t,i,r,n,s,o){Fn("getActiveUniform",e,t,i,r,n,s,o)},tc:function(e,t,i,r,n){e=wr[e],(e=xs.getActiveUniformBlockName(e,t))&&(n&&0<i?(i=O(e,n,i),r&&(H[r>>2]=i)):r&&(H[r>>2]=0))},uc:function(e,t,i,r){if(r){if(e=wr[e],35393==i)i=xs.getActiveUniformBlockName(e,t),H[r>>2]=i.length+1;else if(null!==(e=xs.getActiveUniformBlockParameter(e,t,i)))if(35395==i)for(i=0;i<e.length;i++)H[r+4*i>>2]=e[i];else H[r>>2]=e}else Yr(1281)},wc:function(e,t,i,r,n){if(n)if(0<t&&0==i)Yr(1281);else{e=wr[e];for(var s=[],o=0;o<t;o++)s.push(H[i+4*o>>2]);if(e=xs.getActiveUniforms(e,s,r))for(t=e.length,o=0;o<t;o++)H[n+4*o>>2]=e[o]}else Yr(1281)},wf:function(e,t,i,r){var n=(e=xs.getAttachedShaders(wr[e])).length;for(n>t&&(n=t),H[i>>2]=n,t=0;t<n;++t)H[r+4*t>>2]=Mr.indexOf(e[t])},vf:function(e,t){return xs.getAttribLocation(wr[e],M(t))},uf:function(e,t){Hn(e,t,4)},gc:function(e,t,i){i?Bn(i,xs.getBufferParameter(e,t)):Yr(1281)},tf:function(e,t,i){i?H[i>>2]=xs.getBufferParameter(e,t):Yr(1281)},sf:function(){var e=xs.getError()||Wr;return Wr=0,e},rf:function(e,t){Hn(e,t,2)},Nc:function(e,t){return xs.getFragDataLocation(wr[e],M(t))},qf:function(e,t,i,r){((e=xs.getFramebufferAttachmentParameter(e,t,i))instanceof WebGLRenderbuffer||e instanceof WebGLTexture)&&(e=0|e.name),H[r>>2]=e},hc:function(e,t,i){Yn(e,t,i,1)},jc:function(e,t){Hn(e,t,1)},cd:function(e,t,i){Yn(e,t,i,0)},pf:function(e,t){Hn(e,t,0)},Ib:function(e,t,i,r,n){if(0>r)Yr(1281);else if(n){if(null!==(e=xs.getInternalformatParameter(e,t,i)))for(t=0;t<e.length&&t<r;++t)H[n+t>>2]=e[t]}else Yr(1281)},Pb:function(){Yr(1282)},nf:function(e,t,i,r){null===(e=xs.getProgramInfoLog(wr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},of:function(e,t,i){if(i)if(e>=Tr)Yr(1281);else if(e=wr[e],35716==t)null===(e=xs.getProgramInfoLog(e))&&(e="(unknown error)"),H[i>>2]=e.length+1;else if(35719==t){if(!e.Fi)for(t=0;t<xs.getProgramParameter(e,35718);++t)e.Fi=Math.max(e.Fi,xs.getActiveUniform(e,t).name.length+1);H[i>>2]=e.Fi}else if(35722==t){if(!e.Di)for(t=0;t<xs.getProgramParameter(e,35721);++t)e.Di=Math.max(e.Di,xs.getActiveAttrib(e,t).name.length+1);H[i>>2]=e.Di}else if(35381==t){if(!e.Ei)for(t=0;t<xs.getProgramParameter(e,35382);++t)e.Ei=Math.max(e.Ei,xs.getActiveUniformBlockName(e,t).length+1);H[i>>2]=e.Ei}else H[i>>2]=xs.getProgramParameter(e,t);else Yr(1281)},Mg:function(e,t,i){i?(e=kr[e],Bn(i,"boolean"==typeof(t=2>Ur.version?xs.mi.getQueryObjectEXT(e,t):xs.getQueryParameter(e,t))?t?1:0:t)):Yr(1281)},Og:function(e,t,i){var r;i?(r="boolean"==typeof(e=xs.mi.getQueryObjectEXT(kr[e],t))?e?1:0:e,H[i>>2]=r):Yr(1281)},Lg:function(e,t,i){i?(e=kr[e],Bn(i,"boolean"==typeof(t=2>Ur.version?xs.mi.getQueryObjectEXT(e,t):xs.getQueryParameter(e,t))?t?1:0:t)):Yr(1281)},sd:function(e,t,i){var r;i?(r="boolean"==typeof(e=xs.getQueryParameter(kr[e],t))?e?1:0:e,H[i>>2]=r):Yr(1281)},Ng:function(e,t,i){var r;i?(r="boolean"==typeof(e=xs.mi.getQueryObjectEXT(kr[e],t))?e?1:0:e,H[i>>2]=r):Yr(1281)},td:function(e,t,i){i?H[i>>2]=xs.getQuery(e,t):Yr(1281)},Pg:function(e,t,i){i?H[i>>2]=xs.mi.getQueryEXT(e,t):Yr(1281)},mf:function(e,t,i){i?H[i>>2]=xs.getRenderbufferParameter(e,t):Yr(1281)},Yb:function(e,t,i){i?z[i>>2]=xs.getSamplerParameter(Vr[e],t):Yr(1281)},Zb:function(e,t,i){i?H[i>>2]=xs.getSamplerParameter(Vr[e],t):Yr(1281)},kf:function(e,t,i,r){null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},jf:function(e,t,i,r){e=xs.getShaderPrecisionFormat(e,t),H[i>>2]=e.rangeMin,H[i+4>>2]=e.rangeMax,H[r>>2]=e.precision},hf:function(e,t,i,r){(e=xs.getShaderSource(Mr[e]))&&(t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t))},lf:function(e,t,i){i?35716==t?(null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),H[i>>2]=e?e.length+1:0):35720==t?(e=xs.getShaderSource(Mr[e]),H[i>>2]=e?e.length+1:0):H[i>>2]=xs.getShaderParameter(Mr[e],t):Yr(1281)},gf:function(e){var t=Fr[e];if(!t){switch(e){case 7939:t=zn((t=(t=xs.getSupportedExtensions()||[]).concat(t.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:(t=xs.getParameter(e))||Yr(1280),t=t&&zn(t);break;case 7938:t=xs.getParameter(7938),t=zn(t=2<=Ur.version?"OpenGL ES 3.0 ("+t+")":"OpenGL ES 2.0 ("+t+")");break;case 35724:var i=(t=xs.getParameter(35724)).match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==i&&(3==i[1].length&&(i[1]+="0"),t="OpenGL ES GLSL ES "+i[1]+" ("+t+")"),t=zn(t);break;default:Yr(1280)}Fr[e]=t}return t},zc:function(e,t){if(2>Ur.version)return Yr(1282),0;var i=Br[e];if(i)return 0>t||t>=i.length?(Yr(1281),0):i[t];switch(e){case 7939:return i=(i=(i=xs.getSupportedExtensions()||[]).concat(i.map((function(e){return"GL_"+e})))).map((function(e){return zn(e)})),i=Br[e]=i,0>t||t>=i.length?(Yr(1281),0):i[t];default:return Yr(1280),0}},ic:function(e,t,i,r,n){0>i?Yr(1281):n?null!==(e=xs.getSyncParameter(Nr[e],t))&&(H[n>>2]=e,r&&(H[r>>2]=1)):Yr(1281)},ff:function(e,t,i){i?z[i>>2]=xs.getTexParameter(e,t):Yr(1281)},ef:function(e,t,i){i?H[i>>2]=xs.getTexParameter(e,t):Yr(1281)},Xc:function(e,t,i,r,n,s,o){e=wr[e],(e=xs.getTransformFeedbackVarying(e,t))&&(o&&0<i?(i=O(e.name,o,i),r&&(H[r>>2]=i)):r&&(H[r>>2]=0),n&&(H[n>>2]=e.size),s&&(H[s>>2]=e.type))},vc:function(e,t){return xs.getUniformBlockIndex(wr[e],M(t))},xc:function(e,t,i,r){if(r)if(0<t&&(0==i||0==r))Yr(1281);else{e=wr[e];for(var n=[],s=0;s<t;s++)n.push(M(H[i+4*s>>2]));if(e=xs.getUniformIndices(e,n))for(t=e.length,s=0;s<t;s++)H[r+4*s>>2]=e[s]}else Yr(1281)},bf:function(e,t){if(t=M(t),e=wr[e]){Gn(e);var i=e.Oi,r=0,n=t,s=jn(t);if(0<s&&(r=parseInt(t.slice(s+1))>>>0,n=t.slice(0,s)),(n=e.sj[n])&&r<n[0]&&(i[r+=n[1]]=i[r]||xs.getUniformLocation(e,t)))return r}else Yr(1281);return-1},df:function(e,t,i){Wn(e,t,i,2)},cf:function(e,t,i){Wn(e,t,i,0)},Oc:function(e,t,i){Wn(e,t,i,0)},Vc:function(e,t,i){Un(e,t,i,0)},Uc:function(e,t,i){Un(e,t,i,0)},_e:function(e,t,i){i?H[i>>2]=xs.getVertexAttribOffset(e,t):Yr(1281)},af:function(e,t,i){Un(e,t,i,2)},$e:function(e,t,i){Un(e,t,i,5)},Ze:function(e,t){xs.hint(e,t)},Mb:function(e,t,i){for(var r=Vn[t],n=0;n<t;n++)r[n]=H[i+4*n>>2];xs.invalidateFramebuffer(e,r)},Lb:function(e,t,i,r,n,s,o){for(var a=Vn[t],l=0;l<t;l++)a[l]=H[i+4*l>>2];xs.invalidateSubFramebuffer(e,a,r,n,s,o)},Ye:function(e){return(e=Er[e])?xs.isBuffer(e):0},Xe:function(e){return xs.isEnabled(e)},We:function(e){return(e=Rr[e])?xs.isFramebuffer(e):0},Ve:function(e){return(e=wr[e])?xs.isProgram(e):0},xd:function(e){return(e=kr[e])?xs.isQuery(e):0},Tg:function(e){return(e=kr[e])?xs.mi.isQueryEXT(e):0},Ue:function(e){return(e=Dr[e])?xs.isRenderbuffer(e):0},dc:function(e){return(e=Vr[e])?xs.isSampler(e):0},Te:function(e){return(e=Mr[e])?xs.isShader(e):0},oc:function(e){return xs.isSync(Nr[e])},Se:function(e){return(e=Lr[e])?xs.isTexture(e):0},Tb:function(e){return xs.isTransformFeedback(_r[e])},dd:function(e){return(e=Ir[e])?xs.isVertexArray(e):0},Hg:function(e){return(e=Ir[e])?xs.isVertexArray(e):0},Re:function(e){xs.lineWidth(e)},Qe:function(e){e=wr[e],xs.linkProgram(e),e.Oi=0,e.sj={}},Sb:function(){xs.pauseTransformFeedback()},Pe:function(e,t){3317==e&&(Hr=t),xs.pixelStorei(e,t)},Oe:function(e,t){xs.polygonOffset(e,t)},Ob:function(){Yr(1280)},Nb:function(){Yr(1280)},Qg:function(e,t){xs.mi.queryCounterEXT(kr[e],t)},Hd:function(e){xs.readBuffer(e)},Ne:function(e,t,i,r,n,s,o){if(2<=Ur.version)if(xs.Li)xs.readPixels(e,t,i,r,n,s,o);else{var a=$n(s);xs.readPixels(e,t,i,r,n,s,a,o>>Zn(a))}else(o=Kn(s,n,i,r,o))?xs.readPixels(e,t,i,r,n,s,o):Yr(1280)},Me:function(){},Le:function(e,t,i,r){xs.renderbufferStorage(e,t,i,r)},id:function(e,t,i,r,n){xs.renderbufferStorageMultisample(e,t,i,r,n)},Qb:function(){xs.resumeTransformFeedback()},Ke:function(e,t){xs.sampleCoverage(e,!!t)},$b:function(e,t,i){xs.samplerParameterf(Vr[e],t,i)},_b:function(e,t,i){xs.samplerParameterf(Vr[e],t,z[i>>2])},bc:function(e,t,i){xs.samplerParameteri(Vr[e],t,i)},ac:function(e,t,i){xs.samplerParameteri(Vr[e],t,H[i>>2])},Je:function(e,t,i,r){xs.scissor(e,t,i,r)},He:function(){Yr(1280)},Ge:function(e,t,i,r){t=jr(t,i,r),xs.shaderSource(Mr[e],t)},Fe:function(e,t,i){xs.stencilFunc(e,t,i)},Ee:function(e,t,i,r){xs.stencilFuncSeparate(e,t,i,r)},De:function(e){xs.stencilMask(e)},Ce:function(e,t){xs.stencilMaskSeparate(e,t)},Be:function(e,t,i){xs.stencilOp(e,t,i)},Ae:function(e,t,i,r){xs.stencilOpSeparate(e,t,i,r)},ze:function(e,t,i,r,n,s,o,a,l){if(2<=Ur.version)if(xs.ii)xs.texImage2D(e,t,i,r,n,s,o,a,l);else if(l){var h=$n(a);xs.texImage2D(e,t,i,r,n,s,o,a,h,l>>Zn(h))}else xs.texImage2D(e,t,i,r,n,s,o,a,null);else xs.texImage2D(e,t,i,r,n,s,o,a,l?Kn(a,o,r,n,l):null)},Ed:function(e,t,i,r,n,s,o,a,l,h){if(xs.ii)xs.texImage3D(e,t,i,r,n,s,o,a,l,h);else if(h){var u=$n(l);xs.texImage3D(e,t,i,r,n,s,o,a,l,u,h>>Zn(u))}else xs.texImage3D(e,t,i,r,n,s,o,a,l,null)},ye:function(e,t,i){xs.texParameterf(e,t,i)},we:function(e,t,i){xs.texParameterf(e,t,z[i>>2])},ve:function(e,t,i){xs.texParameteri(e,t,i)},ue:function(e,t,i){xs.texParameteri(e,t,H[i>>2])},Kb:function(e,t,i,r,n){xs.texStorage2D(e,t,i,r,n)},Jb:function(e,t,i,r,n,s){xs.texStorage3D(e,t,i,r,n,s)},te:function(e,t,i,r,n,s,o,a,l){if(2<=Ur.version)if(xs.ii)xs.texSubImage2D(e,t,i,r,n,s,o,a,l);else if(l){var h=$n(a);xs.texSubImage2D(e,t,i,r,n,s,o,a,h,l>>Zn(h))}else xs.texSubImage2D(e,t,i,r,n,s,o,a,null);else h=null,l&&(h=Kn(a,o,n,s,l)),xs.texSubImage2D(e,t,i,r,n,s,o,a,h)},Dd:function(e,t,i,r,n,s,o,a,l,h,u){if(xs.ii)xs.texSubImage3D(e,t,i,r,n,s,o,a,l,h,u);else if(u){var d=$n(h);xs.texSubImage3D(e,t,i,r,n,s,o,a,l,h,d,u>>Zn(d))}else xs.texSubImage3D(e,t,i,r,n,s,o,a,l,h,null)},Yc:function(e,t,i,r){e=wr[e];for(var n=[],s=0;s<t;s++)n.push(M(H[i+4*s>>2]));xs.transformFeedbackVaryings(e,n,r)},se:function(e,t){xs.uniform1f(Xn(e),t)},re:function(e,t,i){if(2<=Ur.version)xs.uniform1fv(Xn(e),z,i>>2,t);else{if(288>=t)for(var r=Jn[t-1],n=0;n<t;++n)r[n]=z[i+4*n>>2];else r=z.subarray(i>>2,i+4*t>>2);xs.uniform1fv(Xn(e),r)}},qe:function(e,t){xs.uniform1i(Xn(e),t)},pe:function(e,t,i){if(2<=Ur.version)xs.uniform1iv(Xn(e),H,i>>2,t);else{if(288>=t)for(var r=qn[t-1],n=0;n<t;++n)r[n]=H[i+4*n>>2];else r=H.subarray(i>>2,i+4*t>>2);xs.uniform1iv(Xn(e),r)}},Mc:function(e,t){xs.uniform1ui(Xn(e),t)},Ic:function(e,t,i){xs.uniform1uiv(Xn(e),Y,i>>2,t)},oe:function(e,t,i){xs.uniform2f(Xn(e),t,i)},ne:function(e,t,i){if(2<=Ur.version)xs.uniform2fv(Xn(e),z,i>>2,2*t);else{if(144>=t)for(var r=Jn[2*t-1],n=0;n<2*t;n+=2)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2];else r=z.subarray(i>>2,i+8*t>>2);xs.uniform2fv(Xn(e),r)}},ke:function(e,t,i){xs.uniform2i(Xn(e),t,i)},je:function(e,t,i){if(2<=Ur.version)xs.uniform2iv(Xn(e),H,i>>2,2*t);else{if(144>=t)for(var r=qn[2*t-1],n=0;n<2*t;n+=2)r[n]=H[i+4*n>>2],r[n+1]=H[i+(4*n+4)>>2];else r=H.subarray(i>>2,i+8*t>>2);xs.uniform2iv(Xn(e),r)}},Lc:function(e,t,i){xs.uniform2ui(Xn(e),t,i)},Hc:function(e,t,i){xs.uniform2uiv(Xn(e),Y,i>>2,2*t)},ie:function(e,t,i,r){xs.uniform3f(Xn(e),t,i,r)},he:function(e,t,i){if(2<=Ur.version)xs.uniform3fv(Xn(e),z,i>>2,3*t);else{if(96>=t)for(var r=Jn[3*t-1],n=0;n<3*t;n+=3)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2],r[n+2]=z[i+(4*n+8)>>2];else r=z.subarray(i>>2,i+12*t>>2);xs.uniform3fv(Xn(e),r)}},ge:function(e,t,i,r){xs.uniform3i(Xn(e),t,i,r)},fe:function(e,t,i){if(2<=Ur.version)xs.uniform3iv(Xn(e),H,i>>2,3*t);else{if(96>=t)for(var r=qn[3*t-1],n=0;n<3*t;n+=3)r[n]=H[i+4*n>>2],r[n+1]=H[i+(4*n+4)>>2],r[n+2]=H[i+(4*n+8)>>2];else r=H.subarray(i>>2,i+12*t>>2);xs.uniform3iv(Xn(e),r)}},Kc:function(e,t,i,r){xs.uniform3ui(Xn(e),t,i,r)},Gc:function(e,t,i){xs.uniform3uiv(Xn(e),Y,i>>2,3*t)},ee:function(e,t,i,r,n){xs.uniform4f(Xn(e),t,i,r,n)},de:function(e,t,i){if(2<=Ur.version)xs.uniform4fv(Xn(e),z,i>>2,4*t);else{if(72>=t){var r=Jn[4*t-1],n=z;i>>=2;for(var s=0;s<4*t;s+=4){var o=i+s;r[s]=n[o],r[s+1]=n[o+1],r[s+2]=n[o+2],r[s+3]=n[o+3]}}else r=z.subarray(i>>2,i+16*t>>2);xs.uniform4fv(Xn(e),r)}},ce:function(e,t,i,r,n){xs.uniform4i(Xn(e),t,i,r,n)},be:function(e,t,i){if(2<=Ur.version)xs.uniform4iv(Xn(e),H,i>>2,4*t);else{if(72>=t)for(var r=qn[4*t-1],n=0;n<4*t;n+=4)r[n]=H[i+4*n>>2],r[n+1]=H[i+(4*n+4)>>2],r[n+2]=H[i+(4*n+8)>>2],r[n+3]=H[i+(4*n+12)>>2];else r=H.subarray(i>>2,i+16*t>>2);xs.uniform4iv(Xn(e),r)}},Jc:function(e,t,i,r,n){xs.uniform4ui(Xn(e),t,i,r,n)},Ec:function(e,t,i){xs.uniform4uiv(Xn(e),Y,i>>2,4*t)},sc:function(e,t,i){e=wr[e],xs.uniformBlockBinding(e,t,i)},$d:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix2fv(Xn(e),!!i,z,r>>2,4*t);else{if(72>=t)for(var n=Jn[4*t-1],s=0;s<4*t;s+=4)n[s]=z[r+4*s>>2],n[s+1]=z[r+(4*s+4)>>2],n[s+2]=z[r+(4*s+8)>>2],n[s+3]=z[r+(4*s+12)>>2];else n=z.subarray(r>>2,r+16*t>>2);xs.uniformMatrix2fv(Xn(e),!!i,n)}},qd:function(e,t,i,r){xs.uniformMatrix2x3fv(Xn(e),!!i,z,r>>2,6*t)},od:function(e,t,i,r){xs.uniformMatrix2x4fv(Xn(e),!!i,z,r>>2,8*t)},_d:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix3fv(Xn(e),!!i,z,r>>2,9*t);else{if(32>=t)for(var n=Jn[9*t-1],s=0;s<9*t;s+=9)n[s]=z[r+4*s>>2],n[s+1]=z[r+(4*s+4)>>2],n[s+2]=z[r+(4*s+8)>>2],n[s+3]=z[r+(4*s+12)>>2],n[s+4]=z[r+(4*s+16)>>2],n[s+5]=z[r+(4*s+20)>>2],n[s+6]=z[r+(4*s+24)>>2],n[s+7]=z[r+(4*s+28)>>2],n[s+8]=z[r+(4*s+32)>>2];else n=z.subarray(r>>2,r+36*t>>2);xs.uniformMatrix3fv(Xn(e),!!i,n)}},pd:function(e,t,i,r){xs.uniformMatrix3x2fv(Xn(e),!!i,z,r>>2,6*t)},md:function(e,t,i,r){xs.uniformMatrix3x4fv(Xn(e),!!i,z,r>>2,12*t)},Zd:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix4fv(Xn(e),!!i,z,r>>2,16*t);else{if(18>=t){var n=Jn[16*t-1],s=z;r>>=2;for(var o=0;o<16*t;o+=16){var a=r+o;n[o]=s[a],n[o+1]=s[a+1],n[o+2]=s[a+2],n[o+3]=s[a+3],n[o+4]=s[a+4],n[o+5]=s[a+5],n[o+6]=s[a+6],n[o+7]=s[a+7],n[o+8]=s[a+8],n[o+9]=s[a+9],n[o+10]=s[a+10],n[o+11]=s[a+11],n[o+12]=s[a+12],n[o+13]=s[a+13],n[o+14]=s[a+14],n[o+15]=s[a+15]}}else n=z.subarray(r>>2,r+64*t>>2);xs.uniformMatrix4fv(Xn(e),!!i,n)}},nd:function(e,t,i,r){xs.uniformMatrix4x2fv(Xn(e),!!i,z,r>>2,8*t)},ld:function(e,t,i,r){xs.uniformMatrix4x3fv(Xn(e),!!i,z,r>>2,12*t)},Yd:function(e){e=wr[e],xs.useProgram(e),xs.Nj=e},Xd:function(e){xs.validateProgram(wr[e])},Wd:function(e,t){xs.vertexAttrib1f(e,t)},Vd:function(e,t){xs.vertexAttrib1f(e,z[t>>2])},Ud:function(e,t,i){xs.vertexAttrib2f(e,t,i)},Td:function(e,t){xs.vertexAttrib2f(e,z[t>>2],z[t+4>>2])},Sd:function(e,t,i,r){xs.vertexAttrib3f(e,t,i,r)},Qd:function(e,t){xs.vertexAttrib3f(e,z[t>>2],z[t+4>>2],z[t+8>>2])},Pd:function(e,t,i,r,n){xs.vertexAttrib4f(e,t,i,r,n)},Od:function(e,t){xs.vertexAttrib4f(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])},Xb:function(e,t){xs.vertexAttribDivisor(e,t)},Cg:function(e,t){xs.vertexAttribDivisor(e,t)},Gb:function(e,t){xs.vertexAttribDivisor(e,t)},Ld:function(e,t){xs.vertexAttribDivisor(e,t)},Hb:function(e,t){xs.vertexAttribDivisor(e,t)},Tc:function(e,t,i,r,n){xs.vertexAttribI4i(e,t,i,r,n)},Rc:function(e,t){xs.vertexAttribI4i(e,H[t>>2],H[t+4>>2],H[t+8>>2],H[t+12>>2])},Sc:function(e,t,i,r,n){xs.vertexAttribI4ui(e,t,i,r,n)},Pc:function(e,t){xs.vertexAttribI4ui(e,Y[t>>2],Y[t+4>>2],Y[t+8>>2],Y[t+12>>2])},Wc:function(e,t,i,r,n){xs.vertexAttribIPointer(e,t,i,r,n)},Nd:function(e,t,i,r,n,s){xs.vertexAttribPointer(e,t,i,!!r,n,s)},Md:function(e,t,i,r){xs.viewport(e,t,i,r)},lc:function(e,t,i,r){xs.waitSync(Nr[e],t,(i>>>0)+4294967296*r)},W:function(){return 0},$g:function(){return!0},ob:function(e,t,i){N.copyWithin(e,t,t+i)},dh:function(e,t,i){return function(e,t){return an()?(e=En(e))?e.requestFullscreen||e.webkitRequestFullscreen?Kr&&hn.Ji?In(e,t):t.qk?(Qr(In,1,[e,t]),1):-2:-3:-4:-1}(e,{Fj:H[i>>2],uj:H[i+4>>2],vk:H[i+8>>2],qk:t,fj:H[i+12>>2],Kj:H[i+16>>2]})},Ma:function(e,t){return(e=En(e))?e.requestPointerLock||e.lj?Kr&&hn.Ji?On(e):t?(Qr(On,2,[e]),1):-2:-1:-4},qb:function(e){var t=N.length;if(2147483648<(e>>>=0))return!1;for(var i=1;4>=i;i*=2){var r=t*(1+.2/i);r=Math.min(r,e+100663296),0<(r=Math.max(e,r))%65536&&(r+=65536-r%65536);e:{try{x.grow(Math.min(2147483648,r)-V.byteLength+65535>>>16),Q();var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1},ra:function(){return(un=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1},sa:function(e,t,i){return"undefined"==typeof onbeforeunload?-1:1!==i?-5:(function(e,t){sn({target:En(2),ji:"beforeunload",ti:t,vi:function(i){i=i||event;var r=ee.get(t)(28,0,e);if(r&&(r=M(r)),r)return i.preventDefault(),i.returnValue=r},si:!0})}(e,t),0)},Ea:function(e,t,i,r){return Qn(e,t,i,r,12,"blur"),0},E:Rn,U:function(e,t,i){return(e=En(e))?(e.style.width=t+"px",e.style.height=i+"px",0):-4},Fa:function(e,t,i,r){return Qn(e,t,i,r,13,"focus"),0},va:function(e,t,i,r){return an()?(e=En(e))?(es(e,t,i,r,"fullscreenchange"),es(e,t,i,r,"webkitfullscreenchange"),0):-4:-1},pa:function(e,t,i){return navigator.getGamepads||navigator.webkitGetGamepads?(ts(e,t,i,26,"gamepadconnected"),0):-1},oa:function(e,t,i){return navigator.getGamepads||navigator.webkitGetGamepads?(ts(e,t,i,27,"gamepaddisconnected"),0):-1},ya:function(e,t,i,r){return is(e,t,i,r,2,"keydown"),0},wa:function(e,t,i,r){return is(e,t,i,r,1,"keypress"),0},xa:function(e,t,i,r){return is(e,t,i,r,3,"keyup"),0},lh:function(e,t,i){Fi(e=ee.get(e),t,i)},Ka:function(e,t,i,r){return ns(e,t,i,r,5,"mousedown"),0},Ia:function(e,t,i,r){return ns(e,t,i,r,33,"mouseenter"),0},Ha:function(e,t,i,r){return ns(e,t,i,r,34,"mouseleave"),0},La:function(e,t,i,r){return ns(e,t,i,r,8,"mousemove"),0},Ja:function(e,t,i,r){return ns(e,t,i,r,6,"mouseup"),0},za:function(e,t,i,r){return document&&document.body&&(document.body.requestPointerLock||document.body.Ci||document.body.dj||document.body.lj)?(e=En(e))?(ss(e,t,i,r,"pointerlockchange"),ss(e,t,i,r,"mozpointerlockchange"),ss(e,t,i,r,"webkitpointerlockchange"),ss(e,t,i,r,"mspointerlockchange"),0):-4:-1},ua:function(e,t,i,r){return function(e,t,i,r){mn||(mn=Ds(36)),sn({target:e=En(e),ji:"resize",ti:r,vi:function(i){if((i=i||event).target==e){var n=document.body;if(n){var s=mn;H[s>>2]=i.detail,H[s+4>>2]=n.clientWidth,H[s+8>>2]=n.clientHeight,H[s+12>>2]=innerWidth,H[s+16>>2]=innerHeight,H[s+20>>2]=outerWidth,H[s+24>>2]=outerHeight,H[s+28>>2]=pageXOffset,H[s+32>>2]=pageYOffset,ee.get(r)(10,s,t)&&i.preventDefault()}}},si:i})}(e,t,i,r),0},Aa:function(e,t,i,r){return os(e,t,i,r,25,"touchcancel"),0},Ca:function(e,t,i,r){return os(e,t,i,r,23,"touchend"),0},Ba:function(e,t,i,r){return os(e,t,i,r,24,"touchmove"),0},Da:function(e,t,i,r){return os(e,t,i,r,22,"touchstart"),0},ta:function(e,t,i){return function(e,t,i){var r=Tn[1];Pn||(Pn=Ds(8)),sn({target:r,ji:"visibilitychange",ti:i,vi:function(t){t=t||event;var r=Pn,n=["hidden","visible","prerender","unloaded"].indexOf(document.visibilityState);H[r>>2]=document.hidden,H[r+4>>2]=n,ee.get(i)(21,r,e)&&t.preventDefault()},si:t})}(e,t,i),0},Ga:function(e,t,i,r){return void 0!==(e=En(e)).onwheel?(function(e,t,i,r){Cn||(Cn=Ds(96)),sn({target:e,Ji:!0,ji:"wheel",ti:r,vi:function(i){i=i||event;var n=Cn;rs(n,i,e),j[n+64>>3]=i.deltaX,j[n+72>>3]=i.deltaY,j[n+80>>3]=i.deltaZ,H[n+88>>2]=i.deltaMode,ee.get(r)(9,n,t)&&i.preventDefault()},si:i})}(e,t,i,r),0):-1},V:function(){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"},_g:function(e,t,i,r,n){function s(e,i){ds(e,i.response,(function(e){Bi((function(){c?ee.get(c)(e):t&&t(e)}),P)}),(function(e){Bi((function(){c?ee.get(c)(e):t&&t(e)}),P)}))}function o(e){Bi((function(){f?ee.get(f)(e):n&&n(e)}),P)}function a(e){Bi((function(){p?ee.get(p)(e):i&&i(e)}),P)}function l(e){Bi((function(){g?ee.get(g)(e):r&&r(e)}),P)}function h(e){Bi((function(){c?ee.get(c)(e):t&&t(e)}),P)}var u=e+112,d=M(u),c=Y[u+36>>2],p=Y[u+40>>2],g=Y[u+44>>2],f=Y[u+48>>2],y=Y[u+52>>2],v=!!(4&y),m=!!(32&y),S=!!(16&y),P=!!(64&y);if("EM_IDB_STORE"===d)d=Y[u+84>>2],ds(e,N.slice(d,d+Y[u+88>>2]),h,a);else if("EM_IDB_DELETE"===d)!function(e,t,i){var r=as;if(r){var n=Y[e+112+64>>2];n||(n=Y[e+8>>2]),n=M(n);try{var s=r.transaction(["FILES"],"readwrite").objectStore("FILES").delete(n);s.onsuccess=function(i){i=i.target.result,Y[e+12>>2]=0,hs(e+16,0),hs(e+24,0),hs(e+32,0),B[e+40>>1]=4,B[e+42>>1]=200,O("OK",e+44,64),t(e,0,i)},s.onerror=function(t){B[e+40>>1]=4,B[e+42>>1]=404,O("Not Found",e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}(e,h,a);else if(S){if(m)return 0;us(e,v?s:h,a,l,o)}else!function(e,t,i){var r=as;if(r){var n=Y[e+112+64>>2];n||(n=Y[e+8>>2]),n=M(n);try{var s=r.transaction(["FILES"],"readonly").objectStore("FILES").get(n);s.onsuccess=function(r){if(r.target.result){var n=(r=r.target.result).byteLength||r.length,s=Ds(n);N.set(new Uint8Array(r),s),Y[e+12>>2]=s,hs(e+16,n),hs(e+24,0),hs(e+32,n),B[e+40>>1]=4,B[e+42>>1]=200,O("OK",e+44,64),t(e,0,r)}else B[e+40>>1]=4,B[e+42>>1]=404,O("Not Found",e+44,64),i(e,0,"no data")},s.onerror=function(t){B[e+40>>1]=4,B[e+42>>1]=404,O("Not Found",e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}(e,h,m?a:v?function(e){us(e,s,a,l,o)}:function(e){us(e,h,a,l,o)});return e},wb:function(e){for(var t=Vi();Vi()-t<e;);},ub:function(e,t){try{var i=0;return gs().forEach((function(r,n){var s=t+i;for(n=H[e+4*n>>2]=s,s=0;s<r.length;++s)_[n++>>0]=r.charCodeAt(s);_[n>>0]=0,i+=r.length+1})),0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},vb:function(e,t){try{var i=gs();H[e>>2]=i.length;var r=0;return i.forEach((function(e){r+=e.length+1})),H[t>>2]=r,0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},fa:function(e){try{return ct(Rt(e)),0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},yb:function(e,t,i,r){try{e:{for(var n=Rt(e),s=e=0;s<i;s++){var o=H[t+(8*s+4)>>2],a=n,l=H[t+8*s>>2],h=o,u=void 0,d=_;if(0>h||0>u)throw new ze(28);if(null===a.Ii)throw new ze(8);if(1==(2097155&a.flags))throw new ze(8);if(16384==(61440&a.node.mode))throw new ze(31);if(!a.ai.read)throw new ze(28);var c=void 0!==u;if(c){if(!a.seekable)throw new ze(70)}else u=a.position;var p=a.ai.read(a,d,l,h,u);c||(a.position+=p);var g=p;if(0>g){var f=-1;break e}if(e+=g,g<o)break}f=e}return H[r>>2]=f,0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},mb:function(e,t,i,r,n){try{var s=Rt(e);return-9007199254740992>=(e=4294967296*i+(t>>>0))||9007199254740992<=e?-61:(pt(s,e,r),me=[s.position>>>0,(ve=s.position,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[n>>2]=me[0],H[n+4>>2]=me[1],s.yj&&0===e&&0===r&&(s.yj=null),0)}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},ea:function(e,t,i,r){try{e:{for(var n=Rt(e),s=e=0;s<i;s++){var o=gt(n,_,H[t+8*s>>2],H[t+(8*s+4)>>2],void 0);if(0>o){var a=-1;break e}e+=o}a=e}return H[r>>2]=a,0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},v:function(){return P},Ua:function(){var e="";"undefined"!=typeof window?e=window.location.hostname:void 0!==t&&(e="node");var i=k(e)+1,r=Ds(i);return O(e,r,i),r},O:function(e){var t=Date.now();return H[e>>2]=t/1e3|0,H[e+4>>2]=t%1e3*1e3|0,0},db:function(e){xs.activeTexture(e)},ha:function(e,t){xs.attachShader(wr[e],Mr[t])},m:function(e,t,i){xs.bindAttribLocation(wr[e],t,M(i))},n:function(e,t){35051==e?xs.Li=t:35052==e&&(xs.ii=t),xs.bindBuffer(e,Er[t])},x:function(e,t){xs.bindFramebuffer(e,Rr[t])},u:function(e,t){xs.bindTexture(e,Lr[t])},vd:function(e,t,i,r){xs.blendColor(e,t,i,r)},kd:function(e){xs.blendEquation(e)},Gd:function(e,t,i,r){xs.blendFuncSeparate(e,t,i,r)},Q:function(e,t,i,r){2<=Ur.version?i?xs.bufferData(e,N,r,i,t):xs.bufferData(e,t,r):xs.bufferData(e,i?N.subarray(i,i+t):t,r)},_:function(e){return xs.checkFramebufferStatus(e)},Gf:function(e){xs.clear(e)},Rf:function(e,t,i,r){xs.clearColor(e,t,i,r)},Fc:function(e,t,i,r){xs.colorMask(!!e,!!t,!!i,!!r)},ab:function(e){xs.compileShader(Mr[e])},L:function(e,t,i,r,n,s,o,a){2<=Ur.version?xs.ii?xs.compressedTexImage2D(e,t,i,r,n,s,o,a):xs.compressedTexImage2D(e,t,i,r,n,s,N,a,o):xs.compressedTexImage2D(e,t,i,r,n,s,a?N.subarray(a,a+o):null)},Rb:function(){var e=zr(wr),t=xs.createProgram();return t.name=e,t.Fi=t.Di=t.Ei=0,t.rj=1,wr[e]=t,e},cb:function(e){var t=zr(Mr);return Mr[t]=xs.createShader(e),t},Ie:function(e){xs.cullFace(e)},G:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Er[r];n&&(xs.deleteBuffer(n),n.name=0,Er[r]=null,r==xs.Li&&(xs.Li=0),r==xs.ii&&(xs.ii=0))}},ug:function(e,t){for(var i=0;i<e;++i){var r=H[t+4*i>>2],n=Rr[r];n&&(xs.deleteFramebuffer(n),n.name=0,Rr[r]=null)}},ja:function(e){if(e){var t=wr[e];t?(xs.deleteProgram(t),t.name=0,wr[e]=null):Yr(1281)}},la:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Dr[r];n&&(xs.deleteRenderbuffer(n),n.name=0,Dr[r]=null)}},ba:function(e){if(e){var t=Mr[e];t?(xs.deleteShader(t),Mr[e]=null):Yr(1281)}},_a:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Lr[r];n&&(xs.deleteTexture(n),n.name=0,Lr[r]=null)}},Rd:function(e){xs.depthFunc(e)},ae:function(e){xs.depthMask(!!e)},ka:function(e,t){xs.detachShader(wr[e],Mr[t])},J:function(e){xs.disable(e)},Y:function(e,t,i){xs.drawArrays(e,t,i)},P:_n,Va:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},I:function(e){xs.enable(e)},Ya:function(e){xs.enableVertexAttribArray(e)},S:function(e,t,i,r,n){xs.framebufferTexture2D(e,t,i,Lr[r],n)},xe:function(e){xs.frontFace(e)},R:function(e,t){Nn(e,t,"createBuffer",Er)},$:function(e,t){Nn(e,t,"createFramebuffer",Rr)},M:function(e,t){Nn(e,t,"createTexture",Lr)},Fg:function(e){xs.generateMipmap(e)},kb:function(e,t,i,r,n,s,o){Fn("getActiveAttrib",e,t,i,r,n,s,o)},jb:function(e,t,i,r,n,s,o){Fn("getActiveUniform",e,t,i,r,n,s,o)},s:function(e,t){Hn(e,t,0)},lb:function(e,t,i,r){null===(e=xs.getProgramInfoLog(wr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},H:function(e,t,i){if(i)if(e>=Tr)Yr(1281);else if(e=wr[e],35716==t)null===(e=xs.getProgramInfoLog(e))&&(e="(unknown error)"),H[i>>2]=e.length+1;else if(35719==t){if(!e.Fi)for(t=0;t<xs.getProgramParameter(e,35718);++t)e.Fi=Math.max(e.Fi,xs.getActiveUniform(e,t).name.length+1);H[i>>2]=e.Fi}else if(35722==t){if(!e.Di)for(t=0;t<xs.getProgramParameter(e,35721);++t)e.Di=Math.max(e.Di,xs.getActiveAttrib(e,t).name.length+1);H[i>>2]=e.Di}else if(35381==t){if(!e.Ei)for(t=0;t<xs.getProgramParameter(e,35382);++t)e.Ei=Math.max(e.Ei,xs.getActiveUniformBlockName(e,t).length+1);H[i>>2]=e.Ei}else H[i>>2]=xs.getProgramParameter(e,t);else Yr(1281)},$a:function(e,t,i,r){null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},aa:function(e,t,i){i?35716==t?(null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),H[i>>2]=e?e.length+1:0):35720==t?(e=xs.getShaderSource(Mr[e]),H[i>>2]=e?e.length+1:0):H[i>>2]=xs.getShaderParameter(Mr[e],t):Yr(1281)},B:function(e){var t=Fr[e];if(!t){switch(e){case 7939:t=zn((t=(t=xs.getSupportedExtensions()||[]).concat(t.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:(t=xs.getParameter(e))||Yr(1280),t=t&&zn(t);break;case 7938:t=xs.getParameter(7938),t=zn(t=2<=Ur.version?"OpenGL ES 3.0 ("+t+")":"OpenGL ES 2.0 ("+t+")");break;case 35724:var i=(t=xs.getParameter(35724)).match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==i&&(3==i[1].length&&(i[1]+="0"),t="OpenGL ES GLSL ES "+i[1]+" ("+t+")"),t=zn(t);break;default:Yr(1280)}Fr[e]=t}return t},ib:function(e,t){if(t=M(t),e=wr[e]){Gn(e);var i=e.Oi,r=0,n=t,s=jn(t);if(0<s&&(r=parseInt(t.slice(s+1))>>>0,n=t.slice(0,s)),(n=e.sj[n])&&r<n[0]&&(i[r+=n[1]]=i[r]||xs.getUniformLocation(e,t)))return r}else Yr(1281);return-1},le:function(e){xs.lineWidth(e)},pb:function(e){e=wr[e],xs.linkProgram(e),e.Oi=0,e.sj={}},Za:function(e,t){3317==e&&(Hr=t),xs.pixelStorei(e,t)},$c:function(e,t,i,r,n,s,o){if(2<=Ur.version)if(xs.Li)xs.readPixels(e,t,i,r,n,s,o);else{var a=$n(s);xs.readPixels(e,t,i,r,n,s,a,o>>Zn(a))}else(o=Kn(s,n,i,r,o))?xs.readPixels(e,t,i,r,n,s,o):Yr(1280)},Qc:function(e,t,i,r){xs.scissor(e,t,i,r)},bb:function(e,t,i,r){t=jr(t,i,r),xs.shaderSource(Mr[e],t)},q:function(e,t,i,r,n,s,o,a,l){if(2<=Ur.version)if(xs.ii)xs.texImage2D(e,t,i,r,n,s,o,a,l);else if(l){var h=$n(a);xs.texImage2D(e,t,i,r,n,s,o,a,h,l>>Zn(h))}else xs.texImage2D(e,t,i,r,n,s,o,a,null);else xs.texImage2D(e,t,i,r,n,s,o,a,l?Kn(a,o,r,n,l):null)},h:function(e,t,i){xs.texParameteri(e,t,i)},hb:function(e,t,i){if(2<=Ur.version)xs.uniform1fv(Xn(e),z,i>>2,t);else{if(288>=t)for(var r=Jn[t-1],n=0;n<t;++n)r[n]=z[i+4*n>>2];else r=z.subarray(i>>2,i+4*t>>2);xs.uniform1fv(Xn(e),r)}},eb:function(e,t){xs.uniform1i(Xn(e),t)},gb:function(e,t,i){if(2<=Ur.version)xs.uniform2fv(Xn(e),z,i>>2,2*t);else{if(144>=t)for(var r=Jn[2*t-1],n=0;n<2*t;n+=2)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2];else r=z.subarray(i>>2,i+8*t>>2);xs.uniform2fv(Xn(e),r)}},fb:function(e,t,i){if(2<=Ur.version)xs.uniform3fv(Xn(e),z,i>>2,3*t);else{if(96>=t)for(var r=Jn[3*t-1],n=0;n<3*t;n+=3)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2],r[n+2]=z[i+(4*n+8)>>2];else r=z.subarray(i>>2,i+12*t>>2);xs.uniform3fv(Xn(e),r)}},da:function(e,t,i){if(2<=Ur.version)xs.uniform4fv(Xn(e),z,i>>2,4*t);else{if(72>=t){var r=Jn[4*t-1],n=z;i>>=2;for(var s=0;s<4*t;s+=4){var o=i+s;r[s]=n[o],r[s+1]=n[o+1],r[s+2]=n[o+2],r[s+3]=n[o+3]}}else r=z.subarray(i>>2,i+16*t>>2);xs.uniform4fv(Xn(e),r)}},ca:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix4fv(Xn(e),!!i,z,r>>2,16*t);else{if(18>=t){var n=Jn[16*t-1],s=z;r>>=2;for(var o=0;o<16*t;o+=16){var a=r+o;n[o]=s[a],n[o+1]=s[a+1],n[o+2]=s[a+2],n[o+3]=s[a+3],n[o+4]=s[a+4],n[o+5]=s[a+5],n[o+6]=s[a+6],n[o+7]=s[a+7],n[o+8]=s[a+8],n[o+9]=s[a+9],n[o+10]=s[a+10],n[o+11]=s[a+11],n[o+12]=s[a+12],n[o+13]=s[a+13],n[o+14]=s[a+14],n[o+15]=s[a+15]}}else n=z.subarray(r>>2,r+64*t>>2);xs.uniformMatrix4fv(Xn(e),!!i,n)}},ia:function(e){e=wr[e],xs.useProgram(e),xs.Nj=e},Wa:function(e,t){xs.vertexAttribDivisor(e,t)},Xa:function(e,t,i,r,n,s){xs.vertexAttribPointer(e,t,i,!!r,n,s)},K:function(e,t,i,r){xs.viewport(e,t,i,r)},me:function(e,t,i){var r=Ns();try{return ee.get(e)(t,i)}catch(e){if(Fs(r),e!==e+0&&"longjmp"!==e)throw e;Hs(1,0)}},Oa:function(e,t,i,r){var n=Ns();try{return ee.get(e)(t,i,r)}catch(e){if(Fs(n),e!==e+0&&"longjmp"!==e)throw e;Hs(1,0)}},kc:function(e,t,i,r,n){var s=Ns();try{return ee.get(e)(t,i,r,n)}catch(e){if(Fs(s),e!==e+0&&"longjmp"!==e)throw e;Hs(1,0)}},o:function(e){P=e},w:function(){return 0},rb:function(e,t,i,r){return function(e,t,i,r){function n(e,t,i){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=i[0]+e;return e}function s(e,t){return n(e,t,"0")}function o(e,t){function i(e){return 0>e?-1:0<e?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function a(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function l(e){e=Ss(new Date(e.oi+1900,0,1),e.qj);var t=new Date(e.getFullYear()+1,0,4),i=a(new Date(e.getFullYear(),0,4));return t=a(t),0>=o(i,e)?0>=o(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var h=H[r+40>>2];for(var u in r={cl:H[r>>2],bl:H[r+4>>2],oj:H[r+8>>2],bj:H[r+12>>2],Vi:H[r+16>>2],oi:H[r+20>>2],pj:H[r+24>>2],qj:H[r+28>>2],yl:H[r+32>>2],al:H[r+36>>2],dl:h?M(h):""},i=M(i),h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})i=i.replace(new RegExp(u,"g"),h[u]);var d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),c="January February March April May June July August September October November December".split(" ");for(u in h={"%a":function(e){return d[e.pj].substring(0,3)},"%A":function(e){return d[e.pj]},"%b":function(e){return c[e.Vi].substring(0,3)},"%B":function(e){return c[e.Vi]},"%C":function(e){return s((e.oi+1900)/100|0,2)},"%d":function(e){return s(e.bj,2)},"%e":function(e){return n(e.bj,2," ")},"%g":function(e){return l(e).toString().substring(2)},"%G":function(e){return l(e)},"%H":function(e){return s(e.oj,2)},"%I":function(e){return 0==(e=e.oj)?e=12:12<e&&(e-=12),s(e,2)},"%j":function(e){return s(e.bj+ys(fs(e.oi+1900)?vs:ms,e.Vi-1),3)},"%m":function(e){return s(e.Vi+1,2)},"%M":function(e){return s(e.bl,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.oj&&12>e.oj?"AM":"PM"},"%S":function(e){return s(e.cl,2)},"%t":function(){return"\t"},"%u":function(e){return e.pj||7},"%U":function(e){var t=new Date(e.oi+1900,0,1),i=0===t.getDay()?t:Ss(t,7-t.getDay());return 0>o(i,e=new Date(e.oi+1900,e.Vi,e.bj))?s(Math.ceil((31-i.getDate()+(ys(fs(e.getFullYear())?vs:ms,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(i,t)?"01":"00"},"%V":function(e){var t=new Date(e.oi+1901,0,4),i=a(new Date(e.oi+1900,0,4));t=a(t);var r=Ss(new Date(e.oi+1900,0,1),e.qj);return 0>o(r,i)?"53":0>=o(t,r)?"01":s(Math.ceil((i.getFullYear()<e.oi+1900?e.qj+32-i.getDate():e.qj+1-i.getDate())/7),2)},"%w":function(e){return e.pj},"%W":function(e){var t=new Date(e.oi,0,1),i=1===t.getDay()?t:Ss(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(i,e=new Date(e.oi+1900,e.Vi,e.bj))?s(Math.ceil((31-i.getDate()+(ys(fs(e.getFullYear())?vs:ms,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(i,t)?"01":"00"},"%y":function(e){return(e.oi+1900).toString().substring(2)},"%Y":function(e){return e.oi+1900},"%z":function(e){var t=0<=(e=e.al);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.dl},"%%":function(){return"%"}})i.includes(u)&&(i=i.replace(new RegExp(u,"g"),h[u](r)));return(u=ws(i,!1)).length>t?0:(_.set(u,e),u.length-1)}(e,t,i,r)},Z:function(e){var t=Date.now()/1e3|0;return e&&(H[e>>2]=t),t}};!function(){function e(e){n.asm=e.exports,x=n.asm.wh,Q(),ee=n.asm.Bh,ie.unshift(n.asm.xh),ce()}function t(t){e(t.instance)}function i(e){return(S||"function"!=typeof fetch?Promise.resolve().then((function(){return ye()})):fetch(ae,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ae+"'";return e.arrayBuffer()})).catch((function(){return ye()}))).then((function(e){return WebAssembly.instantiate(e,r)})).then(e,(function(e){v("failed to asynchronously prepare wasm: "+e),pe(e)}))}var r={a:Rs};if(de(),n.instantiateWasm)try{return n.instantiateWasm(r,e)}catch(e){return v("Module.instantiateWasm callback failed with error: "+e),!1}(S||"function"!=typeof WebAssembly.instantiateStreaming||ge()||"function"!=typeof fetch?i(t):fetch(ae,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(e){return v("wasm streaming compile failed: "+e),v("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(o)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.xh).apply(null,arguments)};var Ds=n._malloc=function(){return(Ds=n._malloc=n.asm.yh).apply(null,arguments)},Ls=n._free=function(){return(Ls=n._free=n.asm.zh).apply(null,arguments)},Ms=n.___errno_location=function(){return(Ms=n.___errno_location=n.asm.Ah).apply(null,arguments)};n._SCRTFillActiveTextureCharArray=function(){return(n._SCRTFillActiveTextureCharArray=n.asm.Ch).apply(null,arguments)},n._main=function(){return(n._main=n.asm.Dh).apply(null,arguments)};var Is=n.___getTypeName=function(){return(Is=n.___getTypeName=n.asm.Eh).apply(null,arguments)};n.___embind_register_native_and_builtin_types=function(){return(n.___embind_register_native_and_builtin_types=n.asm.Fh).apply(null,arguments)};var Os,ks=n.__get_tzname=function(){return(ks=n.__get_tzname=n.asm.Gh).apply(null,arguments)},Vs=n.__get_daylight=function(){return(Vs=n.__get_daylight=n.asm.Hh).apply(null,arguments)},_s=n.__get_timezone=function(){return(_s=n.__get_timezone=n.asm.Ih).apply(null,arguments)},Ns=n.stackSave=function(){return(Ns=n.stackSave=n.asm.Jh).apply(null,arguments)},Fs=n.stackRestore=function(){return(Fs=n.stackRestore=n.asm.Kh).apply(null,arguments)},Bs=n.stackAlloc=function(){return(Bs=n.stackAlloc=n.asm.Lh).apply(null,arguments)},Hs=n._setThrew=function(){return(Hs=n._setThrew=n.asm.Mh).apply(null,arguments)};function Ys(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function zs(e){var t=n._main,i=(e=e||[]).length+1,r=Bs(4*(i+1));H[r>>2]=q(u);for(var s=1;s<i;s++)H[(r>>2)+s]=q(e[s-1]);H[(r>>2)+i]=0;try{Gs(t(i,r))}catch(t){t instanceof Ys||"unwind"==t||((e=t)&&"object"==typeof t&&t.stack&&(e=[t,t.stack]),v("exception thrown: "+e),d(1,t))}}function js(e){function t(){if(!Os&&(Os=!0,n.calledRun=!0,!T)){if(n.noFSInit||et||(et=!0,ft(),n.stdin=n.stdin,n.stdout=n.stdout,n.stderr=n.stderr,n.stdin?St("/dev","stdin",n.stdin):at("/dev/tty","/dev/stdin"),n.stdout?St("/dev","stdout",null,n.stdout):at("/dev/tty","/dev/stdout"),n.stderr?St("/dev","stderr",null,n.stderr):at("/dev/tty1","/dev/stderr"),dt("/dev/stdin",0),dt("/dev/stdout",1),dt("/dev/stderr",1)),He=!1,Ce(ie),Ce(re),s(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Xs&&zs(e),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var t=n.postRun.shift();se.unshift(t)}Ce(se)}}if(e=e||h,!(0<le)){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)oe();Ce(te),0<le||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t())}}function Gs(e){b=e,C||(n.onExit&&n.onExit(e),T=!0),d(e,new Ys(e))}if(n.dynCall_iiiji=function(){return(n.dynCall_iiiji=n.asm.Nh).apply(null,arguments)},n.dynCall_iiij=function(){return(n.dynCall_iiij=n.asm.Oh).apply(null,arguments)},n.dynCall_iijii=function(){return(n.dynCall_iijii=n.asm.Ph).apply(null,arguments)},n.dynCall_iiijiji=function(){return(n.dynCall_iiijiji=n.asm.Qh).apply(null,arguments)},n.dynCall_vij=function(){return(n.dynCall_vij=n.asm.Rh).apply(null,arguments)},n.dynCall_jiji=function(){return(n.dynCall_jiji=n.asm.Sh).apply(null,arguments)},n.dynCall_ji=function(){return(n.dynCall_ji=n.asm.Th).apply(null,arguments)},n.dynCall_viijii=function(){return(n.dynCall_viijii=n.asm.Uh).apply(null,arguments)},n.dynCall_iiiiij=function(){return(n.dynCall_iiiiij=n.asm.Vh).apply(null,arguments)},n.dynCall_iiiiijj=function(){return(n.dynCall_iiiiijj=n.asm.Wh).apply(null,arguments)},n.dynCall_iiiiiijj=function(){return(n.dynCall_iiiiiijj=n.asm.Xh).apply(null,arguments)},n.ccall=R,n.cwrap=function(e,t,i,r){var n=(i=i||[]).every((function(e){return"number"===e}));return"string"!==t&&n&&!r?w(e):function(){return R(e,t,i,arguments)}},n.UTF8ToString=M,n.stringToUTF8=O,n.lengthBytesUTF8=k,n.addRunDependency=de,n.removeRunDependency=ce,n.FS_createPath=vt,n.FS_createDataFile=mt,n.FS_createPreloadedFile=At,n.FS_createLazyFile=Ct,n.FS_createDevice=St,n.FS_unlink=lt,n.callMain=zs,ue=function e(){Os||js(),Os||(ue=e)},n.run=js,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.pop()();var Xs=!0;return n.noInitialRun&&(Xs=!1),js(),e.ready});e.exports=n}).call(this,i(124),i(275).setImmediate)},function(e,t,i){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function s(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new s(n.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new s(n.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i(445),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(276))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyLicense3D=void 0;const r=i(125),n={getLicenseChallenge3D:()=>({challenge:s.SCRTCredentials.GetLicenseChallenge(),orderId:s.SCRTCredentials.GetOrderId()}),setChallengeResponse3D:e=>s.SCRTCredentials.ApplyLicenseResponse(e),setNewLicense3D:e=>{let t,i=!1;return s.SCRTCredentials.SetRuntimeLicenseKeyW(e),i=s.SCRTCredentials.RequiresValidation(),t=s.SCRTCredentials.GetLicenseType()===s.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED,(0,r.updateLicenseDisplay)((0,r.getLicenseInfo)(s),o,!1,!0),{requiresValidation:i,trialExpired:t}},updateLicenseDisplay3D:()=>(0,r.updateLicenseDisplay)((0,r.getLicenseInfo)(s),o,!1,!0)};let s,o,a=!0;t.applyLicense3D=(e,t,i)=>{i||a?(s=e,o=t,(0,r.setCallbacks3D)(n),(0,r.applyLicense)(e,o)):(0,r.updateLicenseDisplay)((0,r.getLicenseInfo)(e),t,!1,!1),i||(a=!1)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.CAMERA_POSITION="CAMERA_POSITION",e.CAMERA_TARGET="CAMERA_TARGET",e.CAMERA_ORTHOHEIGHT="CAMERA_ORTHOHEIGHT",e.CAMERA_ORTHOWIDTH="CAMERA_ORTHOWIDTH",e.CAMERA_FIELDOFVIEW="CAMERA_FIELDOFVIEW",e.CAMERA_PROJECTIONMODE="CAMERA_PROJECTIONMODE",e.CAMERA_ISATTACHED="CAMERA_ISATTACHED",e.CAMERA_ORBITALPITCH="CAMERA_ORBITALPITCH",e.CAMERA_ORBITALYAW="CAMERA_ORBITALYAW",e.CAMERA_RADIUS="CAMERA_RADIUS",e.CAMERA_FORWARD="CAMERA_FORWARD",e.CAMERA_SIDE="CAMERA_SIDE",e.CAMERA_UP="CAMERA_UP",e.CAMERA_UPGLOBAL="CAMERA_UPGLOBAL",e.CAMERA_ASPECTRATIO="CAMERA_ASPECTRATIO",e.CAMERA_ID="CAMERA_ID",e.CAMERA_FARCLIP="CAMERA_FARCLIP",e.CAMERA_NEARCLIP="CAMERA_NEARCLIP",e.SURFACE_CAMERA="SURFACE_CAMERA",e.SURFACE_XAXIS="SURFACE_XAXIS",e.SURFACE_YAXIS="SURFACE_YAXIS",e.SURFACE_ZAXIS="SURFACE_ZAXIS",e.SURFACE_VIEWPORT_MANAGER="SURFACE_VIEWPORT_MANAGER",e.SURFACE_WORLD_DIMENSIONS="SURFACE_WORLD_DIMENSIONS"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toScrtTextStyle=t.updateScrtLineStyle=t.updateScrtAxisDescriptor=t.AxisCubeEntity=void 0;const r=i(79),n=i(111),s=i(141),o=i(93);class a extends s.BaseSceneEntity3D{constructor(e,t){super(e),this.type=r.ESceneEntityType.AxisCubeEntity,this.sciChart3DSurface=t,this.setNativeEntity(e.SCRTAxisCubeEntity.implement(this))}delete(){super.delete()}Update(e){var i,r;if(!this.currentRenderPassData)return;const n=this.nativeEntity,s=n.GetDescriptorPtr(),{sceneDescriptor:{axisCubeDescriptor:{xAxisDescriptor:a,yAxisDescriptor:l,zAxisDescriptor:h}}}=this.currentRenderPassData;(0,o.getDescriptorsEqual)(a,this.lastXDescriptor)&&(0,o.getDescriptorsEqual)(l,this.lastYDescriptor)&&(0,o.getDescriptorsEqual)(h,this.lastZDescriptor)||n.DestroyMeshes(),this.lastXDescriptor=a,this.lastYDescriptor=l,this.lastZDescriptor=h;[[s.GetXAxisDescPtr(),a],[s.GetYAxisDescPtr(),l],[s.GetZAxisDescPtr(),h]].forEach(e=>(0,t.updateScrtAxisDescriptor)(this.webAssemblyContext,e[0],e[1])),super.Update(e),(null===(i=this.sciChart3DSurface)||void 0===i?void 0:i.isAxisCubeRendered)||(null===(r=this.sciChart3DSurface)||void 0===r||r.setIsAxisCubeRendered(),setTimeout(()=>{var e;return null===(e=this.sciChart3DSurface)||void 0===e?void 0:e.invalidateElement()},0))}}t.AxisCubeEntity=a;t.updateScrtAxisDescriptor=(e,i,r)=>{var s;i.m_strTitle=null!==(s=r.axisTitle)&&void 0!==s?s:"",i.m_fRangeSize=r.axisSize,i.m_fTitleOffset=r.titleOffset,i.m_fTextOffset=r.tickLabelsOffset,i.m_bBandsEnabled=r.drawBands,i.m_bMajorLinesEnabled=r.drawMajorGridlines,i.m_bMajorTicksEnabled=r.drawMajorTicks,i.m_bMinorLinesEnabled=r.drawMinorGridlines,i.m_bMinorTicksEnabled=r.drawMinorTicks,(0,n.updateTsrVector4)(r.bandColor,i.GetBandColorPtr()),(0,t.updateScrtLineStyle)(r.majorLineStyle,i.GetMajorLineStylePtr()),(0,t.updateScrtLineStyle)(r.minorLineStyle,i.GetMinorLineStylePtr()),(0,t.toScrtTextStyle)(r.labelStyle,i.GetTextStylePtr()),(0,t.updateScrtLineStyle)(r.majorTickStyle,i.GetMajorTickStylePtr()),(0,t.updateScrtLineStyle)(r.minorTickStyle,i.GetMinorTickStylePtr());const o=new e.FloatVector;r.majorCoordinates.forEach(e=>o.push_back(e)),i.SetMajors(o),o.delete();const a=new e.FloatVector;r.minorCoordinates.forEach(e=>a.push_back(e)),i.SetMinors(a),a.delete();const l=new e.WStringVector;r.tickLabels.forEach(e=>l.push_back(e)),i.SetMajorLabels(l),l.delete()};t.updateScrtLineStyle=(e,t)=>{t.m_fStrokeThickness=e.strokeThickness,t.m_fStart=e.start,t.m_fEnd=e.end,(0,n.updateTsrVector4)(e.stroke,t.GetStrokeColorPtr())};t.toScrtTextStyle=(e,t)=>(t.m_fSize=e.fontSize,t.m_strFont=e.fontFamily,t.m_uiARGBColor=e.foreground,t.m_fDpiScaling=e.dpiScaling,e.alignment&&t.SetAlignment(e.alignment),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSingle3dInternal=void 0;const r=i(274),n=i(36),s=i(91),o=i(92),a=i(4),l=i(53),h=i(71),u=i(277),d=i(140);t.createSingle3dInternal=(e,t)=>((0,n.ensureRegistrations)(),new Promise((i,n)=>{var u,p,g,f;const y=o.default.initCanvas(e,null!==(u=null==t?void 0:t.widthAspect)&&void 0!==u?u:0,null!==(p=null==t?void 0:t.heightAspect)&&void 0!==p?p:0),v=null!==(g=null==t?void 0:t.loader)&&void 0!==g?g:new s.DefaultSciChartLoader,m=v.addChartLoader(y.domDivContainer,null!==(f=null==t?void 0:t.theme)&&void 0!==f?f:a.SciChartSurfaceBase.DEFAULT_THEME),S=h.WebGlHelper.getWebGlSupport();if(S!==h.EWebGLSupport.WebGL2&&S!==h.EWebGLSupport.WebGL1)throw Error("Sorry Your browser does not support WebGL.");{const e=(0,a.getLocateFile)(d.sciChartConfig3D);new r({locateFile:e,noInitialRun:!0}).then(e=>{var r;v.removeChartLoader(y.domDivContainer,m),e.doNotCaptureKeyboard=!0,c(e,y,i,null!==(r=null==t?void 0:t.theme)&&void 0!==r?r:a.SciChartSurfaceBase.DEFAULT_THEME),(0,l.checkBuildStamp)(e)}).catch(e=>{throw v.removeChartLoader(y.domDivContainer,m),e})}}));const c=(e,t,i,r)=>{t.domCanvas2D.width,t.domCanvas2D.height;let n;e.preRun.push(()=>ENV.SDL_EMSCRIPTEN_KEYBOARD_ELEMENT="#chart_WebGL"),e.canvas=t.domCanvasWebGL;const s={InitializeChart(){n=new d.SciChart3DSurface(e,{canvases:t}),n.applyTheme(r),setTimeout(()=>{n.invalidateElement(),(0,u.applyLicense3D)(e,n,!0);const r=o.default.subscribeToResize(t.domChartRoot,t.aspect,n);n.addDeletable(r),n.setIsInitialized(),i({wasmContext:e,sciChart3DSurface:n})},0)},Draw(e){n.isInitialized&&n.doDrawingLoop()},Update(e){},ShutDownChart(){}},a=e.SCRTSampleChartInterface.implement(s),l=new e.SCRTFrameRenderer3D;a.SetFrameRenderer(l),a.SetFPSCounterEnabled(!1),e.SCRTSetGlobalSampleChartInterface(a),e.callMain()}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultViewportManager3D=void 0;const r=i(446);class n extends r.ViewportManager3DBase{}t.DefaultViewportManager3D=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GizmoEntity=void 0;const r=i(79),n=i(141);class s extends n.BaseSceneEntity3D{constructor(e){super(e),this.type=r.ESceneEntityType.GizmoEntity,this.setNativeEntity(e.SCRTXyzGizmoEntity.implement(this))}get enableGizmo(){return this.nativeEntity.GetOverrideEnableGizmo()}set enableGizmo(e){this.nativeEntity.SetOverrideEnableGizmo(e)}}t.GizmoEntity=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RootSceneEntity=void 0;const r=i(79),n=i(141),s=i(1);class o extends n.BaseSceneEntity3D{constructor(e,t){super(e),this.type=r.ESceneEntityType.RootSceneEntity,s.Guard.notNull(t,"parentSurface"),this.parentSurface=t}delete(){super.delete()}attachChild(e){(null==e?void 0:e.nativeEntity)&&this.world.AddEntity(e.nativeEntity),e.parent=this,e.onAttached()}detachChild(e){(null==e?void 0:e.nativeEntity)&&this.world.RemoveEntity(e.nativeEntity),e.onDetached(),e.parent=void 0}}t.RootSceneEntity=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChart3DRenderer=void 0;const r=i(0),n=i(1),s=i(74),o=i(285),a=i(286),l=i(287);class h{constructor(e,t){n.Guard.notNull(e,"scs"),this.scs=e,this.wasmContext=t}static getSceneDescriptor(e){var t,i,r;const n=new l.SceneDescriptor;return n.axisCubeDescriptor=new o.AxisCubeDescriptor,n.axisCubeDescriptor.dimensions=e.worldDimensions,n.axisCubeDescriptor.isVisible=!0,n.axisCubeDescriptor.xAxisDescriptor=null===(t=e.xAxis)||void 0===t?void 0:t.toAxisDescriptor(),n.axisCubeDescriptor.yAxisDescriptor=null===(i=e.yAxis)||void 0===i?void 0:i.toAxisDescriptor(),n.axisCubeDescriptor.zAxisDescriptor=null===(r=e.zAxis)||void 0===r?void 0:r.toAxisDescriptor(),n}static prepareRenderData(e){const t=new a.RenderPassInfo3D;return t.xCalc=e.xAxis.getCurrentCoordinateCalculator(),t.yCalc=e.yAxis.getCurrentCoordinateCalculator(),t.zCalc=e.zAxis.getCurrentCoordinateCalculator(),t.worldDimensions=e.worldDimensions,t.sceneDescriptor=h.getSceneDescriptor(e),t}static tryPerformAutoRangeOn(e,t){if((!e.hasValidVisibleRange()||e.hasDefaultVisibleRange())&&e.autoRange===s.EAutoRange.Once||e.autoRange===s.EAutoRange.Always){const i=t.viewportManager.calculateAutoRange(e);i&&i!==e.visibleRange&&e.isValidRange(i)&&(e.visibleRange=i)}}render(){if(this.scs.isDeleted||!this.scs.isInitialized)return;if(!this.isSurfaceValid(this.scs))throw Error("SciChart3DSurface is not valid");const e=this.scs.getSceneWorld();if(!e)return void console.warn("SciChart3DRenderer: Undefined scene world!");this.wasmContext.SCRTSetActiveWorld(e),this.updateWorldDimensions(e,this.scs.worldDimensions);const t=e.GetMainCamera();this.scs.camera.updateEngineCamera(t);const i=this.previousTime?Date.now()-this.previousTime:void 0;this.previousTime=Date.now(),this.scs.onAnimate(i),this.scs.updateBackground(),this.prepareAxes(this.scs.xAxis,this.scs.yAxis,this.scs.zAxis);const r=h.prepareRenderData(this.scs);this.scs.rootEntity.visitEntities(e=>e.setRenderPassData(r)),this.scs.updateWatermark(6,6),this.scs.onSciChartRendered(),this.scs.isRunningAnimation&&setTimeout(this.scs.invalidateElement,0)}isSurfaceValid(e,t){if(!e.xAxis)throw new Error("Unable to draw SciChart3DSurface as the xAxis is undefined");if(!e.yAxis)throw new Error("Unable to draw SciChart3DSurface as the yAxis is undefined");if(!e.zAxis)throw new Error("Unable to draw SciChart3DSurface as the zAxis is undefined");return!0}prepareAxes(...e){e.forEach(e=>{e.validateAxis(),h.tryPerformAutoRangeOn(e,this.scs),e.isMeasured=!0})}updateWorldDimensions(e,t){let i;n.Guard.notNull(t,"worldDimensions");try{i=this.scs.worldDimensions.toTsrVector3(this.wasmContext),e.SetWorldDimensions(i)}finally{(0,r.deleteSafe)(i)}}}t.SciChart3DRenderer=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisCubeDescriptor=void 0;t.AxisCubeDescriptor=class{}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderPassInfo3D=void 0;t.RenderPassInfo3D=class{}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SceneDescriptor=void 0;t.SceneDescriptor=class{}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sciChartDestinations=t.createMultichart=void 0;const n=i(289),s=i(53),o=i(1),a=i(30),l=i(125),h=i(91),u=i(92),d=i(66),c=i(4),p={wasmContext:void 0,getChildSurfaces:void 0,createChildSurface:void 0};let g;t.createMultichart=(e,t)=>r(void 0,void 0,void 0,(function*(){var i,r,n;u.default.checkChartDivExists(e);const o=u.default.initCanvas(e,null!==(i=null==t?void 0:t.widthAspect)&&void 0!==i?i:0,null!==(r=null==t?void 0:t.heightAspect)&&void 0!==r?r:0,u.default.ECanvasType.canvas2D,null==t?void 0:t.disableAspect),a=null!==(n=null==t?void 0:t.loader)&&void 0!==n?n:new h.DefaultSciChartLoader,l=a.addChartLoader(o.domDivContainer,null==t?void 0:t.theme);try{if(!p.wasmContext||!p.createChildSurface||!p.getChildSurfaces){g||(g=y());const e=yield g;p.wasmContext=e.wasmContext,(0,s.checkBuildStamp)(e.wasmContext),p.createChildSurface=e.createChildSurface,p.getChildSurfaces=e.getChildSurfaces,f(p)}const{createChildSurface:e,wasmContext:i}=p,r=e(o.domChartRoot.id,o,null==t?void 0:t.theme);return new Promise(e=>{setTimeout(()=>{a.removeChartLoader(o.domDivContainer,l),e({wasmContext:i,sciChartSurface:r})},0)})}catch(e){return console.error(e),a.removeChartLoader(o.domDivContainer,l),Promise.reject(e)}}));const f=e=>{const{wasmContext:t,getChildSurfaces:i}=p;t.canvas.addEventListener("webglcontextlost",e=>{console.warn("WebGL context lost: ",e.statusMessage),e.preventDefault(),a.WebGlRenderContext2D.webGlResourcesRefs.forEach(e=>{e.invalidateCache()}),t.SCRTShutdownEngine2D()},!1),t.canvas.addEventListener("webglcontextrestored",e=>{console.warn("WebGL context restored: ",e.statusMessage),t.SCRTInitEngine2D(),t.TSRSetDrawRequestsEnabled(!0)},!1)};t.sciChartDestinations=[];const y=()=>{const e=(e,i,r,n,s,o)=>{const a=(0,c.createChartDestination)(r.domCanvas2D);if(!a)return void r.delete();const l=e.SCRTSurfaceDestination.implement(a);o.AddDestination(l),o.SetFPSCounterEnabled(!1),t.sciChartDestinations.push({canvasElementId:i,sciChartSurface:r,width:n,height:s})};return new Promise((i,r)=>{const s=(0,c.getMasterCanvas)(),a=(0,c.getLocateFile)(d.sciChartConfig);new n({locateFile:a,noInitialRun:!0}).then(r=>{const n=()=>t.sciChartDestinations.map(e=>e.sciChartSurface),a=(i,n,s)=>{o.Guard.notNull(s,"theme");const a=u.default.getCanvas2dId(i);t.sciChartDestinations.filter(e=>e.canvasElementId===a).forEach(e=>e.sciChartSurface.delete(!1));const h=t.sciChartDestinations.filter(e=>e.canvasElementId!==a);for(p.ClearDestinations();t.sciChartDestinations.length>0;)t.sciChartDestinations.pop();h.forEach(t=>e(r,t.canvasElementId,t.sciChartSurface,t.width,t.height,p));const c=((e,i,r,n)=>{o.Guard.notNull(n,"theme");const s=new d.SciChartSurface(e,{canvases:r});s.applyTheme(n);const a=u.default.subscribeToResize(r.domChartRoot,r.aspect,s,r.disableAspect);return s.addDeletable(a),s.setDestinations(t.sciChartDestinations),s})(r,0,n,s);return e(r,a,c,n.domCanvas2D.width,n.domCanvas2D.height,p),l.licenseManager.applyLicense2D(r,c,!1),c};r.canvas=s;const h={InitializeChart(){i({getChildSurfaces:n,createChildSurface:a,wasmContext:r})},Draw(e){const i=t.sciChartDestinations.find(t=>t.canvasElementId===e);i&&i.sciChartSurface.renderSurface.onRenderTimeElapsed()},Update(e){},ShutDownChart(){}},p=r.SCRTSampleChartInterface.implement(h),g=new r.SCRTFrameRenderer2D;p.SetFrameRenderer(g),r.SCRTSetGlobalSampleChartInterface(p);const f=r.SCRTCopyToDestinationInterface.implement({CopyToDestination:(0,c.copyToCanvas)(c.SciChartSurfaceBase.domMasterCanvas,v)});r.SCRTSetGlobalCopyToDestinationInterface(f),r.TSRSetDrawRequestsEnabled(!0),c.SciChartSurfaceBase.domMasterCanvas&&r.TSRSetMainWindowSize(c.SciChartSurfaceBase.domMasterCanvas.width,c.SciChartSurfaceBase.domMasterCanvas.height),r.callMain()}).catch(e=>{console.error(e),r("Could not load SciChart WebAssembly module.\n Check your build process and ensure that your scichart2d.wasm, scichart2d.data and scichart2d.js files are from the same version")})})},v=e=>t.sciChartDestinations.find(t=>t.canvasElementId===e)},function(e,t,i){(function(t,i){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var n,s,o;e=e||{},n||(n=void 0!==e?e:{}),n.ready=new Promise((function(e,t){s=e,o=t})),n.wj||(n.wj=0),n.wj++,function(e){function i(){function t(e,t,i){this.start=e,this.end=t,this.audio=i}function i(i){if(!i)throw"Loading data file failed."+Error().stack;if(!(i instanceof ArrayBuffer))throw"bad input to processPackageData"+Error().stack;i=new Uint8Array(i),t.prototype.Hj=i,i=e.files;for(var r=0;r<i.length;++r)t.prototype.Ci[i[r].filename].onload();n.removeRunDependency("datafile_scichart2d.data")}n.FS_createPath("/","assets",!0,!0),t.prototype={Ci:{},open:function(e,t){this.name=t,this.Ci[t]=this,n.addRunDependency("fp "+this.name)},onload:function(){this.dj(this.Hj.subarray(this.start,this.end))},dj:function(e){n.FS_createDataFile(this.name,null,e,!0,!0,!0),n.removeRunDependency("fp "+this.name),this.Ci[this.name]=null}};for(var r=e.files,s=0;s<r.length;++s)new t(r[s].start,r[s].end,r[s].audio).open("GET",r[s].filename);n.addRunDependency("datafile_scichart2d.data"),n.ak||(n.ak={}),n.ak["scichart2d.data"]={ol:!1},a?(i(a),a=null):o=i}"object"==typeof window?window.encodeURIComponent(window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/"):void 0===t&&"undefined"!=typeof location&&encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"),"function"!=typeof n.locateFilePackage||n.locateFile||(n.locateFile=n.locateFilePackage,v("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r=n.locateFile?n.locateFile("scichart2d.data",""):"scichart2d.data",s=e.remote_package_size,o=null,a=n.getPreloadedPackage?n.getPreloadedPackage(r,s):null;a||function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onprogress=function(i){var s=t;if(i.total&&(s=i.total),i.loaded){r.Ci?n.Qi[e].loaded=i.loaded:(r.Ci=!0,n.Qi||(n.Qi={}),n.Qi[e]={loaded:i.loaded,total:s});var o,a=s=i=0;for(o in n.Qi){var l=n.Qi[o];i+=l.total,s+=l.loaded,a++}i=Math.ceil(i*n.wj/a),n.setStatus&&n.setStatus("Downloading data... ("+s+"/"+i+")")}else!n.Qi&&n.setStatus&&n.setStatus("Downloading data...")},r.onerror=function(){throw Error("NetworkError for: "+e)},r.onload=function(){if(!(200==r.status||304==r.status||206==r.status||0==r.status&&r.response))throw Error(r.statusText+" : "+r.responseURL);i(r.response)},r.send(null)}(r,s,(function(e){o?(o(e),o=null):a=e})),n.calledRun?i():(n.preRun||(n.preRun=[]),n.preRun.push(i))}({files:[{filename:"/assets/TSRAssets.web.pkg",start:0,end:615464,audio:0},{filename:"/assets/SCRTNAssets.web.pkg",start:615464,end:734386,audio:0}],remote_package_size:734386,package_uuid:"89125592-5a42-4691-a4ac-241260b706ee"}),En&&(En=function(e){e=bn(e);var t=Tn[e]||document.querySelector(e);return"#canvas"===e&&(t=t||n.canvas),t});var a,l={};for(a in n)n.hasOwnProperty(a)&&(l[a]=n[a]);var h=[],u="./this.program";function d(e,t){throw t}var c,p,g,f="";"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",c=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p=function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i()},r.onerror=i,r.send(null)},g=function(e){document.title=e};var y=n.print||console.log.bind(console),v=n.printErr||console.warn.bind(console);for(a in l)l.hasOwnProperty(a)&&(n[a]=l[a]);l=null,n.arguments&&(h=n.arguments),n.thisProgram&&(u=n.thisProgram),n.quit&&(d=n.quit);var m,S,P=0;n.wasmBinary&&(S=n.wasmBinary);var C=n.noExitRuntime||!0;function A(e,t){var i="float";switch("*"===i.charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":_[e>>0]=t;break;case"i16":F[e>>1]=t;break;case"i32":H[e>>2]=t;break;case"i64":me=[t>>>0,(ve=t,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[e>>2]=me[0],H[e+4>>2]=me[1];break;case"float":z[e>>2]=t;break;case"double":j[e>>3]=t;break;default:pe("invalid type for setValue: "+i)}}"object"!=typeof WebAssembly&&pe("no native wasm support detected");var x,b,T=!1;function E(e,t){e||pe("Assertion failed: "+t)}function w(e){var t=n["_"+e];return E(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function R(e,t,i,r){var n,s={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);O(e,t=Bs(i),i)}return t},array:function(e){var t=Bs(e.length);return _.set(e,t),t}},o=w(e),a=[];if(e=0,r)for(var l=0;l<r.length;l++){var h=s[i[l]];h?(0===e&&(e=Ns()),a[l]=h(r[l])):a[l]=r[l]}return i=o.apply(null,a),n=i,i="string"===t?M(n):"boolean"===t?!!n:n,0!==e&&Fs(e),i}var D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(e,t,i){var r=t+i;for(i=t;e[i]&&!(i>=r);)++i;if(16<i-t&&e.subarray&&D)return D.decode(e.subarray(t,i));for(r="";t<i;){var n=e[t++];if(128&n){var s=63&e[t++];if(192==(224&n))r+=String.fromCharCode((31&n)<<6|s);else{var o=63&e[t++];65536>(n=224==(240&n)?(15&n)<<12|s<<6|o:(7&n)<<18|s<<12|o<<6|63&e[t++])?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else r+=String.fromCharCode(n)}return r}function M(e,t){return e?L(N,e,t):""}function I(e,t,i,r){if(!(0<r))return 0;var n=i;r=i+r-1;for(var s=0;s<e.length;++s){var o=e.charCodeAt(s);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),127>=o){if(i>=r)break;t[i++]=o}else{if(2047>=o){if(i+1>=r)break;t[i++]=192|o>>6}else{if(65535>=o){if(i+2>=r)break;t[i++]=224|o>>12}else{if(i+3>=r)break;t[i++]=240|o>>18,t[i++]=128|o>>12&63}t[i++]=128|o>>6&63}t[i++]=128|63&o}}return t[i]=0,i-n}function O(e,t,i){return I(e,N,t,i)}function k(e){for(var t=0,i=0;i<e.length;++i){var r=e.charCodeAt(i);55296<=r&&57343>=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),127>=r?++t:t=2047>=r?t+2:65535>=r?t+3:t+4}return t}var V,_,N,F,B,H,Y,z,j,G="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function X(e,t){for(var i=e>>1,r=i+t/2;!(i>=r)&&B[i];)++i;if(32<(i<<=1)-e&&G)return G.decode(N.subarray(e,i));for(i="",r=0;!(r>=t/2);++r){var n=F[e+2*r>>1];if(0==n)break;i+=String.fromCharCode(n)}return i}function W(e,t,i){if(void 0===i&&(i=2147483647),2>i)return 0;var r=t;i=(i-=2)<2*e.length?i/2:e.length;for(var n=0;n<i;++n)F[t>>1]=e.charCodeAt(n),t+=2;return F[t>>1]=0,t-r}function U(e){return 2*e.length}function $(e,t){for(var i=0,r="";!(i>=t/4);){var n=H[e+4*i>>2];if(0==n)break;++i,65536<=n?(n-=65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n)):r+=String.fromCharCode(n)}return r}function Z(e,t,i){if(void 0===i&&(i=2147483647),4>i)return 0;var r=t;i=r+i-4;for(var n=0;n<e.length;++n){var s=e.charCodeAt(n);if(55296<=s&&57343>=s&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++n)),H[t>>2]=s,(t+=4)+4>i)break}return H[t>>2]=0,t-r}function K(e){for(var t=0,i=0;i<e.length;++i){var r=e.charCodeAt(i);55296<=r&&57343>=r&&++i,t+=4}return t}function J(e){var t=k(e)+1,i=Ds(t);return i&&I(e,_,i,t),i}function q(e){var t=k(e)+1,i=Bs(t);return I(e,_,i,t),i}function Q(){var e=x.buffer;V=e,n.HEAP8=_=new Int8Array(e),n.HEAP16=F=new Int16Array(e),n.HEAP32=H=new Int32Array(e),n.HEAPU8=N=new Uint8Array(e),n.HEAPU16=B=new Uint16Array(e),n.HEAPU32=Y=new Uint32Array(e),n.HEAPF32=z=new Float32Array(e),n.HEAPF64=j=new Float64Array(e)}var ee,te=[],ie=[],re=[],ne=[],se=[];function oe(){var e=n.preRun.shift();te.unshift(e)}var ae,le=0,he=null,ue=null;function de(){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le)}function ce(){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),0==le&&(null!==he&&(clearInterval(he),he=null),ue)){var e=ue;ue=null,e()}}function pe(e){throw n.onAbort&&n.onAbort(e),v(e),T=!0,b=1,e=new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info."),o(e),e}function ge(){return ae.startsWith("data:application/octet-stream;base64,")}if(n.preloadedImages={},n.preloadedAudios={},ae="scichart2d.wasm",!ge()){var fe=ae;ae=n.locateFile?n.locateFile(fe,f):f+fe}function ye(){var e=ae;try{if(e==ae&&S)return new Uint8Array(S);throw"both async and sync fetching of the wasm failed"}catch(e){pe(e)}}var ve,me,Se,Pe={531776:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/windows phone/i.test(e)?0:/android/i.test(e)?1:/iPad|iPhone|iPod/.test(e)&&!window.Ci?2:0},532046:function(){return n.xj()},532082:function(){if(void 0===n.xj)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto;(e=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0})(),n.xj=e}catch(t){try{var i=Math.pow(2,32);(e=function(){return Math.floor(Math.random()*Math.floor(i))>>>0})(),n.xj=e}catch(e){throw"No secure random number generator found"}}},532764:function(e){e=M(e)+"\n\nAbort/Retry/Ignore/AlwaysIgnore? [ariA] :",null===(e=window.prompt(e,"i"))&&(e="i"),e=ws(e);var t=Ds(e.length);return e.subarray||e.slice?N.set(e,t):N.set(new Uint8Array(e),t),t},532989:function(e,t,i){n.SDL2||(n.SDL2={});var r=n.SDL2;r.mk!==n.canvas&&(r.xi=n.createContext(n.canvas,!1,!0),r.mk=n.canvas),r.w===e&&r.Ak===t&&r.Dk===r.xi||(r.image=r.xi.createImageData(e,t),r.w=e,r.Ak=t,r.Dk=r.xi),e=r.image.data,t=i>>2;var s=0;if("undefined"!=typeof CanvasPixelArray&&e instanceof CanvasPixelArray)for(i=e.length;s<i;){var o=H[t];e[s]=255&o,e[s+1]=o>>8&255,e[s+2]=o>>16&255,e[s+3]=255,t++,s+=4}else if(r.ll!==e&&(r.nk=new Int32Array(e.buffer),r.pk=new Uint8Array(e.buffer)),i=(e=r.nk).length,e.set(H.subarray(t,t+i)),e=r.pk,s=(t=3)+4*i,0==i%8)for(;t<s;)e[t]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,e[t=t+4|0]=255,t=t+4|0;else for(;t<s;)e[t]=255,t=t+4|0;return r.xi.putImageData(r.image,0,0),0},534444:function(e,t,i,r,n){var s=document.createElement("canvas");s.width=e,s.height=t;var o=s.getContext("2d");t=(e=o.createImageData(e,t)).data,n>>=2;var a,l=0;if("undefined"!=typeof CanvasPixelArray&&t instanceof CanvasPixelArray)for(a=t.length;l<a;){var h=H[n];t[l]=255&h,t[l+1]=h>>8&255,t[l+2]=h>>16&255,t[l+3]=h>>24&255,n++,l+=4}else a=(t=new Int32Array(t.buffer)).length,t.set(H.subarray(n,n+a));return o.putImageData(e,0,0),O(i=0===i&&0===r?"url("+s.toDataURL()+"), auto":"url("+s.toDataURL()+") "+i+" "+r+", auto",r=Ds(i.length+1),i.length+1),r},535433:function(e){return n.canvas&&(n.canvas.style.cursor=M(e)),0},535526:function(){n.canvas&&(n.canvas.style.cursor="none")},535595:function(){return screen.width},535620:function(){return screen.height},535646:function(){return window.innerWidth},535676:function(){return window.innerHeight},535707:function(e){return void 0!==g&&g(M(e)),0},535802:function(){return"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext?1:0},535939:function(){return void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia||void 0!==navigator.webkitGetUserMedia?1:0},536163:function(e){void 0===n.SDL2&&(n.SDL2={});var t=n.SDL2;return e?t.capture={}:t.audio={},t.gi||("undefined"!=typeof AudioContext?t.gi=new AudioContext:"undefined"!=typeof webkitAudioContext&&(t.gi=new webkitAudioContext),t.gi&&function(e){var t;t||(t=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach((function(i){t.forEach((function(t){t&&function(e,t,i){e.addEventListener(t,i,{once:!0})}(t,i,(function(){"suspended"===e.state&&e.resume()}))}))}))}(t.gi)),void 0===t.gi?-1:0},536656:function(){return n.SDL2.gi.sampleRate},536724:function(e,t,i,r){function s(){}function o(n){void 0!==a.capture.aj&&(clearTimeout(a.capture.aj),a.capture.aj=void 0),a.capture.jj=a.gi.createMediaStreamSource(n),a.capture.ni=a.gi.createScriptProcessor(t,e,1),a.capture.ni.onaudioprocess=function(e){void 0!==a&&void 0!==a.capture&&(e.outputBuffer.getChannelData(0).fill(0),a.capture.vj=e.inputBuffer,Ae("vi",i,[r]))},a.capture.jj.connect(a.capture.ni),a.capture.ni.connect(a.gi.destination),a.capture.stream=n}var a=n.SDL2;a.capture.mj=a.gi.createBuffer(e,t,a.gi.sampleRate),a.capture.mj.getChannelData(0).fill(0),a.capture.aj=setTimeout((function(){a.capture.vj=a.capture.mj,Ae("vi",i,[r])}),t/a.gi.sampleRate*1e3),void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(o).catch(s):void 0!==navigator.webkitGetUserMedia&&navigator.webkitGetUserMedia({audio:!0,video:!1},o,s)},538376:function(e,t,i,r){var s=n.SDL2;s.audio.ni=s.gi.createScriptProcessor(t,0,e),s.audio.ni.onaudioprocess=function(e){void 0!==s&&void 0!==s.audio&&(s.audio.Mj=e.outputBuffer,Ae("vi",i,[r]))},s.audio.ni.connect(s.gi.destination)},538786:function(e,t){for(var i=n.SDL2,r=i.capture.vj.numberOfChannels,s=0;s<r;++s){var o=i.capture.vj.getChannelData(s);if(o.length!=t)throw"Web Audio capture buffer length mismatch! Destination size: "+o.length+" samples vs expected "+t+" samples!";if(1==r)for(var a=0;a<t;++a)A(e+4*a,o[a]);else for(a=0;a<t;++a)A(e+4*(a*r+s),o[a])}},539391:function(e,t){for(var i=n.SDL2,r=i.audio.Mj.numberOfChannels,s=0;s<r;++s){var o=i.audio.Mj.getChannelData(s);if(o.length!=t)throw"Web Audio output buffer length mismatch! Destination size: "+o.length+" samples vs expected "+t+" samples!";for(var a=0;a<t;++a)o[a]=z[e+(a*r+s<<2)>>2]}},539871:function(e){var t=n.SDL2;if(e){if(void 0!==t.capture.aj&&clearTimeout(t.capture.aj),void 0!==t.capture.stream){e=t.capture.stream.getAudioTracks();for(var i=0;i<e.length;i++)t.capture.stream.removeTrack(e[i]);t.capture.stream=void 0}void 0!==t.capture.ni&&(t.capture.ni.onaudioprocess=function(){},t.capture.ni.disconnect(),t.capture.ni=void 0),void 0!==t.capture.jj&&(t.capture.jj.disconnect(),t.capture.jj=void 0),void 0!==t.capture.mj&&(t.capture.mj=void 0),t.capture=void 0}else null!=t.audio.ni&&(t.audio.ni.disconnect(),t.audio.ni=void 0),t.audio=void 0;void 0!==t.gi&&void 0===t.audio&&void 0===t.capture&&(t.gi.close(),t.gi=void 0)}};function Ce(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(n);else{var i=t.wk;"number"==typeof i?void 0===t.ej?ee.get(i)():ee.get(i)(t.ej):i(void 0===t.ej?null:t.ej)}}}function Ae(e,t,i){return e.includes("j")?(e=n["dynCall_"+e],t=i&&i.length?e.apply(null,[t].concat(i)):e.call(null,t)):t=ee.get(t).apply(null,i),t}function xe(e){this.bi=e-16,this.Yk=function(e){H[this.bi+4>>2]=e},this.Vk=function(e){H[this.bi+8>>2]=e},this.Wk=function(){H[this.bi>>2]=0},this.Uk=function(){_[this.bi+12>>0]=0},this.Xk=function(){_[this.bi+13>>0]=0},this.Ek=function(e,t){this.Yk(e),this.Vk(t),this.Wk(),this.Uk(),this.Xk()}}function be(e,t){for(var i=0,r=e.length-1;0<=r;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e}function Te(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=be(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e}function Ee(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function we(e){if("/"===e)return"/";var t=(e=(e=Te(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function Re(){for(var e="",t=!1,i=arguments.length-1;-1<=i&&!t;i--){if("string"!=typeof(t=0<=i?arguments[i]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=be(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}var De=[];function Le(e,t){De[e]={input:[],ki:[],Ti:t},it(e,Me)}var Me={open:function(e){var t=De[e.node.Zi];if(!t)throw new ze(43);e.fi=t,e.seekable=!1},close:function(e){e.fi.Ti.flush(e.fi)},flush:function(e){e.fi.Ti.flush(e.fi)},read:function(e,t,i,r){if(!e.fi||!e.fi.Ti.Sj)throw new ze(60);for(var n=0,s=0;s<r;s++){try{var o=e.fi.Ti.Sj(e.fi)}catch(e){throw new ze(29)}if(void 0===o&&0===n)throw new ze(6);if(null==o)break;n++,t[i+s]=o}return n&&(e.node.timestamp=Date.now()),n},write:function(e,t,i,r){if(!e.fi||!e.fi.Ti.Cj)throw new ze(60);try{for(var n=0;n<r;n++)e.fi.Ti.Cj(e.fi,t[i+n])}catch(e){throw new ze(29)}return r&&(e.node.timestamp=Date.now()),n}},Ie={Sj:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=ws(t,!0)}return e.input.shift()},Cj:function(e,t){null===t||10===t?(y(L(e.ki,0)),e.ki=[]):0!=t&&e.ki.push(t)},flush:function(e){e.ki&&0<e.ki.length&&(y(L(e.ki,0)),e.ki=[])}},Oe={Cj:function(e,t){null===t||10===t?(v(L(e.ki,0)),e.ki=[]):0!=t&&e.ki.push(t)},flush:function(e){e.ki&&0<e.ki.length&&(v(L(e.ki,0)),e.ki=[])}},ke={Bi:null,Gi:function(){return ke.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(24576==(61440&i)||4096==(61440&i))throw new ze(63);return ke.Bi||(ke.Bi={dir:{node:{zi:ke.$h.zi,pi:ke.$h.pi,Xi:ke.$h.Xi,kj:ke.$h.kj,ek:ke.$h.ek,tj:ke.$h.tj,fk:ke.$h.fk,dk:ke.$h.dk,nj:ke.$h.nj},stream:{Mi:ke.ai.Mi}},file:{node:{zi:ke.$h.zi,pi:ke.$h.pi},stream:{Mi:ke.ai.Mi,read:ke.ai.read,write:ke.ai.write,Ij:ke.ai.Ij,Wj:ke.ai.Wj,Yj:ke.ai.Yj}},link:{node:{zi:ke.$h.zi,pi:ke.$h.pi,$i:ke.$h.$i},stream:{}},Lj:{node:{zi:ke.$h.zi,pi:ke.$h.pi},stream:tt}}),16384==(61440&(i=$e(e,t,i,r)).mode)?(i.$h=ke.Bi.dir.node,i.ai=ke.Bi.dir.stream,i.Zh={}):32768==(61440&i.mode)?(i.$h=ke.Bi.file.node,i.ai=ke.Bi.file.stream,i.di=0,i.Zh=null):40960==(61440&i.mode)?(i.$h=ke.Bi.link.node,i.ai=ke.Bi.link.stream):8192==(61440&i.mode)&&(i.$h=ke.Bi.Lj.node,i.ai=ke.Bi.Lj.stream),i.timestamp=Date.now(),e&&(e.Zh[t]=i,e.timestamp=i.timestamp),i},pl:function(e){return e.Zh?e.Zh.subarray?e.Zh.subarray(0,e.di):new Uint8Array(e.Zh):new Uint8Array(0)},Pj:function(e,t){var i=e.Zh?e.Zh.length:0;i>=t||(t=Math.max(t,i*(1048576>i?2:1.125)>>>0),0!=i&&(t=Math.max(t,256)),i=e.Zh,e.Zh=new Uint8Array(t),0<e.di&&e.Zh.set(i.subarray(0,e.di),0))},Sk:function(e,t){if(e.di!=t)if(0==t)e.Zh=null,e.di=0;else{var i=e.Zh;e.Zh=new Uint8Array(t),i&&e.Zh.set(i.subarray(0,Math.min(t,e.di))),e.di=t}},$h:{zi:function(e){var t={};return t.rk=8192==(61440&e.mode)?e.id:1,t.zj=e.id,t.mode=e.mode,t.Mk=1,t.uid=0,t.zk=0,t.Zi=e.Zi,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.di:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.hk=new Date(e.timestamp),t.Lk=new Date(e.timestamp),t.lk=new Date(e.timestamp),t.ik=4096,t.jk=Math.ceil(t.size/t.ik),t},pi:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ke.Sk(e,t.size)},Xi:function(){throw je[44]},kj:function(e,t,i,r){return ke.createNode(e,t,i,r)},ek:function(e,t,i){if(16384==(61440&e.mode)){try{var r=Ue(t,i)}catch(e){}if(r)for(var n in r.Zh)throw new ze(55)}delete e.parent.Zh[e.name],e.parent.timestamp=Date.now(),e.name=i,t.Zh[i]=e,t.timestamp=e.parent.timestamp,e.parent=t},tj:function(e,t){delete e.Zh[t],e.timestamp=Date.now()},fk:function(e,t){var i,r=Ue(e,t);for(i in r.Zh)throw new ze(55);delete e.Zh[t],e.timestamp=Date.now()},dk:function(e){var t,i=[".",".."];for(t in e.Zh)e.Zh.hasOwnProperty(t)&&i.push(t);return i},nj:function(e,t,i){return(e=ke.createNode(e,t,41471,0)).link=i,e},$i:function(e){if(40960!=(61440&e.mode))throw new ze(28);return e.link}},ai:{read:function(e,t,i,r,n){var s=e.node.Zh;if(n>=e.node.di)return 0;if(8<(e=Math.min(e.node.di-n,r))&&s.subarray)t.set(s.subarray(n,n+e),i);else for(r=0;r<e;r++)t[i+r]=s[n+r];return e},write:function(e,t,i,r,n,s){if(t.buffer===_.buffer&&(s=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Zh||e.Zh.subarray)){if(s)return e.Zh=t.subarray(i,i+r),e.di=r;if(0===e.di&&0===n)return e.Zh=t.slice(i,i+r),e.di=r;if(n+r<=e.di)return e.Zh.set(t.subarray(i,i+r),n),r}if(ke.Pj(e,n+r),e.Zh.subarray&&t.subarray)e.Zh.set(t.subarray(i,i+r),n);else for(s=0;s<r;s++)e.Zh[n+s]=t[i+s];return e.di=Math.max(e.di,n+r),r},Mi:function(e,t,i){if(1===i?t+=e.position:2===i&&32768==(61440&e.node.mode)&&(t+=e.node.di),0>t)throw new ze(28);return t},Ij:function(e,t,i){ke.Pj(e.node,t+i),e.node.di=Math.max(e.node.di,t+i)},Wj:function(e,t,i,r,n,s){if(0!==t)throw new ze(28);if(32768!=(61440&e.node.mode))throw new ze(43);if(e=e.node.Zh,2&s||e.buffer!==V){if((0<r||r+i<e.length)&&(e=e.subarray?e.subarray(r,r+i):Array.prototype.slice.call(e,r,r+i)),r=!0,pe(),!(i=void 0))throw new ze(48);_.set(e,i)}else r=!1,i=e.byteOffset;return{bi:i,il:r}},Yj:function(e,t,i,r,n){if(32768!=(61440&e.node.mode))throw new ze(43);return 2&n||ke.ai.write(e,t,0,r,i,!1),0}}},Ve=null,_e={},Ne=[],Fe=1,Be=null,He=!0,Ye={},ze=null,je={};function Ge(e,t){if(t=t||{},!(e=Re("/",e)))return{path:"",node:null};var i,r={Qj:!0,Dj:0};for(i in r)void 0===t[i]&&(t[i]=r[i]);if(8<t.Dj)throw new ze(32);e=be(e.split("/").filter((function(e){return!!e})),!1);var n=Ve;for(r="/",i=0;i<e.length;i++){var s=i===e.length-1;if(s&&t.parent)break;if(n=Ue(n,e[i]),r=Te(r+"/"+e[i]),n.Yi&&(!s||s&&t.Qj)&&(n=n.Yi.root),!s||t.gj)for(s=0;40960==(61440&n.mode);)if(n=ht(r),n=Ge(r=Re(Ee(r),n),{Dj:t.Dj}).node,40<s++)throw new ze(32)}return{path:r,node:n}}function Xe(e){for(var t;;){if(e===e.parent)return e=e.Gi.Xj,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function We(e,t){for(var i=0,r=0;r<t.length;r++)i=(i<<5)-i+t.charCodeAt(r)|0;return(e+i>>>0)%Be.length}function Ue(e,t){var i;if(i=(i=Je(e,"x"))?i:e.$h.Xi?0:2)throw new ze(i,e);for(i=Be[We(e.id,t)];i;i=i.Si){var r=i.name;if(i.parent.id===e.id&&r===t)return i}return e.$h.Xi(e,t)}function $e(e,t,i,r){return t=We((e=new Ps(e,t,i,r)).parent.id,e.name),e.Si=Be[t],Be[t]=e}var Ze={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Ke(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Je(e,t){return He?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function qe(e,t){try{return Ue(e,t),20}catch(e){}return Je(e,"wx")}function Qe(e,t){xt||((xt=function(){}).prototype={});var i,r=new xt;for(i in e)r[i]=e[i];return e=r,t=function(e){for(e=e||0;e<=4096;e++)if(!Ne[e])return e;throw new ze(33)}(t),e.Ii=t,Ne[t]=e}var et,tt={open:function(e){e.ai=_e[e.node.Zi].ai,e.ai.open&&e.ai.open(e)},Mi:function(){throw new ze(70)}};function it(e,t){_e[e]={ai:t}}function rt(e,t){var i="/"===t,r=!t;if(i&&Ve)throw new ze(10);if(!i&&!r){var n=Ge(t,{Qj:!1});if(t=n.path,(n=n.node).Yi)throw new ze(10);if(16384!=(61440&n.mode))throw new ze(54)}t={type:e,xl:{},Xj:t,Kk:[]},(e=e.Gi(t)).Gi=t,t.root=e,i?Ve=e:n&&(n.Yi=t,n.Gi&&n.Gi.Kk.push(t))}function nt(e,t,i){var r=Ge(e,{parent:!0}).node;if(!(e=we(e))||"."===e||".."===e)throw new ze(28);var n=qe(r,e);if(n)throw new ze(n);if(!r.$h.kj)throw new ze(63);return r.$h.kj(r,e,t,i)}function st(e){return nt(e,16895,0)}function ot(e,t,i){return void 0===i&&(i=t,t=438),nt(e,8192|t,i)}function at(e,t){if(!Re(e))throw new ze(44);var i=Ge(t,{parent:!0}).node;if(!i)throw new ze(44);var r=qe(i,t=we(t));if(r)throw new ze(r);if(!i.$h.nj)throw new ze(63);i.$h.nj(i,t,e)}function lt(e){var t=Ge(e,{parent:!0}).node,i=we(e),r=Ue(t,i);e:{try{var n=Ue(t,i)}catch(e){n=e.ui;break e}var s=Je(t,"wx");n=s||(16384==(61440&n.mode)?31:0)}if(n)throw new ze(n);if(!t.$h.tj)throw new ze(63);if(r.Yi)throw new ze(10);try{Ye.willDeletePath&&Ye.willDeletePath(e)}catch(t){v("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}if(t.$h.tj(t,i),t=We(r.parent.id,r.name),Be[t]===r)Be[t]=r.Si;else for(t=Be[t];t;){if(t.Si===r){t.Si=r.Si;break}t=t.Si}try{Ye.onDeletePath&&Ye.onDeletePath(e)}catch(t){v("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}}function ht(e){if(!(e=Ge(e).node))throw new ze(44);if(!e.$h.$i)throw new ze(28);return Re(Xe(e.parent),e.$h.$i(e))}function ut(e,t){if(!(e="string"==typeof e?Ge(e,{gj:!0}).node:e).$h.pi)throw new ze(63);e.$h.pi(e,{mode:4095&t|-4096&e.mode,timestamp:Date.now()})}function dt(e,t,i,r){if(""===e)throw new ze(44);if("string"==typeof t){var s=Ze[t];if(void 0===s)throw Error("Unknown file open mode: "+t);t=s}if(i=64&t?4095&(void 0===i?438:i)|32768:0,"object"==typeof e)var o=e;else{e=Te(e);try{o=Ge(e,{gj:!(131072&t)}).node}catch(e){}}if(s=!1,64&t)if(o){if(128&t)throw new ze(20)}else o=nt(e,i,0),s=!0;if(!o)throw new ze(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new ze(54);if(!s&&(i=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Ke(t)||512&t)?31:Je(o,Ke(t)):44))throw new ze(i);if(512&t){if(!(i="string"==typeof(i=o)?Ge(i,{gj:!0}).node:i).$h.pi)throw new ze(63);if(16384==(61440&i.mode))throw new ze(31);if(32768!=(61440&i.mode))throw new ze(28);if(s=Je(i,"w"))throw new ze(s);i.$h.pi(i,{size:0,timestamp:Date.now()})}t&=-131713,(r=Qe({node:o,path:Xe(o),flags:t,seekable:!0,position:0,ai:o.ai,el:[],error:!1},r)).ai.open&&r.ai.open(r),!n.logReadFiles||1&t||(bt||(bt={}),e in bt||(bt[e]=1,v("FS.trackingDelegate error on read file: "+e)));try{Ye.onOpenFile&&(o=0,1!=(2097155&t)&&(o|=1),0!=(2097155&t)&&(o|=2),Ye.onOpenFile(e,o))}catch(t){v("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return r}function ct(e){if(null===e.Ii)throw new ze(8);e.yj&&(e.yj=null);try{e.ai.close&&e.ai.close(e)}catch(e){throw e}finally{Ne[e.Ii]=null}e.Ii=null}function pt(e,t,i){if(null===e.Ii)throw new ze(8);if(!e.seekable||!e.ai.Mi)throw new ze(70);if(0!=i&&1!=i&&2!=i)throw new ze(28);e.position=e.ai.Mi(e,t,i),e.el=[]}function gt(e,t,i,r,n,s){if(0>r||0>n)throw new ze(28);if(null===e.Ii)throw new ze(8);if(0==(2097155&e.flags))throw new ze(8);if(16384==(61440&e.node.mode))throw new ze(31);if(!e.ai.write)throw new ze(28);e.seekable&&1024&e.flags&&pt(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new ze(70)}else n=e.position;t=e.ai.write(e,t,i,r,n,s),o||(e.position+=t);try{e.path&&Ye.onWriteToFile&&Ye.onWriteToFile(e.path)}catch(t){v("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+t.message)}return t}function ft(){ze||((ze=function(e,t){this.node=t,this.Tk=function(e){this.ui=e},this.Tk(e),this.message="FS error"}).prototype=Error(),ze.prototype.constructor=ze,[44].forEach((function(e){je[e]=new ze(e),je[e].stack="<generic error, no stack>"})))}function yt(e,t){var i=0;return e&&(i|=365),t&&(i|=146),i}function vt(e,t){for(e="string"==typeof e?e:Xe(e),t=t.split("/").reverse();t.length;){var i=t.pop();if(i){var r=Te(e+"/"+i);try{st(r)}catch(e){}e=r}}return r}function mt(e,t,i,r,n,s){if(n=nt(e=t?Te(("string"==typeof e?e:Xe(e))+"/"+t):e,4095&(void 0!==(r=yt(r,n))?r:438)|32768,0),i){if("string"==typeof i){e=Array(i.length),t=0;for(var o=i.length;t<o;++t)e[t]=i.charCodeAt(t);i=e}ut(n,146|r),gt(e=dt(n,577),i,0,i.length,0,s),ct(e),ut(n,r)}return n}function St(e,t,i,r){e=Te(("string"==typeof e?e:Xe(e))+"/"+t),t=yt(!!i,!!r),St.Vj||(St.Vj=64);var n=St.Vj++<<8|0;return it(n,{open:function(e){e.seekable=!1},close:function(){r&&r.buffer&&r.buffer.length&&r(10)},read:function(e,t,r,n){for(var s=0,o=0;o<n;o++){try{var a=i()}catch(e){throw new ze(29)}if(void 0===a&&0===s)throw new ze(6);if(null==a)break;s++,t[r+o]=a}return s&&(e.node.timestamp=Date.now()),s},write:function(e,t,i,n){for(var s=0;s<n;s++)try{r(t[i+s])}catch(e){throw new ze(29)}return n&&(e.node.timestamp=Date.now()),s}}),ot(e,t,n)}function Pt(e){if(!(e.Uj||e.Ik||e.link||e.Zh)){if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!c)throw Error("Cannot load without read() or XMLHttpRequest.");try{e.Zh=ws(c(e.url),!0),e.di=e.Zh.length}catch(e){throw new ze(29)}}}function Ct(e,t,i,r,n){if("undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";i={Uj:!1,url:i};var s=function(e,t,i,r){return nt(e=Te(("string"==typeof e?e:Xe(e))+"/"+t),4095&(void 0!==(i=yt(i,r))?i:438)|32768,0)}(e,t,r,n);i.Zh?s.Zh=i.Zh:i.url&&(s.Zh=null,s.url=i.url),Object.defineProperties(s,{di:{get:function(){return this.Zh.length}}});var o={};return Object.keys(s.ai).forEach((function(e){var t=s.ai[e];o[e]=function(){return Pt(s),t.apply(null,arguments)}})),o.read=function(e,t,i,r,n){if(Pt(s),n>=(e=e.node.Zh).length)return 0;if(r=Math.min(e.length-n,r),e.slice)for(var o=0;o<r;o++)t[i+o]=e[n+o];else for(o=0;o<r;o++)t[i+o]=e.get(n+o);return r},s.ai=o,s}function At(e,t,i,r,s,o,a,l,h,u){function d(i){function d(i){u&&u(),l||mt(e,t,i,r,s,h),o&&o(),ce()}var p=!1;n.preloadPlugins.forEach((function(e){!p&&e.canHandle(c)&&(e.handle(i,c,d,(function(){a&&a(),ce()})),p=!0)})),p||d(i)}ir();var c=t?Re(Te(e+"/"+t)):e;de(),"string"==typeof i?function(e,t,i){var r="al "+e;p(e,(function(i){E(i,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(i)),r&&ce()}),(function(){if(!i)throw'Loading data file "'+e+'" failed.';i()})),r&&de()}(i,(function(e){d(e)}),a):d(i)}var xt,bt,Tt={},Et=void 0;function wt(){return H[(Et+=4)-4>>2]}function Rt(e){if(!(e=Ne[e]))throw new ze(8);return e}function Dt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?"_"+e:e}function Lt(e,t){return e=Dt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}var Mt=[],It=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ot(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Mt.length?Mt.pop():It.length;return It[t]={Ej:1,value:e},t}}function kt(e){var t=Error,i=Lt(e,(function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return i.prototype=Object.create(t.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},i}var Vt=void 0,_t=void 0;function Nt(e){for(var t="";N[e];)t+=_t[N[e++]];return t}var Ft=[];function Bt(){for(;Ft.length;){var e=Ft.pop();e.Yh.Ri=!1,e.delete()}}var Ht=void 0,Yt={},zt=void 0;function jt(e){throw new zt(e)}function Gt(e,t){for(void 0===t&&jt("ptr should not be undefined");e.li;)t=e.cj(t),e=e.li;return t}function Xt(e){return e||jt("Cannot use deleted val. handle = "+e),It[e].value}var Wt={};function Ut(e){var t=Nt(e=Is(e));return Ls(e),t}function $t(e,t){var i=Wt[e];return void 0===i&&jt(t+" has unknown type "+Ut(e)),i}function Zt(){}var Kt=!1;function Jt(e){--e.count.value,0===e.count.value&&(e.ri?e.wi.Ni(e.ri):e.ei.ci.Ni(e.bi))}function qt(e){return"undefined"==typeof FinalizationGroup?(qt=function(e){return e},e):(Kt=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next())(t=t.value).bi?Jt(t):console.warn("object already deleted: "+t.bi)})),Zt=function(e){Kt.unregister(e.Yh)},(qt=function(e){return Kt.register(e,e.Yh,e.Yh),e})(e))}function Qt(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ei={},ti={},ii=void 0;function ri(e){throw new ii(e)}function ni(e,t,i){function r(t){(t=i(t)).length!==e.length&&ri("Mismatched type converter count");for(var r=0;r<e.length;++r)si(e[r],t[r])}e.forEach((function(e){ti[e]=t}));var n=Array(t.length),s=[],o=0;t.forEach((function(e,t){Wt.hasOwnProperty(e)?n[t]=Wt[e]:(s.push(e),ei.hasOwnProperty(e)||(ei[e]=[]),ei[e].push((function(){n[t]=Wt[e],++o===s.length&&r(n)})))})),0===s.length&&r(n)}function si(e,t,i){if(i=i||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=t.name;if(e||jt('type "'+r+'" must have a positive integer typeid pointer'),Wt.hasOwnProperty(e)){if(i.Ck)return;jt("Cannot register type '"+r+"' twice")}Wt[e]=t,delete ti[e],ei.hasOwnProperty(e)&&(t=ei[e],delete ei[e],t.forEach((function(e){e()})))}function oi(e){jt(e.Yh.ei.ci.name+" instance already deleted")}function ai(){}var li={};function hi(e,t,i){if(void 0===e[t].hi){var r=e[t];e[t]=function(){return e[t].hi.hasOwnProperty(arguments.length)||jt("Function '"+i+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].hi+")!"),e[t].hi[arguments.length].apply(this,arguments)},e[t].hi=[],e[t].hi[r.Pi]=r}}function ui(e,t,i){n.hasOwnProperty(e)?((void 0===i||void 0!==n[e].hi&&void 0!==n[e].hi[i])&&jt("Cannot register public name '"+e+"' twice"),hi(n,e,e),n.hasOwnProperty(i)&&jt("Cannot register multiple overloads of a function with the same number of arguments ("+i+")!"),n[e].hi[i]=t):(n[e]=t,void 0!==i&&(n[e].wl=i))}function di(e,t,i,r,n,s,o,a){this.name=e,this.constructor=t,this.Ai=i,this.Ni=r,this.li=n,this.xk=s,this.cj=o,this.sk=a,this.bk=[]}function ci(e,t,i){for(;t!==i;)t.cj||jt("Expected null or instance of "+i.name+", got an instance of "+t.name),e=t.cj(e),t=t.li;return e}function pi(e,t){return null===t?(this.Aj&&jt("null is not a valid "+this.name),0):(t.Yh||jt('Cannot pass "'+Li(t)+'" as a '+this.name),t.Yh.bi||jt("Cannot pass deleted object as a pointer of type "+this.name),ci(t.Yh.bi,t.Yh.ei.ci,this.ci))}function gi(e,t){if(null===t){if(this.Aj&&jt("null is not a valid "+this.name),this.ij){var i=this.Qk();return null!==e&&e.push(this.Ni,i),i}return 0}if(t.Yh||jt('Cannot pass "'+Li(t)+'" as a '+this.name),t.Yh.bi||jt("Cannot pass deleted object as a pointer of type "+this.name),!this.hj&&t.Yh.ei.hj&&jt("Cannot convert argument of type "+(t.Yh.wi?t.Yh.wi.name:t.Yh.ei.name)+" to parameter type "+this.name),i=ci(t.Yh.bi,t.Yh.ei.ci,this.ci),this.ij)switch(void 0===t.Yh.ri&&jt("Passing raw pointer to smart pointer is illegal"),this.Zk){case 0:t.Yh.wi===this?i=t.Yh.ri:jt("Cannot convert argument of type "+(t.Yh.wi?t.Yh.wi.name:t.Yh.ei.name)+" to parameter type "+this.name);break;case 1:i=t.Yh.ri;break;case 2:if(t.Yh.wi===this)i=t.Yh.ri;else{var r=t.clone();i=this.Rk(i,Ot((function(){r.delete()}))),null!==e&&e.push(this.Ni,i)}break;default:jt("Unsupporting sharing policy")}return i}function fi(e,t){return null===t?(this.Aj&&jt("null is not a valid "+this.name),0):(t.Yh||jt('Cannot pass "'+Li(t)+'" as a '+this.name),t.Yh.bi||jt("Cannot pass deleted object as a pointer of type "+this.name),t.Yh.ei.hj&&jt("Cannot convert argument of type "+t.Yh.ei.name+" to parameter type "+this.name),ci(t.Yh.bi,t.Yh.ei.ci,this.ci))}function yi(e){return this.fromWireType(Y[e>>2])}function vi(e,t){return t.ei&&t.bi||ri("makeClassHandle requires ptr and ptrType"),!!t.wi!=!!t.ri&&ri("Both smartPtrType and smartPtr must be specified"),t.count={value:1},qt(Object.create(e,{Yh:{value:t}}))}function mi(e,t,i,r){this.name=e,this.ci=t,this.Aj=i,this.hj=r,this.ij=!1,this.Ni=this.Rk=this.Qk=this.ck=this.Zk=this.Ok=void 0,void 0!==t.li?this.toWireType=gi:(this.toWireType=r?pi:fi,this.yi=null)}function Si(e,t,i){n.hasOwnProperty(e)||ri("Replacing nonexistant public symbol"),void 0!==n[e].hi&&void 0!==i?n[e].hi[i]=t:(n[e]=t,n[e].Pi=i)}function Pi(e,t){var i=(e=Nt(e)).includes("j")?function(e,t){var i=[];return function(){i.length=arguments.length;for(var r=0;r<arguments.length;r++)i[r]=arguments[r];return Ae(e,t,i)}}(e,t):ee.get(t);return"function"!=typeof i&&jt("unknown function pointer with signature "+e+": "+t),i}var Ci=void 0;function Ai(e,t){var i=[],r={};throw t.forEach((function e(t){r[t]||Wt[t]||(ti[t]?ti[t].forEach(e):(i.push(t),r[t]=!0))})),new Ci(e+": "+i.map(Ut).join([", "]))}function xi(e){var t=Function;if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var i=Lt(t.name||"unknownFunctionName",(function(){}));return i.prototype=t.prototype,i=new i,(e=t.apply(i,e))instanceof Object?e:i}function bi(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ti(e,t,i,r,n){var s=t.length;2>s&&jt("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==i,a=!1;for(i=1;i<t.length;++i)if(null!==t[i]&&void 0===t[i].yi){a=!0;break}var l="void"!==t[0].name,h="",u="";for(i=0;i<s-2;++i)h+=(0!==i?", ":"")+"arg"+i,u+=(0!==i?", ":"")+"arg"+i+"Wired";e="return function "+Dt(e)+"("+h+") {\nif (arguments.length !== "+(s-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(s-2)+" args!');\n}\n",a&&(e+="var destructors = [];\n");var d=a?"destructors":"null";for(h="throwBindingError invoker fn runDestructors retType classParam".split(" "),r=[jt,r,n,bi,t[0],t[1]],o&&(e+="var thisWired = classParam.toWireType("+d+", this);\n"),i=0;i<s-2;++i)e+="var arg"+i+"Wired = argType"+i+".toWireType("+d+", arg"+i+"); // "+t[i+2].name+"\n",h.push("argType"+i),r.push(t[i+2]);if(o&&(u="thisWired"+(0<u.length?", ":"")+u),e+=(l?"var rv = ":"")+"invoker(fn"+(0<u.length?", ":"")+u+");\n",a)e+="runDestructors(destructors);\n";else for(i=o?1:2;i<t.length;++i)s=1===i?"thisWired":"arg"+(i-2)+"Wired",null!==t[i].yi&&(e+=s+"_dtor("+s+"); // "+t[i].name+"\n",h.push(s+"_dtor"),r.push(t[i].yi));return l&&(e+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h.push(e+"}\n"),xi(h).apply(null,r)}function Ei(e,t){for(var i=[],r=0;r<e;r++)i.push(H[(t>>2)+r]);return i}function wi(e,t,i){return e instanceof Object||jt(i+' with invalid "this": '+e),e instanceof t.ci.constructor||jt(i+' incompatible with "this" of type '+e.constructor.name),e.Yh.bi||jt("cannot call emscripten binding method "+i+" on deleted object"),ci(e.Yh.bi,e.Yh.ei.ci,t.ci)}function Ri(e){4<e&&0==--It[e].Ej&&(It[e]=void 0,Mt.push(e))}function Di(e,t,i){switch(t){case 0:return function(e){return this.fromWireType((i?_:N)[e])};case 1:return function(e){return this.fromWireType((i?F:B)[e>>1])};case 2:return function(e){return this.fromWireType((i?H:Y)[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Li(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Mi(e,t){switch(t){case 2:return function(e){return this.fromWireType(z[e>>2])};case 3:return function(e){return this.fromWireType(j[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Ii(e,t,i){switch(t){case 0:return i?function(e){return _[e]}:function(e){return N[e]};case 1:return i?function(e){return F[e>>1]}:function(e){return B[e>>1]};case 2:return i?function(e){return H[e>>2]}:function(e){return Y[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Oi={};function ki(e){var t=Oi[e];return void 0===t?Nt(e):t}var Vi,_i=[];function Ni(e,t){if($i=e,Zi=t,Wi)if(ji||(ji=!0),0==e)Gi=function(){var e=0|Math.max(0,Hi+t-Vi());setTimeout(Yi,e)};else if(1==e)Gi=function(){lr(Yi)};else if(2==e){if(void 0===i){var r=[];addEventListener("message",(function(e){"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),r.shift()())}),!0),i=function(e){r.push(e),postMessage("setimmediate","*")}}Gi=function(){i(Yi)}}}function Fi(e,t,i,r,s){function o(){if(a<Xi){if(!C)try{Gs(b)}catch(e){if(!(e instanceof Ys))throw e}return!1}return!0}E(!Wi,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Wi=e,Ui=r;var a=Xi;if(ji=!1,Yi=function(){if(!T)if(0<Ji.length){var t=Date.now(),i=Ji.shift();if(i.wk(i.ej),zi){var r=zi,s=0==r%1?r-1:Math.floor(r);zi=i.kl?s:(8*r+(s+.5))/9}console.log('main loop blocker "'+i.name+'" took '+(Date.now()-t)+" ms"),n.setStatus&&(t=n.statusMessage||"Please wait...",i=zi,r=qi.nl,i?i<r?n.setStatus(t+" ("+(r-i)+"/"+r+")"):n.setStatus(t):n.setStatus("")),o()&&setTimeout(Yi,0)}else o()&&(Ki=Ki+1|0,1==$i&&1<Zi&&0!=Ki%Zi?Gi():(0==$i&&(Hi=Vi()),T||n.preMainLoop&&!1===n.preMainLoop()||(Bi(e),n.postMainLoop&&n.postMainLoop()),o()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.Pk&&SDL.audio.Pk(),Gi())))},s||(t&&0<t?Ni(0,1e3/t):Ni(1,1),Gi()),i)throw"unwind"}function Bi(e,t){if(!T)if(t)e();else try{e()}catch(e){if(!(e instanceof Ys)&&"unwind"!==e)throw e&&"object"==typeof e&&e.stack&&v("exception thrown: "+[e,e.stack]),e}}Vi=function(){return performance.now()};var Hi,Yi,zi,ji=!1,Gi=null,Xi=0,Wi=null,Ui=0,$i=0,Zi=0,Ki=0,Ji=[],qi={},Qi=!1,er=!1,tr=[];function ir(){function e(){er=document.pointerLockElement===n.canvas||document.mozPointerLockElement===n.canvas||document.webkitPointerLockElement===n.canvas||document.msPointerLockElement===n.canvas}if(n.preloadPlugins||(n.preloadPlugins=[]),!pr){pr=!0;try{gr=!0}catch(e){gr=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}fr="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:gr?null:console.log("warning: no BlobBuilder"),yr="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,n.Zj||void 0!==yr||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),n.Zj=!0),n.preloadPlugins.push({canHandle:function(e){return!n.Zj&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,i,r){var s=null;if(gr)try{(s=new Blob([e],{type:hr(t)})).size!==e.length&&(s=new Blob([new Uint8Array(e).buffer],{type:hr(t)}))}catch(e){!function(e){m||(m={}),m[e]||(m[e]=1,v(e))}("Blob constructor present but fails: "+e+"; falling back to blob builder")}s||((s=new fr).append(new Uint8Array(e).buffer),s=s.getBlob());var o=yr.createObjectURL(s),a=new Image;a.onload=function(){E(a.complete,"Image "+t+" could not be decoded");var r=document.createElement("canvas");r.width=a.width,r.height=a.height,r.getContext("2d").drawImage(a,0,0),n.preloadedImages[t]=r,yr.revokeObjectURL(o),i&&i(e)},a.onerror=function(){console.log("Image "+o+" could not be decoded"),r&&r()},a.src=o}}),n.preloadPlugins.push({canHandle:function(e){return!n.vl&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,i,r){function s(r){a||(a=!0,n.preloadedAudios[t]=r,i&&i(e))}function o(){a||(a=!0,n.preloadedAudios[t]=new Audio,r&&r())}var a=!1;if(!gr)return o();try{var l=new Blob([e],{type:hr(t)})}catch(e){return o()}l=yr.createObjectURL(l);var h=new Audio;h.addEventListener("canplaythrough",(function(){s(h)}),!1),h.onerror=function(){if(!a){console.log("warning: browser could not fully decode audio "+t+", trying slower base64 approach");for(var i="",r=0,n=0,o=0;o<e.length;o++)for(r=r<<8|e[o],n+=8;6<=n;){var l=r>>n-6&63;n-=6,i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[l]}2==n?(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&r)<<4],i+="=="):4==n&&(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&r)<<2],i+="="),h.src="data:audio/x-"+t.substr(-3)+";base64,"+i,s(h)}},h.src=l,function(e){setTimeout((function(){Bi(e)}),1e4)}((function(){s(h)}))}});var t=n.canvas;t&&(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock||t.msRequestPointerLock||function(){},t.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},t.exitPointerLock=t.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",e,!1),document.addEventListener("mozpointerlockchange",e,!1),document.addEventListener("webkitpointerlockchange",e,!1),document.addEventListener("mspointerlockchange",e,!1),n.elementPointerLock&&t.addEventListener("click",(function(e){!er&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),e.preventDefault())}),!1))}}var rr=!1,nr=void 0,sr=void 0;function or(){return!!Qi&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var ar=0;function lr(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===ar)ar=t+1e3/60;else for(;t+2>=ar;)ar+=1e3/60;setTimeout(e,Math.max(ar-t,0))}}function hr(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}var ur=[];function dr(){var e=n.canvas;ur.forEach((function(t){t(e.width,e.height)}))}function cr(e,t,i){t&&i?(e.gl=t,e.Bk=i):(t=e.gl,i=e.Bk);var r=t,s=i;if(n.forcedAspectRatio&&0<n.forcedAspectRatio&&(r/s<n.forcedAspectRatio?r=Math.round(s*n.forcedAspectRatio):s=Math.round(r/n.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var o=Math.min(screen.width/r,screen.height/s);r=Math.round(r*o),s=Math.round(s*o)}sr?(e.width!=r&&(e.width=r),e.height!=s&&(e.height=s),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=i&&(e.height=i),void 0!==e.style&&(r!=t||s!=i?(e.style.setProperty("width",r+"px","important"),e.style.setProperty("height",s+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}var pr,gr,fr,yr,vr,mr=12288,Sr=!1,Pr=0,Cr=0,Ar=0,xr={alpha:!1,depth:!1,stencil:!1,antialias:!1},br={},Tr=1,Er=[],wr=[],Rr=[],Dr=[],Lr=[],Mr=[],Ir=[],Or=[],kr=[],Vr=[],_r=[],Nr=[],Fr={},Br={},Hr=4;function Yr(e){Wr||(Wr=e)}function zr(e){for(var t=Tr++,i=e.length;i<t;i++)e[i]=null;return t}function jr(e,t,i){for(var r="",n=0;n<e;++n){var s=i?H[i+4*n>>2]:-1;r+=M(H[t+4*n>>2],0>s?void 0:s)}return r}function Gr(e,t){e.Rj||(e.Rj=e.getContext,e.getContext=function(t,i){return"webgl"==t==(i=e.Rj(t,i))instanceof WebGLRenderingContext?i:null});var i=1<t.Bj?e.getContext("webgl2",t):e.getContext("webgl",t);return i?function(e,t){var i=zr(Or),r={ql:i,attributes:t,version:t.Bj,Hi:e};return e.canvas&&(e.canvas.Wi=r),Or[i]=r,(void 0===t.tk||t.tk)&&function(e){if(e||(e=Ur),!e.Fk){e.Fk=!0;var t=e.Hi;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,i){t.vertexAttribDivisorANGLE(e,i)},e.drawArraysInstanced=function(e,i,r,n){t.drawArraysInstancedANGLE(e,i,r,n)},e.drawElementsInstanced=function(e,i,r,n,s){t.drawElementsInstancedANGLE(e,i,r,n,s)})}(t),function(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)})}(t),function(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(e,i){t.drawBuffersWEBGL(e,i)})}(t),t.ml=t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),t.sl=t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"),2<=e.version&&(t.mi=t.getExtension("EXT_disjoint_timer_query_webgl2")),(2>e.version||!t.mi)&&(t.mi=t.getExtension("EXT_disjoint_timer_query")),t.ul=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}(r),i}(i,t):0}function Xr(e){Ur=Or[e],n.xi=xs=Ur&&Ur.Hi}var Wr,Ur,$r={},Zr=[],Kr=0;function Jr(){for(var e=rn.length-1;0<=e;--e)nn(e);rn=[],qr=[]}var qr=[];function Qr(e,t,i){function r(e,t){if(e.length!=t.length)return!1;for(var i in e)if(e[i]!=t[i])return!1;return!0}for(var n in qr){var s=qr[n];if(s.Gj==e&&r(s.Jj,i))return}qr.push({Gj:e,$j:t,Jj:i}),qr.sort((function(e,t){return e.$j<t.$j}))}function en(e){for(var t=0;t<qr.length;++t)qr[t].Gj==e&&(qr.splice(t,1),--t)}function tn(){if(Kr&&hn.Ji)for(var e=0;e<qr.length;++e){var t=qr[e];qr.splice(e,1),--e,t.Gj.apply(null,t.Jj)}}var rn=[];function nn(e){var t=rn[e];t.target.removeEventListener(t.ji,t.uk,t.si),rn.splice(e,1)}function sn(e){function t(t){++Kr,hn=e,tn(),e.vi(t),tn(),--Kr}if(e.ti)e.uk=t,e.target.addEventListener(e.ji,t,e.si),rn.push(e),ln||(ne.push(Jr),ln=!0);else for(var i=0;i<rn.length;++i)rn[i].target==e.target&&rn[i].ji==e.ji&&nn(i--)}function on(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""}function an(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}var ln,hn,un,dn,cn,pn,gn,fn,yn,vn,mn,Sn,Pn,Cn,An={},xn={};function bn(e){return 2<e?M(e):e}var Tn=[0,document,window];function En(e){return e=bn(e),Tn[e]||document.querySelector(e)}function wn(e){var t=Ns(),i=Bs(8),r=i+4,n=Bs(e.id.length+1);return O(e.id,n,e.id.length+1),(e=En(n))&&(H[i>>2]=e.width,H[r>>2]=e.height),i=[H[i>>2],H[r>>2]],Fs(t),i}function Rn(e,t,i){return(e=En(e))?(e.width=t,e.height=i,0):-4}function Dn(e,t,i){if(e.jl){var r=Ns(),n=Bs(e.id.length+1);O(e.id,n,e.id.length+1),Rn(n,t,i),Fs(r)}else e.width=t,e.height=i}function Ln(e,t,i){e.style.paddingLeft=e.style.paddingRight=i+"px",e.style.paddingTop=e.style.paddingBottom=t+"px"}function Mn(e){return 0>Tn.indexOf(e)?e.getBoundingClientRect():{left:0,top:0}}function In(e,t){if(0!=t.Fj||0!=t.uj){!function(e){function t(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||(document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),Dn(e,r,n),e.style.width=s,e.style.height=o,e.style.backgroundColor=a,l||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=l,e.style.paddingLeft=h,e.style.paddingRight=u,e.style.paddingTop=d,e.style.paddingBottom=c,e.style.marginLeft=p,e.style.marginRight=g,e.style.marginTop=f,e.style.marginBottom=y,document.body.style.margin=v,document.documentElement.style.overflow=m,document.body.scroll=S,e.style.Tj=P,e.Wi&&e.Wi.Hi.viewport(0,0,r,n),xn.fj&&ee.get(xn.fj)(37,0,xn.Kj))}var i=wn(e),r=i[0],n=i[1],s=e.style.width,o=e.style.height,a=e.style.backgroundColor,l=document.body.style.backgroundColor,h=e.style.paddingLeft,u=e.style.paddingRight,d=e.style.paddingTop,c=e.style.paddingBottom,p=e.style.marginLeft,g=e.style.marginRight,f=e.style.marginTop,y=e.style.marginBottom,v=document.body.style.margin,m=document.documentElement.style.overflow,S=document.body.scroll,P=e.style.Tj;document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t)}(e);var i=t.$k?innerWidth:screen.width,r=t.$k?innerHeight:screen.height,n=Mn(e),s=n.width;n=n.height;var o=wn(e),a=o[0];o=o[1],3==t.Fj?(Ln(e,(r-n)/2,(i-s)/2),i=s,r=n):2==t.Fj&&(i*o<a*r?(Ln(e,(r-(s=o*i/a))/2,0),r=s):(Ln(e,0,(i-(s=a*r/o))/2),i=s)),e.style.backgroundColor||(e.style.backgroundColor="black"),document.body.style.backgroundColor||(document.body.style.backgroundColor="black"),e.style.width=i+"px",e.style.height=r+"px",1==t.vk&&(e.style.Tj="pixelated"),s=2==t.uj?devicePixelRatio:1,0!=t.uj&&(Dn(e,i=i*s|0,r=r*s|0),e.Wi&&e.Wi.Hi.viewport(0,0,i,r))}if(e.requestFullscreen)e.requestFullscreen();else{if(!e.webkitRequestFullscreen)return an()?-3:-1;e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}return xn=t,t.fj&&ee.get(t.fj)(37,0,t.Kj),0}function On(e){if(e.requestPointerLock)e.requestPointerLock();else{if(!e.lj)return document.body.requestPointerLock||document.body.lj?-3:-1;e.lj()}return 0}function kn(e,t){j[e>>3]=t.timestamp;for(var i=0;i<t.axes.length;++i)j[e+8*i+16>>3]=t.axes[i];for(i=0;i<t.buttons.length;++i)j[e+8*i+528>>3]="object"==typeof t.buttons[i]?t.buttons[i].value:t.buttons[i];for(i=0;i<t.buttons.length;++i)H[e+4*i+1040>>2]="object"==typeof t.buttons[i]?t.buttons[i].pressed:1==t.buttons[i];H[e+1296>>2]=t.connected,H[e+1300>>2]=t.index,H[e+8>>2]=t.axes.length,H[e+12>>2]=t.buttons.length,O(t.id,e+1304,64),O(t.mapping,e+1368,64)}var Vn=[];function _n(e,t,i,r){xs.drawElements(e,t,i,r)}function Nn(e,t,i,r){for(var n=0;n<e;n++){var s=xs[i](),o=s&&zr(r);s?(s.name=o,r[o]=s):Yr(1282),H[t+4*n>>2]=o}}function Fn(e,t,i,r,n,s,o,a){t=wr[t],(e=xs[e](t,i))&&(r=a&&O(e.name,a,r),n&&(H[n>>2]=r),s&&(H[s>>2]=e.size),o&&(H[o>>2]=e.type))}function Bn(e,t){Y[e>>2]=t,Y[e+4>>2]=(t-Y[e>>2])/4294967296}function Hn(e,t,i){if(t){var r=void 0;switch(e){case 36346:r=1;break;case 36344:return void(0!=i&&1!=i&&Yr(1280));case 34814:case 36345:r=0;break;case 34466:var n=xs.getParameter(34467);r=n?n.length:0;break;case 33309:if(2>Ur.version)return void Yr(1282);r=2*(xs.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>Ur.version)return void Yr(1280);r=33307==e?3:0}if(void 0===r)switch(n=xs.getParameter(e),typeof n){case"number":r=n;break;case"boolean":r=n?1:0;break;case"string":return void Yr(1280);case"object":if(null===n)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:r=0;break;default:return void Yr(1280)}else{if(n instanceof Float32Array||n instanceof Uint32Array||n instanceof Int32Array||n instanceof Array){for(e=0;e<n.length;++e)switch(i){case 0:H[t+4*e>>2]=n[e];break;case 2:z[t+4*e>>2]=n[e];break;case 4:_[t+e>>0]=n[e]?1:0}return}try{r=0|n.name}catch(t){return Yr(1280),void v("GL_INVALID_ENUM in glGet"+i+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Yr(1280),void v("GL_INVALID_ENUM in glGet"+i+"v: Native code calling glGet"+i+"v("+e+") and it returns "+n+" of type "+typeof n+"!")}switch(i){case 1:Bn(t,r);break;case 0:H[t>>2]=r;break;case 2:z[t>>2]=r;break;case 4:_[t>>0]=r?1:0}}else Yr(1281)}function Yn(e,t,i,r){if(i){switch(typeof(t=xs.getIndexedParameter(e,t))){case"boolean":e=t?1:0;break;case"number":e=t;break;case"object":if(null===t)switch(e){case 35983:case 35368:e=0;break;default:return void Yr(1280)}else{if(!(t instanceof WebGLBuffer))return void Yr(1280);e=0|t.name}break;default:return void Yr(1280)}switch(r){case 1:Bn(i,e);break;case 0:H[i>>2]=e;break;case 2:z[i>>2]=e;break;case 4:_[i>>0]=e?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+r}}else Yr(1281)}function zn(e){var t=k(e)+1,i=Ds(t);return O(e,i,t),i}function jn(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Gn(e){var t,i=e.Oi,r=e.sj;if(!i)for(e.Oi=i={},e.gk={},t=0;t<xs.getProgramParameter(e,35718);++t){var n=xs.getActiveUniform(e,t),s=n.name;n=n.size;var o=jn(s);o=0<o?s.slice(0,o):s;var a=e.rj;for(e.rj+=n,r[o]=[n,a],s=0;s<n;++s)i[a]=s,e.gk[a++]=o}}function Xn(e){var t=xs.Nj;if(t){var i=t.Oi[e];return"number"==typeof i&&(t.Oi[e]=i=xs.getUniformLocation(t,t.gk[e]+(0<i?"["+i+"]":""))),i}Yr(1282)}function Wn(e,t,i,r){if(i)if(Gn(e=wr[e]),"number"==typeof(e=xs.getUniform(e,Xn(t)))||"boolean"==typeof e)switch(r){case 0:H[i>>2]=e;break;case 2:z[i>>2]=e}else for(t=0;t<e.length;t++)switch(r){case 0:H[i+4*t>>2]=e[t];break;case 2:z[i+4*t>>2]=e[t]}else Yr(1281)}function Un(e,t,i,r){if(i)if(e=xs.getVertexAttrib(e,t),34975==t)H[i>>2]=e&&e.name;else if("number"==typeof e||"boolean"==typeof e)switch(r){case 0:H[i>>2]=e;break;case 2:z[i>>2]=e;break;case 5:H[i>>2]=Math.fround(e)}else for(t=0;t<e.length;t++)switch(r){case 0:H[i+4*t>>2]=e[t];break;case 2:z[i+4*t>>2]=e[t];break;case 5:H[i+4*t>>2]=Math.fround(e[t])}else Yr(1281)}function $n(e){return 0==(e-=5120)?_:1==e?N:2==e?F:4==e?H:6==e?z:5==e||28922==e||28520==e||30779==e||30782==e?Y:B}function Zn(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Kn(e,t,i,r,n){var s=Zn(e=$n(e)),o=Hr;return e.subarray(n>>s,n+r*(i*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[t-6402]||1)*(1<<s)+o-1&-o)>>s)}var Jn=[],qn=[];function Qn(e,t,i,r,n,s){dn||(dn=Ds(256)),sn(e={target:En(e),ji:s,ti:r,vi:function(e){var i=(e=e||event).target.id?e.target.id:"",s=dn;O(on(e.target),s+0,128),O(i,s+128,128),ee.get(r)(n,s,t)&&e.preventDefault()},si:i})}function es(e,t,i,r,n){pn||(pn=Ds(280)),sn({target:e,ji:n,ti:r,vi:function(e){e=e||event;var i=pn,n=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,s=!!n;H[i>>2]=s,H[i+4>>2]=an();var o=s?n:cn,a=o&&o.id?o.id:"";O(on(o),i+8,128),O(a,i+136,128),H[i+264>>2]=o?o.clientWidth:0,H[i+268>>2]=o?o.clientHeight:0,H[i+272>>2]=screen.width,H[i+276>>2]=screen.height,s&&(cn=n),ee.get(r)(19,i,t)&&e.preventDefault()},si:i})}function ts(e,t,i,r,n){gn||(gn=Ds(1432)),sn(t={target:En(2),Ji:!0,ji:n,ti:i,vi:function(t){t=t||event;var n=gn;kn(n,t.gamepad),ee.get(i)(r,n,e)&&t.preventDefault()},si:t})}function is(e,t,i,r,n,s){fn||(fn=Ds(164)),sn(e={target:En(e),Ji:!0,ji:s,ti:r,vi:function(e){var i=fn,s=i>>2;H[s]=e.location,H[s+1]=e.ctrlKey,H[s+2]=e.shiftKey,H[s+3]=e.altKey,H[s+4]=e.metaKey,H[s+5]=e.repeat,H[s+6]=e.charCode,H[s+7]=e.keyCode,H[s+8]=e.which,O(e.key||"",i+36,32),O(e.code||"",i+68,32),O(e.char||"",i+100,32),O(e.locale||"",i+132,32),ee.get(r)(n,i,t)&&e.preventDefault()},si:i})}function rs(e,t,i){H[e>>=2]=t.screenX,H[e+1]=t.screenY,H[e+2]=t.clientX,H[e+3]=t.clientY,H[e+4]=t.ctrlKey,H[e+5]=t.shiftKey,H[e+6]=t.altKey,H[e+7]=t.metaKey,F[2*e+16]=t.button,F[2*e+17]=t.buttons,H[e+9]=t.movementX,H[e+10]=t.movementY,i=Mn(i),H[e+11]=t.clientX-i.left,H[e+12]=t.clientY-i.top}function ns(e,t,i,r,n,s){yn||(yn=Ds(64)),sn({target:e=En(e),Ji:"mousemove"!=s&&"mouseenter"!=s&&"mouseleave"!=s,ji:s,ti:r,vi:function(i){i=i||event,rs(yn,i,e),ee.get(r)(n,yn,t)&&i.preventDefault()},si:i})}function ss(e,t,i,r,n){vn||(vn=Ds(260)),sn({target:e,ji:n,ti:r,vi:function(e){e=e||event;var i=vn,n=document.pointerLockElement||document.dj||document.hl||document.Hj;H[i>>2]=!!n;var s=n&&n.id?n.id:"";O(on(n),i+4,128),O(s,i+132,128),ee.get(r)(20,i,t)&&e.preventDefault()},si:i})}function os(e,t,i,r,n,s){Sn||(Sn=Ds(1684)),sn({target:e=En(e),Ji:"touchstart"==s||"touchend"==s,ji:s,ti:r,vi:function(i){for(var s={},o=i.touches,a=0;a<o.length;++a){var l=o[a];s[l.identifier]=l}for(o=i.changedTouches,a=0;a<o.length;++a)(l=o[a]).Hk=1,s[l.identifier]=l;for(o=i.targetTouches,a=0;a<o.length;++a)s[o[a].identifier].Nk=1;H[1+(l=(o=Sn)>>2)]=i.ctrlKey,H[l+2]=i.shiftKey,H[l+3]=i.altKey,H[l+4]=i.metaKey,l+=5;var h=Mn(e),u=0;for(a in s){var d=s[a];if(H[l]=d.identifier,H[l+1]=d.screenX,H[l+2]=d.screenY,H[l+3]=d.clientX,H[l+4]=d.clientY,H[l+5]=d.pageX,H[l+6]=d.pageY,H[l+7]=d.Hk,H[l+8]=d.Nk,H[l+9]=d.clientX-h.left,H[l+10]=d.clientY-h.top,l+=13,31<++u)break}H[o>>2]=u,ee.get(r)(n,o,t)&&i.preventDefault()},si:i})}var as,ls=[];function hs(e,t){Y[e>>2]=t,Y[e+4>>2]=t/4294967296|0}function us(e,t,i,r,n){function s(t){var i=0,r=0;t&&(r=P.response?P.response.byteLength:0,i=Ds(r),N.set(new Uint8Array(P.response),i)),Y[e+12>>2]=i,hs(e+16,r)}var o=Y[e+8>>2];if(o){var a=M(o),l=e+112,h=M(l);h||(h="GET");var u=Y[l+52>>2],d=Y[l+56>>2],c=!!Y[l+60>>2],p=Y[l+68>>2],g=Y[l+72>>2];o=Y[l+76>>2];var f=Y[l+80>>2],y=Y[l+84>>2];l=Y[l+88>>2];var v=!!(1&u),m=!!(2&u);u=!!(64&u),p=p?M(p):void 0,g=g?M(g):void 0;var S=f?M(f):void 0,P=new XMLHttpRequest;if(P.withCredentials=c,P.open(h,a,!u,p,g),u||(P.timeout=d),P.dj=a,P.responseType="arraybuffer",f&&P.overrideMimeType(S),o)for(;(h=Y[o>>2])&&(a=Y[o+4>>2]);)o+=8,h=M(h),a=M(a),P.setRequestHeader(h,a);ls.push(P),Y[e+0>>2]=ls.length,o=y&&l?N.slice(y,y+l):null,P.onload=function(r){s(v&&!m);var n=P.response?P.response.byteLength:0;hs(e+24,0),n&&hs(e+32,n),B[e+40>>1]=P.readyState,B[e+42>>1]=P.status,P.statusText&&O(P.statusText,e+44,64),200<=P.status&&300>P.status?t&&t(e,P,r):i&&i(e,P,r)},P.onerror=function(t){s(v);var r=P.status;hs(e+24,0),hs(e+32,P.response?P.response.byteLength:0),B[e+40>>1]=P.readyState,B[e+42>>1]=r,i&&i(e,P,t)},P.ontimeout=function(t){i&&i(e,P,t)},P.onprogress=function(t){var i=v&&m&&P.response?P.response.byteLength:0,n=0;v&&m&&(n=Ds(i),N.set(new Uint8Array(P.response),n)),Y[e+12>>2]=n,hs(e+16,i),hs(e+24,t.loaded-i),hs(e+32,t.total),B[e+40>>1]=P.readyState,3<=P.readyState&&0===P.status&&0<t.loaded&&(P.status=200),B[e+42>>1]=P.status,P.statusText&&O(P.statusText,e+44,64),r&&r(e,P,t),n&&Ls(n)},P.onreadystatechange=function(t){B[e+40>>1]=P.readyState,2<=P.readyState&&(B[e+42>>1]=P.status),n&&n(e,P,t)};try{P.send(o)}catch(t){i&&i(e,P,t)}}else i(e,0,"no url specified!")}function ds(e,t,i,r){var n=as;if(n){var s=Y[e+112+64>>2];s||(s=Y[e+8>>2]);var o=M(s);try{var a=n.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);a.onsuccess=function(){B[e+40>>1]=4,B[e+42>>1]=200,O("OK",e+44,64),i(e,0,o)},a.onerror=function(t){B[e+40>>1]=4,B[e+42>>1]=413,O("Payload Too Large",e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}var cs,ps={};function gs(){if(!cs){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(e in ps)void 0===ps[e]?delete t[e]:t[e]=ps[e];var i=[];for(e in t)i.push(e+"="+t[e]);cs=i}return cs}function fs(e){return 0==e%4&&(0!=e%100||0==e%400)}function ys(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var vs=[31,29,31,30,31,30,31,31,30,31,30,31],ms=[31,28,31,30,31,30,31,31,30,31,30,31];function Ss(e,t){for(e=new Date(e.getTime());0<t;){var i=e.getMonth(),r=(fs(e.getFullYear())?vs:ms)[i];if(!(t>r-e.getDate())){e.setDate(e.getDate()+t);break}t-=r-e.getDate()+1,e.setDate(1),11>i?e.setMonth(i+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Ps(e,t,i,r){e||(e=this),this.parent=e,this.Gi=e.Gi,this.Yi=null,this.id=Fe++,this.name=t,this.mode=i,this.$h={},this.ai={},this.Zi=r}Object.defineProperties(Ps.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},Ik:{get:function(){return 16384==(61440&this.mode)}},Uj:{get:function(){return 8192==(61440&this.mode)}}}),ft(),Be=Array(4096),rt(ke,"/"),st("/tmp"),st("/home"),st("/home/web_user"),function(){st("/dev"),it(259,{read:function(){return 0},write:function(e,t,i,r){return r}}),ot("/dev/null",259),Le(1280,Ie),Le(1536,Oe),ot("/dev/tty",1280),ot("/dev/tty1",1536);var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){pe("randomDevice")}}();St("/dev","random",e),St("/dev","urandom",e),st("/dev/shm"),st("/dev/shm/tmp")}(),function(){st("/proc");var e=st("/proc/self");st("/proc/self/fd"),rt({Gi:function(){var t=$e(e,"fd",16895,73);return t.$h={Xi:function(e,t){var i=Ne[+t];if(!i)throw new ze(8);return(e={parent:null,Gi:{Xj:"fake"},$h:{$i:function(){return i.path}}}).parent=e}},t}},"/proc/self/fd")}(),n.FS_createPath=vt,n.FS_createDataFile=mt,n.FS_createPreloadedFile=At,n.FS_createLazyFile=Ct,n.FS_createDevice=St,n.FS_unlink=lt,n.count_emval_handles=function(){for(var e=0,t=5;t<It.length;++t)void 0!==It[t]&&++e;return e},n.get_first_emval=function(){for(var e=5;e<It.length;++e)if(void 0!==It[e])return It[e];return null},Vt=n.PureVirtualError=kt("PureVirtualError");for(var Cs=Array(256),As=0;256>As;++As)Cs[As]=String.fromCharCode(As);_t=Cs,n.getInheritedInstanceCount=function(){return Object.keys(Yt).length},n.getLiveInheritedInstances=function(){var e,t=[];for(e in Yt)Yt.hasOwnProperty(e)&&t.push(Yt[e]);return t},n.flushPendingDeletes=Bt,n.setDelayFunction=function(e){Ht=e,Ft.length&&Ht&&Ht(Bt)},zt=n.BindingError=kt("BindingError"),ii=n.InternalError=kt("InternalError"),ai.prototype.isAliasOf=function(e){if(!(this instanceof ai&&e instanceof ai))return!1;var t=this.Yh.ei.ci,i=this.Yh.bi,r=e.Yh.ei.ci;for(e=e.Yh.bi;t.li;)i=t.cj(i),t=t.li;for(;r.li;)e=r.cj(e),r=r.li;return t===r&&i===e},ai.prototype.clone=function(){if(this.Yh.bi||oi(this),this.Yh.Ui)return this.Yh.count.value+=1,this;var e=qt,t=Object,i=t.create,r=Object.getPrototypeOf(this),n=this.Yh;return(e=e(i.call(t,r,{Yh:{value:{count:n.count,Ri:n.Ri,Ui:n.Ui,bi:n.bi,ei:n.ei,ri:n.ri,wi:n.wi}}}))).Yh.count.value+=1,e.Yh.Ri=!1,e},ai.prototype.delete=function(){this.Yh.bi||oi(this),this.Yh.Ri&&!this.Yh.Ui&&jt("Object already scheduled for deletion"),Zt(this),Jt(this.Yh),this.Yh.Ui||(this.Yh.ri=void 0,this.Yh.bi=void 0)},ai.prototype.isDeleted=function(){return!this.Yh.bi},ai.prototype.deleteLater=function(){return this.Yh.bi||oi(this),this.Yh.Ri&&!this.Yh.Ui&&jt("Object already scheduled for deletion"),Ft.push(this),1===Ft.length&&Ht&&Ht(Bt),this.Yh.Ri=!0,this},mi.prototype.yk=function(e){return this.ck&&(e=this.ck(e)),e},mi.prototype.Oj=function(e){this.Ni&&this.Ni(e)},mi.prototype.argPackAdvance=8,mi.prototype.readValueFromPointer=yi,mi.prototype.deleteObject=function(e){null!==e&&e.delete()},mi.prototype.fromWireType=function(e){function t(){return this.ij?vi(this.ci.Ai,{ei:this.Ok,bi:i,wi:this,ri:e}):vi(this.ci.Ai,{ei:this,bi:e})}var i=this.yk(e);if(!i)return this.Oj(e),null;var r=function(e,t){return t=Gt(e,t),Yt[t]}(this.ci,i);if(void 0!==r)return 0===r.Yh.count.value?(r.Yh.bi=i,r.Yh.ri=e,r.clone()):(r=r.clone(),this.Oj(e),r);if(r=this.ci.xk(i),!(r=li[r]))return t.call(this);r=this.hj?r.kk:r.pointerType;var n=function e(t,i,r){return i===r?t:void 0===r.li||null===(t=e(t,i,r.li))?null:r.sk(t)}(i,this.ci,r.ci);return null===n?t.call(this):this.ij?vi(r.ci.Ai,{ei:r,bi:n,wi:this,ri:e}):vi(r.ci.Ai,{ei:r,bi:n})},Ci=n.UnboundTypeError=kt("UnboundTypeError"),n.requestFullscreen=function(e,t){!function(e,t){function i(){Qi=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=or,nr&&r.requestPointerLock(),Qi=!0,sr?("undefined"!=typeof SDL&&(H[SDL.screen>>2]=8388608|Y[SDL.screen>>2]),cr(n.canvas),dr()):cr(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),sr?("undefined"!=typeof SDL&&(H[SDL.screen>>2]=-8388609&Y[SDL.screen>>2]),cr(n.canvas),dr()):cr(r)),n.onFullScreen&&n.onFullScreen(Qi),n.onFullscreen&&n.onFullscreen(Qi)}void 0===(nr=e)&&(nr=!0),void 0===(sr=t)&&(sr=!1);var r=n.canvas;rr||(rr=!0,document.addEventListener("fullscreenchange",i,!1),document.addEventListener("mozfullscreenchange",i,!1),document.addEventListener("webkitfullscreenchange",i,!1),document.addEventListener("MSFullscreenChange",i,!1));var s=document.createElement("div");r.parentNode.insertBefore(s,r),s.appendChild(r),s.requestFullscreen=s.requestFullscreen||s.mozRequestFullScreen||s.msRequestFullscreen||(s.webkitRequestFullscreen?function(){s.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(s.webkitRequestFullScreen?function(){s.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),s.requestFullscreen()}(e,t)},n.requestAnimationFrame=function(e){lr(e)},n.setCanvasSize=function(e,t,i){cr(n.canvas,e,t),i||dr()},n.pauseMainLoop=function(){Gi=null,Xi++},n.resumeMainLoop=function(){Xi++;var e=$i,t=Zi,i=Wi;Wi=null,Fi(i,0,!1,Ui,!0),Ni(e,t),Gi()},n.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},n.createContext=function(e,t,i,r){return function(e,t,i,r){if(t&&n.xi&&e==n.canvas)return n.xi;var s;if(t){var o={antialias:!1,alpha:!1,Bj:"undefined"!=typeof WebGL2RenderingContext?2:1};if(r)for(var a in r)o[a]=r[a];if(void 0!==$r&&(s=Gr(e,o)))var l=Or[s].Hi}else l=e.getContext("2d");return l?(i&&(t||E(void 0===xs,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),n.xi=l,t&&Xr(s),n.fl=t,tr.forEach((function(e){e()})),ir()),l):null}(e,t,i,r)};for(var xs,bs=0;32>bs;++bs)Vn.push(Array(bs));var Ts=new Float32Array(288);for(bs=0;288>bs;++bs)Jn[bs]=Ts.subarray(0,bs+1);var Es=new Int32Array(288);for(bs=0;288>bs;++bs)qn[bs]=Es.subarray(0,bs+1);function ws(e,t){var i=Array(k(e)+1);return e=I(e,i,0,i.length),t&&(i.length=e),i}!function(e,t){try{var i=indexedDB.open("emscripten_filesystem",1)}catch(e){return void t()}i.onupgradeneeded=function(e){(e=e.target.result).objectStoreNames.contains("FILES")&&e.deleteObjectStore("FILES"),e.createObjectStore("FILES")},i.onsuccess=function(e){!function(e){as=e,ce()}(e.target.result)},i.onerror=function(e){t()}}(0,(function(){as=!1,ce()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||de();var Rs={f:function(e){return Ds(e+16)+16},g:function(e,t,i){throw new xe(e).Ek(t,i),e},xb:function(e,t){!function(){function e(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}if(!Se){Se=!0;var t=(new Date).getFullYear(),i=new Date(t,0,1),r=new Date(t,6,1);t=i.getTimezoneOffset();var n=r.getTimezoneOffset(),s=Math.max(t,n);H[_s()>>2]=60*s,H[Vs()>>2]=Number(t!=n),i=e(i),r=e(r),i=J(i),r=J(r),n<t?(H[ks()>>2]=i,H[ks()+4>>2]=r):(H[ks()>>2]=r,H[ks()+4>>2]=i)}}(),e=new Date(1e3*H[e>>2]),H[t>>2]=e.getSeconds(),H[t+4>>2]=e.getMinutes(),H[t+8>>2]=e.getHours(),H[t+12>>2]=e.getDate(),H[t+16>>2]=e.getMonth(),H[t+20>>2]=e.getFullYear()-1900,H[t+24>>2]=e.getDay();var i=new Date(e.getFullYear(),0,1);H[t+28>>2]=(e.getTime()-i.getTime())/864e5|0,H[t+36>>2]=-60*e.getTimezoneOffset();var r=new Date(e.getFullYear(),6,1).getTimezoneOffset();return e=0|(r!=(i=i.getTimezoneOffset())&&e.getTimezoneOffset()==Math.min(i,r)),H[t+32>>2]=e,e=H[ks()+(e?4:0)>>2],H[t+40>>2]=e,t},tb:function(){return 0},fa:function(e,t,i){Et=i;try{var r=Rt(e);switch(t){case 0:var n=wt();return 0>n?-28:dt(r.path,r.flags,0,n).Ii;case 1:case 2:return 0;case 3:return r.flags;case 4:return n=wt(),r.flags|=n,0;case 12:return n=wt(),F[n+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return H[Ms()>>2]=28,-1;default:return-28}}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},Ab:function(e,t,i){Et=i;try{var r=Rt(e);switch(t){case 21509:case 21505:return r.fi?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.fi?0:-59;case 21519:if(!r.fi)return-59;var n=wt();return H[n>>2]=0;case 21520:return r.fi?-28:-59;case 21531:if(e=n=wt(),!r.ai.Gk)throw new ze(59);return r.ai.Gk(r,t,e);case 21523:case 21524:return r.fi?0:-59;default:pe("bad ioctl syscall "+t)}}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},Cb:function(e,t,i){Et=i;try{return dt(M(e),t,i?wt():0).Ii}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},Bb:function(e,t){try{e=M(e);e:{try{var i=Ge(e,{gj:!0}).node;if(!i)throw new ze(44);if(!i.$h.zi)throw new ze(63);var r=i.$h.zi(i)}catch(t){if(t&&t.node&&Te(e)!==Te(Xe(t.node))){var n=-54;break e}throw t}H[t>>2]=r.rk,H[t+4>>2]=0,H[t+8>>2]=r.zj,H[t+12>>2]=r.mode,H[t+16>>2]=r.Mk,H[t+20>>2]=r.uid,H[t+24>>2]=r.zk,H[t+28>>2]=r.Zi,H[t+32>>2]=0,me=[r.size>>>0,(ve=r.size,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[t+40>>2]=me[0],H[t+44>>2]=me[1],H[t+48>>2]=4096,H[t+52>>2]=r.jk,H[t+56>>2]=r.hk.getTime()/1e3|0,H[t+60>>2]=0,H[t+64>>2]=r.Lk.getTime()/1e3|0,H[t+68>>2]=0,H[t+72>>2]=r.lk.getTime()/1e3|0,H[t+76>>2]=0,me=[r.zj>>>0,(ve=r.zj,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[t+80>>2]=me[0],H[t+84>>2]=me[1],n=0}return n}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),-e.ui}},F:function(e,t,i){e=Nt(e),t=$t(t,"wrapper"),i=Xt(i);var r=[].slice,n=t.ci,s=n.Ai,o=n.li.Ai,a=n.li.constructor;for(var l in e=Lt(e,(function(){n.li.bk.forEach(function(e){if(this[e]===o[e])throw new Vt("Pure virtual function "+e+" must be implemented in JavaScript")}.bind(this)),Object.defineProperty(this,"__parent",{value:s}),this.__construct.apply(this,r.call(arguments))})),s.__construct=function(){this===s&&jt("Pass correct 'this' to __construct");var e=a.implement.apply(void 0,[this].concat(r.call(arguments)));Zt(e);var t=e.Yh;e.notifyOnDestruction(),t.Ui=!0,Object.defineProperties(this,{Yh:{value:t}}),qt(this),e=t.bi,e=Gt(n,e),Yt.hasOwnProperty(e)?jt("Tried to register registered instance: "+e):Yt[e]=this},s.__destruct=function(){this===s&&jt("Pass correct 'this' to __destruct"),Zt(this);var e=this.Yh.bi;e=Gt(n,e),Yt.hasOwnProperty(e)?delete Yt[e]:jt("Tried to unregister unregistered instance: "+e)},e.prototype=Object.create(s),i)e.prototype[l]=i[l];return Ot(e)},ob:function(){},$g:function(e,t,i,r,n){var s=Qt(i);si(e,{name:t=Nt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:8,readValueFromPointer:function(e){if(1===i)var r=_;else if(2===i)r=F;else{if(4!==i)throw new TypeError("Unknown boolean type size: "+t);r=H}return this.fromWireType(r[e>>s])},yi:null})},c:function(e,t,i,r,n,s,o,a,l,h,u,d,c){u=Nt(u),s=Pi(n,s),a&&(a=Pi(o,a)),h&&(h=Pi(l,h)),c=Pi(d,c);var p=Dt(u);ui(p,(function(){Ai("Cannot construct "+u+" due to unbound types",[r])})),ni([e,t,i],r?[r]:[],(function(t){if(t=t[0],r)var i=t.ci,n=i.Ai;else n=ai.prototype;t=Lt(p,(function(){if(Object.getPrototypeOf(this)!==o)throw new zt("Use 'new' to construct "+u);if(void 0===l.Ki)throw new zt(u+" has no accessible constructor");var e=l.Ki[arguments.length];if(void 0===e)throw new zt("Tried to invoke ctor of "+u+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.Ki).toString()+") parameters instead!");return e.apply(this,arguments)}));var o=Object.create(n,{constructor:{value:t}});t.prototype=o;var l=new di(u,t,o,c,i,s,a,h);i=new mi(u,l,!0,!1),n=new mi(u+"*",l,!1,!1);var d=new mi(u+" const*",l,!1,!0);return li[e]={pointerType:n,kk:d},Si(p,t),[i,n,d]}))},e:function(e,t,i,r,n,s,o){var a=Ei(i,r);t=Nt(t),s=Pi(n,s),ni([],[e],(function(e){function r(){Ai("Cannot call "+n+" due to unbound types",a)}var n=(e=e[0]).name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var l=e.ci.constructor;return void 0===l[t]?(r.Pi=i-1,l[t]=r):(hi(l,t,n),l[t].hi[i-1]=r),ni([],a,(function(e){return e=Ti(n,[e[0],null].concat(e.slice(1)),null,s,o),void 0===l[t].hi?(e.Pi=i-1,l[t]=e):l[t].hi[i-1]=e,[]})),[]}))},d:function(e,t,i,r,n,s){E(0<t);var o=Ei(t,i);n=Pi(r,n);var a=[s],l=[];ni([],[e],(function(e){var i="constructor "+(e=e[0]).name;if(void 0===e.ci.Ki&&(e.ci.Ki=[]),void 0!==e.ci.Ki[t-1])throw new zt("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.ci.Ki[t-1]=function(){Ai("Cannot construct "+e.name+" due to unbound types",o)},ni([],o,(function(r){return e.ci.Ki[t-1]=function(){arguments.length!==t-1&&jt(i+" called with "+arguments.length+" arguments, expected "+(t-1)),l.length=0,a.length=t;for(var e=1;e<t;++e)a[e]=r[e].toWireType(l,arguments[e-1]);return e=n.apply(null,a),bi(l),r[0].fromWireType(e)},[]})),[]}))},a:function(e,t,i,r,n,s,o,a){var l=Ei(i,r);t=Nt(t),s=Pi(n,s),ni([],[e],(function(e){function r(){Ai("Cannot call "+n+" due to unbound types",l)}var n=(e=e[0]).name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.ci.bk.push(t);var h=e.ci.Ai,u=h[t];return void 0===u||void 0===u.hi&&u.className!==e.name&&u.Pi===i-2?(r.Pi=i-2,r.className=e.name,h[t]=r):(hi(h,t,n),h[t].hi[i-2]=r),ni([],l,(function(r){return r=Ti(n,r,e,s,o),void 0===h[t].hi?(r.Pi=i-2,h[t]=r):h[t].hi[i-2]=r,[]})),[]}))},b:function(e,t,i,r,n,s,o,a,l,h){t=Nt(t),n=Pi(r,n),ni([],[e],(function(e){var r=(e=e[0]).name+"."+t,u={get:function(){Ai("Cannot access "+r+" due to unbound types",[i,o])},enumerable:!0,configurable:!0};return u.set=l?function(){Ai("Cannot access "+r+" due to unbound types",[i,o])}:function(){jt(r+" is a read-only property")},Object.defineProperty(e.ci.Ai,t,u),ni([],l?[i,o]:[i],(function(i){var o=i[0],u={get:function(){var t=wi(this,e,r+" getter");return o.fromWireType(n(s,t))},enumerable:!0};if(l){l=Pi(a,l);var d=i[1];u.set=function(t){var i=wi(this,e,r+" setter"),n=[];l(h,i,d.toWireType(n,t)),bi(n)}}return Object.defineProperty(e.ci.Ai,t,u),[]})),[]}))},_g:function(e,t){si(e,{name:t=Nt(t),fromWireType:function(e){var t=It[e].value;return Ri(e),t},toWireType:function(e,t){return Ot(t)},argPackAdvance:8,readValueFromPointer:yi,yi:null})},l:function(e,t,i,r){function n(){}i=Qt(i),t=Nt(t),n.values={},si(e,{name:t,constructor:n,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:Di(t,i,r),yi:null}),ui(t,n)},k:function(e,t,i){var r=$t(e,"enum");t=Nt(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:i},constructor:{value:Lt(r.name+"_"+t,(function(){}))}}),e.values[i]=r,e[t]=r},la:function(e,t,i){i=Qt(i),si(e,{name:t=Nt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Li(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:Mi(t,i),yi:null})},i:function(e,t,i,r,n,s){var o=Ei(t,i);e=Nt(e),n=Pi(r,n),ui(e,(function(){Ai("Cannot call "+e+" due to unbound types",o)}),t-1),ni([],o,(function(i){return Si(e,Ti(e,[i[0],null].concat(i.slice(1)),null,n,s),t-1),[]}))},t:function(e,t,i,r,n){function s(e){return e}t=Nt(t),-1===n&&(n=4294967295);var o=Qt(i);if(0===r){var a=32-8*i;s=function(e){return e<<a>>>a}}var l=t.includes("unsigned");si(e,{name:t,fromWireType:s,toWireType:function(e,i){if("number"!=typeof i&&"boolean"!=typeof i)throw new TypeError('Cannot convert "'+Li(i)+'" to '+this.name);if(i<r||i>n)throw new TypeError('Passing a number "'+Li(i)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+n+"]!");return l?i>>>0:0|i},argPackAdvance:8,readValueFromPointer:Ii(t,o,0!==r),yi:null})},p:function(e,t,i){function r(e){var t=Y;return new n(V,t[1+(e>>=2)],t[e])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];si(e,{name:i=Nt(i),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Ck:!0})},ma:function(e,t){var i="std::string"===(t=Nt(t));si(e,{name:t,fromWireType:function(e){var t=Y[e>>2];if(i)for(var r=e+4,n=0;n<=t;++n){var s=e+4+n;if(n==t||0==N[s]){if(r=M(r,s-r),void 0===o)var o=r;else o+=String.fromCharCode(0),o+=r;r=s+1}}else{for(o=Array(t),n=0;n<t;++n)o[n]=String.fromCharCode(N[e+4+n]);o=o.join("")}return Ls(e),o},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||jt("Cannot pass non-string to std::string");var n=(i&&r?function(){return k(t)}:function(){return t.length})(),s=Ds(4+n+1);if(Y[s>>2]=n,i&&r)O(t,s+4,n+1);else if(r)for(r=0;r<n;++r){var o=t.charCodeAt(r);255<o&&(Ls(s),jt("String has UTF-16 code units that do not fit in 8 bits")),N[s+4+r]=o}else for(r=0;r<n;++r)N[s+4+r]=t[r];return null!==e&&e.push(Ls,s),s},argPackAdvance:8,readValueFromPointer:yi,yi:function(e){Ls(e)}})},T:function(e,t,i){if(i=Nt(i),2===t)var r=X,n=W,s=U,o=function(){return B},a=1;else 4===t&&(r=$,n=Z,s=K,o=function(){return Y},a=2);si(e,{name:i,fromWireType:function(e){for(var i,n=Y[e>>2],s=o(),l=e+4,h=0;h<=n;++h){var u=e+4+h*t;h!=n&&0!=s[u>>a]||(l=r(l,u-l),void 0===i?i=l:(i+=String.fromCharCode(0),i+=l),l=u+t)}return Ls(e),i},toWireType:function(e,r){"string"!=typeof r&&jt("Cannot pass non-string to C++ string type "+i);var o=s(r),l=Ds(4+o+t);return Y[l>>2]=o>>a,n(r,l+4,o+t),null!==e&&e.push(Ls,l),l},argPackAdvance:8,readValueFromPointer:yi,yi:function(e){Ls(e)}})},ah:function(e,t){si(e,{Jk:!0,name:t=Nt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},Xg:function(e){delete ls[e-1]},sb:function(){throw"longjmp"},X:function(e,t,i,r,n){e=_i[e],t=Xt(t),i=ki(i);var s=[];return H[r>>2]=Ot(s),e(t,i,s,n)},E:function(e,t,i,r){(e=_i[e])(t=Xt(t),i=ki(i),null,r)},Ra:Ri,z:function(e,t){for(var i=(t=function(e,t){for(var i=Array(e),r=0;r<e;++r)i[r]=$t(H[(t>>2)+r],"parameter "+r);return i}(e,t))[0],r=i.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",n=["retType"],s=[i],o="",a=0;a<e-1;++a)o+=(0!==a?", ":"")+"arg"+a,n.push("argType"+a),s.push(t[1+a]);r="return function "+Dt("methodCaller_"+r)+"(handle, name, destructors, args) {\n";var l=0;for(a=0;a<e-1;++a)r+=" var arg"+a+" = argType"+a+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=t[a+1].argPackAdvance;for(r+=" var rv = handle[name]("+o+");\n",a=0;a<e-1;++a)t[a+1].deleteObject&&(r+=" argType"+a+".deleteObject(arg"+a+");\n");return i.Jk||(r+=" return retType.toWireType(destructors, rv);\n"),n.push(r+"};\n"),function(e){var t=_i.length;return _i.push(e),t}(e=xi(n).apply(null,s))},Ta:function(e){4<e&&(It[e].Ej+=1)},Qa:function(e){bi(It[e].value),Ri(e)},r:function(e,t){return Ot(e=(e=$t(e,"_emval_take_value")).readValueFromPointer(t))},B:function(){pe()},C:function(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return H[Ms()>>2]=28,-1;e=Vi()}return H[t>>2]=e/1e3|0,H[t+4>>2]=e%1e3*1e6|0,0},Za:function(e,t){return e-t},ch:function(){pe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},rh:function(e){return 12448==e?(mr=12288,1):(mr=12300,0)},Oa:function(e,t,i,r,n){if(62e3!=e)mr=12296,i=0;else{if(t)for(;;){if(12321==(e=H[t>>2]))xr.alpha=0<H[t+4>>2];else if(12325==e)xr.depth=0<H[t+4>>2];else if(12326==e)xr.stencil=0<H[t+4>>2];else if(12337==e)e=H[t+4>>2],xr.antialias=0<e;else if(12338==e)e=H[t+4>>2],xr.antialias=1==e;else if(12544==e)xr.rl=12547!=H[t+4>>2];else if(12344==e)break;t+=8}i&&r||n?(n&&(H[n>>2]=1),i&&0<r&&(H[i>>2]=62002),mr=12288,i=1):(mr=12300,i=0)}return i},ih:function(e,t,i,r){if(62e3!=e)return mr=12296,0;for(e=1;;){if(12440!=(t=H[r>>2])){if(12344==t)break;return mr=12292,0}e=H[r+4>>2],r+=8}return 2>e||3<e?(mr=12293,0):(xr.Bj=e-1,xr.tl=0,0!=(vr=Gr(n.canvas,xr))?(mr=12288,Xr(vr),n.fl=!0,tr.forEach((function(e){e()})),Xr(null),62004):(mr=12297,0))},kh:function(e,t){return 62e3!=e?(mr=12296,0):62002!=t?(mr=12293,0):(mr=12288,62006)},jh:function(e,t){if(62e3!=e)return mr=12296,0;if(62004!=t)return mr=12294,0;if(Ur===Or[e=vr]&&(Ur=null),"object"==typeof An)for(var i=Or[e].Hi.canvas,r=0;r<rn.length;++r)rn[r].target!=i||nn(r--);return Or[e]&&Or[e].Hi.canvas&&(Or[e].Hi.canvas.Wi=void 0),Or[e]=null,mr=12288,Pr==t&&(Pr=0),1},lh:function(e,t){return 62e3!=e?(mr=12296,0):62006!=t?(mr=12301,1):(Cr==t&&(Cr=0),Ar==t&&(Ar=0),mr=12288,1)},Pa:function(e,t,i,r){if(62e3!=e)return mr=12296,0;if(62002!=t)return mr=12293,0;if(!r)return mr=12300,0;switch(mr=12288,i){case 12320:return H[r>>2]=xr.alpha?32:24,1;case 12321:return H[r>>2]=xr.alpha?8:0,1;case 12322:case 12323:case 12324:return H[r>>2]=8,1;case 12325:return H[r>>2]=xr.depth?24:0,1;case 12326:return H[r>>2]=xr.stencil?8:0,1;case 12327:return H[r>>2]=12344,1;case 12328:return H[r>>2]=62002,1;case 12329:return H[r>>2]=0,1;case 12330:return H[r>>2]=4096,1;case 12331:return H[r>>2]=16777216,1;case 12332:return H[r>>2]=4096,1;case 12333:case 12334:return H[r>>2]=0,1;case 12335:return H[r>>2]=12344,1;case 12337:return H[r>>2]=xr.antialias?4:0,1;case 12338:return H[r>>2]=xr.antialias?1:0,1;case 12339:return H[r>>2]=4,1;case 12340:return H[r>>2]=12344,1;case 12341:case 12342:case 12343:return H[r>>2]=-1,1;case 12345:case 12346:case 12347:return H[r>>2]=0,1;case 12348:return H[r>>2]=1;case 12349:case 12350:return H[r>>2]=0,1;case 12351:return H[r>>2]=12430,1;case 12352:return H[r>>2]=4,1;case 12354:return H[r>>2]=0,1;default:return mr=12292,0}},Ma:function(){return mr=12288,62e3},hh:function(){return mr},sh:function(e,t,i){return 62e3==e?(t&&(H[t>>2]=1),i&&(H[i>>2]=4),Sr=!0,mr=12288,1):(mr=12296,0)},mh:function(e,t,i,r){return 62e3!=e?(mr=12296,0):0!=r&&62004!=r?(mr=12294,0):0!=i&&62006!=i||0!=t&&62006!=t?(mr=12301,0):(Xr(r?vr:null),Pr=r,Ar=t,Cr=i,mr=12288,1)},gh:function(e,t){if(62e3!=e)return mr=12296,0;if(mr=12288,br[t])return br[t];switch(t){case 12371:e=J("Emscripten");break;case 12372:e=J("1.4 Emscripten EGL");break;case 12373:e=J("");break;case 12429:e=J("OpenGL_ES");break;default:return mr=12300,0}return br[t]=e},nh:function(){if(Sr)if(n.xi){if(!n.xi.isContextLost())return mr=12288,1;mr=12302}else mr=12290;else mr=12289;return 0},oh:function(e,t){return 62e3!=e?(mr=12296,0):(0==t?Ni(0,0):Ni(1,t),mr=12288,1)},th:function(e){return 62e3!=e?(mr=12296,0):(Ar=Cr=Pr=0,Sr=!1,mr=12288,1)},qh:function(){return mr=12288,1},ph:function(){return mr=12288,1},j:function(e,t,i){var r;for(Zr.length=0,i>>=2;r=N[t++];)(r=105>r)&&1&i&&i++,Zr.push(r?j[i++>>1]:H[i]),++i;return Pe[e].apply(null,Zr)},Sa:function(){Gi=null,Xi++,Wi=null},dh:function(){if(!an())return-1;en(In);var e=Tn[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else{if(!e.webkitExitFullscreen)return-1;e.webkitFullscreenElement&&e.webkitExitFullscreen()}return 0},fh:function(){if(en(On),document.exitPointerLock)document.exitPointerLock();else{if(!document.Ci)return-1;document.Ci()}return 0},N:function(){return devicePixelRatio},y:function(e,t,i){return(e=En(e))?(e=Mn(e),j[t>>3]=e.width,j[i>>3]=e.height,0):-4},pa:function(e,t){return 0>e||e>=un.length?-5:un[e]?(kn(t,un[e]),0):-7},bh:function(){return un.length},Bg:function(e){xs.activeTexture(e)},Ag:function(e,t){xs.attachShader(wr[e],Mr[t])},wd:function(e,t){xs.beginQuery(e,kr[t])},Tg:function(e,t){xs.mi.beginQueryEXT(e,kr[t])},bd:function(e){xs.beginTransformFeedback(e)},zg:function(e,t,i){xs.bindAttribLocation(wr[e],t,M(i))},yg:function(e,t){35051==e?xs.Li=t:35052==e&&(xs.ii=t),xs.bindBuffer(e,Er[t])},Zc:function(e,t,i){xs.bindBufferBase(e,t,Er[i])},$c:function(e,t,i,r,n){xs.bindBufferRange(e,t,Er[i],r,n)},xg:function(e,t){xs.bindFramebuffer(e,Rr[t])},wg:function(e,t){xs.bindRenderbuffer(e,Dr[t])},dc:function(e,t){xs.bindSampler(e,Vr[t])},vg:function(e,t){xs.bindTexture(e,Lr[t])},Wb:function(e,t){xs.bindTransformFeedback(e,_r[t])},gd:function(e){xs.bindVertexArray(Ir[e])},Kg:function(e){xs.bindVertexArray(Ir[e])},ug:function(e,t,i,r){xs.blendColor(e,t,i,r)},tg:function(e){xs.blendEquation(e)},sg:function(e,t){xs.blendEquationSeparate(e,t)},rg:function(e,t){xs.blendFunc(e,t)},qg:function(e,t,i,r){xs.blendFuncSeparate(e,t,i,r)},kd:function(e,t,i,r,n,s,o,a,l,h){xs.blitFramebuffer(e,t,i,r,n,s,o,a,l,h)},pg:function(e,t,i,r){2<=Ur.version?i?xs.bufferData(e,N,r,i,t):xs.bufferData(e,t,r):xs.bufferData(e,i?N.subarray(i,i+t):t,r)},og:function(e,t,i,r){2<=Ur.version?xs.bufferSubData(e,t,N,r,i):xs.bufferSubData(e,t,N.subarray(r,r+i))},ng:function(e){return xs.checkFramebufferStatus(e)},mg:function(e){xs.clear(e)},Bc:function(e,t,i,r){xs.clearBufferfi(e,t,i,r)},Cc:function(e,t,i){xs.clearBufferfv(e,t,z,i>>2)},Ec:function(e,t,i){xs.clearBufferiv(e,t,H,i>>2)},Dc:function(e,t,i){xs.clearBufferuiv(e,t,Y,i>>2)},lg:function(e,t,i,r){xs.clearColor(e,t,i,r)},kg:function(e){xs.clearDepth(e)},jg:function(e){xs.clearStencil(e)},nc:function(e,t,i,r){return xs.clientWaitSync(Nr[e],t,(i>>>0)+4294967296*r)},ig:function(e,t,i,r){xs.colorMask(!!e,!!t,!!i,!!r)},hg:function(e){xs.compileShader(Mr[e])},gg:function(e,t,i,r,n,s,o,a){2<=Ur.version?xs.ii?xs.compressedTexImage2D(e,t,i,r,n,s,o,a):xs.compressedTexImage2D(e,t,i,r,n,s,N,a,o):xs.compressedTexImage2D(e,t,i,r,n,s,a?N.subarray(a,a+o):null)},Bd:function(e,t,i,r,n,s,o,a,l){xs.ii?xs.compressedTexImage3D(e,t,i,r,n,s,o,a,l):xs.compressedTexImage3D(e,t,i,r,n,s,o,N,l,a)},fg:function(e,t,i,r,n,s,o,a,l){2<=Ur.version?xs.ii?xs.compressedTexSubImage2D(e,t,i,r,n,s,o,a,l):xs.compressedTexSubImage2D(e,t,i,r,n,s,o,N,l,a):xs.compressedTexSubImage2D(e,t,i,r,n,s,o,l?N.subarray(l,l+a):null)},Ad:function(e,t,i,r,n,s,o,a,l,h,u){xs.ii?xs.compressedTexSubImage3D(e,t,i,r,n,s,o,a,l,h,u):xs.compressedTexSubImage3D(e,t,i,r,n,s,o,a,l,N,u,h)},zc:function(e,t,i,r,n){xs.copyBufferSubData(e,t,i,r,n)},eg:function(e,t,i,r,n,s,o,a){xs.copyTexImage2D(e,t,i,r,n,s,o,a)},dg:function(e,t,i,r,n,s,o,a){xs.copyTexSubImage2D(e,t,i,r,n,s,o,a)},Cd:function(e,t,i,r,n,s,o,a,l){xs.copyTexSubImage3D(e,t,i,r,n,s,o,a,l)},cg:function(){var e=zr(wr),t=xs.createProgram();return t.name=e,t.Fi=t.Di=t.Ei=0,t.rj=1,wr[e]=t,e},bg:function(e){var t=zr(Mr);return Mr[t]=xs.createShader(e),t},ag:function(e){xs.cullFace(e)},_f:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Er[r];n&&(xs.deleteBuffer(n),n.name=0,Er[r]=null,r==xs.Li&&(xs.Li=0),r==xs.ii&&(xs.ii=0))}},Zf:function(e,t){for(var i=0;i<e;++i){var r=H[t+4*i>>2],n=Rr[r];n&&(xs.deleteFramebuffer(n),n.name=0,Rr[r]=null)}},Yf:function(e){if(e){var t=wr[e];t?(xs.deleteProgram(t),t.name=0,wr[e]=null):Yr(1281)}},yd:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=kr[r];n&&(xs.deleteQuery(n),kr[r]=null)}},Vg:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=kr[r];n&&(xs.mi.deleteQueryEXT(n),kr[r]=null)}},Xf:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Dr[r];n&&(xs.deleteRenderbuffer(n),n.name=0,Dr[r]=null)}},fc:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Vr[r];n&&(xs.deleteSampler(n),n.name=0,Vr[r]=null)}},Wf:function(e){if(e){var t=Mr[e];t?(xs.deleteShader(t),Mr[e]=null):Yr(1281)}},oc:function(e){if(e){var t=Nr[e];t?(xs.deleteSync(t),t.name=0,Nr[e]=null):Yr(1281)}},Vf:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Lr[r];n&&(xs.deleteTexture(n),n.name=0,Lr[r]=null)}},Vb:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=_r[r];n&&(xs.deleteTransformFeedback(n),n.name=0,_r[r]=null)}},fd:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2];xs.deleteVertexArray(Ir[r]),Ir[r]=null}},Jg:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2];xs.deleteVertexArray(Ir[r]),Ir[r]=null}},Uf:function(e){xs.depthFunc(e)},Tf:function(e){xs.depthMask(!!e)},Sf:function(e,t){xs.depthRange(e,t)},Rf:function(e,t){xs.detachShader(wr[e],Mr[t])},Pf:function(e){xs.disable(e)},Of:function(e){xs.disableVertexAttribArray(e)},Nf:function(e,t,i){xs.drawArrays(e,t,i)},sc:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Fg:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Fb:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Kd:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},Gb:function(e,t,i,r){xs.drawArraysInstanced(e,t,i,r)},rd:function(e,t){for(var i=Vn[e],r=0;r<e;r++)i[r]=H[t+4*r>>2];xs.drawBuffers(i)},Id:function(e,t){for(var i=Vn[e],r=0;r<e;r++)i[r]=H[t+4*r>>2];xs.drawBuffers(i)},Gg:function(e,t){for(var i=Vn[e],r=0;r<e;r++)i[r]=H[t+4*r>>2];xs.drawBuffers(i)},Mf:function(e,t,i,r){xs.drawElements(e,t,i,r)},rc:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Dg:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Db:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Eb:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Jd:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},Gd:function(e,t,i,r,n,s){_n(e,r,n,s)},Lf:function(e){xs.enable(e)},Kf:function(e){xs.enableVertexAttribArray(e)},vd:function(e){xs.endQuery(e)},Sg:function(e){xs.mi.endQueryEXT(e)},ad:function(){xs.endTransformFeedback()},qc:function(e,t){return(e=xs.fenceSync(e,t))?(t=zr(Nr),e.name=t,Nr[t]=e,t):0},Jf:function(){xs.finish()},If:function(){xs.flush()},Hf:function(e,t,i,r){xs.framebufferRenderbuffer(e,t,i,Dr[r])},Gf:function(e,t,i,r,n){xs.framebufferTexture2D(e,t,i,Lr[r],n)},hd:function(e,t,i,r,n){xs.framebufferTextureLayer(e,t,Lr[i],r,n)},Ff:function(e){xs.frontFace(e)},Ef:function(e,t){Nn(e,t,"createBuffer",Er)},Cf:function(e,t){Nn(e,t,"createFramebuffer",Rr)},zd:function(e,t){Nn(e,t,"createQuery",kr)},Wg:function(e,t){for(var i=0;i<e;i++){var r=xs.mi.createQueryEXT();if(!r){for(Yr(1282);i<e;)H[t+4*i++>>2]=0;break}var n=zr(kr);r.name=n,kr[n]=r,H[t+4*i>>2]=n}},Bf:function(e,t){Nn(e,t,"createRenderbuffer",Dr)},gc:function(e,t){Nn(e,t,"createSampler",Vr)},Af:function(e,t){Nn(e,t,"createTexture",Lr)},Ub:function(e,t){Nn(e,t,"createTransformFeedback",_r)},ed:function(e,t){Nn(e,t,"createVertexArray",Ir)},Ig:function(e,t){Nn(e,t,"createVertexArray",Ir)},Df:function(e){xs.generateMipmap(e)},zf:function(e,t,i,r,n,s,o){Fn("getActiveAttrib",e,t,i,r,n,s,o)},yf:function(e,t,i,r,n,s,o){Fn("getActiveUniform",e,t,i,r,n,s,o)},uc:function(e,t,i,r,n){e=wr[e],(e=xs.getActiveUniformBlockName(e,t))&&(n&&0<i?(i=O(e,n,i),r&&(H[r>>2]=i)):r&&(H[r>>2]=0))},vc:function(e,t,i,r){if(r){if(e=wr[e],35393==i)i=xs.getActiveUniformBlockName(e,t),H[r>>2]=i.length+1;else if(null!==(e=xs.getActiveUniformBlockParameter(e,t,i)))if(35395==i)for(i=0;i<e.length;i++)H[r+4*i>>2]=e[i];else H[r>>2]=e}else Yr(1281)},xc:function(e,t,i,r,n){if(n)if(0<t&&0==i)Yr(1281);else{e=wr[e];for(var s=[],o=0;o<t;o++)s.push(H[i+4*o>>2]);if(e=xs.getActiveUniforms(e,s,r))for(t=e.length,o=0;o<t;o++)H[n+4*o>>2]=e[o]}else Yr(1281)},xf:function(e,t,i,r){var n=(e=xs.getAttachedShaders(wr[e])).length;for(n>t&&(n=t),H[i>>2]=n,t=0;t<n;++t)H[r+4*t>>2]=Mr.indexOf(e[t])},wf:function(e,t){return xs.getAttribLocation(wr[e],M(t))},vf:function(e,t){Hn(e,t,4)},hc:function(e,t,i){i?Bn(i,xs.getBufferParameter(e,t)):Yr(1281)},uf:function(e,t,i){i?H[i>>2]=xs.getBufferParameter(e,t):Yr(1281)},tf:function(){var e=xs.getError()||Wr;return Wr=0,e},sf:function(e,t){Hn(e,t,2)},Nc:function(e,t){return xs.getFragDataLocation(wr[e],M(t))},rf:function(e,t,i,r){((e=xs.getFramebufferAttachmentParameter(e,t,i))instanceof WebGLRenderbuffer||e instanceof WebGLTexture)&&(e=0|e.name),H[r>>2]=e},ic:function(e,t,i){Yn(e,t,i,1)},lc:function(e,t){Hn(e,t,1)},cd:function(e,t,i){Yn(e,t,i,0)},qf:function(e,t){Hn(e,t,0)},Jb:function(e,t,i,r,n){if(0>r)Yr(1281);else if(n){if(null!==(e=xs.getInternalformatParameter(e,t,i)))for(t=0;t<e.length&&t<r;++t)H[n+t>>2]=e[t]}else Yr(1281)},Qb:function(){Yr(1282)},of:function(e,t,i,r){null===(e=xs.getProgramInfoLog(wr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},pf:function(e,t,i){if(i)if(e>=Tr)Yr(1281);else if(e=wr[e],35716==t)null===(e=xs.getProgramInfoLog(e))&&(e="(unknown error)"),H[i>>2]=e.length+1;else if(35719==t){if(!e.Fi)for(t=0;t<xs.getProgramParameter(e,35718);++t)e.Fi=Math.max(e.Fi,xs.getActiveUniform(e,t).name.length+1);H[i>>2]=e.Fi}else if(35722==t){if(!e.Di)for(t=0;t<xs.getProgramParameter(e,35721);++t)e.Di=Math.max(e.Di,xs.getActiveAttrib(e,t).name.length+1);H[i>>2]=e.Di}else if(35381==t){if(!e.Ei)for(t=0;t<xs.getProgramParameter(e,35382);++t)e.Ei=Math.max(e.Ei,xs.getActiveUniformBlockName(e,t).length+1);H[i>>2]=e.Ei}else H[i>>2]=xs.getProgramParameter(e,t);else Yr(1281)},Mg:function(e,t,i){i?(e=kr[e],Bn(i,"boolean"==typeof(t=2>Ur.version?xs.mi.getQueryObjectEXT(e,t):xs.getQueryParameter(e,t))?t?1:0:t)):Yr(1281)},Og:function(e,t,i){var r;i?(r="boolean"==typeof(e=xs.mi.getQueryObjectEXT(kr[e],t))?e?1:0:e,H[i>>2]=r):Yr(1281)},Lg:function(e,t,i){i?(e=kr[e],Bn(i,"boolean"==typeof(t=2>Ur.version?xs.mi.getQueryObjectEXT(e,t):xs.getQueryParameter(e,t))?t?1:0:t)):Yr(1281)},sd:function(e,t,i){var r;i?(r="boolean"==typeof(e=xs.getQueryParameter(kr[e],t))?e?1:0:e,H[i>>2]=r):Yr(1281)},Ng:function(e,t,i){var r;i?(r="boolean"==typeof(e=xs.mi.getQueryObjectEXT(kr[e],t))?e?1:0:e,H[i>>2]=r):Yr(1281)},td:function(e,t,i){i?H[i>>2]=xs.getQuery(e,t):Yr(1281)},Qg:function(e,t,i){i?H[i>>2]=xs.mi.getQueryEXT(e,t):Yr(1281)},nf:function(e,t,i){i?H[i>>2]=xs.getRenderbufferParameter(e,t):Yr(1281)},Yb:function(e,t,i){i?z[i>>2]=xs.getSamplerParameter(Vr[e],t):Yr(1281)},Zb:function(e,t,i){i?H[i>>2]=xs.getSamplerParameter(Vr[e],t):Yr(1281)},lf:function(e,t,i,r){null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},kf:function(e,t,i,r){e=xs.getShaderPrecisionFormat(e,t),H[i>>2]=e.rangeMin,H[i+4>>2]=e.rangeMax,H[r>>2]=e.precision},jf:function(e,t,i,r){(e=xs.getShaderSource(Mr[e]))&&(t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t))},mf:function(e,t,i){i?35716==t?(null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),H[i>>2]=e?e.length+1:0):35720==t?(e=xs.getShaderSource(Mr[e]),H[i>>2]=e?e.length+1:0):H[i>>2]=xs.getShaderParameter(Mr[e],t):Yr(1281)},hf:function(e){var t=Fr[e];if(!t){switch(e){case 7939:t=zn((t=(t=xs.getSupportedExtensions()||[]).concat(t.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:(t=xs.getParameter(e))||Yr(1280),t=t&&zn(t);break;case 7938:t=xs.getParameter(7938),t=zn(t=2<=Ur.version?"OpenGL ES 3.0 ("+t+")":"OpenGL ES 2.0 ("+t+")");break;case 35724:var i=(t=xs.getParameter(35724)).match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==i&&(3==i[1].length&&(i[1]+="0"),t="OpenGL ES GLSL ES "+i[1]+" ("+t+")"),t=zn(t);break;default:Yr(1280)}Fr[e]=t}return t},Ac:function(e,t){if(2>Ur.version)return Yr(1282),0;var i=Br[e];if(i)return 0>t||t>=i.length?(Yr(1281),0):i[t];switch(e){case 7939:return i=(i=(i=xs.getSupportedExtensions()||[]).concat(i.map((function(e){return"GL_"+e})))).map((function(e){return zn(e)})),i=Br[e]=i,0>t||t>=i.length?(Yr(1281),0):i[t];default:return Yr(1280),0}},jc:function(e,t,i,r,n){0>i?Yr(1281):n?null!==(e=xs.getSyncParameter(Nr[e],t))&&(H[n>>2]=e,r&&(H[r>>2]=1)):Yr(1281)},gf:function(e,t,i){i?z[i>>2]=xs.getTexParameter(e,t):Yr(1281)},ff:function(e,t,i){i?H[i>>2]=xs.getTexParameter(e,t):Yr(1281)},Xc:function(e,t,i,r,n,s,o){e=wr[e],(e=xs.getTransformFeedbackVarying(e,t))&&(o&&0<i?(i=O(e.name,o,i),r&&(H[r>>2]=i)):r&&(H[r>>2]=0),n&&(H[n>>2]=e.size),s&&(H[s>>2]=e.type))},wc:function(e,t){return xs.getUniformBlockIndex(wr[e],M(t))},yc:function(e,t,i,r){if(r)if(0<t&&(0==i||0==r))Yr(1281);else{e=wr[e];for(var n=[],s=0;s<t;s++)n.push(M(H[i+4*s>>2]));if(e=xs.getUniformIndices(e,n))for(t=e.length,s=0;s<t;s++)H[r+4*s>>2]=e[s]}else Yr(1281)},cf:function(e,t){if(t=M(t),e=wr[e]){Gn(e);var i=e.Oi,r=0,n=t,s=jn(t);if(0<s&&(r=parseInt(t.slice(s+1))>>>0,n=t.slice(0,s)),(n=e.sj[n])&&r<n[0]&&(i[r+=n[1]]=i[r]||xs.getUniformLocation(e,t)))return r}else Yr(1281);return-1},ef:function(e,t,i){Wn(e,t,i,2)},df:function(e,t,i){Wn(e,t,i,0)},Oc:function(e,t,i){Wn(e,t,i,0)},Vc:function(e,t,i){Un(e,t,i,0)},Uc:function(e,t,i){Un(e,t,i,0)},$e:function(e,t,i){i?H[i>>2]=xs.getVertexAttribOffset(e,t):Yr(1281)},bf:function(e,t,i){Un(e,t,i,2)},af:function(e,t,i){Un(e,t,i,5)},_e:function(e,t){xs.hint(e,t)},Nb:function(e,t,i){for(var r=Vn[t],n=0;n<t;n++)r[n]=H[i+4*n>>2];xs.invalidateFramebuffer(e,r)},Mb:function(e,t,i,r,n,s,o){for(var a=Vn[t],l=0;l<t;l++)a[l]=H[i+4*l>>2];xs.invalidateSubFramebuffer(e,a,r,n,s,o)},Ze:function(e){return(e=Er[e])?xs.isBuffer(e):0},Ye:function(e){return xs.isEnabled(e)},Xe:function(e){return(e=Rr[e])?xs.isFramebuffer(e):0},We:function(e){return(e=wr[e])?xs.isProgram(e):0},xd:function(e){return(e=kr[e])?xs.isQuery(e):0},Ug:function(e){return(e=kr[e])?xs.mi.isQueryEXT(e):0},Ve:function(e){return(e=Dr[e])?xs.isRenderbuffer(e):0},ec:function(e){return(e=Vr[e])?xs.isSampler(e):0},Ue:function(e){return(e=Mr[e])?xs.isShader(e):0},pc:function(e){return xs.isSync(Nr[e])},Te:function(e){return(e=Lr[e])?xs.isTexture(e):0},Tb:function(e){return xs.isTransformFeedback(_r[e])},dd:function(e){return(e=Ir[e])?xs.isVertexArray(e):0},Hg:function(e){return(e=Ir[e])?xs.isVertexArray(e):0},Re:function(e){xs.lineWidth(e)},Qe:function(e){e=wr[e],xs.linkProgram(e),e.Oi=0,e.sj={}},Sb:function(){xs.pauseTransformFeedback()},Pe:function(e,t){3317==e&&(Hr=t),xs.pixelStorei(e,t)},Oe:function(e,t){xs.polygonOffset(e,t)},Pb:function(){Yr(1280)},Ob:function(){Yr(1280)},Rg:function(e,t){xs.mi.queryCounterEXT(kr[e],t)},Hd:function(e){xs.readBuffer(e)},Ne:function(e,t,i,r,n,s,o){if(2<=Ur.version)if(xs.Li)xs.readPixels(e,t,i,r,n,s,o);else{var a=$n(s);xs.readPixels(e,t,i,r,n,s,a,o>>Zn(a))}else(o=Kn(s,n,i,r,o))?xs.readPixels(e,t,i,r,n,s,o):Yr(1280)},Me:function(){},Le:function(e,t,i,r){xs.renderbufferStorage(e,t,i,r)},id:function(e,t,i,r,n){xs.renderbufferStorageMultisample(e,t,i,r,n)},Rb:function(){xs.resumeTransformFeedback()},Ke:function(e,t){xs.sampleCoverage(e,!!t)},ac:function(e,t,i){xs.samplerParameterf(Vr[e],t,i)},_b:function(e,t,i){xs.samplerParameterf(Vr[e],t,z[i>>2])},cc:function(e,t,i){xs.samplerParameteri(Vr[e],t,i)},bc:function(e,t,i){xs.samplerParameteri(Vr[e],t,H[i>>2])},Je:function(e,t,i,r){xs.scissor(e,t,i,r)},Ie:function(){Yr(1280)},Ge:function(e,t,i,r){t=jr(t,i,r),xs.shaderSource(Mr[e],t)},Fe:function(e,t,i){xs.stencilFunc(e,t,i)},Ee:function(e,t,i,r){xs.stencilFuncSeparate(e,t,i,r)},De:function(e){xs.stencilMask(e)},Ce:function(e,t){xs.stencilMaskSeparate(e,t)},Be:function(e,t,i){xs.stencilOp(e,t,i)},Ae:function(e,t,i,r){xs.stencilOpSeparate(e,t,i,r)},ze:function(e,t,i,r,n,s,o,a,l){if(2<=Ur.version)if(xs.ii)xs.texImage2D(e,t,i,r,n,s,o,a,l);else if(l){var h=$n(a);xs.texImage2D(e,t,i,r,n,s,o,a,h,l>>Zn(h))}else xs.texImage2D(e,t,i,r,n,s,o,a,null);else xs.texImage2D(e,t,i,r,n,s,o,a,l?Kn(a,o,r,n,l):null)},Ed:function(e,t,i,r,n,s,o,a,l,h){if(xs.ii)xs.texImage3D(e,t,i,r,n,s,o,a,l,h);else if(h){var u=$n(l);xs.texImage3D(e,t,i,r,n,s,o,a,l,u,h>>Zn(u))}else xs.texImage3D(e,t,i,r,n,s,o,a,l,null)},ye:function(e,t,i){xs.texParameterf(e,t,i)},xe:function(e,t,i){xs.texParameterf(e,t,z[i>>2])},ve:function(e,t,i){xs.texParameteri(e,t,i)},ue:function(e,t,i){xs.texParameteri(e,t,H[i>>2])},Lb:function(e,t,i,r,n){xs.texStorage2D(e,t,i,r,n)},Kb:function(e,t,i,r,n,s){xs.texStorage3D(e,t,i,r,n,s)},te:function(e,t,i,r,n,s,o,a,l){if(2<=Ur.version)if(xs.ii)xs.texSubImage2D(e,t,i,r,n,s,o,a,l);else if(l){var h=$n(a);xs.texSubImage2D(e,t,i,r,n,s,o,a,h,l>>Zn(h))}else xs.texSubImage2D(e,t,i,r,n,s,o,a,null);else h=null,l&&(h=Kn(a,o,n,s,l)),xs.texSubImage2D(e,t,i,r,n,s,o,a,h)},Dd:function(e,t,i,r,n,s,o,a,l,h,u){if(xs.ii)xs.texSubImage3D(e,t,i,r,n,s,o,a,l,h,u);else if(u){var d=$n(h);xs.texSubImage3D(e,t,i,r,n,s,o,a,l,h,d,u>>Zn(d))}else xs.texSubImage3D(e,t,i,r,n,s,o,a,l,h,null)},Yc:function(e,t,i,r){e=wr[e];for(var n=[],s=0;s<t;s++)n.push(M(H[i+4*s>>2]));xs.transformFeedbackVaryings(e,n,r)},se:function(e,t){xs.uniform1f(Xn(e),t)},re:function(e,t,i){if(2<=Ur.version)xs.uniform1fv(Xn(e),z,i>>2,t);else{if(288>=t)for(var r=Jn[t-1],n=0;n<t;++n)r[n]=z[i+4*n>>2];else r=z.subarray(i>>2,i+4*t>>2);xs.uniform1fv(Xn(e),r)}},qe:function(e,t){xs.uniform1i(Xn(e),t)},pe:function(e,t,i){if(2<=Ur.version)xs.uniform1iv(Xn(e),H,i>>2,t);else{if(288>=t)for(var r=qn[t-1],n=0;n<t;++n)r[n]=H[i+4*n>>2];else r=H.subarray(i>>2,i+4*t>>2);xs.uniform1iv(Xn(e),r)}},Mc:function(e,t){xs.uniform1ui(Xn(e),t)},Ic:function(e,t,i){xs.uniform1uiv(Xn(e),Y,i>>2,t)},oe:function(e,t,i){xs.uniform2f(Xn(e),t,i)},ne:function(e,t,i){if(2<=Ur.version)xs.uniform2fv(Xn(e),z,i>>2,2*t);else{if(144>=t)for(var r=Jn[2*t-1],n=0;n<2*t;n+=2)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2];else r=z.subarray(i>>2,i+8*t>>2);xs.uniform2fv(Xn(e),r)}},me:function(e,t,i){xs.uniform2i(Xn(e),t,i)},je:function(e,t,i){if(2<=Ur.version)xs.uniform2iv(Xn(e),H,i>>2,2*t);else{if(144>=t)for(var r=qn[2*t-1],n=0;n<2*t;n+=2)r[n]=H[i+4*n>>2],r[n+1]=H[i+(4*n+4)>>2];else r=H.subarray(i>>2,i+8*t>>2);xs.uniform2iv(Xn(e),r)}},Lc:function(e,t,i){xs.uniform2ui(Xn(e),t,i)},Hc:function(e,t,i){xs.uniform2uiv(Xn(e),Y,i>>2,2*t)},ie:function(e,t,i,r){xs.uniform3f(Xn(e),t,i,r)},he:function(e,t,i){if(2<=Ur.version)xs.uniform3fv(Xn(e),z,i>>2,3*t);else{if(96>=t)for(var r=Jn[3*t-1],n=0;n<3*t;n+=3)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2],r[n+2]=z[i+(4*n+8)>>2];else r=z.subarray(i>>2,i+12*t>>2);xs.uniform3fv(Xn(e),r)}},ge:function(e,t,i,r){xs.uniform3i(Xn(e),t,i,r)},fe:function(e,t,i){if(2<=Ur.version)xs.uniform3iv(Xn(e),H,i>>2,3*t);else{if(96>=t)for(var r=qn[3*t-1],n=0;n<3*t;n+=3)r[n]=H[i+4*n>>2],r[n+1]=H[i+(4*n+4)>>2],r[n+2]=H[i+(4*n+8)>>2];else r=H.subarray(i>>2,i+12*t>>2);xs.uniform3iv(Xn(e),r)}},Kc:function(e,t,i,r){xs.uniform3ui(Xn(e),t,i,r)},Gc:function(e,t,i){xs.uniform3uiv(Xn(e),Y,i>>2,3*t)},ee:function(e,t,i,r,n){xs.uniform4f(Xn(e),t,i,r,n)},de:function(e,t,i){if(2<=Ur.version)xs.uniform4fv(Xn(e),z,i>>2,4*t);else{if(72>=t){var r=Jn[4*t-1],n=z;i>>=2;for(var s=0;s<4*t;s+=4){var o=i+s;r[s]=n[o],r[s+1]=n[o+1],r[s+2]=n[o+2],r[s+3]=n[o+3]}}else r=z.subarray(i>>2,i+16*t>>2);xs.uniform4fv(Xn(e),r)}},ce:function(e,t,i,r,n){xs.uniform4i(Xn(e),t,i,r,n)},be:function(e,t,i){if(2<=Ur.version)xs.uniform4iv(Xn(e),H,i>>2,4*t);else{if(72>=t)for(var r=qn[4*t-1],n=0;n<4*t;n+=4)r[n]=H[i+4*n>>2],r[n+1]=H[i+(4*n+4)>>2],r[n+2]=H[i+(4*n+8)>>2],r[n+3]=H[i+(4*n+12)>>2];else r=H.subarray(i>>2,i+16*t>>2);xs.uniform4iv(Xn(e),r)}},Jc:function(e,t,i,r,n){xs.uniform4ui(Xn(e),t,i,r,n)},Fc:function(e,t,i){xs.uniform4uiv(Xn(e),Y,i>>2,4*t)},tc:function(e,t,i){e=wr[e],xs.uniformBlockBinding(e,t,i)},ae:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix2fv(Xn(e),!!i,z,r>>2,4*t);else{if(72>=t)for(var n=Jn[4*t-1],s=0;s<4*t;s+=4)n[s]=z[r+4*s>>2],n[s+1]=z[r+(4*s+4)>>2],n[s+2]=z[r+(4*s+8)>>2],n[s+3]=z[r+(4*s+12)>>2];else n=z.subarray(r>>2,r+16*t>>2);xs.uniformMatrix2fv(Xn(e),!!i,n)}},qd:function(e,t,i,r){xs.uniformMatrix2x3fv(Xn(e),!!i,z,r>>2,6*t)},od:function(e,t,i,r){xs.uniformMatrix2x4fv(Xn(e),!!i,z,r>>2,8*t)},_d:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix3fv(Xn(e),!!i,z,r>>2,9*t);else{if(32>=t)for(var n=Jn[9*t-1],s=0;s<9*t;s+=9)n[s]=z[r+4*s>>2],n[s+1]=z[r+(4*s+4)>>2],n[s+2]=z[r+(4*s+8)>>2],n[s+3]=z[r+(4*s+12)>>2],n[s+4]=z[r+(4*s+16)>>2],n[s+5]=z[r+(4*s+20)>>2],n[s+6]=z[r+(4*s+24)>>2],n[s+7]=z[r+(4*s+28)>>2],n[s+8]=z[r+(4*s+32)>>2];else n=z.subarray(r>>2,r+36*t>>2);xs.uniformMatrix3fv(Xn(e),!!i,n)}},pd:function(e,t,i,r){xs.uniformMatrix3x2fv(Xn(e),!!i,z,r>>2,6*t)},md:function(e,t,i,r){xs.uniformMatrix3x4fv(Xn(e),!!i,z,r>>2,12*t)},Zd:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix4fv(Xn(e),!!i,z,r>>2,16*t);else{if(18>=t){var n=Jn[16*t-1],s=z;r>>=2;for(var o=0;o<16*t;o+=16){var a=r+o;n[o]=s[a],n[o+1]=s[a+1],n[o+2]=s[a+2],n[o+3]=s[a+3],n[o+4]=s[a+4],n[o+5]=s[a+5],n[o+6]=s[a+6],n[o+7]=s[a+7],n[o+8]=s[a+8],n[o+9]=s[a+9],n[o+10]=s[a+10],n[o+11]=s[a+11],n[o+12]=s[a+12],n[o+13]=s[a+13],n[o+14]=s[a+14],n[o+15]=s[a+15]}}else n=z.subarray(r>>2,r+64*t>>2);xs.uniformMatrix4fv(Xn(e),!!i,n)}},nd:function(e,t,i,r){xs.uniformMatrix4x2fv(Xn(e),!!i,z,r>>2,8*t)},ld:function(e,t,i,r){xs.uniformMatrix4x3fv(Xn(e),!!i,z,r>>2,12*t)},Yd:function(e){e=wr[e],xs.useProgram(e),xs.Nj=e},Xd:function(e){xs.validateProgram(wr[e])},Wd:function(e,t){xs.vertexAttrib1f(e,t)},Vd:function(e,t){xs.vertexAttrib1f(e,z[t>>2])},Ud:function(e,t,i){xs.vertexAttrib2f(e,t,i)},Td:function(e,t){xs.vertexAttrib2f(e,z[t>>2],z[t+4>>2])},Sd:function(e,t,i,r){xs.vertexAttrib3f(e,t,i,r)},Rd:function(e,t){xs.vertexAttrib3f(e,z[t>>2],z[t+4>>2],z[t+8>>2])},Pd:function(e,t,i,r,n){xs.vertexAttrib4f(e,t,i,r,n)},Od:function(e,t){xs.vertexAttrib4f(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])},Xb:function(e,t){xs.vertexAttribDivisor(e,t)},Cg:function(e,t){xs.vertexAttribDivisor(e,t)},Hb:function(e,t){xs.vertexAttribDivisor(e,t)},Ld:function(e,t){xs.vertexAttribDivisor(e,t)},Ib:function(e,t){xs.vertexAttribDivisor(e,t)},Tc:function(e,t,i,r,n){xs.vertexAttribI4i(e,t,i,r,n)},Rc:function(e,t){xs.vertexAttribI4i(e,H[t>>2],H[t+4>>2],H[t+8>>2],H[t+12>>2])},Sc:function(e,t,i,r,n){xs.vertexAttribI4ui(e,t,i,r,n)},Qc:function(e,t){xs.vertexAttribI4ui(e,Y[t>>2],Y[t+4>>2],Y[t+8>>2],Y[t+12>>2])},Wc:function(e,t,i,r,n){xs.vertexAttribIPointer(e,t,i,r,n)},Nd:function(e,t,i,r,n,s){xs.vertexAttribPointer(e,t,i,!!r,n,s)},Md:function(e,t,i,r){xs.viewport(e,t,i,r)},mc:function(e,t,i,r){xs.waitSync(Nr[e],t,(i>>>0)+4294967296*r)},W:function(){return 0},Zg:function(){return!0},pb:function(e,t,i){N.copyWithin(e,t,t+i)},eh:function(e,t,i){return function(e,t){return an()?(e=En(e))?e.requestFullscreen||e.webkitRequestFullscreen?Kr&&hn.Ji?In(e,t):t.qk?(Qr(In,1,[e,t]),1):-2:-3:-4:-1}(e,{Fj:H[i>>2],uj:H[i+4>>2],vk:H[i+8>>2],qk:t,fj:H[i+12>>2],Kj:H[i+16>>2]})},La:function(e,t){return(e=En(e))?e.requestPointerLock||e.lj?Kr&&hn.Ji?On(e):t?(Qr(On,2,[e]),1):-2:-1:-4},qb:function(e){var t=N.length;if(2147483648<(e>>>=0))return!1;for(var i=1;4>=i;i*=2){var r=t*(1+.2/i);r=Math.min(r,e+100663296),0<(r=Math.max(e,r))%65536&&(r+=65536-r%65536);e:{try{x.grow(Math.min(2147483648,r)-V.byteLength+65535>>>16),Q();var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1},qa:function(){return(un=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1},ra:function(e,t,i){return"undefined"==typeof onbeforeunload?-1:1!==i?-5:(function(e,t){sn({target:En(2),ji:"beforeunload",ti:t,vi:function(i){i=i||event;var r=ee.get(t)(28,0,e);if(r&&(r=M(r)),r)return i.preventDefault(),i.returnValue=r},si:!0})}(e,t),0)},Da:function(e,t,i,r){return Qn(e,t,i,r,12,"blur"),0},D:Rn,U:function(e,t,i){return(e=En(e))?(e.style.width=t+"px",e.style.height=i+"px",0):-4},Ea:function(e,t,i,r){return Qn(e,t,i,r,13,"focus"),0},ua:function(e,t,i,r){return an()?(e=En(e))?(es(e,t,i,r,"fullscreenchange"),es(e,t,i,r,"webkitfullscreenchange"),0):-4:-1},oa:function(e,t,i){return navigator.getGamepads||navigator.webkitGetGamepads?(ts(e,t,i,26,"gamepadconnected"),0):-1},na:function(e,t,i){return navigator.getGamepads||navigator.webkitGetGamepads?(ts(e,t,i,27,"gamepaddisconnected"),0):-1},xa:function(e,t,i,r){return is(e,t,i,r,2,"keydown"),0},va:function(e,t,i,r){return is(e,t,i,r,1,"keypress"),0},wa:function(e,t,i,r){return is(e,t,i,r,3,"keyup"),0},uh:function(e,t,i){Fi(e=ee.get(e),t,i)},Ja:function(e,t,i,r){return ns(e,t,i,r,5,"mousedown"),0},Ha:function(e,t,i,r){return ns(e,t,i,r,33,"mouseenter"),0},Ga:function(e,t,i,r){return ns(e,t,i,r,34,"mouseleave"),0},Ka:function(e,t,i,r){return ns(e,t,i,r,8,"mousemove"),0},Ia:function(e,t,i,r){return ns(e,t,i,r,6,"mouseup"),0},ya:function(e,t,i,r){return document&&document.body&&(document.body.requestPointerLock||document.body.Ci||document.body.dj||document.body.lj)?(e=En(e))?(ss(e,t,i,r,"pointerlockchange"),ss(e,t,i,r,"mozpointerlockchange"),ss(e,t,i,r,"webkitpointerlockchange"),ss(e,t,i,r,"mspointerlockchange"),0):-4:-1},ta:function(e,t,i,r){return function(e,t,i,r){mn||(mn=Ds(36)),sn({target:e=En(e),ji:"resize",ti:r,vi:function(i){if((i=i||event).target==e){var n=document.body;if(n){var s=mn;H[s>>2]=i.detail,H[s+4>>2]=n.clientWidth,H[s+8>>2]=n.clientHeight,H[s+12>>2]=innerWidth,H[s+16>>2]=innerHeight,H[s+20>>2]=outerWidth,H[s+24>>2]=outerHeight,H[s+28>>2]=pageXOffset,H[s+32>>2]=pageYOffset,ee.get(r)(10,s,t)&&i.preventDefault()}}},si:i})}(e,t,i,r),0},za:function(e,t,i,r){return os(e,t,i,r,25,"touchcancel"),0},Ba:function(e,t,i,r){return os(e,t,i,r,23,"touchend"),0},Aa:function(e,t,i,r){return os(e,t,i,r,24,"touchmove"),0},Ca:function(e,t,i,r){return os(e,t,i,r,22,"touchstart"),0},sa:function(e,t,i){return function(e,t,i){var r=Tn[1];Pn||(Pn=Ds(8)),sn({target:r,ji:"visibilitychange",ti:i,vi:function(t){t=t||event;var r=Pn,n=["hidden","visible","prerender","unloaded"].indexOf(document.visibilityState);H[r>>2]=document.hidden,H[r+4>>2]=n,ee.get(i)(21,r,e)&&t.preventDefault()},si:t})}(e,t,i),0},Fa:function(e,t,i,r){return void 0!==(e=En(e)).onwheel?(function(e,t,i,r){Cn||(Cn=Ds(96)),sn({target:e,Ji:!0,ji:"wheel",ti:r,vi:function(i){i=i||event;var n=Cn;rs(n,i,e),j[n+64>>3]=i.deltaX,j[n+72>>3]=i.deltaY,j[n+80>>3]=i.deltaZ,H[n+88>>2]=i.deltaMode,ee.get(r)(9,n,t)&&i.preventDefault()},si:i})}(e,t,i,r),0):-1},V:function(){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"},Yg:function(e,t,i,r,n){function s(e,i){ds(e,i.response,(function(e){Bi((function(){c?ee.get(c)(e):t&&t(e)}),P)}),(function(e){Bi((function(){c?ee.get(c)(e):t&&t(e)}),P)}))}function o(e){Bi((function(){f?ee.get(f)(e):n&&n(e)}),P)}function a(e){Bi((function(){p?ee.get(p)(e):i&&i(e)}),P)}function l(e){Bi((function(){g?ee.get(g)(e):r&&r(e)}),P)}function h(e){Bi((function(){c?ee.get(c)(e):t&&t(e)}),P)}var u=e+112,d=M(u),c=Y[u+36>>2],p=Y[u+40>>2],g=Y[u+44>>2],f=Y[u+48>>2],y=Y[u+52>>2],v=!!(4&y),m=!!(32&y),S=!!(16&y),P=!!(64&y);if("EM_IDB_STORE"===d)d=Y[u+84>>2],ds(e,N.slice(d,d+Y[u+88>>2]),h,a);else if("EM_IDB_DELETE"===d)!function(e,t,i){var r=as;if(r){var n=Y[e+112+64>>2];n||(n=Y[e+8>>2]),n=M(n);try{var s=r.transaction(["FILES"],"readwrite").objectStore("FILES").delete(n);s.onsuccess=function(i){i=i.target.result,Y[e+12>>2]=0,hs(e+16,0),hs(e+24,0),hs(e+32,0),B[e+40>>1]=4,B[e+42>>1]=200,O("OK",e+44,64),t(e,0,i)},s.onerror=function(t){B[e+40>>1]=4,B[e+42>>1]=404,O("Not Found",e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}(e,h,a);else if(S){if(m)return 0;us(e,v?s:h,a,l,o)}else!function(e,t,i){var r=as;if(r){var n=Y[e+112+64>>2];n||(n=Y[e+8>>2]),n=M(n);try{var s=r.transaction(["FILES"],"readonly").objectStore("FILES").get(n);s.onsuccess=function(r){if(r.target.result){var n=(r=r.target.result).byteLength||r.length,s=Ds(n);N.set(new Uint8Array(r),s),Y[e+12>>2]=s,hs(e+16,n),hs(e+24,0),hs(e+32,n),B[e+40>>1]=4,B[e+42>>1]=200,O("OK",e+44,64),t(e,0,r)}else B[e+40>>1]=4,B[e+42>>1]=404,O("Not Found",e+44,64),i(e,0,"no data")},s.onerror=function(t){B[e+40>>1]=4,B[e+42>>1]=404,O("Not Found",e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}(e,h,m?a:v?function(e){us(e,s,a,l,o)}:function(e){us(e,h,a,l,o)});return e},wb:function(e){for(var t=Vi();Vi()-t<e;);},ub:function(e,t){try{var i=0;return gs().forEach((function(r,n){var s=t+i;for(n=H[e+4*n>>2]=s,s=0;s<r.length;++s)_[n++>>0]=r.charCodeAt(s);_[n>>0]=0,i+=r.length+1})),0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},vb:function(e,t){try{var i=gs();H[e>>2]=i.length;var r=0;return i.forEach((function(e){r+=e.length+1})),H[t>>2]=r,0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},ea:function(e){try{return ct(Rt(e)),0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},zb:function(e,t,i,r){try{e:{for(var n=Rt(e),s=e=0;s<i;s++){var o=H[t+(8*s+4)>>2],a=n,l=H[t+8*s>>2],h=o,u=void 0,d=_;if(0>h||0>u)throw new ze(28);if(null===a.Ii)throw new ze(8);if(1==(2097155&a.flags))throw new ze(8);if(16384==(61440&a.node.mode))throw new ze(31);if(!a.ai.read)throw new ze(28);var c=void 0!==u;if(c){if(!a.seekable)throw new ze(70)}else u=a.position;var p=a.ai.read(a,d,l,h,u);c||(a.position+=p);var g=p;if(0>g){var f=-1;break e}if(e+=g,g<o)break}f=e}return H[r>>2]=f,0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},nb:function(e,t,i,r,n){try{var s=Rt(e);return-9007199254740992>=(e=4294967296*i+(t>>>0))||9007199254740992<=e?-61:(pt(s,e,r),me=[s.position>>>0,(ve=s.position,1<=+Math.abs(ve)?0<ve?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],H[n>>2]=me[0],H[n+4>>2]=me[1],s.yj&&0===e&&0===r&&(s.yj=null),0)}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},da:function(e,t,i,r){try{e:{for(var n=Rt(e),s=e=0;s<i;s++){var o=gt(n,_,H[t+8*s>>2],H[t+(8*s+4)>>2],void 0);if(0>o){var a=-1;break e}e+=o}a=e}return H[r>>2]=a,0}catch(e){return void 0!==Tt&&e instanceof ze||pe(e),e.ui}},v:function(){return P},Ua:function(){var e="";"undefined"!=typeof window?e=window.location.hostname:void 0!==t&&(e="node");var i=k(e)+1,r=Ds(i);return O(e,r,i),r},O:function(e){var t=Date.now();return H[e>>2]=t/1e3|0,H[e+4>>2]=t%1e3*1e3|0,0},eb:function(e){xs.activeTexture(e)},ga:function(e,t){xs.attachShader(wr[e],Mr[t])},m:function(e,t,i){xs.bindAttribLocation(wr[e],t,M(i))},n:function(e,t){35051==e?xs.Li=t:35052==e&&(xs.ii=t),xs.bindBuffer(e,Er[t])},x:function(e,t){xs.bindFramebuffer(e,Rr[t])},u:function(e,t){xs.bindTexture(e,Lr[t])},Fd:function(e,t,i,r){xs.blendColor(e,t,i,r)},ud:function(e){xs.blendEquation(e)},Qd:function(e,t,i,r){xs.blendFuncSeparate(e,t,i,r)},Q:function(e,t,i,r){2<=Ur.version?i?xs.bufferData(e,N,r,i,t):xs.bufferData(e,t,r):xs.bufferData(e,i?N.subarray(i,i+t):t,r)},Z:function(e){return xs.checkFramebufferStatus(e)},Qf:function(e){xs.clear(e)},$f:function(e,t,i,r){xs.clearColor(e,t,i,r)},Pc:function(e,t,i,r){xs.colorMask(!!e,!!t,!!i,!!r)},bb:function(e){xs.compileShader(Mr[e])},L:function(e,t,i,r,n,s,o,a){2<=Ur.version?xs.ii?xs.compressedTexImage2D(e,t,i,r,n,s,o,a):xs.compressedTexImage2D(e,t,i,r,n,s,N,a,o):xs.compressedTexImage2D(e,t,i,r,n,s,a?N.subarray(a,a+o):null)},$b:function(){var e=zr(wr),t=xs.createProgram();return t.name=e,t.Fi=t.Di=t.Ei=0,t.rj=1,wr[e]=t,e},db:function(e){var t=zr(Mr);return Mr[t]=xs.createShader(e),t},Se:function(e){xs.cullFace(e)},G:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Er[r];n&&(xs.deleteBuffer(n),n.name=0,Er[r]=null,r==xs.Li&&(xs.Li=0),r==xs.ii&&(xs.ii=0))}},Eg:function(e,t){for(var i=0;i<e;++i){var r=H[t+4*i>>2],n=Rr[r];n&&(xs.deleteFramebuffer(n),n.name=0,Rr[r]=null)}},ia:function(e){if(e){var t=wr[e];t?(xs.deleteProgram(t),t.name=0,wr[e]=null):Yr(1281)}},ka:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Dr[r];n&&(xs.deleteRenderbuffer(n),n.name=0,Dr[r]=null)}},aa:function(e){if(e){var t=Mr[e];t?(xs.deleteShader(t),Mr[e]=null):Yr(1281)}},$a:function(e,t){for(var i=0;i<e;i++){var r=H[t+4*i>>2],n=Lr[r];n&&(xs.deleteTexture(n),n.name=0,Lr[r]=null)}},$d:function(e){xs.depthFunc(e)},ke:function(e){xs.depthMask(!!e)},ja:function(e,t){xs.detachShader(wr[e],Mr[t])},J:function(e){xs.disable(e)},Y:function(e,t,i){xs.drawArrays(e,t,i)},P:_n,Va:function(e,t,i,r,n){xs.drawElementsInstanced(e,t,i,r,n)},I:function(e){xs.enable(e)},Ya:function(e){xs.enableVertexAttribArray(e)},S:function(e,t,i,r,n){xs.framebufferTexture2D(e,t,i,Lr[r],n)},He:function(e){xs.frontFace(e)},R:function(e,t){Nn(e,t,"createBuffer",Er)},_:function(e,t){Nn(e,t,"createFramebuffer",Rr)},M:function(e,t){Nn(e,t,"createTexture",Lr)},Pg:function(e){xs.generateMipmap(e)},lb:function(e,t,i,r,n,s,o){Fn("getActiveAttrib",e,t,i,r,n,s,o)},kb:function(e,t,i,r,n,s,o){Fn("getActiveUniform",e,t,i,r,n,s,o)},s:function(e,t){Hn(e,t,0)},mb:function(e,t,i,r){null===(e=xs.getProgramInfoLog(wr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},H:function(e,t,i){if(i)if(e>=Tr)Yr(1281);else if(e=wr[e],35716==t)null===(e=xs.getProgramInfoLog(e))&&(e="(unknown error)"),H[i>>2]=e.length+1;else if(35719==t){if(!e.Fi)for(t=0;t<xs.getProgramParameter(e,35718);++t)e.Fi=Math.max(e.Fi,xs.getActiveUniform(e,t).name.length+1);H[i>>2]=e.Fi}else if(35722==t){if(!e.Di)for(t=0;t<xs.getProgramParameter(e,35721);++t)e.Di=Math.max(e.Di,xs.getActiveAttrib(e,t).name.length+1);H[i>>2]=e.Di}else if(35381==t){if(!e.Ei)for(t=0;t<xs.getProgramParameter(e,35382);++t)e.Ei=Math.max(e.Ei,xs.getActiveUniformBlockName(e,t).length+1);H[i>>2]=e.Ei}else H[i>>2]=xs.getProgramParameter(e,t);else Yr(1281)},ab:function(e,t,i,r){null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),t=0<t&&r?O(e,r,t):0,i&&(H[i>>2]=t)},$:function(e,t,i){i?35716==t?(null===(e=xs.getShaderInfoLog(Mr[e]))&&(e="(unknown error)"),H[i>>2]=e?e.length+1:0):35720==t?(e=xs.getShaderSource(Mr[e]),H[i>>2]=e?e.length+1:0):H[i>>2]=xs.getShaderParameter(Mr[e],t):Yr(1281)},A:function(e){var t=Fr[e];if(!t){switch(e){case 7939:t=zn((t=(t=xs.getSupportedExtensions()||[]).concat(t.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:(t=xs.getParameter(e))||Yr(1280),t=t&&zn(t);break;case 7938:t=xs.getParameter(7938),t=zn(t=2<=Ur.version?"OpenGL ES 3.0 ("+t+")":"OpenGL ES 2.0 ("+t+")");break;case 35724:var i=(t=xs.getParameter(35724)).match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==i&&(3==i[1].length&&(i[1]+="0"),t="OpenGL ES GLSL ES "+i[1]+" ("+t+")"),t=zn(t);break;default:Yr(1280)}Fr[e]=t}return t},jb:function(e,t){if(t=M(t),e=wr[e]){Gn(e);var i=e.Oi,r=0,n=t,s=jn(t);if(0<s&&(r=parseInt(t.slice(s+1))>>>0,n=t.slice(0,s)),(n=e.sj[n])&&r<n[0]&&(i[r+=n[1]]=i[r]||xs.getUniformLocation(e,t)))return r}else Yr(1281);return-1},we:function(e){xs.lineWidth(e)},yb:function(e){e=wr[e],xs.linkProgram(e),e.Oi=0,e.sj={}},_a:function(e,t){3317==e&&(Hr=t),xs.pixelStorei(e,t)},jd:function(e,t,i,r,n,s,o){if(2<=Ur.version)if(xs.Li)xs.readPixels(e,t,i,r,n,s,o);else{var a=$n(s);xs.readPixels(e,t,i,r,n,s,a,o>>Zn(a))}else(o=Kn(s,n,i,r,o))?xs.readPixels(e,t,i,r,n,s,o):Yr(1280)},_c:function(e,t,i,r){xs.scissor(e,t,i,r)},cb:function(e,t,i,r){t=jr(t,i,r),xs.shaderSource(Mr[e],t)},q:function(e,t,i,r,n,s,o,a,l){if(2<=Ur.version)if(xs.ii)xs.texImage2D(e,t,i,r,n,s,o,a,l);else if(l){var h=$n(a);xs.texImage2D(e,t,i,r,n,s,o,a,h,l>>Zn(h))}else xs.texImage2D(e,t,i,r,n,s,o,a,null);else xs.texImage2D(e,t,i,r,n,s,o,a,l?Kn(a,o,r,n,l):null)},h:function(e,t,i){xs.texParameteri(e,t,i)},ib:function(e,t,i){if(2<=Ur.version)xs.uniform1fv(Xn(e),z,i>>2,t);else{if(288>=t)for(var r=Jn[t-1],n=0;n<t;++n)r[n]=z[i+4*n>>2];else r=z.subarray(i>>2,i+4*t>>2);xs.uniform1fv(Xn(e),r)}},fb:function(e,t){xs.uniform1i(Xn(e),t)},hb:function(e,t,i){if(2<=Ur.version)xs.uniform2fv(Xn(e),z,i>>2,2*t);else{if(144>=t)for(var r=Jn[2*t-1],n=0;n<2*t;n+=2)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2];else r=z.subarray(i>>2,i+8*t>>2);xs.uniform2fv(Xn(e),r)}},gb:function(e,t,i){if(2<=Ur.version)xs.uniform3fv(Xn(e),z,i>>2,3*t);else{if(96>=t)for(var r=Jn[3*t-1],n=0;n<3*t;n+=3)r[n]=z[i+4*n>>2],r[n+1]=z[i+(4*n+4)>>2],r[n+2]=z[i+(4*n+8)>>2];else r=z.subarray(i>>2,i+12*t>>2);xs.uniform3fv(Xn(e),r)}},ca:function(e,t,i){if(2<=Ur.version)xs.uniform4fv(Xn(e),z,i>>2,4*t);else{if(72>=t){var r=Jn[4*t-1],n=z;i>>=2;for(var s=0;s<4*t;s+=4){var o=i+s;r[s]=n[o],r[s+1]=n[o+1],r[s+2]=n[o+2],r[s+3]=n[o+3]}}else r=z.subarray(i>>2,i+16*t>>2);xs.uniform4fv(Xn(e),r)}},ba:function(e,t,i,r){if(2<=Ur.version)xs.uniformMatrix4fv(Xn(e),!!i,z,r>>2,16*t);else{if(18>=t){var n=Jn[16*t-1],s=z;r>>=2;for(var o=0;o<16*t;o+=16){var a=r+o;n[o]=s[a],n[o+1]=s[a+1],n[o+2]=s[a+2],n[o+3]=s[a+3],n[o+4]=s[a+4],n[o+5]=s[a+5],n[o+6]=s[a+6],n[o+7]=s[a+7],n[o+8]=s[a+8],n[o+9]=s[a+9],n[o+10]=s[a+10],n[o+11]=s[a+11],n[o+12]=s[a+12],n[o+13]=s[a+13],n[o+14]=s[a+14],n[o+15]=s[a+15]}}else n=z.subarray(r>>2,r+64*t>>2);xs.uniformMatrix4fv(Xn(e),!!i,n)}},ha:function(e){e=wr[e],xs.useProgram(e),xs.Nj=e},Wa:function(e,t){xs.vertexAttribDivisor(e,t)},Xa:function(e,t,i,r,n,s){xs.vertexAttribPointer(e,t,i,!!r,n,s)},K:function(e,t,i,r){xs.viewport(e,t,i,r)},le:function(e,t,i){var r=Ns();try{return ee.get(e)(t,i)}catch(e){if(Fs(r),e!==e+0&&"longjmp"!==e)throw e;Hs(1,0)}},Na:function(e,t,i,r){var n=Ns();try{return ee.get(e)(t,i,r)}catch(e){if(Fs(n),e!==e+0&&"longjmp"!==e)throw e;Hs(1,0)}},kc:function(e,t,i,r,n){var s=Ns();try{return ee.get(e)(t,i,r,n)}catch(e){if(Fs(s),e!==e+0&&"longjmp"!==e)throw e;Hs(1,0)}},o:function(e){P=e},w:function(){return 0},rb:function(e,t,i,r){return function(e,t,i,r){function n(e,t,i){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=i[0]+e;return e}function s(e,t){return n(e,t,"0")}function o(e,t){function i(e){return 0>e?-1:0<e?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function a(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function l(e){e=Ss(new Date(e.oi+1900,0,1),e.qj);var t=new Date(e.getFullYear()+1,0,4),i=a(new Date(e.getFullYear(),0,4));return t=a(t),0>=o(i,e)?0>=o(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var h=H[r+40>>2];for(var u in r={cl:H[r>>2],bl:H[r+4>>2],oj:H[r+8>>2],bj:H[r+12>>2],Vi:H[r+16>>2],oi:H[r+20>>2],pj:H[r+24>>2],qj:H[r+28>>2],yl:H[r+32>>2],al:H[r+36>>2],dl:h?M(h):""},i=M(i),h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})i=i.replace(new RegExp(u,"g"),h[u]);var d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),c="January February March April May June July August September October November December".split(" ");for(u in h={"%a":function(e){return d[e.pj].substring(0,3)},"%A":function(e){return d[e.pj]},"%b":function(e){return c[e.Vi].substring(0,3)},"%B":function(e){return c[e.Vi]},"%C":function(e){return s((e.oi+1900)/100|0,2)},"%d":function(e){return s(e.bj,2)},"%e":function(e){return n(e.bj,2," ")},"%g":function(e){return l(e).toString().substring(2)},"%G":function(e){return l(e)},"%H":function(e){return s(e.oj,2)},"%I":function(e){return 0==(e=e.oj)?e=12:12<e&&(e-=12),s(e,2)},"%j":function(e){return s(e.bj+ys(fs(e.oi+1900)?vs:ms,e.Vi-1),3)},"%m":function(e){return s(e.Vi+1,2)},"%M":function(e){return s(e.bl,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.oj&&12>e.oj?"AM":"PM"},"%S":function(e){return s(e.cl,2)},"%t":function(){return"\t"},"%u":function(e){return e.pj||7},"%U":function(e){var t=new Date(e.oi+1900,0,1),i=0===t.getDay()?t:Ss(t,7-t.getDay());return 0>o(i,e=new Date(e.oi+1900,e.Vi,e.bj))?s(Math.ceil((31-i.getDate()+(ys(fs(e.getFullYear())?vs:ms,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(i,t)?"01":"00"},"%V":function(e){var t=new Date(e.oi+1901,0,4),i=a(new Date(e.oi+1900,0,4));t=a(t);var r=Ss(new Date(e.oi+1900,0,1),e.qj);return 0>o(r,i)?"53":0>=o(t,r)?"01":s(Math.ceil((i.getFullYear()<e.oi+1900?e.qj+32-i.getDate():e.qj+1-i.getDate())/7),2)},"%w":function(e){return e.pj},"%W":function(e){var t=new Date(e.oi,0,1),i=1===t.getDay()?t:Ss(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(i,e=new Date(e.oi+1900,e.Vi,e.bj))?s(Math.ceil((31-i.getDate()+(ys(fs(e.getFullYear())?vs:ms,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(i,t)?"01":"00"},"%y":function(e){return(e.oi+1900).toString().substring(2)},"%Y":function(e){return e.oi+1900},"%z":function(e){var t=0<=(e=e.al);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.dl},"%%":function(){return"%"}})i.includes(u)&&(i=i.replace(new RegExp(u,"g"),h[u](r)));return(u=ws(i,!1)).length>t?0:(_.set(u,e),u.length-1)}(e,t,i,r)}};!function(){function e(e){n.asm=e.exports,x=n.asm.vh,Q(),ee=n.asm.Ah,ie.unshift(n.asm.wh),ce()}function t(t){e(t.instance)}function i(e){return(S||"function"!=typeof fetch?Promise.resolve().then((function(){return ye()})):fetch(ae,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ae+"'";return e.arrayBuffer()})).catch((function(){return ye()}))).then((function(e){return WebAssembly.instantiate(e,r)})).then(e,(function(e){v("failed to asynchronously prepare wasm: "+e),pe(e)}))}var r={a:Rs};if(de(),n.instantiateWasm)try{return n.instantiateWasm(r,e)}catch(e){return v("Module.instantiateWasm callback failed with error: "+e),!1}(S||"function"!=typeof WebAssembly.instantiateStreaming||ge()||"function"!=typeof fetch?i(t):fetch(ae,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(e){return v("wasm streaming compile failed: "+e),v("falling back to ArrayBuffer instantiation"),i(t)}))}))).catch(o)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.wh).apply(null,arguments)};var Ds=n._malloc=function(){return(Ds=n._malloc=n.asm.xh).apply(null,arguments)},Ls=n._free=function(){return(Ls=n._free=n.asm.yh).apply(null,arguments)},Ms=n.___errno_location=function(){return(Ms=n.___errno_location=n.asm.zh).apply(null,arguments)};n._SCRTFillActiveTextureCharArray=function(){return(n._SCRTFillActiveTextureCharArray=n.asm.Bh).apply(null,arguments)},n._SCRTFillActiveTextureFloat=function(){return(n._SCRTFillActiveTextureFloat=n.asm.Ch).apply(null,arguments)},n._SCRTFillActiveDoubleVector=function(){return(n._SCRTFillActiveDoubleVector=n.asm.Dh).apply(null,arguments)},n._main=function(){return(n._main=n.asm.Eh).apply(null,arguments)};var Is=n.___getTypeName=function(){return(Is=n.___getTypeName=n.asm.Fh).apply(null,arguments)};n.___embind_register_native_and_builtin_types=function(){return(n.___embind_register_native_and_builtin_types=n.asm.Gh).apply(null,arguments)};var Os,ks=n.__get_tzname=function(){return(ks=n.__get_tzname=n.asm.Hh).apply(null,arguments)},Vs=n.__get_daylight=function(){return(Vs=n.__get_daylight=n.asm.Ih).apply(null,arguments)},_s=n.__get_timezone=function(){return(_s=n.__get_timezone=n.asm.Jh).apply(null,arguments)},Ns=n.stackSave=function(){return(Ns=n.stackSave=n.asm.Kh).apply(null,arguments)},Fs=n.stackRestore=function(){return(Fs=n.stackRestore=n.asm.Lh).apply(null,arguments)},Bs=n.stackAlloc=function(){return(Bs=n.stackAlloc=n.asm.Mh).apply(null,arguments)},Hs=n._setThrew=function(){return(Hs=n._setThrew=n.asm.Nh).apply(null,arguments)};function Ys(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function zs(e){var t=n._main,i=(e=e||[]).length+1,r=Bs(4*(i+1));H[r>>2]=q(u);for(var s=1;s<i;s++)H[(r>>2)+s]=q(e[s-1]);H[(r>>2)+i]=0;try{Gs(t(i,r))}catch(t){t instanceof Ys||"unwind"==t||((e=t)&&"object"==typeof t&&t.stack&&(e=[t,t.stack]),v("exception thrown: "+e),d(1,t))}}function js(e){function t(){if(!Os&&(Os=!0,n.calledRun=!0,!T)){if(n.noFSInit||et||(et=!0,ft(),n.stdin=n.stdin,n.stdout=n.stdout,n.stderr=n.stderr,n.stdin?St("/dev","stdin",n.stdin):at("/dev/tty","/dev/stdin"),n.stdout?St("/dev","stdout",null,n.stdout):at("/dev/tty","/dev/stdout"),n.stderr?St("/dev","stderr",null,n.stderr):at("/dev/tty1","/dev/stderr"),dt("/dev/stdin",0),dt("/dev/stdout",1),dt("/dev/stderr",1)),He=!1,Ce(ie),Ce(re),s(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Xs&&zs(e),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var t=n.postRun.shift();se.unshift(t)}Ce(se)}}if(e=e||h,!(0<le)){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)oe();Ce(te),0<le||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t())}}function Gs(e){b=e,C||(n.onExit&&n.onExit(e),T=!0),d(e,new Ys(e))}if(n.dynCall_iiiji=function(){return(n.dynCall_iiiji=n.asm.Oh).apply(null,arguments)},n.dynCall_iiij=function(){return(n.dynCall_iiij=n.asm.Ph).apply(null,arguments)},n.dynCall_iijii=function(){return(n.dynCall_iijii=n.asm.Qh).apply(null,arguments)},n.dynCall_iiijiji=function(){return(n.dynCall_iiijiji=n.asm.Rh).apply(null,arguments)},n.dynCall_jiji=function(){return(n.dynCall_jiji=n.asm.Sh).apply(null,arguments)},n.dynCall_ji=function(){return(n.dynCall_ji=n.asm.Th).apply(null,arguments)},n.dynCall_viijii=function(){return(n.dynCall_viijii=n.asm.Uh).apply(null,arguments)},n.dynCall_iiiiij=function(){return(n.dynCall_iiiiij=n.asm.Vh).apply(null,arguments)},n.dynCall_iiiiijj=function(){return(n.dynCall_iiiiijj=n.asm.Wh).apply(null,arguments)},n.dynCall_iiiiiijj=function(){return(n.dynCall_iiiiiijj=n.asm.Xh).apply(null,arguments)},n.ccall=R,n.cwrap=function(e,t,i,r){var n=(i=i||[]).every((function(e){return"number"===e}));return"string"!==t&&n&&!r?w(e):function(){return R(e,t,i,arguments)}},n.UTF8ToString=M,n.stringToUTF8=O,n.lengthBytesUTF8=k,n.addRunDependency=de,n.removeRunDependency=ce,n.FS_createPath=vt,n.FS_createDataFile=mt,n.FS_createPreloadedFile=At,n.FS_createLazyFile=Ct,n.FS_createDevice=St,n.FS_unlink=lt,n.callMain=zs,ue=function e(){Os||js(),Os||(ue=e)},n.run=js,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.pop()();var Xs=!0;return n.noInitialRun&&(Xs=!1),js(),e.ready});e.exports=n}).call(this,i(124),i(275).setImmediate)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OneTimePerformanceWarning=void 0;const r=i(127),n=i(105);t.OneTimePerformanceWarning=class{constructor(e){this.warnedProperty=!1,this.messageProperty=e}warn(){n.SciChartDefaults.performanceWarnings&&!this.warnedProperty&&r.licenseManager2dState.getIsDev()&&(console.warn(this.messageProperty),this.warnedProperty=!0)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAutoColorMode=void 0,function(e){e.Never="Never",e.Once="Once",e.OnAddRemoveSeries="OnAddRemoveSeries",e.Always="Always"}(t.EAutoColorMode||(t.EAutoColorMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BatchRenderContext=void 0;const r=i(30);class n extends r.WebGlRenderContext2D{constructor(){super(...arguments),this.doDraw=!1}drawLayers(){this.doDraw&&super.drawLayers()}endFonts(e=!1){(this.doDraw||e)&&super.endFonts()}}t.BatchRenderContext=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderContext2D=void 0;t.RenderContext2D=class{constructor(e){this.canvas2D=e,this.ctx2D=e.getContext("2d")}drawRect(e,t,i,r,n="rgba(211,211,211,0.5)"){this.clear(),this.ctx2D.fillStyle=n,this.ctx2D.fillRect(e,t,i,r)}drawCircle(e,t,i,r){const n=r;this.clear(),this.ctx2D.beginPath(),this.ctx2D.arc(e,t,i,0,2*Math.PI,!1),this.ctx2D.fillStyle=r,this.ctx2D.fill(),this.ctx2D.lineWidth=0,this.ctx2D.strokeStyle=n,this.ctx2D.stroke()}clear(){this.ctx2D.clearRect(0,0,this.canvas2D.width,this.canvas2D.height)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.AXIS_POSITION_COORDINATE="AXIS_POSITION_COORDINATE",e.COORDINATE_MODE="COORDINATE_MODE",e.VERTICAL_AXIS_ID="VERTICAL_AXIS_ID"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartRenderer=void 0;const r=i(13),n=i(99),s=i(15),o=i(74),a=i(33),l=i(181),h=i(296),u=i(30),d=i(297),c=i(23),p=i(4),g=i(6),f=i(194),y=i(298),v=i(189);class m{constructor(e){this.sciChartSurface=e}static resampleSeries(e,t,i){if(!t.supportsResampling)return{pointSeries:t.toPointSeries(),renderableSeries:t,indicesRange:void 0,resamplingHash:void 0};const r=new d.ResamplingParams(i,t,e);if(!t.needsResampling(r))return{pointSeries:t.toPointSeries(),renderableSeries:t,indicesRange:void 0,resamplingHash:void 0};const n=m.calculateResamplingHash(t,r),s=t.getCurrentRenderPassData();return{pointSeries:Boolean(s&&s.resamplingHash===n)?s.pointSeries:t.toPointSeries(r),renderableSeries:t,indicesRange:r.indexesRange,resamplingHash:n}}static calculateResamplingHash(e,t){const i=[],r=h.hashUtils.generateBooleanHash(e.enableDrawingOptimisations);i.push(r);const n=e.dataSeries;if(n){const e=h.hashUtils.generateHash(n.id);i.push(e);const t=h.hashUtils.generateNumberHash(n.count());i.push(t);const r=h.hashUtils.generateBooleanHash(n.dataDistributionCalculator.isSortedAscending);i.push(r);const s=h.hashUtils.generateNumberHash(n.changeCount);i.push(s)}const s=h.hashUtils.generateObjectHash(t);return i.push(s),h.hashUtils.generateCombinedHash(i)}render(e){if(this.sciChartSurface.isDeleted)return;const t=e.getNativeContext(),i=this.sciChartSurface.webAssemblyContext2D;let n;r.IS_TEST_ENV||(n=t.GetBlendMode(),t.SetBlendMode(i.eSCRTBlendMode.BlendAdditiveOneAlpha)),this.validate();const s=this.previousTime?Date.now()-this.previousTime:void 0;this.previousTime=Date.now(),this.sciChartSurface.onAnimate(s),e.enqueueLayeredDraw(()=>{this.sciChartSurface.updateBackground()},(0,u.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset,this.sciChartSurface.stepBetweenLayers,l.EDefaultRenderLayer.AxisBandsLayer)),this.sciChartSurface.updateStackedCollectionAccumulatedVectors(),this.sciChartSurface.xAxes.asArray().forEach(e=>this.tryPerformAutoRangeOn(e,this.sciChartSurface)),this.sciChartSurface.yAxes.asArray().forEach(e=>this.tryPerformAutoRangeOn(e,this.sciChartSurface));const o=this.sciChartSurface.layoutManager.layoutChart(e.viewportSize),a=this.getViewportRect(e.viewportSize,o);this.sciChartSurface.setCoordSvgTranslation(o.x-a.x,o.y-a.y),this.updateSvgCanvasSize(a);const{xAxesById:h,yAxesById:d}=this.prepareAxesRenderData(),p=this.prepareSeriesRenderData(o,h);e.enqueueLayeredDraw(()=>{this.sciChartSurface.drawBorder(e)},(0,u.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset,this.sciChartSurface.stepBetweenLayers,l.EDefaultRenderLayer.AxisBandsLayer)),this.sciChartSurface.debugRendering&&this.drawDebugAxes(this.sciChartSurface,e),this.drawAxes(this.sciChartSurface,e);const g=[...this.sciChartSurface.annotations.asArray(),...this.sciChartSurface.modifierAnnotations.asArray()],f=g.filter(e=>e.type===c.EAnnotationType.RenderContextBoxAnnotation||e.type===c.EAnnotationType.RenderContextLineAnnotation||e.type===c.EAnnotationType.RenderContextHorizontalLineAnnotation||e.type===c.EAnnotationType.RenderContextVerticalLineAnnotation||e.type===c.EAnnotationType.RenderContextAxisMarkerAnnotation||e.type===c.EAnnotationType.RenderContextNativeTextAnnotation),y=(0,u.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset,this.sciChartSurface.stepBetweenLayers,l.EDefaultRenderLayer.AnnotationsBelowSeriesLayer);e.enqueueLayeredDraw(()=>{this.drawRenderContextAnnotations(f,h,d,c.EAnnotationLayer.BelowChart,e,o)},y);const v=(0,u.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset,this.sciChartSurface.stepBetweenLayers,l.EDefaultRenderLayer.SeriesLayer);e.enqueueLayeredDraw(()=>this.drawSeries(this.sciChartSurface,p,e),v);const m=(0,u.calculateAbsoluteRenderLayer)(this.sciChartSurface.layersOffset,this.sciChartSurface.stepBetweenLayers,l.EDefaultRenderLayer.AnnotationsAboveSeriesLayer);e.enqueueLayeredDraw(()=>{this.drawRenderContextAnnotations(f,h,d,c.EAnnotationLayer.AboveChart,e,o)},m),e.drawLayers(),e.endFonts();const S=g.filter(e=>e.type===c.EAnnotationType.SVG||e.type===c.EAnnotationType.SVGTextAnnotation||e.type===c.EAnnotationType.SVGCustomAnnotation);this.drawSvgAnnotations(S,h,d,this.sciChartSurface.getCoordSvgTranslation()),this.updateWatermark(e,o),this.onParentSurfaceRendered(),r.IS_TEST_ENV||t.SetBlendMode(n),this.sciChartSurface.isRunningAnimation&&setTimeout(this.sciChartSurface.invalidateElement,0)}drawRenderContextAnnotations(e,t,i,r,n,s){e.filter(e=>e.annotationLayer===r).forEach(e=>{if(0===t.count||0===i.count)console.error("Cannot draw annotations before axes have been configured. Add axes first, or use suspendUpdates to pause drawing until axes are available.");else{const r=t.item(e.xAxisId)||t.values[0],o=i.item(e.yAxisId)||i.values[0];e.showWarning&&(t.count>0&&r.id!==e.xAxisId&&console.warn(`Annotation looked for xAxis Id ${e.xAxisId} but got ${r.id}. Do you need to set xAxisId on an annotation or modifier?`),i.count>0&&o.id!==e.yAxisId&&console.warn(`Annotation looked for yAxis Id ${e.yAxisId} but got ${o.id}. Do you need to set yAxisId on an annotation or modifier?`),e.showWarning=!1),e.isHidden||e.drawWithContext(n,r.getCurrentCoordinateCalculator(),o.getCurrentCoordinateCalculator(),s)}})}drawSvgAnnotations(e,t,i,r){e.forEach(e=>{const n=t.item(e.xAxisId)||t.values[0],s=i.item(e.yAxisId)||i.values[0];e.showWarning&&(t.count>0&&n.id!==e.xAxisId&&console.warn(`Annotation looked for xAxis Id ${e.xAxisId} but got ${n.id}. Do you need to set xAxisId on an annotation or modifier?`),i.count>0&&s.id!==e.yAxisId&&console.warn(`Annotation looked for yAxis Id ${e.yAxisId} but got ${s.id}. Do you need to set yAxisId on an annotation or modifier?`),e.showWarning=!1),e.update(n.getCurrentCoordinateCalculator(),s.getCurrentCoordinateCalculator(),r.x/g.DpiHelper.PIXEL_RATIO,r.y/g.DpiHelper.PIXEL_RATIO)})}validate(){this.sciChartSurface.xAxes.asArray().forEach(e=>e.isMeasured=!1),this.sciChartSurface.yAxes.asArray().forEach(e=>e.isMeasured=!1);let e=[];if(this.sciChartSurface.renderableSeries.size()>0&&(0===this.sciChartSurface.xAxes.size()&&e.push("Chart must have at least one X axis"),0===this.sciChartSurface.yAxes.size()&&e.push("Chart must have at least one Y axis")),e.length>0)throw new Error(e.join("\n"))}updateSvgCanvasSize(e){const t=new s.Rect(e.x/g.DpiHelper.PIXEL_RATIO,e.y/g.DpiHelper.PIXEL_RATIO,e.width/g.DpiHelper.PIXEL_RATIO,e.height/g.DpiHelper.PIXEL_RATIO);if(this.prevRect){if(s.Rect.isEqual(this.prevRect,t))return}else this.prevRect=t;const i=this.sciChartSurface.domSvgContainer;i&&(i.style.marginLeft=t.x+"px",i.style.marginTop=t.y+"px",i.setAttribute("width",t.width.toString()),i.setAttribute("height",t.height.toString()),i.style.width=t.width+"px",i.style.height=t.height+"px",i.currentScale=1)}prepareAxesRenderData(){const e=new n.Dictionary,t=new n.Dictionary;return this.sciChartSurface.xAxes.asArray().forEach(t=>{e.add(t.id,t),t.prepareRenderData()}),this.sciChartSurface.yAxes.asArray().forEach(e=>{t.add(e.id,e),e.prepareRenderData()}),{xAxesById:e,yAxesById:t}}prepareSeriesRenderData(e,t){const i=this.sciChartSurface.renderableSeries.size(),r=new y.RenderPassInfo(i,e);for(let i=0;i<this.sciChartSurface.renderableSeries.size();i++){const n=this.sciChartSurface.renderableSeries.get(i);if(!n.isStacked&&!n.dataSeries)continue;if(!n.isStacked&&n.dataSeries.getIsDeleted())throw new Error(`SciChartSurface.renderableSeries[index=${i}] dataSeries has been deleted. This is an invalid state for SciChart. Have you shared this DataSeries between chart surfaces?`);const s=t.item(n.xAxisId),o=m.resampleSeries(s,n,e);r.renderableSeriesArray.push(o.renderableSeries),r.pointSeriesArray.push(o.pointSeries),r.indicesRanges.push(o.indicesRange),r.resamplingHashes.push(o.resamplingHash)}return r}drawAxes(e,t){e.xAxes.asArray().forEach(e=>{e.draw(t)}),e.yAxes.asArray().forEach(e=>{e.draw(t)})}drawSeries(e,t,i){const{renderableSeriesArray:r,pointSeriesArray:n,resamplingHashes:s,indicesRanges:o}=t,l=t=>{const l=r[t],h=n[t],u=s[t],d=o[t],c=e.xAxes.asArray().find(e=>e.id===l.xAxisId);if(!c)throw Error("Cannot find an X Axis with ID = "+l.xAxisId);const p=e.yAxes.asArray().find(e=>e.id===l.yAxisId);if(!p)throw Error("Cannot find a Y Axis with ID = "+l.yAxisId);if(c.isVerticalChart&&![a.EAxisAlignment.Top,a.EAxisAlignment.Bottom].includes(p.axisAlignment))throw Error("For vertical chart (chart with X Axis alignment Left or Right) Y Axis alignment should be Top or Bottom, X Axis ID = "+c.id);if((0,a.getIsVertical)(c.axisAlignment)&&(0,a.getIsVertical)(p.axisAlignment))throw Error("Both x and y axes can't have vertical alignment");if((0,a.getIsHorizontal)(c.axisAlignment)&&(0,a.getIsHorizontal)(p.axisAlignment))throw Error("Both x and y axes can't have horizontal alignment");try{const e=new f.RenderPassData(d,c.getCurrentCoordinateCalculator,p.getCurrentCoordinateCalculator,c.isVerticalChart,h,u);l.draw(i,e)}finally{}},h=i.getNativeContext(),u=this.sciChartSurface.seriesViewRect;h.PushMatrix(),h.PushState(),h.Translate(u.x,u.y),h.SetClipRect(u.x,u.y,u.width,u.height),r.forEach((e,t)=>{e.isVisible&&!e.isSelected&&l(t)}),r.forEach((e,t)=>{e.isVisible&&e.isSelected&&l(t)}),this.sciChartSurface.dataLabelLayoutManager&&this.sciChartSurface.dataLabelLayoutManager.performTextLayout(this.sciChartSurface,t),r.forEach((e,t)=>{e.isVisible&&e.dataLabelProvider&&e.dataLabelProvider.draw(i)}),h.PopMatrix(),h.PopState()}drawDebugAxes(e,t){t.enqueueLayeredDraw(()=>{e.xAxes.asArray().forEach(e=>{e.drawDebug(t)}),e.yAxes.asArray().forEach(e=>{e.drawDebug(t)})})}tryPerformAutoRangeOn(e,t){const i=!e.hasValidVisibleRange()||e.hasDefaultVisibleRange();if(e.autoRange===o.EAutoRange.Always||e.autoRange===o.EAutoRange.Once&&i){const t=e.getMaximumRange();t.equals(e.visibleRange)||(!e.autoRangeAnimation||i&&!e.autoRangeAnimation.animateInitialRanging||!i&&!e.autoRangeAnimation.animateSubsequentRanging?e.visibleRange=t:t.equals(e.animatedVisibleRange)||e.animateVisibleRange(t,e.autoRangeAnimation.duration,e.autoRangeAnimation.easing))}}onParentSurfaceRendered(){var e;this.sciChartSurface.isSubSurface||this.sciChartSurface.chartModifiers.asArray().forEach(e=>{e.onParentSurfaceRendered()}),null===(e=this.sciChartSurface.subCharts)||void 0===e||e.forEach(e=>{e.chartModifiers.asArray().forEach(e=>{e.onParentSurfaceRendered()})}),this.sciChartSurface.rendered.raiseEvent()}updateWatermark(e,t){const i=t.x+5,r=(this.sciChartSurface.isCopyCanvasSurface?p.SciChartSurfaceBase.domMasterCanvas.height:e.viewportSize.height)-(t.top+t.height)+5;this.sciChartSurface.updateWatermark(i,r)}getViewportRect(e,t){switch(this.sciChartSurface.svgClippingMode){case v.ESvgClippingMode.SeriesViewRect:return t;case v.ESvgClippingMode.Chart:return new s.Rect(0,0,e.width,e.height);case v.ESvgClippingMode.SubChart:let i=new s.Rect(0,0,e.width,e.height);if(this.sciChartSurface.isSubSurface){i=this.sciChartSurface.getSubChartRect()}return i;default:return t}}}t.SciChartRenderer=m},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashUtils=void 0;const r=e=>e.split("").reduce((e,t)=>(e=(e<<5)-e+t.charCodeAt(0))&e,0);t.hashUtils={generateHash:r,generateObjectHash:e=>{const t=JSON.stringify(e);return r(t)},generateBooleanHash:e=>r(!1===e?"0":!0===e?"1":"-1"),generateNumberHash:e=>{const t=e.toString(10);return r(t)},generateCombinedHash:e=>e.reduce((e,t)=>397*e^t,0)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResamplingParams=void 0;const r=i(74);class n{constructor(e,t,i){if(this.zeroLineY=0,this.precision=0,this.enableExperimentalResampling=!1,this.dataIsFifo=!1,this.fifoCapacity=0,this.viewportRect=e,t){const e=t.dataSeries;this.resamplingMode=t.resamplingMode,this.precision=t.resamplingPrecision,i&&(this.indexesRange=t.getIndicesRange(i.visibleRange,i.isCategoryAxis),this.isCategoryAxis=i.isCategoryAxis,this.isXAxisAutoRanged=i.autoRange===r.EAutoRange.Always,this.xVisibleRange=i.visibleRange),e&&(this.dataHasNaN=null==e?void 0:e.dataDistributionCalculator.containsNaN,this.dataEvenlySpaced=null==e?void 0:e.isEvenlySpaced)}}clone(e){var t,i,r,s,o,a,l,h,u,d,c,p,g,f;const y=new n(void 0,void 0,void 0);return y.zeroLineY=null!==(t=null==e?void 0:e.zeroLineY)&&void 0!==t?t:this.zeroLineY,y.precision=null!==(i=null==e?void 0:e.precision)&&void 0!==i?i:this.precision,y.xVisibleRange=null!==(r=null==e?void 0:e.xVisibleRange)&&void 0!==r?r:this.xVisibleRange,y.indexesRange=null!==(s=null==e?void 0:e.indicesRange)&&void 0!==s?s:this.indexesRange,y.viewportRect=null!==(o=null==e?void 0:e.viewportRect)&&void 0!==o?o:this.viewportRect,y.isCategoryAxis=null!==(a=null==e?void 0:e.isCategoryAxis)&&void 0!==a?a:this.isCategoryAxis,y.isXAxisAutoRanged=null!==(l=null==e?void 0:e.isXAxisAutoRanged)&&void 0!==l?l:this.isXAxisAutoRanged,y.resamplingMode=null!==(h=null==e?void 0:e.resamplingMode)&&void 0!==h?h:this.resamplingMode,y.renderableSeriesHash=null!==(u=null==e?void 0:e.renderableSeriesHash)&&void 0!==u?u:this.renderableSeriesHash,y.enableExperimentalResampling=null!==(d=null==e?void 0:e.enableExperimentalResampling)&&void 0!==d?d:this.enableExperimentalResampling,y.dataHasNaN=null!==(c=null==e?void 0:e.dataHasNaN)&&void 0!==c?c:this.dataHasNaN,y.dataIsFifo=null!==(p=null==e?void 0:e.dataIsFifo)&&void 0!==p?p:this.dataIsFifo,y.fifoCapacity=null!==(g=null==e?void 0:e.fifoCapacity)&&void 0!==g?g:this.fifoCapacity,y.dataEvenlySpaced=null!==(f=null==e?void 0:e.dataEvenlySpaced)&&void 0!==f?f:this.dataEvenlySpaced,y}}t.ResamplingParams=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderPassInfo=void 0;t.RenderPassInfo=class{constructor(e,t){this.pointSeriesArray=[],this.renderableSeriesArray=[],this.indicesRanges=[],this.resamplingHashes=[],this.seriesViewRect=t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdornerLayer=void 0;t.AdornerLayer=class{constructor(e){this.parentSurface=e}selectAnnotation(e){const t=this.parentSurface;let i;const r=t=>{t.forEach(t=>{const r=t;r.click(e,!i&&r.isEditable)&&(i=r)})};return r(t.annotations.asArray()),r(t.modifierAnnotations.asArray()),this.selectedAnnotationProperty=i,!!i}deselectAnnotation(e){this.selectedAnnotationProperty===e&&(this.selectedAnnotationProperty=void 0)}get selectedAnnotation(){return this.selectedAnnotationProperty}get isAnnotationSelected(){return!!this.selectedAnnotationProperty}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;t.Logger=class{static log(e,...t){console.log(e,t)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeatmapSeriesInfo=void 0;const r=i(41),n=i(21),s=i(82);class o extends s.SeriesInfo{constructor(e,t){super(e,t),this.xIndex=t.heatmapXIndex,this.yIndex=t.heatmapYIndex,this.zValue=t.zValue,this.color=void 0}get formattedZValue(){const e=this.renderableSeries;return e?e.zLabelProvider.formatCursorLabel(this.zValue):(0,n.formatNumber)(this.zValue,r.ENumericFormat.Decimal,2)}}t.HeatmapSeriesInfo=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlcSeriesInfo=void 0;const r=i(82);class n extends r.SeriesInfo{constructor(e,t){super(e,t),this.highValue=t.highValue,this.lowValue=t.lowValue,this.closeValue=t.closeValue}get formattedHighValue(){return this.getYCursorFormattedValue(this.highValue)}get formattedLowValue(){return this.getYCursorFormattedValue(this.lowValue)}get formattedCloseValue(){return this.getYCursorFormattedValue(this.closeValue)}}t.HlcSeriesInfo=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcSeriesInfo=void 0;const r=i(82);class n extends r.SeriesInfo{constructor(e,t){super(e,t),this.openValue=t.openValue,this.highValue=t.highValue,this.lowValue=t.lowValue,this.closeValue=t.closeValue}get formattedOpenValue(){return this.getYCursorFormattedValue(this.openValue)}get formattedHighValue(){return this.getYCursorFormattedValue(this.highValue)}get formattedLowValue(){return this.getYCursorFormattedValue(this.lowValue)}get formattedCloseValue(){return this.getYCursorFormattedValue(this.closeValue)}}t.OhlcSeriesInfo=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XySeriesInfo=void 0;const r=i(82);class n extends r.SeriesInfo{constructor(e,t){super(e,t)}}t.XySeriesInfo=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyySeriesInfo=void 0;const r=i(82);class n extends r.SeriesInfo{constructor(e,t){super(e,t),this.isFirstSeries=!0,this.y1Value=t.y1Value,this.point2y1Value=t.point2y1Value,this.y1Coordinate=t.y1Coord,this.point2y1Coordinate=t.point2y1Coord}get formattedY1Value(){return this.getYCursorFormattedValue(this.y1Value)}}t.XyySeriesInfo=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyPointSeriesResampled=void 0;const r=i(197);class n extends r.BasePointSeriesResampled{constructor(e,t){super(e,t)}}t.XyPointSeriesResampled=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtremeResamplerHelper=void 0;const r=i(0),n=i(1),s=i(114);t.ExtremeResamplerHelper=class{constructor(e){this.isDeleted=!1,this.nativeMergeIndexParams=new e.SCRTDoubleResamplerMergeIndicesParams,this.wasmContext=e,this.nativeResampler=new this.wasmContext.SCRTDoubleResampler,this.xInput=new this.wasmContext.SCRTXvaluesProvider,this.nativeArgs=new this.wasmContext.ResamplingArgs,this.output=new this.wasmContext.SCRTDoubleArraysXyResampleOutput}needsResampling(e,t,i=!0,r=!1){i&&this.resetAndFillBasicNativeArgs(e,t);const n=this.nativeResampler.RequiresReduction(this.nativeArgs);return r&&!n&&(this.nativeArgs.Resampling=this.getNativeResamplingMode(s.EResamplingMode.None)),n}resampleIntoPointSeries(e,t,i,r,s,o,a,l=!0){if(this.isDeleted)throw new Error("should not call resampleIntoPointSeries() if deleted");n.Guard.notNull(i,"xDataValues"),n.Guard.notNull(r,"yDataValues"),n.Guard.notNull(i,"xOriginalValues"),n.Guard.notNull(r,"yOriginalValues"),n.Guard.notNull(t,"resamplingParams"),l&&this.resetAndFillBasicNativeArgs(t,i),this.xInput.SetInput(i),this.nativeArgs.FifoCapacity=t.fifoCapacity,this.nativeArgs.HasNaN=t.dataHasNaN,this.nativeArgs.IsFifo=t.dataIsFifo,this.nativeArgs.ResamplingPrecision=t.precision,this.nativeArgs.ZeroLineY=t.zeroLineY,this.nativeArgs.NewDataPointCount=-1,!0===l&&this.needsResampling(t,i,!1,!0);const h=this.nativeResampler.UpdateIndices(s,this.xInput,r,this.nativeArgs.Resampling,this.nativeArgs);o.resizeFast(h+1),a.resizeFast(h+1),this.output.Reset(o,a),this.nativeResampler.Execute(this.xInput,r,this.output,s,this.nativeArgs.Resampling,this.nativeArgs);const u=s.size();o.resizeFast(u),a.resizeFast(u)}mergeIndexes(e,t,i,r){return this.nativeResampler.MergeIndices(e,t,i,r)}copyValuesByIndexes(e,t,i,r,n,s,o,a,l,h=0){const u=this.nativeMergeIndexParams;u.SetIndices(e),this.xInput.SetInput(t),u.SetXInput(this.xInput),u.SetYInput(i),u.SetY1Input(r),u.SetY1Offset(h),u.count=n,u.isCategoryData=s,u.SetXOut(o),u.SetYOut(a),u.SetY1Out(l),this.nativeResampler.CopyValuesByIndices(u)}delete(){this.isDeleted||((0,r.deleteSafe)(this.nativeResampler),(0,r.deleteSafe)(this.xInput),(0,r.deleteSafe)(this.nativeArgs),(0,r.deleteSafe)(this.output),(0,r.deleteSafe)(this.nativeMergeIndexParams),this.isDeleted=!0)}debugParameters(e,t){console.log(31415),console.log("ResamplingParams:"),console.log(".. zeroLineY: "+e.zeroLineY),console.log(".. resamplingPrecision: "+e.precision),console.log(".. xVisibleRange: "+e.xVisibleRange),console.log(".. indicesRange: "+e.indexesRange),console.log(".. viewportRect: "+this.debugRect(e.viewportRect)),console.log(".. isCategoryAxis: "+e.isCategoryAxis),console.log(".. isXAxisAutoRanged: "+e.isXAxisAutoRanged),console.log(".. resamplingMode: "+e.resamplingMode),console.log(".. renderableSeriesHash: "+e.renderableSeriesHash),console.log(".. enableExperimentalResampling: "+e.enableExperimentalResampling),console.log(".. dataHasNan: "+e.dataHasNaN),console.log(".. dataIsFifo: "+e.dataIsFifo),console.log(".. fifoCapacity: "+e.fifoCapacity),console.log(".. dataEvenlySpaced: "+e.dataEvenlySpaced),console.log("native Resampling Args:"),console.log(".. ResamplingData: "+this.debugResamplingDataEnum(t.Data)),console.log(".. StartIndex: "+t.StartIndex),console.log(".. EndIndex: "+t.EndIndex),console.log(".. FifoCapacity: "+t.FifoCapacity),console.log(".. HasNaN: "+t.HasNaN),console.log(".. IsFifo: "+t.IsFifo),console.log(".. MaxXInclusive: "+t.MaxXInclusive),console.log(".. MinXInclusive: "+t.MinXInclusive),console.log(".. ResamplingMode: "+this.debugResamplingModeEnum(t.Resampling)),console.log(".. ResamplingPrecision: "+t.ResamplingPrecision),console.log(".. ViewportWidth: "+t.ViewportWidth),console.log(".. ZeroLineY: "+t.ZeroLineY),console.log(".. NewDataPointCount: "+t.NewDataPointCount),console.log(".. InputBaseIndex: "+t.InputBaseIndex)}debugRect(e){return`X ${e.x} Y ${e.y} Width ${e.width} Height ${e.height}`}debugResamplingDataEnum(e){return e===this.wasmContext.ResamplingData.LinearData?"LinearData":e===this.wasmContext.ResamplingData.CategoryData?"CategoryData":e===this.wasmContext.ResamplingData.UnsortedData?"UnsortedData":e===this.wasmContext.ResamplingData.UnevenlySpacedData?"UnevenlySpacedData":"Unknown"}debugResamplingModeEnum(e){return e===this.wasmContext.ResamplingMode.MinMax?"MinMax":e===this.wasmContext.ResamplingMode.Auto?"Auto":"Unknown"}getDataDistribution(e,t){return t?this.wasmContext.ResamplingData.CategoryData:e?this.wasmContext.ResamplingData.LinearData:this.wasmContext.ResamplingData.UnevenlySpacedData}getNativeResamplingMode(e){switch(e){case s.EResamplingMode.Auto:return this.wasmContext.ResamplingMode.Auto;case s.EResamplingMode.Max:return this.wasmContext.ResamplingMode.Max;case s.EResamplingMode.Mid:return this.wasmContext.ResamplingMode.Mid;case s.EResamplingMode.Min:return this.wasmContext.ResamplingMode.Min;case s.EResamplingMode.MinMax:return this.wasmContext.ResamplingMode.MinMax;case s.EResamplingMode.MinOrMax:return this.wasmContext.ResamplingMode.MinOrMax;case s.EResamplingMode.None:return this.wasmContext.ResamplingMode.None;default:throw new Error("Unknown resamplingMode "+e)}}resetAndFillBasicNativeArgs(e,t){if(this.nativeArgs.Reset(),this.nativeArgs.Data=this.getDataDistribution(e.dataEvenlySpaced,e.isCategoryAxis),this.nativeArgs.StartIndex=e.indexesRange.min,this.nativeArgs.EndIndex=e.indexesRange.max,this.nativeArgs.MaxXInclusive=e.xVisibleRange.max,this.nativeArgs.MinXInclusive=e.xVisibleRange.min,this.nativeArgs.Resampling=this.getNativeResamplingMode(e.resamplingMode),this.nativeArgs.ViewportWidth=e.viewportRect.width,e.isCategoryAxis)this.nativeArgs.MinXInclusive=e.indexesRange.min,this.nativeArgs.MaxXInclusive=e.indexesRange.max;else{const i=t.get(e.indexesRange.min),r=t.get(e.indexesRange.max);this.nativeArgs.MinXInclusive=Math.max(i,e.xVisibleRange.min),this.nativeArgs.MaxXInclusive=Math.min(r,e.xVisibleRange.max)}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.FILL="fill",e.HEIGHT="height",e.IMAGE="image",e.SIZE_TO_IMAGE="size_to_image",e.STROKE="stroke",e.STROKE_THICKNESS="strokeThickness",e.WIDTH="width",e.OPACITY="opacity"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesHoveredArgs=void 0;t.SeriesHoveredArgs=class{constructor(e,t){this.sourceSeries=e,this.hovered=t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesSelectedArgs=void 0;t.SeriesSelectedArgs=class{constructor(e,t){this.sourceSeries=e,this.isSelected=t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesVisibleChangedArgs=void 0;t.SeriesVisibleChangedArgs=class{constructor(e,t){this.sourceSeries=e,this.isVisible=t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStackedCollection=void 0;const r=i(65),n=i(0),s=i(3),o=i(69),a=i(22),l=i(60),h=i(57),u=i(24),d=i(7);class c extends o.ObservableArray{constructor(e,t){var i,r,n,s;super(),this.id=(0,a.generateGuid)(),this.isStacked=!0,this.supportsResampling=!1,this.isSpline=!1,this.enableDrawingOptimisations=!0,this.isAccumulatedVectorDirty=!0,this.firstAnimationRender=!1,this.isVisibleProperty=!0,this.xAxisIdProperty=h.AxisCore.DEFAULT_AXIS_ID,this.yAxisIdProperty=h.AxisCore.DEFAULT_AXIS_ID,this.isOneHundredPercentProperty=!1,this.animationQueue=[],this.webAssemblyContext=e,this.isVisibleProperty=null!==(i=null==t?void 0:t.isVisible)&&void 0!==i?i:this.isVisibleProperty,this.xAxisIdProperty=null!==(r=null==t?void 0:t.xAxisId)&&void 0!==r?r:this.xAxisIdProperty,this.yAxisIdProperty=null!==(n=null==t?void 0:t.yAxisId)&&void 0!==n?n:this.yAxisIdProperty,this.isOneHundredPercentProperty=null!==(s=null==t?void 0:t.isOneHundredPercent)&&void 0!==s?s:this.isOneHundredPercentProperty,this.updateAnimationProperties=this.updateAnimationProperties.bind(this),this.notifyPropertyChanged=this.notifyPropertyChanged.bind(this),this.getParentSurface=this.getParentSurface.bind(this),this.beforeAnimationStart=this.beforeAnimationStart.bind(this),this.afterAnimationComplete=this.afterAnimationComplete.bind(this),this.updateAnimationProperties=this.updateAnimationProperties.bind(this),this.accumulatedValues0=new this.webAssemblyContext.SCRTDoubleVector,this.accumulatedFinalAnimationValues0=new this.webAssemblyContext.SCRTDoubleVector}get isVisibleChanged(){throw new Error("getting visibleChanged event is not supported for BaseStackedCollection")}get selected(){throw new Error("getting selected event is not supported for BaseStackedCollection")}get hovered(){throw new Error("getting hovered event is not supported for BaseStackedCollection")}get isSelected(){return!1}set isSelected(e){throw new Error("Setting or getting isSelected is not supported for BaseStackedCollection")}get isHovered(){throw new Error("Setting or getting isHovered is not supported for BaseStackedCollection")}set isHovered(e){throw new Error("Setting or getting isHovered is not supported for BaseStackedCollection")}get isDigitalLine(){throw new Error("Setting or getting isDigitalLine is not supported for BaseStackedCollection")}set isDigitalLine(e){throw new Error("Setting or getting isDigitalLine is not supported for BaseStackedCollection")}get isVisible(){return this.isVisibleProperty}set isVisible(e){this.isVisibleProperty=e,this.notifyPropertyChanged(d.PROPERTY.IS_VISIBLE)}get xAxis(){return this.parentSurface.xAxes.asArray().find(e=>e.id===this.xAxisId)}get xAxisId(){return this.xAxisIdProperty}set xAxisId(e){this.xAxisIdProperty=e,this.notifyPropertyChanged(d.PROPERTY.XAXIS_ID)}get yAxis(){return this.parentSurface.yAxes.asArray().find(e=>e.id===this.yAxisId)}get yAxisId(){return this.yAxisIdProperty}set yAxisId(e){this.yAxisIdProperty=e,this.notifyPropertyChanged(d.PROPERTY.YAXIS_ID)}get isOneHundredPercent(){return this.isOneHundredPercentProperty}set isOneHundredPercent(e){this.isOneHundredPercentProperty=e,this.notifyPropertyChanged(d.PROPERTY.IS_ONE_HUNDRED_PERCENT)}get dataSeries(){throw Error("dataSeries property is not supported for BaseStackedCollection")}set dataSeries(e){throw Error("dataSeries property is not supported for BaseStackedCollection")}get drawNaNAs(){throw Error("drawNaNAs property is not supported for BaseStackedCollection")}set drawNaNAs(e){throw Error("drawNaNAs property is not supported for BaseStackedCollection")}get drawingProviders(){throw Error("drawingProviders property is not supported for BaseStackedCollection")}set drawingProviders(e){throw Error("drawingProviders property is not supported for BaseStackedCollection")}get hitTestProvider(){throw Error("hitTestProvider property is not supported for BaseStackedCollection, call hitTestProvider on BaseStackedRenderableSeries instead")}set hitTestProvider(e){throw Error("hitTestProvider property is not supported for BaseStackedCollection, call hitTestProvider on BaseStackedRenderableSeries instead")}get paletteProvider(){throw Error("paletteProvider property is not supported for BaseStackedCollection")}set paletteProvider(e){throw Error("paletteProvider property is not supported for BaseStackedCollection")}get pointMarker(){throw Error("pointMarker property is not supported for BaseStackedCollection")}set pointMarker(e){throw Error("pointMarker property is not supported for BaseStackedCollection")}get rolloverModifierProps(){throw Error("rolloverModifierProps property is not supported for BaseStackedCollection")}set rolloverModifierProps(e){throw Error("rolloverModifierProps property is not supported for BaseStackedCollection")}get stroke(){throw Error("stroke property is not supported for BaseStackedCollection")}set stroke(e){throw Error("stroke property is not supported for BaseStackedCollection")}get strokeThickness(){throw Error("strokeThickness property is not supported for BaseStackedCollection")}set strokeThickness(e){throw Error("strokeThickness property is not supported for BaseStackedCollection")}get effect(){throw Error("effect property is not supported for BaseStackedCollection")}set effect(e){throw Error("effect property is not supported for BaseStackedCollection")}get opacity(){throw Error("opacity property is not supported for BaseStackedCollection")}set opacity(e){throw Error("effect property is not supported for BaseStackedCollection")}set rolloverModifierProps1(e){throw Error("rolloverModifierProps1() method is not supported for BaseStackedCollection")}get rolloverModifierProps1(){throw Error("rolloverModifierProps1() method is not supported for BaseStackedCollection")}get resamplingMode(){throw Error("resamplingMode property is not supported for BaseStackedCollection")}set resamplingMode(e){throw Error("resamplingMode property is not supported for BaseStackedCollection")}get resamplingPrecision(){throw Error("resamplingPrecision property is not supported for BaseStackedCollection")}set resamplingPrecision(e){throw Error("resamplingPrecision property is not supported for BaseStackedCollection")}getIndicesRange(e){throw Error("getIndicesRange() method is not supported for BaseStackedCollection")}get canDraw(){return u.animationHelpers.checkCanDraw(this.animationFSM)}pushPalettedColors(e,t){throw new Error("Method not implemented.")}getSeriesInfo(e){throw new Error("Method not implemented.")}applyTheme(e){this.asArray().forEach(t=>{t.applyTheme(e)})}delete(){this.accumulatedValues0=(0,n.deleteSafe)(this.accumulatedValues0),this.accumulatedFinalAnimationValues0=(0,n.deleteSafe)(this.accumulatedFinalAnimationValues0)}notifyPropertyChanged(e){this.invalidateParent()}onDpiChanged(e){this.asArray().forEach(t=>t.onDpiChanged(e))}getBaseXValues(){return[]}getDataSeriesName(){return"Stacked Collection"}getDataSeriesValuesCount(){if(this.getNativeXValues())return this.getNativeXValues().size()}getNativeXValues(){var e;if(0!==this.size())return null===(e=this.get(0).dataSeries)||void 0===e?void 0:e.getNativeXValues()}getYRange(e,t){if(!this.isEnoughDataToDraw())return new s.NumberRange;let i;return this.getVisibleSeries().forEach(r=>{if(r.accumulatedValues.size()===this.getNativeXValues().size()){const n=(0,l.getWindowedYRange)(this.webAssemblyContext,this.getNativeXValues(),r.accumulatedValues,e,!0,t,!0);n&&(i=i?i.union(n):n)}}),i||new s.NumberRange}hasDataSeries(){return!!this.getNativeXValues()}hasStrokePaletteProvider(){return!1}hasFillPaletteProvider(){return!1}hasPointMarkerPaletteProvider(){return!1}onAttach(e){if(this.parentSurface=e,this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=e.invalidateElement}onDetach(){this.invalidateParentCallback=void 0,this.parentSurface=void 0,this.delete()}getVisibleSeries(){return this.asArray().filter(e=>e.isVisible)}enqueueAnimation(e){this.animationQueue.push(e),this.invalidateParent()}runAnimation(e){this.animationQueue=[],this.animationFSM.toCompleted(),this.afterAnimationComplete()}set animation(e){e&&this.animationQueue.push(e),this.invalidateParent()}get isRunningAnimation(){return u.animationHelpers.checkIsAnimationRunning(this.animationQueue,this.animationFSM)}onAnimate(e){var t;if(!this.animationFSM||(null===(t=this.animationFSM)||void 0===t?void 0:t.is([r.EAnimationState.Completed])))if(this.animationQueue.length>=1){const e=this.animationQueue.shift();this.animationFSM=new r.SeriesAnimationFiniteStateMachine(e,void 0)}else this.animationFSM=void 0;this.animationFSM&&u.animationHelpers.animationUpdate(this.animationFSM,e,this.beforeAnimationStart,this.afterAnimationComplete,this.updateAnimationProperties)}checkIsOutOfDataRange(e,t){throw Error("checkIsOutOfDataRange() method is not supported for BaseStackedCollection")}toPointSeries(e){}getCurrentRenderPassData(){throw Error("getCurrentRenderPassData method is not supported for BaseStackedCollection")}get dataLabelProvider(){}toJSON(e=!1){const t=[];for(const i of this.asArray())t.push(i.toJSON(e));const i={isVisible:this.isVisible,isOneHundredPercent:this.isOneHundredPercent,xAxisId:this.xAxisId,yAxisId:this.yAxisId};return{type:this.type,series:t,options:i}}resolveAutoColors(e,t,i){for(let r=0;r<this.size();r++){this.get(r).resolveAutoColors(e+r,t,i)}}adjustAutoColor(e,t){return t}isAllDataSeriesSet(){let e=!0;return this.asArray().forEach(t=>{t.dataSeries||(e=!1)}),e}invalidateParent(){this.invalidateParentCallback&&this.invalidateParentCallback()}getFirstSeries(){if(0!==this.size())return this.get(0)}getParentSurface(){return this.parentSurface}beforeAnimationStart(){this.updateAccumulatedVectors();const e=this.accumulatedValues0.size();this.accumulatedFinalAnimationValues0.resize(e,0);for(let t=0;t<e;t++)this.accumulatedFinalAnimationValues0.set(t,this.accumulatedValues0.get(t));this.getVisibleSeries().forEach(e=>{e.beforeAnimationStart()})}afterAnimationComplete(){this.getVisibleSeries().forEach(e=>{e.afterAnimationComplete()})}updateAnimationProperties(e,t){this.isAllDataSeriesSet()&&(t.animation.calculateAnimationValues(this.webAssemblyContext,this.accumulatedFinalAnimationValues0,this.accumulatedValues0,e),this.getVisibleSeries().forEach(i=>{i.updateAnimationProperties(e,t)})),this.invalidateParentCallback&&this.invalidateParentCallback()}updateHitTestProviders(e){this.getVisibleSeries().forEach(t=>{var i;null===(i=t.hitTestProvider)||void 0===i||i.update(e)})}isEnoughDataToDraw(){const e=this.getVisibleSeries().length;if(e<1)return!1;for(let t=0;t<e;t++)if(!this.get(t).dataSeries)return!1;for(let t=0;t<e;t++)if(0===this.get(t).dataSeries.count())return!1;return!0}}t.BaseStackedCollection=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESearchMode=void 0,function(e){e.Exact="Exact",e.Nearest="Nearest",e.RoundDown="RoundDown",e.RoundUp="RoundUp"}(t.ESearchMode||(t.ESearchMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataDistributionCalculator=void 0;const r=i(188),n=i(45),s=i(21);t.DataDistributionCalculator=class{constructor(){this.containsNanProperty=!1,this.isSortedAscendingProperty=!0}get containsNaN(){return this.containsNanProperty}get isSortedAscending(){return this.isSortedAscendingProperty}onAppend(e,t,i,o,a){if(void 0!==t?this.containsNanProperty=t:!1===this.containsNanProperty&&(this.containsNanProperty=a.some(s.checkIsNaN),!1===this.containsNanProperty&&r.performanceWarnings.dataDistributionFlagNaN.warn()),void 0!==e)this.isSortedAscendingProperty=e;else if(!0===this.isSortedAscendingProperty){const e=(0,n.isArraySorted)(o),t=i.size(),s=0===t||i.get(t-1)<o[0];this.isSortedAscendingProperty=e&&s,!0===this.isSortedAscendingProperty&&r.performanceWarnings.dataDistributionFlagSortedAscending.warn()}}onInsert(e,t,i,o,a,l){if(void 0!==t?this.containsNanProperty=t:!1===this.containsNanProperty&&(this.containsNanProperty=a.some(s.checkIsNaN),!1===this.containsNanProperty&&r.performanceWarnings.dataDistributionFlagNaN.warn()),void 0!==e)this.isSortedAscendingProperty=e;else if(!0===this.isSortedAscendingProperty&&o){const e=(0,n.isArraySorted)(o),t=0===l||i.get(l-1)<o[0],s=l>=i.size()||o[o.length-1]<i.get(l);this.isSortedAscendingProperty=e&&t&&s,!0===this.isSortedAscendingProperty&&r.performanceWarnings.dataDistributionFlagSortedAscending.warn()}}onUpdate(e,t,i,r,o,a){if(void 0!==t?this.containsNanProperty=t:!1===this.containsNanProperty&&(this.containsNanProperty=o.some(s.checkIsNaN)),void 0!==e)this.isSortedAscendingProperty=e;else if(!0===this.isSortedAscendingProperty&&r){const e=(0,n.isArraySorted)(r),t=0===a||i.get(a-1)<r[0],s=i.size(),o=a+r.length,l=o>=s||r[r.length-1]<i.get(o);this.isSortedAscendingProperty=e&&t&&l}}clear(e,t){this.isSortedAscendingProperty=null==e||e,this.containsNanProperty=null!=t&&t}setIsSortedAscending(e){this.isSortedAscendingProperty=e}setContainsNaN(e){this.containsNanProperty=e}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EDataLabelSkipMode=void 0,function(e){e.ShowAll="ShowAll",e.SkipIfOverlapPrevious="SkipIfOverlapPrevious",e.SkipIfOverlapNext="SkipIfOverlapNext",e.SkipIfSame="SkipIfSame"}(t.EDataLabelSkipMode||(t.EDataLabelSkipMode={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnSeriesDrawingProvider=void 0;const r=i(0),n=i(54),s=i(35),o=i(4),a=i(7),l=i(49);class h extends l.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.nativeDrawingProvider=new e.SCRTColumnSeriesDrawingProvider,this.strokePenCache=new s.Pen2DCache(e),this.strokePenFillColoredCache=new s.Pen2DCache(e),this.fillBrushCache=new n.BrushCache(e);const{stroke:i,strokeThickness:r,fill:o,opacity:a}=this.parentSeries;(0,s.createPenInCache)(this.strokePenCache,i,r,a),0===r&&(0,s.createPenInCache)(this.strokePenFillColoredCache,o,1,a),this.createBrush()}delete(){this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),this.strokePenCache=(0,r.deleteSafe)(this.strokePenCache),this.strokePenFillColoredCache=(0,r.deleteSafe)(this.strokePenFillColoredCache),this.fillBrushCache=(0,r.deleteSafe)(this.fillBrushCache),super.delete()}draw(e,t){const i=t.pointSeries,r=this.parentSeries.parentSurface.seriesViewRect,o=this.parentSeries.strokeThickness,a=new this.webAssemblyContext.SCRTColumnDrawingParams;a.forceShaderMethod=!0,a.verticalChart=t.isVerticalChart,a.zeroLineY=this.parentSeries.zeroLineY,a.columnWidth=this.parentSeries.getDataPointWidth(t.xCoordinateCalculator,this.parentSeries.dataPointWidth),a.bottomRadius=this.parentSeries.cornerRadius;let l=this.strokePenCache;1===a.columnWidth&&0===o&&(a.columnWidth=0,l=this.strokePenFillColoredCache);const h=(0,s.getScrtPenFromCache)(l);h&&a.SetLinesPen(h);const u=(0,n.getScrtBrushFromCache)(this.fillBrushCache);u&&a.SetFillBrush(u),a.viewportWidth=r.width,a.viewportHeight=r.height,super.applyStrokeFillPaletting(this.parentSeries.stroke,h,this.parentSeries.fill,u,this.parentSeries.opacity,!1,void 0!==this.parentSeries.fillLinearGradient),a.SetPalettedColors(this.palettingState.palettedColors);const d=t.xCoordinateCalculator.isCategoryCoordinateCalculator,c=i.xValues,p=i.yValues;a.count=p.size();const g=e.getNativeContext();this.nativeDrawingProvider.DrawPointsVec(g,d?i.indexes:c,p,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,a),a.delete()}onDpiChanged(e){super.onDpiChanged(e),this.onSeriesPropertyChange(a.PROPERTY.STROKE)}onSeriesPropertyChange(e){super.onSeriesPropertyChange(e);const{stroke:t,strokeThickness:i,opacity:r,fill:n}=this.parentSeries;e!==a.PROPERTY.STROKE&&e!==a.PROPERTY.STROKE_THICKNESS&&e!==a.PROPERTY.OPACITY||(0,s.createPenInCache)(this.strokePenCache,t,i,r),e!==a.PROPERTY.FILL&&e!==a.PROPERTY.OPACITY||this.createBrush(),0!==i||e!==a.PROPERTY.STROKE_THICKNESS&&e!==a.PROPERTY.STROKE&&e!==a.PROPERTY.OPACITY&&e!==a.PROPERTY.FILL||(0,s.createPenInCache)(this.strokePenFillColoredCache,n,1,r)}createBrush(){const{fill:e,opacity:t,fillLinearGradient:i,parentSurface:r}=this.parentSeries,s=(null==r?void 0:r.isCopyCanvasSurface)?r.domCanvas2D.height/o.SciChartSurfaceBase.domMasterCanvas.height:1,a=(null==r?void 0:r.isCopyCanvasSurface)?r.domCanvas2D.width/o.SciChartSurfaceBase.domMasterCanvas.width:1;return(0,n.createBrushInCache)(this.fillBrushCache,e,t,s,a,i)}}t.ColumnSeriesDrawingProvider=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnSeriesHitTestProvider=void 0;const r=i(11),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:n,isVerticalChart:a}=this.currentRenderPassData,l=a?i.y:i.x,h=a?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return o.HitTestInfo.empty();const d=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),p=u.getNativeYValues(),g=s.hitTestHelpers.createHitTestInfo(this.parentSeries,r,n,a,u,c,p,l,h,d,0);return g.isHit=d>=0&&s.hitTestHelpers.testIsHitForColumn(r,n,this.parentSeries,c,p,d,l,h),g}hitTestForDataPointSelectionModifier(e,t,i=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){return this.hitTest(e,t)}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=d.getNativeXValues(),p=d.getNativeYValues(),g=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,d,h,d.dataDistributionCalculator.isSortedAscending),f=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,d,c,p,h,u,g,0),y=n.isCategoryCoordinateCalculator;if(g>=0){const e=y?0:c.get(0),t=y?c.size()-1:c.get(c.size()-1),{dataPointWidth:i}=this.parentSeries;f.isWithinDataBounds=(0,r.testIsInInterval)(f.hitTestPointValues.x,e,t,i/2),f.isHit=f.isWithinDataBounds}else f.isHit=!1;return f}}t.ColumnSeriesHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartPieLegend=void 0;const r=i(52),n=i(78),s=i(84);class o extends s.SciChartLegendBase{constructor(){super(...arguments),this.type=s.ELegendType.SciChartPieLegend,this.animate=!0,this.showCheckboxesProperty=!1,this.showSeriesMarkersProperty=!0}get showCheckboxes(){return this.showCheckboxesProperty}set showCheckboxes(e){this.showCheckboxesProperty=e,this.notifyPropertyChanged()}get showSeriesMarkers(){return this.showSeriesMarkersProperty}set showSeriesMarkers(e){this.showSeriesMarkersProperty=e,this.notifyPropertyChanged()}applyTheme(){}setPieSegmentArray(e){this.pieSegmentArray=e}update(){this.delete(),this.showLegend&&this.create()}addEventListeners(){this.pieSegmentArray.forEach(e=>{const t=this.parentDiv.querySelector("#"+a(e.id));if(!t)return;const i=(0,n.addEventListenerToPieSegment)(e,t,this.animate),r=this.eventListenersCollection.get(e.id);r?r.push(i):this.eventListenersCollection.set(e.id,[i])})}removeEventListeners(){this.pieSegmentArray.forEach(e=>this.removeEventListenerFromSeries(e.id))}getInnerHTML(){const e=this.parentSurfaceProperty.themeProvider.legendBackgroundBrush,t=this.parentSurfaceProperty.themeProvider.labelForegroundBrush,i=this.pieSegmentArray.map((e,t)=>{var i;return{id:a(e.id),name:null!==(i=e.text)&&void 0!==i?i:"Segment "+(t+1),color:e.color,checked:e.isSelected,gradient:e.colorLinearGradient}}),n=new r.Thickness(this.margin,this.margin,this.margin,this.margin);return this.getLegendHTML(this.placement,t,e,n,this.orientation,this.showCheckboxes,this.showSeriesMarkers,i)}}t.SciChartPieLegend=o;const a=e=>"check"+e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.COLOR="COLOR",e.COLOR_LINEAR_GRADIENT="COLOR_LINEAR_GRADIENT",e.DELTA="DELTA",e.IS_SELECTED="IS_SELECTED",e.PERCENTAGE="PERCENTAGE",e.TEXT="TEXT",e.VALUE="VALUE",e.SHIFT="SHIFT",e.LABEL_PROVIDER="LABEL_PROVIDER",e.LABEL_STYLE="LABEL_STYLE",e.LABEL_OFFSET="LABEL_OFFSET",e.RADIUS_ADJUSTMENT="RADIUS_ADJUSTMENT",e.SHOW_LABEL="SHOW_LABEL"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogarithmicCoordinateCalculator=void 0;const r=i(3),n=i(29),s=i(106);class o extends s.CoordinateCalculatorBase{constructor(e,t,i,r,s,o,a,l=0){n.EXyDirection.XDirection;super(e,t,i,r,l,a),this.logBaseProperty=o,this.nativeCalculator=a?new e.FlippedLogarithmicCoordinateCalculator(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset,this.logBase):new e.LogarithmicCoordinateCalculator(this.viewportDimension,this.visibleMin,this.visibleMax,-1,this.offset,this.logBase)}get logBase(){return this.logBaseProperty}translateBy(e,t){if(0===e)return t;const i=Math.abs(this.nativeCalculator.GetDataValue(0)),n=Math.abs(this.nativeCalculator.GetDataValue(e)),s=this.webAssemblyContext.NumberUtil,o=t.min<0;o&&(t=new r.NumberRange(Math.abs(t.max),Math.abs(t.min)));let a=s.Log(n,this.logBase)-s.Log(i,this.logBase);this.hasFlippedCoordinates&&(a=-a);const l=s.Log(t.min,this.logBase),h=s.Log(t.max,this.logBase),u=Math.pow(this.logBase,l+a),d=Math.pow(this.logBase,h+a);return o?new r.NumberRange(-d,-u):new r.NumberRange(u,d)}zoomTranslateBy(e,t,i){return i.growByLog(new r.NumberRange(e,t),this.logBase)}}t.LogarithmicCoordinateCalculator=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogarithmicDeltaCalculator=void 0;const r=i(1),n=i(3),s=i(269);class o extends s.DeltaCalculator{constructor(e){super(),this.logarithmicBase=10,this.webAssemblyContext=e}getDeltaFromRange(e,t,i,s){if(r.Guard.argumentIsRealNumber(e,"min"),r.Guard.argumentIsRealNumber(t,"max"),(e=Math.abs(e))>(t=Math.abs(t))){const i=e;e=t,t=i}const o=this.webAssemblyContext.NiceLogScale.CalculateTickSpacing(e,t,this.logarithmicBase,i,s),a=new n.NumberRange(o.minD,o.maxD);return o.delete(),a}}t.LogarithmicDeltaCalculator=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlcScaleOffsetFilter=void 0;const r=i(56),n=i(10),s=i(323);class o extends s.HlcCustomFilter{constructor(e,t){var i,r;if(super(e,t),this.scaleProperty=1,this.offsetProperty=0,e.type!==n.EDataSeriesType.Hlc)throw new Error("HlcScaleOffsetFilter only supports Hlc original series");this.scaleProperty=null!==(i=null==t?void 0:t.scale)&&void 0!==i?i:this.scaleProperty,this.offsetProperty=null!==(r=null==t?void 0:t.offset)&&void 0!==r?r:this.offsetProperty,this.getOriginalCount()>0&&this.filterAll()}get scale(){return this.scaleProperty}set scale(e){this.scaleProperty=e,this.filterAll()}get offset(){return this.offsetProperty}set offset(e){this.offsetProperty=e,this.filterAll()}toJSON(e=!1){const t=this.originalSeries.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.HlcScaleOffset,options:{scale:this.scale,offset:this.offset}}})}defaultFunction(e,t){return t*this.scaleProperty+this.offsetProperty}}t.HlcScaleOffsetFilter=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlcCustomFilter=void 0;const r=i(10),n=i(453);class s extends n.HlcFilterBase{get closefilterFunction(){return this.closefilterFunctionProperty}set closefilterFunction(e){this.closefilterFunctionProperty=e,this.filterAll()}get highfilterFunction(){return this.highfilterFunctionProperty}set highfilterFunction(e){this.highfilterFunctionProperty=e,this.filterAll()}get lowfilterFunction(){return this.lowfilterFunctionProperty}set lowfilterFunction(e){this.lowfilterFunctionProperty=e,this.filterAll()}constructor(e,t){var i,n,s;if(super(e,t),e.type!==r.EDataSeriesType.Hlc)throw new Error("HlcCustomFilter only supports Hlc original series");this.closefilterFunctionProperty=null!==(i=null==t?void 0:t.closefilterFunction)&&void 0!==i?i:this.closefilterFunctionProperty,this.highfilterFunctionProperty=null!==(n=null==t?void 0:t.highfilterFunction)&&void 0!==n?n:this.closefilterFunction,this.lowfilterFunctionProperty=null!==(s=null==t?void 0:t.lowfilterFunction)&&void 0!==s?s:this.closefilterFunction,this.getOriginalCount()>0&&((null==t?void 0:t.closefilterFunction)||(null==t?void 0:t.highfilterFunction)||(null==t?void 0:t.lowfilterFunction))&&this.filterAll()}highfilterFunctionProperty(e,t){return t}lowfilterFunctionProperty(e,t){return t}closefilterFunctionProperty(e,t){return t}filterOnAppend(e){const{xValues:t,highValues:i,lowValues:r,closeValues:n,metadata:s}=this.filter(this.count(),e);this.appendRange(t,n,i,r,s)}filterOnUpdate(e){const t=this.originalSeries;this.update(e,this.highfilterFunction(e,t.getNativeHighValues().get(e)),this.lowfilterFunction(e,t.getNativeLowValues().get(e)),this.closefilterFunction(e,t.getNativeYValues().get(e)),this.originalSeries.getMetadataAt(e))}filterOnInsert(e,t){const{xValues:i,highValues:r,lowValues:n,closeValues:s,metadata:o}=this.filter(e,t);this.insertRange(e,i,s,r,n,o)}filterOnRemove(e,t){this.removeRange(e,t)}filterAll(){this.clear();const{xValues:e,highValues:t,lowValues:i,closeValues:r,metadata:n}=this.filter(0,this.getOriginalCount());this.appendRange(e,r,t,i,n)}filter(e,t){const i=this.getOriginalXValues(),r=this.getOriginalYValues(),n=this.getOriginalHighValues(),s=this.getOriginalLowValues(),o=[],a=[],l=[],h=[],u=[];for(let d=e;d<e+t;d++)o.push(i.get(d)),a.push(this.highfilterFunction(d,n.get(d))),l.push(this.lowfilterFunction(d,s.get(d))),h.push(this.closefilterFunction(d,r.get(d))),u.push(this.originalSeries.getMetadataAt(d));return{xValues:o,highValues:a,lowValues:l,closeValues:h,metadata:u}}}t.HlcCustomFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcScaleOffsetFilter=void 0;const r=i(56),n=i(10),s=i(325);class o extends s.OhlcCustomFilter{constructor(e,t){var i,r;if(super(e,t),this.scaleProperty=1,this.offsetProperty=0,e.type!==n.EDataSeriesType.Ohlc)throw new Error("OhlcScaleOffsetFilter only supports Ohlc original series");this.scaleProperty=null!==(i=null==t?void 0:t.scale)&&void 0!==i?i:this.scaleProperty,this.offsetProperty=null!==(r=null==t?void 0:t.offset)&&void 0!==r?r:this.offsetProperty,this.getOriginalCount()>0&&this.filterAll()}get scale(){return this.scaleProperty}set scale(e){this.scaleProperty=e,this.filterAll()}get offset(){return this.offsetProperty}set offset(e){this.offsetProperty=e,this.filterAll()}toJSON(e=!1){const t=this.originalSeries.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.OhlcScaleOffset,options:{scale:this.scale,offset:this.offset}}})}defaultFunction(e,t){return t*this.scaleProperty+this.offsetProperty}}t.OhlcScaleOffsetFilter=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcCustomFilter=void 0;const r=i(10),n=i(454);class s extends n.OhlcFilterBase{get closefilterFunction(){return this.closefilterFunctionProperty}set closefilterFunction(e){this.closefilterFunctionProperty=e,this.filterAll()}get openfilterFunction(){return this.openfilterFunctionProperty}set openfilterFunction(e){this.openfilterFunctionProperty=e,this.filterAll()}get highfilterFunction(){return this.highfilterFunctionProperty}set highfilterFunction(e){this.highfilterFunctionProperty=e,this.filterAll()}get lowfilterFunction(){return this.lowfilterFunctionProperty}set lowfilterFunction(e){this.lowfilterFunctionProperty=e,this.filterAll()}constructor(e,t){var i,n,s,o;if(super(e,t),e.type!==r.EDataSeriesType.Ohlc)throw new Error("OhlcCustomFilter only supports Ohlc original series");this.closefilterFunctionProperty=null!==(i=null==t?void 0:t.closefilterFunction)&&void 0!==i?i:this.closefilterFunctionProperty,this.openfilterFunctionProperty=null!==(n=null==t?void 0:t.openfilterFunction)&&void 0!==n?n:this.closefilterFunction,this.highfilterFunctionProperty=null!==(s=null==t?void 0:t.highfilterFunction)&&void 0!==s?s:this.closefilterFunction,this.lowfilterFunctionProperty=null!==(o=null==t?void 0:t.lowfilterFunction)&&void 0!==o?o:this.closefilterFunction,this.getOriginalCount()>0&&((null==t?void 0:t.closefilterFunction)||(null==t?void 0:t.openfilterFunction)||(null==t?void 0:t.highfilterFunction)||(null==t?void 0:t.lowfilterFunction))&&this.filterAll()}openfilterFunctionProperty(e,t){return t}highfilterFunctionProperty(e,t){return t}lowfilterFunctionProperty(e,t){return t}closefilterFunctionProperty(e,t){return t}filterOnAppend(e){const{xValues:t,openValues:i,highValues:r,lowValues:n,closeValues:s,metadata:o}=this.filter(this.count(),e);this.appendRange(t,i,r,n,s,o)}filterOnUpdate(e){const t=this.originalSeries;this.update(e,this.openfilterFunction(e,t.getNativeOpenValues().get(e)),this.highfilterFunction(e,t.getNativeHighValues().get(e)),this.lowfilterFunction(e,t.getNativeLowValues().get(e)),this.closefilterFunction(e,t.getNativeCloseValues().get(e)),this.originalSeries.getMetadataAt(e))}filterOnInsert(e,t){const{xValues:i,openValues:r,highValues:n,lowValues:s,closeValues:o,metadata:a}=this.filter(e,t);this.insertRange(e,i,r,n,s,o,a)}filterOnRemove(e,t){this.removeRange(e,t)}filterAll(){this.clear();const{xValues:e,openValues:t,highValues:i,lowValues:r,closeValues:n,metadata:s}=this.filter(0,this.getOriginalCount());this.appendRange(e,t,i,r,n,s)}filter(e,t){const i=this.getOriginalXValues(),r=this.originalSeries,n=[],s=[],o=[],a=[],l=[],h=[];for(let u=e;u<e+t;u++)n.push(i.get(u)),s.push(this.openfilterFunction(u,r.getNativeOpenValues().get(u))),o.push(this.highfilterFunction(u,r.getNativeHighValues().get(u))),a.push(this.lowfilterFunction(u,r.getNativeLowValues().get(u))),l.push(this.closefilterFunction(u,r.getNativeCloseValues().get(u))),h.push(this.originalSeries.getMetadataAt(u));return{xValues:n,openValues:s,highValues:o,lowValues:a,closeValues:l,metadata:h}}}t.OhlcCustomFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyLinearTrendFilter=void 0;const r=i(56),n=i(62);class s extends n.XyFilterBase{constructor(e,t){super(e,t),this.getOriginalCount()>0&&this.filterAll()}get slope(){return this.slopeProperty}get intercept(){return this.interceptProperty}get correlation(){return this.correlationProperty}toJSON(e=!1){const t=super.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.XyLinearTrend,options:{field:this.field,slope:this.slope,intercept:this.intercept}}})}filterAll(){let e=0,t=0,i=0,r=0,n=0;const s=this.getOriginalXValues(),o=this.getOriginalYValues(),a=this.getOriginalCount();for(let a=0;a<this.getOriginalCount();a++){const l=o.get(a),h=s.get(a);e+=h*l,t+=h,i+=l,r+=Math.pow(h,2),n+=Math.pow(l,2)}const l=e*a,h=t*i,u=r*a,d=Math.pow(t,2);this.correlationProperty=(l-h)/Math.sqrt((u-d)*(n*a-Math.pow(i,2))),this.slopeProperty=(l-h)/(u-d);const c=this.slopeProperty*t;this.interceptProperty=(i-c)/a;const p=[],g=[];for(let e=0;e<a;e++){const t=s.get(e);g.push(t),p.push(t*this.slopeProperty+this.interceptProperty)}this.clear(),this.appendRange(g,p)}}t.XyLinearTrendFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyMovingAverageFilter=void 0;const r=i(56),n=i(62);class s extends n.XyFilterBase{constructor(e,t){var i;if(super(e,t),this.lengthProperty=30,this.buffer=[],this.pointer=-1,this.bufferTotal=0,this.lengthProperty=null!==(i=null==t?void 0:t.length)&&void 0!==i?i:this.lengthProperty,!e.dataDistributionCalculator.isSortedAscending)throw new Error("XyMovingAverageFilter requires original data to be sorted in X");this.getOriginalCount()>0&&this.calculate(0)}get length(){return this.lengthProperty}set length(e){this.lengthProperty=e,this.calculate(0)}toJSON(e=!1){const t=this.originalSeries.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.XyMovingAverage,options:{field:this.field,length:this.length}}})}onOriginalPropertyChanged(e){}filterOnAppend(e){this.calculate(this.count())}filterOnUpdate(e){const t=this.getOriginalYValues().get(e)||0;this.calculateUpdate(e,t)}filterOnInsert(e,t){this.calculate(e)}filterOnRemove(e,t){this.calculate(e)}filterAll(){this.calculate(0)}calculateUpdate(e,t){if(e<this.count()-1)this.calculate(e);else{const i=this.buffer[this.pointer];this.bufferTotal=this.bufferTotal-i+t,this.buffer[this.pointer]=t,this.update(e,this.bufferTotal/this.length)}}calculate(e){const t=e;e<this.count()&&(0===e?this.clear():this.removeRange(e,this.count()-e),e=Math.max(0,e-this.length+1),this.buffer=[],this.pointer=-1,this.bufferTotal=0);const i=this.getOriginalXValues(),r=this.getOriginalYValues();Math.min(this.length,this.getOriginalCount());for(let n=e;n<this.getOriginalCount();n++){const e=i.get(n)||0,s=r.get(n)||0;this.pointer=(this.pointer+1)%this.length;const o=this.buffer[this.pointer];this.buffer[this.pointer]=s,this.bufferTotal=this.bufferTotal+s-(null!=o?o:0),this.buffer.length===this.length?this.append(e,this.bufferTotal/this.length):t<this.length&&this.append(e,NaN)}}}t.XyMovingAverageFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyRatioFilter=void 0;const r=i(1),n=i(56),s=i(10),o=i(62);class a extends o.XyFilterBase{constructor(e,t){var i;super(e,t),this.divisorField=o.EDataSeriesField.Y,r.Guard.notNull(t.divisorSeries,"divisorSeries"),this.divisorSeries=t.divisorSeries,this.divisorField=null!==(i=t.divisorField)&&void 0!==i?i:this.divisorField,this.onDivisorDataChanged=this.onDivisorDataChanged.bind(this),this.divisorSeries.dataChanged.subscribe(this.onDivisorDataChanged),this.getOriginalCount()>0&&this.filterAll()}toJSON(e=!1){const t=this.originalSeries.toJSON(e),i=[],r=this.getDivisorYValues();for(let e=0;e<this.divisorSeries.count();e++)i.push(r.get(e));return Object.assign(Object.assign({},t),{filter:{type:n.EDataFilterType.XyRatio,options:{field:this.field,divisorSeries:i}}})}filterOnAppend(e){if(this.getOriginalCount()!==this.divisorSeries.count())return;const{xValues:t,yValues:i}=this.filter(this.count(),e);this.appendRange(t,i)}filterOnUpdate(e){this.update(e,this.getOriginalYValues().get(e)/this.getDivisorYValues().get(e))}filterOnInsert(e,t){if(this.getOriginalCount()!==this.divisorSeries.count())return;const{xValues:i,yValues:r}=this.filter(e,t);this.insertRange(e,i,r)}filterOnRemove(e,t){this.getOriginalCount()===this.divisorSeries.count()&&this.removeRange(e,t)}filterAll(){if(this.getOriginalCount()!==this.divisorSeries.count())return;this.clear();const{xValues:e,yValues:t}=this.filter(0,this.getOriginalCount());this.appendRange(e,t)}filter(e,t){const i=this.getOriginalXValues(),r=this.getOriginalYValues(),n=[],s=[];for(let o=e;o<e+t;o++)n.push(i.get(o)),s.push(r.get(o)/this.getDivisorYValues().get(o));return{xValues:n,yValues:s}}getDivisorYValues(){let e=this.divisorSeries.getNativeYValues();if(this.divisorSeries.type===s.EDataSeriesType.Xyy){const t=this.divisorSeries;e=(0,o.switchData)(this.divisorField,t.getNativeYValues(),t.getNativeY1Values())}else if(this.divisorSeries.type===s.EDataSeriesType.Xyz){const t=this.divisorSeries;e=(0,o.switchData)(this.field,t.getNativeYValues(),t.getNativeZValues())}else if(this.divisorSeries.type===s.EDataSeriesType.Ohlc){const t=this.divisorSeries;e=(0,o.switchData)(this.field,t.getNativeYValues(),t.getNativeOpenValues(),t.getNativeHighValues(),t.getNativeLowValues())}return e}onDivisorDataChanged(e){const{changeType:t,name:i,index:r,count:n}=e;switch(t){case s.EDataChangeType.Append:this.filterOnAppend(n);break;case s.EDataChangeType.Clear:this.onClear();break;case s.EDataChangeType.Insert:this.filterOnInsert(r,n);break;case s.EDataChangeType.Remove:this.filterOnRemove(r,n);break;case s.EDataChangeType.Update:this.filterOnUpdate(r)}}}t.XyRatioFilter=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyScaleOffsetFilter=void 0;const r=i(56),n=i(330);class s extends n.XyCustomFilter{constructor(e,t){var i,r;super(e,t),this.scaleProperty=1,this.offsetProperty=0,this.scaleProperty=null!==(i=null==t?void 0:t.scale)&&void 0!==i?i:this.scaleProperty,this.offsetProperty=null!==(r=null==t?void 0:t.offset)&&void 0!==r?r:this.offsetProperty,this.getOriginalCount()>0&&this.filterAll()}get scale(){return this.scaleProperty}set scale(e){this.scaleProperty=e,this.filterAll()}get offset(){return this.offsetProperty}set offset(e){this.offsetProperty=e,this.filterAll()}toJSON(e=!1){const t=this.originalSeries.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.XyScaleOffset,options:{field:this.field,scale:this.scale,offset:this.offset}}})}filterFunctionProperty(e,t){return t*this.scaleProperty+this.offsetProperty}}t.XyScaleOffsetFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyCustomFilter=void 0;const r=i(62);class n extends r.XyFilterBase{constructor(e,t){var i;super(e,t),this.filterFunctionProperty=null!==(i=null==t?void 0:t.filterFunction)&&void 0!==i?i:this.filterFunctionProperty,this.getOriginalCount()>0&&(null==t?void 0:t.filterFunction)&&this.filterAll()}get filterFunction(){return this.filterFunctionProperty}set filterFunction(e){this.filterFunctionProperty=e,this.filterAll()}filterFunctionProperty(e,t){return t}filterOnAppend(e){const{xValues:t,yValues:i,metadata:r}=this.filter(this.count(),e);this.appendRange(t,i,r)}filterOnUpdate(e){this.update(e,this.filterFunction(e,this.getOriginalYValues().get(e)),this.originalSeries.getMetadataAt(e))}filterOnInsert(e,t){const{xValues:i,yValues:r,metadata:n}=this.filter(e,t);this.insertRange(e,i,r,n)}filterOnRemove(e,t){this.removeRange(e,t)}filterAll(){this.clear();const{xValues:e,yValues:t,metadata:i}=this.filter(0,this.getOriginalCount());this.appendRange(e,t,i)}filter(e,t){const i=this.getOriginalXValues(),r=this.getOriginalYValues(),n=[],s=[],o=[];for(let a=e;a<e+t;a++)n.push(i.get(a)),s.push(this.filterFunction(a,r.get(a))),o.push(this.originalSeries.getMetadataAt(a));return{xValues:n,yValues:s,metadata:o}}}t.XyCustomFilter=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyyScaleOffsetFilter=void 0;const r=i(56),n=i(332);class s extends n.XyyCustomFilter{constructor(e,t){var i,r;super(e,t),this.scaleProperty=1,this.offsetProperty=0,this.scaleProperty=null!==(i=null==t?void 0:t.scale)&&void 0!==i?i:this.scaleProperty,this.offsetProperty=null!==(r=null==t?void 0:t.offset)&&void 0!==r?r:this.offsetProperty,this.getOriginalCount()>0&&this.filterAll()}get scale(){return this.scaleProperty}set scale(e){this.scaleProperty=e,this.filterAll()}get offset(){return this.offsetProperty}set offset(e){this.offsetProperty=e,this.filterAll()}toJSON(e=!1){const t=this.originalSeries.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.XyyScaleOffset,options:{yfield:this.yfield,y1field:this.y1field,scale:this.scale,offset:this.offset}}})}filterFunctionProperty(e,t){return t*this.scaleProperty+this.offsetProperty}}t.XyyScaleOffsetFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyyCustomFilter=void 0;const r=i(455);class n extends r.XyyFilterBase{constructor(e,t){var i,r;super(e,t),this.filterFunctionProperty=null!==(i=null==t?void 0:t.filterFunction)&&void 0!==i?i:this.filterFunctionProperty,this.y1filterFunctionProperty=null!==(r=null==t?void 0:t.y1filterFunction)&&void 0!==r?r:this.filterFunctionProperty,this.getOriginalCount()>0&&((null==t?void 0:t.filterFunction)||(null==t?void 0:t.y1filterFunction))&&this.filterAll()}get filterFunction(){return this.filterFunctionProperty}set filterFunction(e){this.filterFunctionProperty=e,this.filterAll()}filterFunctionProperty(e,t){return t}get y1filterFunction(){return this.y1filterFunctionProperty}set y1yfilterFunction(e){this.y1filterFunctionProperty=e,this.filterAll()}y1filterFunctionProperty(e,t){return t}filterOnAppend(e){const{xValues:t,yValues:i,y1Values:r,metadata:n}=this.filter(this.count(),e);this.appendRange(t,i,r,n)}filterOnUpdate(e){this.update(e,this.filterFunction(e,this.getOriginalYValues().get(e)),this.y1filterFunction(e,this.getOriginalY1Values().get(e)),this.originalSeries.getMetadataAt(e))}filterOnInsert(e,t){const{xValues:i,yValues:r,y1Values:n,metadata:s}=this.filter(e,t);this.insertRange(e,i,r,n,s)}filterOnRemove(e,t){this.removeRange(e,t)}filterAll(){this.clear();const{xValues:e,yValues:t,y1Values:i,metadata:r}=this.filter(0,this.getOriginalCount());this.appendRange(e,t,i,r)}filter(e,t){const i=this.getOriginalXValues(),r=this.getOriginalYValues(),n=this.getOriginalY1Values(),s=[],o=[],a=[],l=[];for(let h=e;h<e+t;h++)s.push(i.get(h)),o.push(this.filterFunction(h,r.get(h))),a.push(this.y1filterFunction(h,n.get(h))),l.push(this.originalSeries.getMetadataAt(h));return{xValues:s,yValues:o,y1Values:a,metadata:l}}}t.XyyCustomFilter=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyzScaleOffsetFilter=void 0;const r=i(56),n=i(334);class s extends n.XyzCustomFilter{constructor(e,t){var i,r;super(e,t),this.scaleProperty=1,this.offsetProperty=0,this.scaleProperty=null!==(i=null==t?void 0:t.scale)&&void 0!==i?i:this.scaleProperty,this.offsetProperty=null!==(r=null==t?void 0:t.offset)&&void 0!==r?r:this.offsetProperty,this.getOriginalCount()>0&&this.filterAll()}get scale(){return this.scaleProperty}set scale(e){this.scaleProperty=e,this.filterAll()}get offset(){return this.offsetProperty}set offset(e){this.offsetProperty=e,this.filterAll()}toJSON(e=!1){const t=this.originalSeries.toJSON(e);return Object.assign(Object.assign({},t),{filter:{type:r.EDataFilterType.XyzScaleOffset,options:{yfield:this.yfield,zfield:this.zfield,scale:this.scale,offset:this.offset}}})}filterFunctionProperty(e,t){return t*this.scaleProperty+this.offsetProperty}}t.XyzScaleOffsetFilter=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyzCustomFilter=void 0;const r=i(456);class n extends r.XyzFilterBase{constructor(e,t){var i,r;super(e,t),this.filterFunctionProperty=null!==(i=null==t?void 0:t.filterFunction)&&void 0!==i?i:this.filterFunctionProperty,this.zfilterFunctionProperty=null!==(r=null==t?void 0:t.zfilterFunction)&&void 0!==r?r:this.filterFunctionProperty,this.getOriginalCount()>0&&((null==t?void 0:t.filterFunction)||(null==t?void 0:t.zfilterFunction))&&this.filterAll()}get filterFunction(){return this.filterFunctionProperty}set filterFunction(e){this.filterFunctionProperty=e,this.filterAll()}filterFunctionProperty(e,t){return t}get zfilterFunction(){return this.zfilterFunctionProperty}set zfilterFunction(e){this.zfilterFunctionProperty=e,this.filterAll()}zfilterFunctionProperty(e,t){return t}filterOnAppend(e){const{xValues:t,yValues:i,zValues:r,metadata:n}=this.filter(this.count(),e);this.appendRange(t,i,r,n)}filterOnUpdate(e){this.update(e,this.filterFunction(e,this.getOriginalYValues().get(e)),this.zfilterFunction(e,this.getOriginalZValues().get(e)),this.originalSeries.getMetadataAt(e))}filterOnInsert(e,t){const{xValues:i,yValues:r,zValues:n,metadata:s}=this.filter(e,t);this.insertRange(e,i,r,n,s)}filterOnRemove(e,t){this.removeRange(e,t)}filterAll(){this.clear();const{xValues:e,yValues:t,zValues:i,metadata:r}=this.filter(0,this.getOriginalCount());this.appendRange(e,t,i,r)}filter(e,t){const i=this.getOriginalXValues(),r=this.getOriginalYValues(),n=this.getOriginalZValues(),s=[],o=[],a=[],l=[];for(let h=e;h<e+t;h++)s.push(i.get(h)),o.push(this.filterFunction(h,r.get(h))),a.push(this.zfilterFunction(h,n.get(h))),l.push(this.originalSeries.getMetadataAt(h));return{xValues:s,yValues:o,zValues:a,metadata:l}}}t.XyzCustomFilter=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformHeatmapDataSeries=void 0;const r=i(0),n=i(1),s=i(3),o=i(457),a=i(55),l=i(60),h=i(336),u=i(10);class d extends h.BaseHeatmapDataSeries{constructor(e,t){if(super(e,t),this.type=u.EDataSeriesType.HeatmapNonUniform,n.Guard.notNull(t.xCellOffsets,"options.xCellOffsets"),n.Guard.notNull(t.yCellOffsets,"options.yCellOffsets"),Array.isArray(t.xCellOffsets)){if(t.xCellOffsets.length<this.arrayWidth+1)throw new Error("xCellOffsets array should not be smaller than zValues width!");this.xCellOffsetsProperty=t.xCellOffsets}else this.xCellOffsetsGeneratorFunction=t.xCellOffsets;if(Array.isArray(t.yCellOffsets)){if(t.yCellOffsets.length<this.arrayHeight+1)throw new Error("yCellOffsets array should not be smaller than zValues height!");this.yCellOffsetsProperty=t.yCellOffsets}else this.yCellOffsetsGeneratorFunction=t.yCellOffsets;this.nativeXOffsetsProperty=new this.webAssemblyContext.SCRTDoubleVector,this.nativeYOffsetsProperty=new this.webAssemblyContext.SCRTDoubleVector,this.getZValues()&&this.notifyDataChanged(u.EDataChangeType.Append)}get xCellSizes(){return this.xCellSizesProperty||(this.xCellSizesProperty=this.calculateCellSizes(this.xCellOffsetsProperty)),this.xCellSizesProperty}get yCellSizes(){return this.yCellSizesProperty||(this.yCellSizesProperty=this.calculateCellSizes(this.yCellOffsetsProperty)),this.yCellSizesProperty}get xCellOffsets(){return this.xCellOffsetsProperty}get yCellOffsets(){return this.yCellOffsetsProperty}get nativeXCellOffsets(){return this.nativeXOffsetsProperty||(this.nativeXOffsetsProperty=new o.SCRTDoubleVector,(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeXOffsetsProperty,this.xCellOffsets)),this.nativeXOffsetsProperty}get nativeYCellOffsets(){return this.nativeYOffsetsProperty||(this.nativeYOffsetsProperty=new o.SCRTDoubleVector,(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeYOffsetsProperty,this.yCellOffsets)),this.nativeYOffsetsProperty}getXValue(e){return this.xCellOffsetsProperty[e]}getYValue(e){return this.yCellOffsetsProperty[e]}notifyDataChanged(e,t){(this.xCellOffsets||this.xCellOffsetsGeneratorFunction)&&(this.yCellOffsets||this.yCellOffsetsGeneratorFunction)&&(e===u.EDataChangeType.Append&&(this.xCellOffsetsGeneratorFunction&&(this.xCellOffsetsProperty=this.mapCellSizes(this.arrayWidth,this.xCellOffsetsGeneratorFunction)),this.yCellOffsetsGeneratorFunction&&(this.yCellOffsetsProperty=this.mapCellSizes(this.arrayHeight,this.yCellOffsetsGeneratorFunction)),this.nativeXOffsetsProperty.clear(),this.nativeYOffsetsProperty.clear(),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeXOffsetsProperty,this.xCellOffsetsProperty),(0,a.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeYOffsetsProperty,this.yCellOffsetsProperty)),this.xRangeProperty=new s.NumberRange(this.getXValue(0),this.getXValue(this.arrayWidth)),this.yRangeProperty=new s.NumberRange(this.getYValue(0),this.getYValue(this.arrayHeight)),super.notifyDataChanged(e,t))}toJSON(e){return Object.assign(Object.assign({},super.toJSON(e)),{xCellOffsets:this.xCellOffsetsProperty,yCellOffsets:this.yCellOffsetsProperty})}getXRange(){return this.xRangeProperty}getYRange(){return this.yRangeProperty}getXIndicesRange(e,t,i,r){return(0,l.getIndicesRange)(this.webAssemblyContext,this.nativeXCellOffsets,e,!0)}getYIndicesRange(e,t,i,r){return(0,l.getIndicesRange)(this.webAssemblyContext,this.nativeYCellOffsets,e,!0)}delete(){super.delete(),this.nativeXOffsetsProperty=(0,r.deleteSafe)(this.nativeXOffsetsProperty),this.nativeYOffsetsProperty=(0,r.deleteSafe)(this.nativeYOffsetsProperty)}mapCellSizes(e,t){const i=[],r=e+1;for(let e=0;e<r;++e)i.push(t(e));return i}calculateCellSizes(e){if(!e||0===e.length)return[];const t=e.length,i=e[t-1]-e[0],r=[];for(let n=0;n<t-1;++n){const t=e[n+1]-e[n];r.push(t/i)}return r}}t.NonUniformHeatmapDataSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseHeatmapDataSeries=void 0;const r=i(14),n=i(0),s=i(18),o=i(1),a=i(3),l=i(17),h=i(55),u=i(22),d=i(51),c=i(10),p=i(115);t.BaseHeatmapDataSeries=class{constructor(e,t){var i,n,o,a;this.dataChanged=new s.EventHandler,this.minXSpacing=0,this.arrayWidth=0,this.arrayHeight=0,this.hasDataChangesProperty=!1,this.hasNaNsProperty=!1,this.lastZMin=-1,this.lastZMax=-1,this.lastFillValuesOutOfRange=void 0,this.metadataGeneratorProperty=void 0,this.changeCountProperty=0,this.webAssemblyContext=e,this.id=null!==(i=null==t?void 0:t.id)&&void 0!==i?i:(0,u.generateGuid)(),this.dataSeriesNameProperty=null!==(n=null==t?void 0:t.dataSeriesName)&&void 0!==n?n:this.dataSeriesNameProperty,this.hasNaNsProperty=null!==(o=null==t?void 0:t.containsNaN)&&void 0!==o?o:this.hasNaNsProperty,this.normalizedVector=new this.webAssemblyContext.SCRTFloatVector,(null==t?void 0:t.metadata)&&("type"in t.metadata?(this.metadataGeneratorProperty=(0,r.createType)(l.EBaseType.MetadataGenerator,t.metadata.type,e,t.metadata.data),t.metadata=null===(a=this.metadataGeneratorProperty)||void 0===a?void 0:a.getMetadata()):Array.isArray(null==t?void 0:t.metadata)||(this.metadataGeneratorProperty=new p.TemplateMetadataGenerator(null==t?void 0:t.metadata),t.metadata=void 0)),this.setZValues(null==t?void 0:t.zValues,null==t?void 0:t.metadata)}get isSorted(){return!0}set isSorted(e){throw new Error("setting isSorted on a heatmap series is not supported")}get isEvenlySpaced(){return!0}set isEvenlySpaced(e){throw new Error("setting isEvenlySpaced on a heatmap series is not supported")}get containsNaN(){return!1}set containsNaN(e){throw new Error("setting containsNaN is not supported on BaseHeatmapDataSeries")}get dataDistributionCalculator(){throw new Error("dataDistributionCalculator is not supported on BaseHeatmapDataSeries")}get hasDataChanges(){return this.hasDataChangesProperty}getZValues(){return this.zValuesProperty}setZValues(e,t){if(!e||!e[0])return this.zValuesProperty=void 0,this.arrayHeight=0,this.arrayWidth=0,void(this.size=0);const i=e[0].length;e.forEach(e=>{if(!e)throw new Error("Each row in zValues must be defined. See how to declare a 2D array in Javascript here https://stackoverflow.com/a/966234/303612");if(e.length!==i)throw new Error("Each row in zValues must be the same length, so that the overall 2D array is square")}),t&&g(e,t);const r=e[0].length,n=e.length;this.arrayWidth=r,this.arrayHeight=n,this.size=r*n,this.zValuesProperty=e,this.setMetadata(t),this.notifyDataChanged(c.EDataChangeType.Append)}getZValue(e,t){return this.zValuesProperty[e][t]}setZValue(e,t,i,r){this.zValuesProperty[e][t]=i,this.setMetadataAt(e,t,r),this.notifyDataChanged(c.EDataChangeType.Update,t,e)}clear(){this.getIsDeleted()||(this.setZValues(void 0),this.setMetadata(void 0),this.notifyDataChanged(c.EDataChangeType.Clear,null,null))}get xMin(){return this.xRange.min}get xMax(){return this.xRange.max}get yMin(){return this.yRange.min}get yMax(){return this.yRange.max}get zMin(){return this.zRange.min}get zMax(){return this.zRange.max}get xRange(){return this.getXRange()}get yRange(){return this.getYRange()}get zRange(){return this.getZRange()}get dataSeriesName(){return this.dataSeriesNameProperty}set dataSeriesName(e){this.dataSeriesNameProperty=e,this.notifyDataChanged(c.EDataChangeType.Property,null,null,"dataSeriesName")}get hasValues(){return this.arrayWidth>0&&this.arrayHeight>0}set hasNaNs(e){this.hasNaNsProperty=e,this.notifyDataChanged(c.EDataChangeType.Property,null,null,"hasNaNs")}get hasNaNs(){return this.hasNaNsProperty}count(){return this.arrayWidth*this.arrayHeight}setMetadataGenerator(e){const t=void 0===this.metadataGeneratorProperty;this.metadataGeneratorProperty=e,t&&this.setMetadata(null)}delete(){this.isDeleted=!0,this.normalizedVector=(0,n.deleteSafe)(this.normalizedVector)}getIsDeleted(){return this.isDeleted}getNativeIndexes(){throw new Error("getNativeIndexes is invalid for heatmap type series. Try getting or setting zValues instead")}getNativeXValues(){throw new Error("getNativeXValues is invalid for heatmap type series. Try getting or setting zValues instead")}getNativeYValues(){throw new Error("getNativeYValues is invalid for heatmap type series. Try getting or setting zValues instead")}getWindowedYRange(e,t,i){return this.yRange}notifyDataChanged(e,t,i,r){this.changeCountProperty++,this.hasDataChangesProperty=!0,this.dataChanged.raiseEvent({changeType:e,index:t,yIndex:i,name:r})}getNormalizedVector(e,t){o.Guard.notNull(e,"colorMap"),o.Guard.argumentIsRealNumber(e.minimum,"colorMap.minimum"),o.Guard.argumentIsRealNumber(e.maximum,"colorMap.maximum");const i=this.arrayWidth*this.arrayHeight;return(this.hasDataChangesProperty||i!==this.normalizedVector.size()||e.minimum!==this.lastZMin||e.maximum!==this.lastZMax||t!==this.lastFillValuesOutOfRange)&&(this.recreateNormalizedVector(e.minimum,e.maximum,t),this.lastZMin=e.minimum,this.lastZMax=e.maximum,this.lastFillValuesOutOfRange=t,this.hasDataChangesProperty=!1),this.normalizedVector}recreateNormalizedVector(e,t,i){const r=this.arrayWidth*this.arrayHeight;this.normalizedVector.clear(),this.normalizedVector.resizeFast(r);const n=this.hasNaNs?e-(t-e)/128:e;if(!(0,d.isRealNumber)(n))throw Error("Can not create newZMin for try to use different zMin and zMax values");let s=0;const o=1/(t-n),a=new Float32Array(this.arrayWidth);for(let r=0;r<this.arrayHeight;r++){for(let s=0;s<this.arrayWidth;s++){const l=this.zValuesProperty[r][s];let h=l-n;l!=l?h=0:h<e-n?h=i?e-n:0:h>t-n&&(h=i?t-n:0);const u=h*o;a[s]=u}(0,h.memCopyFloat32)(this.webAssemblyContext,a,this.normalizedVector,s),s+=this.arrayWidth}}getMetadataAt(e,t){if(this.validateIndexes(e,t),this.metadataProperty)return this.metadataProperty[e][t]}getMetadataHeight(){return this.metadataProperty?this.metadataProperty.length:this.arrayHeight}getMetadataWidth(){return this.metadataProperty?this.metadataProperty[0].length:this.arrayWidth}toJSON(e=!1){return{id:this.id,containsNaN:this.hasNaNs,dataSeriesName:this.dataSeriesName,zValues:e?void 0:this.zValuesProperty,metadata:this.metadataGeneratorProperty?this.metadataGeneratorProperty.toJSON():this.metadataProperty}}getIndicesRange(e,t,i,r){throw Error("getIndicesRange() method is not supported for BaseHeatmapDataSeries")}get changeCount(){return this.changeCountProperty}getZRange(){const e=this.getZValues();if(e){let t=Number.MAX_VALUE,i=Number.MIN_VALUE;for(let r=0;r<this.arrayHeight;++r)for(let n=0;n<this.arrayWidth;n++){const s=e[r][n];s<t&&(t=s),s>i&&(i=s)}return new a.NumberRange(t,i)}}validateIndexes(e,t){if(Math.round(e)!==e)throw Error("yIndex must be an integer");if(Math.round(t)!==t)throw Error("xIndex must be an integer");if(e<0||e>=this.arrayHeight)throw new Error("yIndex is out of range");if(t<0||t>=this.arrayWidth)throw new Error("xIndex is out of range")}setMetadata(e){if(!e&&this.metadataGeneratorProperty)for(let t=0;t<this.arrayHeight;t++)for(let i=0;i<this.arrayWidth;i++)e[t][i]=this.metadataGeneratorProperty.getSingleMetadata();this.metadataProperty=e}setMetadataAt(e,t,i){i&&(this.validateIndexes(e,t),this.fillMetadataIfUndefined(),this.metadataProperty[e][t]=i)}fillMetadataIfUndefined(){if(void 0===this.metadataProperty){const e=Array(this.arrayHeight).fill(void 0);for(let t=0;t<this.arrayHeight;t++)e[t]=Array(this.arrayWidth).fill(void 0)}}};const g=(e,t)=>{o.Guard.arraysSameLengthArr([{arg:e,name:"zValues"},{arg:t,name:"metadata"}]);for(let i=0;i<e.length;i++)o.Guard.arraysSameLengthArr([{arg:e[i],name:`zValues[${i}]`},{arg:t[i],name:`metadata[${i}]`}])}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyTextDataSeries=void 0;const r=i(1),n=i(67),s=i(55),o=i(60),a=i(10);class l extends o.BaseDataSeries{constructor(e,t){super(e,t),this.type=a.EDataSeriesType.XyText,this.textValuesProperty=[],(null==t?void 0:t.xValues)&&(r.Guard.notNull(t.yValues,"options.yValues"),this.appendRange(t.xValues,t.yValues,t.textValues,t.metadata))}get textValues(){return this.textValuesProperty}append(e,t,i,r){if(!this.getIsDeleted()){const n=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,n,[e],[t]),this.appendMetadata(r),n.push_back(e),this.getNativeYValues().push_back(t),this.textValuesProperty.push(i),this.notifyDataChanged(a.EDataChangeType.Append,null,1)}}appendRange(e,t,i,o){if(!this.getIsDeleted()){r.Guard.isTrue((0,n.isNumberArray)(e)||(0,n.isTypedArray)(e),"xValues must be an array of numbers"),r.Guard.isTrue((0,n.isNumberArray)(t)||(0,n.isTypedArray)(t),"yValues must be an array of numbers"),r.Guard.arraysSameLength(e,"xValues",t,"yValues"),o&&(r.Guard.isTrue(Array.isArray(o),"metadata must be an array of IPointMetadata"),r.Guard.arraysSameLength(e,"xValues",o,"metadata"));const l=this.getNativeXValues(),h=this.getNativeYValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,l,e,t),this.appendMetadataRange(o,e.length),(0,s.appendDoubleVectorFromJsArray)(this.webAssemblyContext,l,e),(0,s.appendDoubleVectorFromJsArray)(this.webAssemblyContext,h,t),this.textValuesProperty.push(...i),this.notifyDataChanged(a.EDataChangeType.Append,null,e.length)}}update(e,t,i,r){this.getIsDeleted()||(this.validateIndex(e),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[t],e),this.getNativeYValues().set(e,t),this.textValuesProperty[e]=i,this.setMetadataAt(e,r),this.notifyDataChanged(a.EDataChangeType.Update,e,1))}updateXyText(e,t,i,r,n){if(!this.getIsDeleted()){this.validateIndex(e);const s=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,s,[t],[i],e),s.set(e,t),this.getNativeYValues().set(e,i),this.textValuesProperty[e]=r,this.setMetadataAt(e,n),this.notifyDataChanged(a.EDataChangeType.Update,e,1)}}insert(e,t,i,r,n){if(!this.getIsDeleted()){this.validateIndex(e,"Start index is out of range");const s=this.getNativeXValues(),o=this.getNativeYValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,s,[t],[i],e),s.insertAt(e,t),o.insertAt(e,i),this.textValuesProperty.unshift(r),this.insertMetadata(e,n),this.notifyDataChanged(a.EDataChangeType.Insert,e,1)}}insertRange(e,t,i,o,l){if(!this.getIsDeleted()){r.Guard.isTrue((0,n.isNumberArray)(t)||(0,n.isTypedArray)(t),"xValues must be an array of numbers"),r.Guard.isTrue((0,n.isNumberArray)(i)||(0,n.isTypedArray)(i),"yValues must be an array of numbers"),this.validateIndex(e,"Start index is out of range"),r.Guard.arraysSameLength(t,"xValues",i,"yValues"),l&&(r.Guard.isTrue(Array.isArray(l),"metadata must be an array of IPointMetadata"),r.Guard.arraysSameLength(t,"xValues",l,"metadata"));const h=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,h,t,i,e),(0,s.insertDoubleVectorFromJsArray)(this.webAssemblyContext,t,this.getNativeXValues(),e),(0,s.insertDoubleVectorFromJsArray)(this.webAssemblyContext,i,this.getNativeYValues(),e),this.textValuesProperty.unshift(...o),this.insertMetadataRange(e,l),this.notifyDataChanged(a.EDataChangeType.Insert,e,t.length)}}removeAt(e){this.getIsDeleted()||(this.validateIndex(e),this.getNativeXValues().removeAt(e),this.getNativeYValues().removeAt(e),this.textValuesProperty.splice(e,1),this.removeMetadataAt(e),this.notifyDataChanged(a.EDataChangeType.Remove,e,1))}removeRange(e,t){this.getIsDeleted()||(this.validateIndex(e,"Start index is out of range"),this.getNativeXValues().removeRange(e,t),this.getNativeYValues().removeRange(e,t),this.textValuesProperty.splice(e,t),this.removeMetadataRange(e,t),this.notifyDataChanged(a.EDataChangeType.Remove,e,t))}clear(){this.getIsDeleted()||(super.clear(),this.getNativeXValues().clear(),this.getNativeYValues().clear(),this.textValuesProperty=[],this.setMetadata(void 0),this.notifyDataChanged(a.EDataChangeType.Clear,null,null))}toJSON(e=!1){const t=super.toJSON();if(!e){const e=[],i=[];for(let t=0;t<this.count();t++)e.push(this.xValues.get(t)),i.push(this.yValues.get(t));const r={xValues:e,yValues:i,textValues:this.textValuesProperty};Object.assign(t,r)}return t}}t.XyTextDataSeries=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorTooltipSvgAnnotation=void 0;const r=i(119),n=i(34),s=i(46),o=i(23),a=i(87);class l extends a.SvgAnnotationBase{constructor(e){var t,i,r,n,s,a,l,h,u;if(super(e),this.type=o.EAnnotationType.SVG,this.seriesInfosProperty=[],this.isHidden=!0,this.titleProperty=null!==(t=null==e?void 0:e.title)&&void 0!==t?t:this.titleProperty,this.tooltipSvgTemplateProperty=null!==(i=null==e?void 0:e.tooltipSvgTemplate)&&void 0!==i?i:this.tooltipSvgTemplateProperty,this.tooltipLegendTemplateProperty=null!==(r=null==e?void 0:e.tooltipLegendTemplate)&&void 0!==r?r:this.tooltipLegendTemplateProperty,this.seriesInfosProperty=null!==(n=null==e?void 0:e.seriesInfos)&&void 0!==n?n:this.seriesInfosProperty,this.containerBackgroundProperty=null!==(s=null==e?void 0:e.containerBackground)&&void 0!==s?s:this.containerBackgroundProperty,this.textStrokeProperty=null!==(a=null==e?void 0:e.textStroke)&&void 0!==a?a:this.textStrokeProperty,this.tooltipLegendOffsetXProperty=null!==(l=null==e?void 0:e.tooltipLegendOffsetX)&&void 0!==l?l:this.tooltipLegendOffsetXProperty,this.tooltipLegendOffsetYProperty=null!==(h=null==e?void 0:e.tooltipLegendOffsetY)&&void 0!==h?h:this.tooltipLegendOffsetYProperty,this.cursorModifier=e.cursorModifier,this.placementDivId=null!==(u=null==e?void 0:e.placementDivId)&&void 0!==u?u:this.placementDivId,this.placementDivId){const e=document.getElementById(this.placementDivId);this.svgDivRoot=e}}get seriesInfos(){return this.seriesInfosProperty}set seriesInfos(e){this.seriesInfosProperty&&e&&(this.seriesInfosProperty=e,(e.length!==this.seriesInfosProperty.length||this.seriesInfosProperty.map(t=>t.equals(e.find(e=>e.renderableSeries.id===t.renderableSeries.id))).some(e=>!1===e))&&this.notifyPropertyChanged(s.PROPERTY.SERIES_INFOS))}get title(){return this.titleProperty}set title(e){this.titleProperty!==e&&(this.titleProperty=e,this.notifyPropertyChanged(s.PROPERTY.TITLE))}get tooltipSvgTemplate(){return this.tooltipSvgTemplateProperty}set tooltipSvgTemplate(e){this.tooltipSvgTemplateProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_SVG_TEMPLATE)}get tooltipLegendTemplate(){return this.tooltipLegendTemplateProperty}set tooltipLegendTemplate(e){this.tooltipLegendTemplateProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_LEGEND_TEMPLATE)}get containerBackground(){return this.containerBackgroundProperty}set containerBackground(e){this.containerBackgroundProperty!==e&&(this.containerBackgroundProperty=e,this.notifyPropertyChanged(s.PROPERTY.CONTAINER_BACKGROUND))}get tooltipLegendOffsetX(){return this.tooltipLegendOffsetXProperty}set tooltipLegendOffsetX(e){this.tooltipLegendOffsetXProperty!==e&&(this.tooltipLegendOffsetXProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_LEGEND_OFFSET_X))}get tooltipLegendOffsetY(){return this.tooltipLegendOffsetYProperty}set tooltipLegendOffsetY(e){this.tooltipLegendOffsetYProperty!==e&&(this.tooltipLegendOffsetYProperty=e,this.notifyPropertyChanged(s.PROPERTY.TOOLTIP_LEGEND_OFFSET_Y))}get textStroke(){return this.textStrokeProperty}set textStroke(e){this.textStrokeProperty!==e&&(this.textStrokeProperty=e,this.notifyPropertyChanged(s.PROPERTY.TEXT_STROKE))}update(e,t,i,n){const s=this.cursorModifier.getMousePosition();this.previousMousePosition===s&&s!==r.EMousePosition.SeriesArea||(this.previousMousePosition=this.cursorModifier.getMousePosition(),this.svg&&this.delete(),this.create(e,t,i,n),this.placementDivId?this.updateExternalLegendTooltip():(this.updateTooltip(i,n),this.updateLegendTooltip()))}delete(){this.parentSurface&&!this.parentSurface.isDeleted&&this.svg&&(this.placementDivId?this.svgDivRoot.removeChild(this.svg):this.svgRoot.removeChild(this.svg),this.setSvg(void 0))}create(e,t,i,r){if(!this.tooltipSvgTemplate)throw Error("Please provide a tooltipSvgTemplate for CursorTooltipSvgAnnotation");const s=this.tooltipSvgTemplate(this.seriesInfos,this);if(this.placementDivId){const e=n.annotationHelpers.createSvg(s,this.svgDivRoot);this.setSvg(e)}else{const e=n.annotationHelpers.createSvg(s,this.svgRoot);this.setSvg(e)}}updateTooltip(e,t){var i,r,n,s;const o=null!==(i=this.xCoordShift)&&void 0!==i?i:0,a=null!==(r=this.yCoordShift)&&void 0!==r?r:0;this.svg.style.display=this.isHidden?"none":"block";const l=o+(null!==(n=this.x1)&&void 0!==n?n:0)+e,h=a+(null!==(s=this.y1)&&void 0!==s?s:0)+t;isNaN(l)||isNaN(h)?this.svg.style.display="none":(this.setSvgAttribute("x",l),this.setSvgAttribute("y",h))}updateLegendTooltip(){if(this.tooltipLegendTemplate){const e=this.seriesInfos?this.tooltipLegendTemplate(this.seriesInfos,this):"<svg></svg>";this.svgLegend&&this.svgRoot.removeChild(this.svgLegend);const t=n.annotationHelpers.createSvg(e,this.svgRoot);this.svgLegend=t,this.svgLegend.setAttribute("x",this.tooltipLegendOffsetX.toString()),this.svgLegend.setAttribute("y",this.tooltipLegendOffsetY.toString())}}updateExternalLegendTooltip(){if(this.tooltipLegendTemplate){const e=this.seriesInfos?this.tooltipLegendTemplate(this.seriesInfos,this):"<svg style='display: none'></svg>";this.svgLegend&&this.svgLegend.removeChild(this.svgLegend);const t=n.annotationHelpers.createSvg(e,this.svgRoot);this.svgLegend=t}}}t.CursorTooltipSvgAnnotation=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataPointInfo=void 0;t.DataPointInfo=class{constructor(e,t,i){this.renderableSeriesProperty=e,this.indexProperty=i,this.metadataProperty=t}get metadata(){return this.metadataProperty}set metadata(e){this.metadataProperty=e}get index(){return this.indexProperty}get xValue(){return this.dataSeries.getNativeXValues().get(this.index)}get yValue(){return this.dataSeries.getNativeYValues().get(this.index)}get renderableSeries(){return this.renderableSeriesProperty}get dataSeries(){return this.renderableSeries.dataSeries}get seriesName(){return this.dataSeries.dataSeriesName}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataPointSelectionChangedArgs=void 0;t.DataPointSelectionChangedArgs=class{constructor(e,t){this.source=e,this.selectedDataPoints=t}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegendModifier=void 0;const r=i(18),n=i(19),s=i(342),o=i(20);class a extends o.ChartModifierBase2D{constructor(e){var t,i,o,a,l,h,u;super(e),this.type=n.EChart2DModifierType.Legend,this.isCheckedChanged=new r.EventHandler,this.includedSeriesMap=new Map,this.legendItemCheckedChanged=this.legendItemCheckedChanged.bind(this),this.sciChartLegend=new s.SciChartLegend,this.sciChartLegend.orientation=null!==(t=null==e?void 0:e.orientation)&&void 0!==t?t:this.sciChartLegend.orientation,this.sciChartLegend.showLegend=null!==(i=null==e?void 0:e.showLegend)&&void 0!==i?i:this.sciChartLegend.showLegend,this.sciChartLegend.showCheckboxes=null!==(o=null==e?void 0:e.showCheckboxes)&&void 0!==o?o:this.sciChartLegend.showCheckboxes,this.sciChartLegend.showSeriesMarkers=null!==(a=null==e?void 0:e.showSeriesMarkers)&&void 0!==a?a:this.sciChartLegend.showSeriesMarkers,this.sciChartLegend.placement=null!==(l=null==e?void 0:e.placement)&&void 0!==l?l:this.sciChartLegend.placement,this.sciChartLegend.margin=null!==(h=null==e?void 0:e.margin)&&void 0!==h?h:this.sciChartLegend.margin,this.sciChartLegend.placementDivId=null!==(u=null==e?void 0:e.placementDivId)&&void 0!==u?u:this.sciChartLegend.placementDivId,this.sciChartLegend.legendItemCheckedChangedCallback=this.legendItemCheckedChanged,(null==e?void 0:e.isCheckedChangedCallback)&&this.isCheckedChanged.subscribe(t=>e.isCheckedChangedCallback(t.series,t.isChecked))}applyTheme(e){super.applyTheme(e),this.sciChartLegend.applyTheme()}onAttachSeries(e){super.onAttachSeries(e),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries()),this.sciChartLegend.setInvalidateParentSurface(this.parentSurface.invalidateElement)}onDetachSeries(e){super.onDetachSeries(e),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries())}onParentSurfaceRendered(){super.onParentSurfaceRendered(),this.sciChartLegend.setSeriesViewRect(this.parentSurface.seriesViewRect),this.sciChartLegend.update()}onAttach(){super.onAttach(),this.sciChartLegend.setParentSurface(this.parentSurface),this.sciChartLegend.setRootDiv(this.parentSurface.domDivContainer),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries()),this.sciChartLegend.setInvalidateParentSurface(this.parentSurface.invalidateElement)}onDetach(){super.onDetach(),this.sciChartLegend.delete(),this.sciChartLegend.setRootDiv(void 0),this.sciChartLegend.setRenderableSeriesArray([]),this.sciChartLegend.setInvalidateParentSurface(void 0),this.sciChartLegend.setParentSurface(void 0)}includeSeries(e,t){var i;(void 0===this.includedSeriesMap.get(e)&&!t||!0===this.includedSeriesMap.get(e)&&!t||!1===this.includedSeriesMap.get(e)&&t)&&(this.includedSeriesMap.set(e,t),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries()),null===(i=this.parentSurface)||void 0===i||i.invalidateElement())}getIncludedRenderableSeries(){const e=this.parentSurface.renderableSeries.asArray().filter(e=>!e.isStacked&&this.testIsIncludedSeries(e)),t=this.parentSurface.renderableSeries.asArray().filter(e=>e.isStacked),i=e;return t.forEach(e=>{e.getVisibleSeries().forEach(e=>{this.testIsIncludedSeries(e)&&i.push(e)})}),i}toJSON(){const e=super.toJSON(),t={margin:this.sciChartLegend.margin,orientation:this.sciChartLegend.orientation,placement:this.sciChartLegend.placement,showCheckboxes:this.sciChartLegend.showCheckboxes,showLegend:this.sciChartLegend.showLegend,showSeriesMarkers:this.sciChartLegend.showSeriesMarkers};return Object.assign(e.options,t),e}delete(){super.delete(),this.sciChartLegend.delete()}legendItemCheckedChanged(e,t){var i;null===(i=this.isCheckedChanged)||void 0===i||i.raiseEvent({series:e,isChecked:t})}testIsIncludedSeries(e){return!1!==this.includedSeriesMap.get(e)}}t.LegendModifier=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartLegend=void 0;const r=i(52),n=i(84);class s extends n.SciChartLegendBase{constructor(){super(...arguments),this.type=n.ELegendType.SciChartLegend,this.showCheckboxesProperty=!1,this.showSeriesMarkersProperty=!0}applyTheme(){}get showCheckboxes(){return this.showCheckboxesProperty}set showCheckboxes(e){this.showCheckboxesProperty=e,this.notifyPropertyChanged()}get showSeriesMarkers(){return this.showSeriesMarkersProperty}set showSeriesMarkers(e){this.showSeriesMarkersProperty=e,this.notifyPropertyChanged()}setRenderableSeriesArray(e){this.renderableSeriesArray=e,this.invalidateLegend()}addEventListeners(){this.renderableSeriesArray.forEach(e=>this.addEventListenerToSeries(e))}removeEventListeners(){this.renderableSeriesArray.forEach(e=>this.removeEventListenerFromSeries(e.id))}addEventListenerToSeries(e){const t=this.parentDiv.querySelector(`[id='${e.id}']`);if(t){const i=t=>{e.isVisible=t.target.checked,this.legendItemCheckedChangedCallback&&this.legendItemCheckedChangedCallback(e,e.isVisible)};t.addEventListener("change",i);const r={element:t,eventType:"change",eventListener:i,delete:()=>t.removeEventListener("change",i)},n=this.eventListenersCollection.get(e.id);n?n.push(r):this.eventListenersCollection.set(e.id,[r])}}getInnerHTML(){const e=this.parentSurfaceProperty.themeProvider.legendBackgroundBrush,t=this.parentSurfaceProperty.themeProvider.labelForegroundBrush,i=this.renderableSeriesArray.map((e,t)=>{var i;return{id:e.id,name:null!==(i=e.getDataSeriesName())&&void 0!==i?i:"Series "+(t+1),color:e.isStacked?e.fill:e.stroke,checked:e.isVisible,gradient:void 0}}),{left:n,top:s,right:o,bottom:a}=this.parentSurfaceProperty.getSeriesViewRectPadding(!1),l=this.isExternal()?new r.Thickness(this.margin,this.margin,this.margin,this.margin):new r.Thickness(s+this.margin,o+this.margin,a+this.margin,n+this.margin);return this.getLegendHTML(this.placement,t,e,l,this.orientation,this.showCheckboxes,this.showSeriesMarkers,i)}}t.SciChartLegend=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewCustomResizableAnnotation=void 0;const r=i(5),n=i(29),s=i(11),o=i(9),a=i(6),l=i(28),h=i(34),u=i(46),d=i(174);class c extends d.CustomAnnotation{constructor(e){var t,i,r;super(e),this.minWidthProperty=10,this.minHeightProperty=10,this.adornerSvgStringTemplateProperty=null!==(t=null==e?void 0:e.adornerSvgStringTemplate)&&void 0!==t?t:this.adornerSvgStringTemplateProperty,this.minWidthProperty=null!==(i=null==e?void 0:e.minWidth)&&void 0!==i?i:this.minWidthProperty,this.minHeightProperty=null!==(r=null==e?void 0:e.minHeight)&&void 0!==r?r:this.minHeightProperty}set minWidth(e){this.minWidthProperty=e,this.notifyPropertyChanged(u.PROPERTY.MINIMUM_WIDTH)}get minWidth(){return this.minWidthProperty}set minHeight(e){this.minHeightProperty=e,this.notifyPropertyChanged(u.PROPERTY.MINIMUM_HEIGHT)}get minHeight(){return this.minHeightProperty}set adornerSvgStringTemplate(e){this.adornerSvgStringTemplateProperty=e,this.notifyPropertyChanged(u.PROPERTY.ADORNER_TEMPLATE)}get adornerSvgStringTemplate(){return this.adornerSvgStringTemplateProperty}setCoordinates(e){if(!this.parentSurface)return;const{x1:t=this.x1,x2:i=this.x2,y1:n=this.y1,y2:s=this.y2}=e,o=this.getAbsoluteCoordinates(new r.Point(t,n)),a=this.getAbsoluteCoordinates(new r.Point(i,s)),l=this.parentSurface.getXAxisById(this.xAxisId),h=l.getCurrentCoordinateCalculator(),u=this.parentSurface.getYAxisById(this.yAxisId),d=u.getCurrentCoordinateCalculator(),c=l.isHorizontalAxis?h:d,p=u.isHorizontalAxis?h:d,g=c.hasFlippedCoordinates?t:i,f=c.hasFlippedCoordinates?i:t,y=p.hasFlippedCoordinates?t:i,v=p.hasFlippedCoordinates?i:t,m=this.isVerticalChart?new r.Point(y,g):new r.Point(g,y),S=this.isVerticalChart?new r.Point(v,f):new r.Point(f,v);l.isHorizontalAxis?t-this.x1>=this.x2-i?(this.x2=null!=i?i:this.x2,h.hasFlippedCoordinates?this.adjustLeftSideToLimits(a.x,m,h):this.adjustRightSideToLimits(a.x,S,h)):(this.x1=null!=t?t:this.x1,h.hasFlippedCoordinates?this.adjustRightSideToLimits(o.x,S,h):this.adjustLeftSideToLimits(o.x,m,h)):t-this.x1>=this.x2-i?(this.x2=null!=i?i:this.x2,h.hasFlippedCoordinates?this.adjustTopSideToLimits(a.y,m,h):this.adjustBottomSideToLimits(a.y,S,h)):(this.x1=null!=t?t:this.x1,h.hasFlippedCoordinates?this.adjustBottomSideToLimits(o.y,S,h):this.adjustTopSideToLimits(o.y,m,h))}onDragStarted(e){var t;null===(t=this.dragStarted)||void 0===t||t.raiseEvent();const{x1:i,x2:a,y1:h,y2:d}=this.getAnnotationBorders(!0),c=(0,o.translateFromCanvasToSeriesViewRect)(new r.Point(e.mousePoint.x,e.mousePoint.y),this.parentSurface.seriesViewRect,!0);if(!c)return!1;const p=(0,o.translateToNotScaled)(c.x),g=(0,o.translateToNotScaled)(c.y),f=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.XDirection:this.resizeDirections!==n.EXyDirection.YDirection,y=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.YDirection:this.resizeDirections!==n.EXyDirection.XDirection;if(f){if((0,s.testIsInBounds)(p,g,i-u.ADORNER_GRIP_RADIUS,d,i+u.ADORNER_GRIP_RADIUS,h))return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y1,!0;if((0,s.testIsInBounds)(p,g,a-u.ADORNER_GRIP_RADIUS,d,a+u.ADORNER_GRIP_RADIUS,h))return this.adornerDraggingPoint=l.EDraggingGripPoint.x2y2,!0}if(y){if((0,s.testIsInBounds)(p,g,i,h+u.ADORNER_GRIP_RADIUS,a,h-u.ADORNER_GRIP_RADIUS))return this.adornerDraggingPoint=l.EDraggingGripPoint.x2y1,!0;if((0,s.testIsInBounds)(p,g,i,d+u.ADORNER_GRIP_RADIUS,a,d-u.ADORNER_GRIP_RADIUS))return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y2,!0}return!!this.clickToSelect(e)&&(this.adornerDraggingPoint=l.EDraggingGripPoint.Body,!0)}update(e,t,i,r){this.create(e,t,i,r),this.svg.style.display=this.isHidden?"none":"block",this.svg.style.opacity=this.opacity.toString();const n=this.getX1Coordinate(e,t),s=this.getY1Coordinate(e,t),o=this.getX2Coordinate(e,t),a=this.getY2Coordinate(e,t);if(this.setAnnotationBorders(n,o,s,a),isNaN(n)||isNaN(s)||!isFinite(n)||!isFinite(s)||isNaN(o)||isNaN(a)||!isFinite(o)||!isFinite(a))this.svg.style.display="none";else{const e=Math.abs(o-n),t=Math.abs(a-s),l=(n<o?n:o)+i,h=(s<a?s:a)+r;this.setSvgAttribute("x",l),this.setSvgAttribute("y",h),this.setSvgAttribute("width",e),this.setSvgAttribute("height",t),this.svgDOMRect=this.svg.getBoundingClientRect()}this.updateAdornerInner()}calcDragDistance(e){const t=this.parentSurface.getXAxisById(this.xAxisId),i=t.getCurrentCoordinateCalculator(),r=this.parentSurface.getYAxisById(this.yAxisId),s=r.getCurrentCoordinateCalculator(),o=t.isHorizontalAxis?i:s,a=r.isHorizontalAxis?i:s,h=this.getX1Coordinate(i,s),u=this.getY1Coordinate(i,s),d=this.getX2Coordinate(i,s),c=this.getY2Coordinate(i,s),p=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.XDirection:this.resizeDirections!==n.EXyDirection.YDirection,g=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.YDirection:this.resizeDirections!==n.EXyDirection.XDirection;switch(this.adornerDraggingPoint){case l.EDraggingGripPoint.Body:{if(!this.prevValue)return void(this.prevValue=e);const i=this.x1-(this.prevValue.x-e.x),s=this.x2-(this.prevValue.x-e.x),o=this.y1-(this.prevValue.y-e.y),a=this.y2-(this.prevValue.y-e.y);if(this.resizeDirections!==n.EXyDirection.YDirection)if(i<t.visibleRange.min){const e=this.x1-t.visibleRange.min;this.x1=t.visibleRange.min,this.x2=this.x2-e}else if(s>t.visibleRange.max){const e=t.visibleRange.max-this.x2;this.x1=this.x1+e,this.x2=t.visibleRange.max}else this.x1=i,this.x2=s;if(this.resizeDirections!==n.EXyDirection.XDirection)if(a>r.visibleRange.max){const e=this.y2-r.visibleRange.max;this.y2=r.visibleRange.max,this.y1=this.y1+e}else if(o<r.visibleRange.min){const e=this.y1-r.visibleRange.min;this.y2=this.y2-e,this.y1=r.visibleRange.min}else this.y1=o,this.y2=a;this.prevValue=e;break}case l.EDraggingGripPoint.x1y1:p&&(o.hasFlippedCoordinates?this.adjustLeftSideToLimits(d,e,o):this.adjustLeftSideToLimits(h,e,o));break;case l.EDraggingGripPoint.x2y2:p&&(o.hasFlippedCoordinates?this.adjustRightSideToLimits(h,e,o):this.adjustRightSideToLimits(d,e,o));break;case l.EDraggingGripPoint.x2y1:g&&(a.hasFlippedCoordinates?this.adjustTopSideToLimits(c,e,a):this.adjustTopSideToLimits(u,e,a));break;case l.EDraggingGripPoint.x1y2:g&&(a.hasFlippedCoordinates?this.adjustBottomSideToLimits(u,e,a):this.adjustBottomSideToLimits(c,e,a));break;default:throw new Error("Unexpected adornerDraggingPoint value "+this.adornerDraggingPoint)}}create(e,t,i,r){if(this.svg)return;this.setSvg(h.annotationHelpers.createSvg(this.svgString,this.svgRoot));const n=this.svg.getBBox(),s=this.getX1Coordinate(e,t),o=this.getY1Coordinate(e,t);this.isVerticalChart?(void 0===this.x2&&(this.x2=this.getValue(s+n.width,e,l.ECoordinateMode.Pixel)),void 0===this.y2&&(this.y2=this.getValue(o+n.height,t,l.ECoordinateMode.Pixel))):(void 0===this.x2&&(this.x2=this.getValue(o+n.height,e,l.ECoordinateMode.Pixel)),void 0===this.y2&&(this.y2=this.getValue(s+n.width,t,l.ECoordinateMode.Pixel)));const a=this.getX2Coordinate(e,t),u=this.getY2Coordinate(e,t),d=Math.abs(a-s),c=Math.abs(u-o);if(this.isVerticalChart){if(d<this.minWidth){const i=this.isVerticalChart?t:e;this.y2=this.getValue(s+this.minWidth,i,l.ECoordinateMode.Pixel)}if(c<this.minHeight){const i=this.isVerticalChart?e:t;this.x2=this.getValue(o+this.minHeight,i,l.ECoordinateMode.Pixel)}}else{if(d<this.minWidth){const i=this.isVerticalChart?t:e;this.x2=this.getValue(s+this.minWidth,i,l.ECoordinateMode.Pixel)}if(c<this.minHeight){const i=this.isVerticalChart?e:t;this.y2=this.getValue(o+this.minHeight,i,l.ECoordinateMode.Pixel)}}}updateAdornerInner(){if(this.deleteAdorner(),this.adornerSvgStringTemplate){const{x1:e,x2:t,y1:i,y2:r}=this.getAdornerAnnotationBorders(!0),n=this.parentSurface.domSvgAdornerLayer,s=this.adornerSvgStringTemplate(e,i,t,r);this.svgAdorner=h.annotationHelpers.createSvg(s,n)}}checkIsClickedOnAnnotationInternal(e,t){const{x1:i,x2:r,y1:a,y2:l}=this.getAnnotationBorders(!0),h=(0,o.translateToNotScaled)(e),d=(0,o.translateToNotScaled)(t);if((0,s.testIsInBounds)(h,d,i,l,r,a))return!0;const c=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.XDirection:this.resizeDirections!==n.EXyDirection.YDirection,p=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.YDirection:this.resizeDirections!==n.EXyDirection.XDirection;if(c){if((0,s.testIsInBounds)(h,d,i-u.ADORNER_GRIP_RADIUS,l,i+u.ADORNER_GRIP_RADIUS,a))return!0;if((0,s.testIsInBounds)(h,d,r-u.ADORNER_GRIP_RADIUS,l,r+u.ADORNER_GRIP_RADIUS,a))return!0}if(p){if((0,s.testIsInBounds)(h,d,i,a+u.ADORNER_GRIP_RADIUS,r,a-u.ADORNER_GRIP_RADIUS))return!0;if((0,s.testIsInBounds)(h,d,i,l+u.ADORNER_GRIP_RADIUS,r,l-u.ADORNER_GRIP_RADIUS))return!0}return!1}adjustLeftSideToLimits(e,t,i){const r=this.getAbsoluteHorizontalCoordinate(this.isVerticalChart?t.y:t.x),n=p(r,i),s=e-n>=this.minWidth?n:e-this.minWidth,o=this.convertFromCoordinate(s*a.DpiHelper.PIXEL_RATIO,i,this.isVerticalChart?this.yCoordinateMode:this.xCoordinateMode);this.isVerticalChart?i.hasFlippedCoordinates?this.y1=o:this.y2=o:i.hasFlippedCoordinates?this.x1=o:this.x2=o}adjustRightSideToLimits(e,t,i){const r=this.getAbsoluteHorizontalCoordinate(this.isVerticalChart?t.y:t.x),n=p(r,i),s=n-e>=this.minWidth?n:e+this.minWidth,o=this.convertFromCoordinate(s*a.DpiHelper.PIXEL_RATIO,i,this.isVerticalChart?this.yCoordinateMode:this.xCoordinateMode);this.isVerticalChart?i.hasFlippedCoordinates?this.y2=o:this.y1=o:i.hasFlippedCoordinates?this.x2=o:this.x1=o}adjustTopSideToLimits(e,t,i){const r=this.getAbsoluteVerticalCoordinate(this.isVerticalChart?t.x:t.y),n=p(r,i),s=e-n>=this.minHeight?n:e-this.minHeight,o=this.convertFromCoordinate(s*a.DpiHelper.PIXEL_RATIO,i,this.isVerticalChart?this.xCoordinateMode:this.yCoordinateMode);this.isVerticalChart?i.hasFlippedCoordinates?this.x1=o:this.x2=o:i.hasFlippedCoordinates?this.y1=o:this.y2=o}adjustBottomSideToLimits(e,t,i){const r=this.getAbsoluteVerticalCoordinate(this.isVerticalChart?t.x:t.y),n=p(r,i),s=n-e>=this.minHeight?n:e+this.minHeight,o=this.convertFromCoordinate(s*a.DpiHelper.PIXEL_RATIO,i,this.isVerticalChart?this.xCoordinateMode:this.yCoordinateMode);this.isVerticalChart?i.hasFlippedCoordinates?this.x2=o:this.x1=o:i.hasFlippedCoordinates?this.y2=o:this.y1=o}}t.OverviewCustomResizableAnnotation=c;const p=(e,t)=>e<=0?0:e>=t.viewportDimension/a.DpiHelper.PIXEL_RATIO?t.viewportDimension/a.DpiHelper.PIXEL_RATIO:e},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PinchZoomModifier=void 0;const r=i(5),n=i(19),s=i(29),o=i(81),a=i(9),l=i(20);class h extends l.ChartModifierBase2D{constructor(e){var t,i;super(e),this.type=n.EChart2DModifierType.PinchZoom,this.horizontalGrowFactor=.005,this.verticalGrowFactor=.005,this.activeTouchEvents=new Map,this.getMiddlePoint=(e,t)=>new r.Point((e.x+t.x)/2,(e.y+t.y)/2),this.horizontalGrowFactor=null!==(t=null==e?void 0:e.horizontalGrowFactor)&&void 0!==t?t:this.horizontalGrowFactor,this.verticalGrowFactor=null!==(i=null==e?void 0:e.verticalGrowFactor)&&void 0!==i?i:this.verticalGrowFactor}modifierMouseDown(e){if(super.modifierMouseDown(e),!this.isAttached)throw new Error("Should not call PinchZoomModifier.modifierMouseDown if not attached");this.activeTouchEvents.set(e.pointerId,e),e.handled=!0}modifierMouseMove(e){if(super.modifierMouseMove(e),this.activeTouchEvents.set(e.pointerId,e),this.activeTouchEvents.size>=2){const[{mousePoint:e},{mousePoint:t}]=Array.from(this.activeTouchEvents.values()),i=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);this.parentSurface.setZoomState(o.EZoomState.UserZooming);const n=this.getMiddlePoint(e,t),s=(0,a.translateFromCanvasToSeriesViewRect)(n,this.parentSurface.seriesViewRect);if(s&&void 0!==this.previousHorizontalTouchPointsDistance&&void 0!==this.previousVerticalTouchPointsDistance){const e=this.previousHorizontalTouchPointsDistance-i,t=this.previousVerticalTouchPointsDistance-r;this.performZoom(s,e,t)}this.previousHorizontalTouchPointsDistance=i,this.previousVerticalTouchPointsDistance=r}}modifierMouseUp(e){super.modifierMouseUp(e),this.removeFromActiveTouchEvents(e)}modifierPointerCancel(e){super.modifierPointerCancel(e),this.removeFromActiveTouchEvents(e)}toJSON(){const e=super.toJSON(),t={horizontalGrowFactor:this.horizontalGrowFactor,verticalGrowFactor:this.verticalGrowFactor};return Object.assign(e.options,t),e}performZoom(e,t,i){const r=this.horizontalGrowFactor*t,n=this.verticalGrowFactor*i;[s.EXyDirection.XDirection,s.EXyDirection.XyDirection].includes(this.xyDirection)&&this.parentSurface.xAxes.asArray().forEach(t=>{this.growBy(e,t,r)}),[s.EXyDirection.YDirection,s.EXyDirection.XyDirection].includes(this.xyDirection)&&this.parentSurface.yAxes.asArray().forEach(t=>{this.growBy(e,t,n)})}notifyPropertyChanged(e){super.notifyPropertyChanged(e)}removeFromActiveTouchEvents(e){this.activeTouchEvents.delete(e.pointerId),this.activeTouchEvents.size<2&&(this.previousHorizontalTouchPointsDistance=void 0,this.previousVerticalTouchPointsDistance=void 0)}}t.PinchZoomModifier=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcTooltipPositions=t.calcTooltipProps=t.RolloverModifier=void 0;const r=i(14),n=i(17),s=i(19),o=i(119),a=i(8),l=i(156),h=i(9),u=i(28),d=i(88),c=i(346),p=i(347),g=i(348),f=i(4),y=i(6),v=i(20),m=i(72);class S extends v.ChartModifierBase2D{constructor(e){var t,i,a,l,h,p,g,y,v,m,S,P;super(e),this.type=s.EChart2DModifierType.Rollover,this.tooltipLegendOffsetX=0,this.tooltipLegendOffsetY=0,this.snapToDataPoint=!1,this.hitTestRadius=0,this.mousePosition=o.EMousePosition.OutOfCanvas,this.showRolloverLineProperty=!0,this.showTooltipProperty=!0,this.allowTooltipOverlappingProperty=!1,this.includedSeriesMap=new Map,this.hitTestRenderableSeries=this.hitTestRenderableSeries.bind(this),this.placementDivIdProperty=null!==(t=null==e?void 0:e.placementDivId)&&void 0!==t?t:this.placementDivIdProperty,this.rolloverLineAnnotation=new d.LineAnnotation({xCoordinateMode:u.ECoordinateMode.Pixel,yCoordinateMode:u.ECoordinateMode.Pixel,strokeDashArray:null==e?void 0:e.rolloverLineStrokeDashArray,strokeThickness:null!==(i=null==e?void 0:e.rolloverLineStrokeThickness)&&void 0!==i?i:2,stroke:null!==(a=null==e?void 0:e.rolloverLineStroke)&&void 0!==a?a:f.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,isHidden:!0,xAxisId:this.xAxisId,yAxisId:this.yAxisId}),(null==e?void 0:e.tooltipLegendTemplate)&&"string"==typeof e.tooltipLegendTemplate&&(this.typeMap.set("tooltipLegendTemplate",e.tooltipLegendTemplate),e.tooltipLegendTemplate=(0,r.getFunction)(n.EBaseType.OptionFunction,e.tooltipLegendTemplate)),this.tooltipLegendTemplate=null!==(l=null==e?void 0:e.tooltipLegendTemplate)&&void 0!==l?l:this.tooltipLegendTemplate,this.tooltipLegendOffsetX=null!==(h=null==e?void 0:e.tooltipLegendOffsetX)&&void 0!==h?h:this.tooltipLegendOffsetX,this.tooltipLegendOffsetY=null!==(p=null==e?void 0:e.tooltipLegendOffsetY)&&void 0!==p?p:this.tooltipLegendOffsetY,(null==e?void 0:e.tooltipDataTemplate)&&"string"==typeof e.tooltipDataTemplate&&(this.typeMap.set("tooltipDataTemplate",e.tooltipDataTemplate),e.tooltipDataTemplate=(0,r.getFunction)(n.EBaseType.OptionFunction,e.tooltipDataTemplate.type)),this.tooltipDataTemplateProperty=null!==(g=null==e?void 0:e.tooltipDataTemplate)&&void 0!==g?g:this.tooltipDataTemplateProperty,this.showRolloverLineProperty=null!==(y=null==e?void 0:e.showRolloverLine)&&void 0!==y?y:this.showRolloverLineProperty,this.showTooltipProperty=null!==(v=null==e?void 0:e.showTooltip)&&void 0!==v?v:this.showTooltipProperty,this.legendAnnotation=new c.RolloverLegendSvgAnnotation({tooltipLegendTemplate:this.tooltipLegendTemplate,tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,xAxisId:this.xAxisId,yAxisId:this.yAxisId}),this.allowTooltipOverlappingProperty=null!==(m=null==e?void 0:e.allowTooltipOverlapping)&&void 0!==m?m:this.allowTooltipOverlappingProperty,this.snapToDataPoint=null!==(S=null==e?void 0:e.snapToDataPoint)&&void 0!==S?S:this.snapToDataPoint,this.hitTestRadius=null!==(P=null==e?void 0:e.hitTestRadius)&&void 0!==P?P:this.hitTestRadius}applyTheme(e){if(this.parentSurface){const t=this.parentSurface.previousThemeProvider;this.rolloverLineAnnotation.stroke===t.cursorLineBrush&&(this.rolloverLineAnnotation.stroke=e.cursorLineBrush)}}get rolloverLineStroke(){return this.rolloverLineAnnotation.stroke}set rolloverLineStroke(e){this.rolloverLineAnnotation.stroke=e,this.notifyPropertyChanged(m.PROPERTY.STROKE)}get rolloverLineStrokeThickness(){return this.rolloverLineAnnotation.strokeThickness}set rolloverLineStrokeThickness(e){this.rolloverLineAnnotation.strokeThickness=e,this.notifyPropertyChanged(m.PROPERTY.STROKE_THICKNESS)}get rolloverLineStrokeDashArray(){return this.rolloverLineAnnotation.strokeDashArray}set rolloverLineStrokeDashArray(e){this.rolloverLineAnnotation.strokeDashArray=e,this.notifyPropertyChanged(m.PROPERTY.STROKE_DASH_ARRAY)}get showRolloverLine(){return this.showRolloverLineProperty}set showRolloverLine(e){this.showRolloverLineProperty=e,this.notifyPropertyChanged(m.PROPERTY.SHOW_ROLLOVER_LINE)}get tooltipDataTemplate(){return this.tooltipDataTemplateProperty}set tooltipDataTemplate(e){this.tooltipDataTemplateProperty=e,this.notifyPropertyChanged(m.PROPERTY.TOOLTIP_DATA_TEMPLATE)}get showTooltip(){return this.showTooltipProperty}set showTooltip(e){this.showTooltipProperty=e,this.notifyPropertyChanged(m.PROPERTY.SHOW_TOOLTIP)}get allowTooltipOverlapping(){return this.allowTooltipOverlappingProperty}set allowTooltipOverlapping(e){this.allowTooltipOverlappingProperty=e,this.notifyPropertyChanged(m.PROPERTY.ALLOW_TOOLTIP_OVERLAPPING)}onAttach(){super.onAttach(),this.parentSurface.modifierAnnotations.add(this.rolloverLineAnnotation),this.parentSurface.modifierAnnotations.add(this.legendAnnotation),this.getIncludedRenderableSeries().forEach(e=>this.addSeriesAnnotationsToParentSurface(e))}onDetach(){super.onDetach(),this.rolloverLineAnnotation.delete(),this.parentSurface.modifierAnnotations.remove(this.rolloverLineAnnotation),this.parentSurface.modifierAnnotations.remove(this.legendAnnotation),this.getIncludedRenderableSeries().forEach(e=>this.removeSeriesAnnotationsFromParentSurface(e))}onAttachSeries(e){super.onAttachSeries(e);this.parentSurface.renderableSeries.size();this.addSeriesAnnotationsToParentSurface(e),this.legendAnnotation.seriesInfos=this.getSeriesInfos()}onDetachSeries(e){super.onDetachSeries(e),this.removeSeriesAnnotationsFromParentSurface(e)}modifierMouseMove(e){let t;super.modifierMouseMove(e),this.mousePoint?(t=(0,h.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect),this.mousePosition=t?o.EMousePosition.SeriesArea:o.EMousePosition.AxisArea):this.mousePosition=o.EMousePosition.OutOfCanvas,this.update()}modifierMouseLeave(e){super.modifierMouseLeave(e),this.mousePosition=o.EMousePosition.OutOfCanvas,this.update()}modifierMouseEnter(e){super.modifierMouseEnter(e)}onParentSurfaceRendered(){this.update()}includeSeries(e,t){var i;(void 0===this.includedSeriesMap.get(e)&&!t||!0===this.includedSeriesMap.get(e)&&!t||!1===this.includedSeriesMap.get(e)&&t)&&(this.includedSeriesMap.set(e,t),!0===t&&this.addSeriesAnnotationsToParentSurface(e),!1===t&&this.removeSeriesAnnotationsFromParentSurface(e),this.parentSurface&&(this.legendAnnotation.seriesInfos=this.getSeriesInfos()),null===(i=this.parentSurface)||void 0===i||i.invalidateElement())}getIncludedRenderableSeries(){const e=this.parentSurface.renderableSeries.asArray().filter(e=>!e.isStacked&&e.isVisible&&e.rolloverModifierProps.showRollover&&this.testIsIncludedSeries(e)),t=this.parentSurface.renderableSeries.asArray().filter(e=>e.isStacked),i=e;return t.forEach(e=>{e.getVisibleSeries().forEach(e=>{e.rolloverModifierProps.showRollover&&this.testIsIncludedSeries(e)&&i.push(e)})}),i}hitTestRenderableSeries(e,t){if(t)return this.hitTestRadius<=0?e.hitTestProvider.hitTestXSlice(t.x,t.y):e.hitTestProvider.hitTestDataPoint(t.x,t.y,this.hitTestRadius)}getMousePosition(){return this.mousePosition}toJSON(){const e=super.toJSON(),t={rolloverLineStroke:this.rolloverLineStroke,rolloverLineStrokeThickness:this.rolloverLineStrokeThickness,showRolloverLine:this.showRolloverLine,showTooltip:this.showTooltip,tooltipDataTemplate:this.typeMap.get("tooltipDataTemplate"),tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,tooltipLegendTemplate:this.typeMap.get("tooltipLegendTemplate")};return Object.assign(e.options,t),e}notifyPropertyChanged(e){super.notifyPropertyChanged(e),e===m.PROPERTY.X_AXIS_ID&&(this.rolloverLineAnnotation.xAxisId=this.xAxisId,this.legendAnnotation.xAxisId=this.xAxisId),e===m.PROPERTY.Y_AXIS_ID&&(this.rolloverLineAnnotation.yAxisId=this.yAxisId,this.legendAnnotation.yAxisId=this.yAxisId)}isVerticalChart(){var e,t;const i=(null===(e=this.parentSurface)||void 0===e?void 0:e.getXAxisById(this.xAxisId))||(null===(t=this.parentSurface)||void 0===t?void 0:t.xAxes.get(0));return!!i&&i.isVerticalChart}removeSeriesAnnotationsFromParentSurface(e){if(this.parentSurface)if(e.isStacked){e.asArray().forEach(e=>{this.parentSurface.modifierAnnotations.remove(e.rolloverModifierProps.marker),this.parentSurface.modifierAnnotations.remove(e.rolloverModifierProps.tooltip),e.rolloverModifierProps.delete()})}else this.parentSurface.modifierAnnotations.remove(e.rolloverModifierProps.marker),this.parentSurface.modifierAnnotations.remove(e.rolloverModifierProps.tooltip),e.rolloverModifierProps.delete(),e.type===a.ESeriesType.BandSeries&&(this.parentSurface.modifierAnnotations.remove(e.rolloverModifierProps1.marker),this.parentSurface.modifierAnnotations.remove(e.rolloverModifierProps1.tooltip),e.rolloverModifierProps1.delete())}addSeriesAnnotationsToParentSurface(e){this.parentSurface&&e.type!==a.ESeriesType.StackedMountainCollection&&e.type!==a.ESeriesType.StackedColumnCollection&&(e.rolloverModifierProps.rolloverModifier=this,P(e,this.placementDivIdProperty),this.parentSurface.modifierAnnotations.add(e.rolloverModifierProps.marker),this.parentSurface.modifierAnnotations.add(e.rolloverModifierProps.tooltip),e.type===a.ESeriesType.BandSeries&&(e.rolloverModifierProps1.rolloverModifier=this,this.parentSurface.modifierAnnotations.add(e.rolloverModifierProps1.marker),this.parentSurface.modifierAnnotations.add(e.rolloverModifierProps1.tooltip)))}update(){this.updateLine(),this.updateSeriesAnnotations(),this.tooltipLegendTemplate&&(this.legendAnnotation.seriesInfos=this.getSeriesInfos())}updateLine(){if(this.mousePosition===o.EMousePosition.SeriesArea)if(this.showRolloverLineProperty)if(this.snapToDataPoint){const e=this.getIncludedRenderableSeries()[0];if(e){const t=this.hitTestRenderableSeries(e,this.mousePoint);if(t&&t.isWithinDataBounds){this.rolloverLineAnnotation.isHidden=!1;const e=(0,h.translateToNotScaled)(t.xCoord);this.rolloverLineAnnotation.x1=e,this.rolloverLineAnnotation.x2=e,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=this.isVerticalChart()?(0,h.translateToNotScaled)(this.parentSurface.seriesViewRect.right):(0,h.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom)}else this.rolloverLineAnnotation.isHidden=!0}else this.rolloverLineAnnotation.isHidden=!0}else{this.rolloverLineAnnotation.isHidden=!1;const e=(0,h.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect);if(e){const t=(0,h.translateToNotScaled)(e.x),i=(0,h.translateToNotScaled)(e.y);this.isVerticalChart()?(this.rolloverLineAnnotation.x1=i,this.rolloverLineAnnotation.x2=i,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=(0,h.translateToNotScaled)(this.parentSurface.seriesViewRect.right)):(this.rolloverLineAnnotation.x1=t,this.rolloverLineAnnotation.x2=t,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=(0,h.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom))}}else this.rolloverLineAnnotation.isHidden=!0;else this.rolloverLineAnnotation.isHidden=!0}updateSeriesAnnotations(){const e=this.getIncludedRenderableSeries();if(e.forEach(e=>{e.rolloverModifierProps.marker.suspendInvalidate(),e.rolloverModifierProps.tooltip.suspendInvalidate(),e.rolloverModifierProps.marker.isHidden=!0,e.rolloverModifierProps.tooltip.isHidden=!0,e.rolloverModifierProps.tooltip.x1=void 0,e.rolloverModifierProps.tooltip.y1=void 0,e.type===a.ESeriesType.BandSeries&&(e.rolloverModifierProps1.marker.suspendInvalidate(),e.rolloverModifierProps1.tooltip.suspendInvalidate(),e.rolloverModifierProps1.marker.isHidden=!0,e.rolloverModifierProps1.tooltip.isHidden=!0,e.rolloverModifierProps1.tooltip.x1=void 0,e.rolloverModifierProps1.tooltip.y1=void 0)}),this.mousePosition!==o.EMousePosition.SeriesArea)return void e.forEach(e=>{e.rolloverModifierProps.marker.resumeInvalidate(),e.rolloverModifierProps.tooltip.resumeInvalidate(),e.type===a.ESeriesType.BandSeries&&(e.rolloverModifierProps1.marker.resumeInvalidate(),e.rolloverModifierProps1.tooltip.resumeInvalidate())});const i=[];e.forEach((e,r)=>{const n=e.yAxis.visibleRange.min,s=e.yAxis.visibleRange.max,o=this.hitTestRenderableSeries(e,this.mousePoint);if(o){if(e.type!==a.ESeriesType.StackedColumnSeries||o.isHit){if(n<=o.yValue&&o.yValue<=s){const n=this.isVerticalChart()?o.yCoord:o.xCoord,s=this.isVerticalChart()?o.xCoord:o.yCoord,a=(0,t.calcTooltipProps)(r,e,e.rolloverModifierProps,this.parentSurface.seriesViewRect,o.xValue,o.yValue,n,s,o,y.DpiHelper.PIXEL_RATIO,!1,this.isVerticalChart());a&&i.push(a)}}if(e.type===a.ESeriesType.BandSeries){if(n<=o.y1Value&&o.y1Value<=s){const n=this.isVerticalChart()?o.y1Coord:o.xCoord,s=this.isVerticalChart()?o.xCoord:o.y1Coord,a=(0,t.calcTooltipProps)(r,e,e.rolloverModifierProps1,this.parentSurface.seriesViewRect,o.xValue,o.y1Value,n,s,o,y.DpiHelper.PIXEL_RATIO,!0,this.isVerticalChart());a&&i.push(a)}}}});const r=i.sort((e,t)=>e.yCoord>t.yCoord?1:t.yCoord>e.yCoord?-1:0);(0,t.calcTooltipPositions)(r,this.allowTooltipOverlapping,4*y.DpiHelper.PIXEL_RATIO,this.parentSurface.seriesViewRect,y.DpiHelper.PIXEL_RATIO,this.isVerticalChart()).forEach(t=>{const i=e[t.index],r=this.showTooltip&&t.seriesInfo.isHit,n=t.seriesInfo.isHit;t.isY1?C(i.rolloverModifierProps1,i,t,r,n,this.placementDivId):C(i.rolloverModifierProps,i,t,r,n,this.placementDivId)}),e.forEach(e=>{e.rolloverModifierProps.marker.resumeInvalidate(),e.rolloverModifierProps.tooltip.resumeInvalidate(),e.type===a.ESeriesType.BandSeries&&(e.rolloverModifierProps1.marker.resumeInvalidate(),e.rolloverModifierProps1.tooltip.resumeInvalidate())})}testIsIncludedSeries(e){return!1!==this.includedSeriesMap.get(e)}getSeriesInfos(){return this.getIncludedRenderableSeries().map(e=>{const t=this.hitTestRenderableSeries(e,this.mousePoint);if(t)return e.getSeriesInfo(t)}).filter(e=>void 0!==e)}get placementDivId(){return this.placementDivIdProperty}set placementDivId(e){var t;this.placementDivIdProperty!==e&&(this.placementDivIdProperty=e,null===(t=this.parentSurface)||void 0===t||t.renderableSeries.asArray().forEach(e=>{e.rolloverModifierProps.tooltip.placementDivId=this.placementDivIdProperty,e.rolloverModifierProps1.tooltip.placementDivId=this.placementDivIdProperty}))}}t.RolloverModifier=S;t.calcTooltipProps=(e,t,i,r,n,s,o,a,l,h,u=!1,d=!1)=>{const c=t.yAxis.visibleRange;if(c.min<=s&&s<=c.max){const c=t.getSeriesInfo(l),p=i.tooltip.width,g=p*h,f=i.tooltip.height,y=f*h,v=a,m=r.height-a,S=5*h,P=r.width-o<g?-p:5;let C=d?S:-f/2;d?m<y+S&&(C=(y+S)/h*-1):v<y/2?C=-v/h:m<y/2&&(C=-(y-m)/h);return{index:e,isY1:u,xValue:n,yValue:s,xCoord:o,yCoord:a,hitTestPointValues:l.hitTestPointValues,isCategoryAxis:l.isCategoryAxis,xCoordShift:P,yCoordShift:C,height:y,width:g,seriesInfo:c}}};t.calcTooltipPositions=(e,t,i,r,n,s=!1)=>{const o=(0,l.getTooltipPositionProperties)(s),a=(0,l.checkHasOverlap)(e,i,n,o),h=e.length;if(!t&&h>=2&&a){const t=(0,l.spreadTooltips)(e,n,o,i,r);e.forEach(e=>{e[o.shiftPropertyName]=t.get(e.index)})}return s&&!a&&e.forEach(e=>e[o.shiftPropertyName]=-e.width/2/n),e};const P=(e,t)=>{var i,r,n,s,o,l;if(e.rolloverModifierProps.marker||(e.rolloverModifierProps.marker=new p.RolloverMarkerSvgAnnotation(e.rolloverModifierProps),e.isStacked||(e.rolloverModifierProps.marker.xAxisId=e.xAxisId,e.rolloverModifierProps.marker.yAxisId=e.yAxisId)),e.rolloverModifierProps.tooltip||(e.rolloverModifierProps.tooltipTitle=null!==(r=null!==(i=e.rolloverModifierProps.tooltipTitle)&&void 0!==i?i:e.getDataSeriesName())&&void 0!==r?r:"",e.rolloverModifierProps.tooltipColor=null!==(n=e.rolloverModifierProps.tooltipColor)&&void 0!==n?n:e.stroke,e.rolloverModifierProps.tooltip=new g.RolloverTooltipSvgAnnotation(e.rolloverModifierProps,{seriesType:e.type,placementDivId:t}),e.isStacked||(e.rolloverModifierProps.tooltip.xAxisId=e.xAxisId,e.rolloverModifierProps.tooltip.yAxisId=e.yAxisId)),e.type===a.ESeriesType.BandSeries){const i=e;i.rolloverModifierProps1.marker||(i.rolloverModifierProps1.marker=new p.RolloverMarkerSvgAnnotation(i.rolloverModifierProps1),i.rolloverModifierProps1.marker.xAxisId=i.xAxisId,i.rolloverModifierProps1.marker.yAxisId=i.yAxisId),i.rolloverModifierProps1.tooltip||(i.rolloverModifierProps1.tooltipTitle=null!==(o=null!==(s=i.rolloverModifierProps1.tooltipTitle)&&void 0!==s?s:i.getDataSeriesName())&&void 0!==o?o:"",i.rolloverModifierProps1.tooltipColor=null!==(l=i.rolloverModifierProps1.tooltipColor)&&void 0!==l?l:i.strokeY1,i.rolloverModifierProps1.tooltip=new g.RolloverTooltipSvgAnnotation(i.rolloverModifierProps1,{placementDivId:t}),i.rolloverModifierProps1.tooltip.xAxisId=i.xAxisId,i.rolloverModifierProps1.tooltip.yAxisId=i.yAxisId)}},C=(e,t,i,r,n,s)=>{e.tooltip.seriesInfo=i.seriesInfo,i.isY1&&(e.tooltip.seriesInfo.isFirstSeries=!1),n&&(e.marker.isHidden=!1,e.marker.x1=i.xValue,e.marker.y1=i.yValue),r?(e.tooltip.isHidden=!1,e.tooltip.x1=i.xValue,e.tooltip.y1=i.yValue,e.tooltip.xCoordShift=i.xCoordShift,e.tooltip.yCoordShift=i.yCoordShift):s&&e.tooltip.delete()}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RolloverLegendSvgAnnotation=void 0;const r=i(34),n=i(46),s=i(23),o=i(87);class a extends o.SvgAnnotationBase{constructor(e){var t,i,r;super(e),this.type=s.EAnnotationType.SVG,this.seriesInfosProperty=[],this.isHidden=!0,this.tooltipLegendTemplateProperty=null!==(t=null==e?void 0:e.tooltipLegendTemplate)&&void 0!==t?t:this.tooltipLegendTemplateProperty,this.tooltipLegendOffsetXProperty=null!==(i=null==e?void 0:e.tooltipLegendOffsetX)&&void 0!==i?i:this.tooltipLegendOffsetXProperty,this.tooltipLegendOffsetYProperty=null!==(r=null==e?void 0:e.tooltipLegendOffsetY)&&void 0!==r?r:this.tooltipLegendOffsetYProperty}get seriesInfos(){return this.seriesInfosProperty}set seriesInfos(e){this.seriesInfosProperty&&e&&(e.length!==this.seriesInfosProperty.length||this.seriesInfosProperty.map(t=>t.equals(e.find(e=>e.renderableSeries.id===t.renderableSeries.id))).some(e=>!1===e))&&(this.seriesInfosProperty=e,this.notifyPropertyChanged(n.PROPERTY.SERIES_INFOS))}get tooltipLegendTemplate(){return this.tooltipLegendTemplateProperty}set tooltipLegendTemplate(e){this.tooltipLegendTemplateProperty=e,this.notifyPropertyChanged(n.PROPERTY.TOOLTIP_LEGEND_TEMPLATE)}get tooltipLegendOffsetX(){return this.tooltipLegendOffsetXProperty}set tooltipLegendOffsetX(e){this.tooltipLegendOffsetXProperty=e,this.notifyPropertyChanged(n.PROPERTY.TOOLTIP_LEGEND_OFFSET_X)}get tooltipLegendOffsetY(){return this.tooltipLegendOffsetYProperty}set tooltipLegendOffsetY(e){this.tooltipLegendOffsetYProperty=e,this.notifyPropertyChanged(n.PROPERTY.TOOLTIP_LEGEND_OFFSET_Y)}update(e,t,i,r){this.tooltipLegendTemplate&&(this.svg&&this.delete(),this.create(e,t,i,r))}create(e,t,i,n){const s=this.tooltipLegendTemplate(this.seriesInfos,this);r.annotationHelpers.createSvg(s,this.svgRoot);this.setSvg(this.svgRoot.lastChild),this.setSvgAttribute("x",this.tooltipLegendOffsetX+i),this.setSvgAttribute("y",this.tooltipLegendOffsetY+n)}}t.RolloverLegendSvgAnnotation=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RolloverMarkerSvgAnnotation=void 0;const r=i(119),n=i(34),s=i(23),o=i(87);class a extends o.SvgAnnotationBase{constructor(e){super(),this.type=s.EAnnotationType.SVG,this.tooltipProps=e,this.isHiddenProperty=!0,this.x1=0,this.y1=0,this.xCoordShift=-4,this.yCoordShift=-4}update(e,t,i,n){const s=this.tooltipProps.rolloverModifier.getMousePosition();this.previousMousePosition===s&&s!==r.EMousePosition.SeriesArea||(this.previousMousePosition=this.tooltipProps.rolloverModifier.getMousePosition(),super.update(e,t,i,n))}create(e,t,i,r){this.svg&&this.delete();const{tooltipColor:s,markerColor:o}=this.tooltipProps,a=l(null!=o?o:s),h=n.annotationHelpers.createSvg(a,this.svgRoot);this.setSvg(h)}}t.RolloverMarkerSvgAnnotation=a;const l=e=>`<svg width="8" height="8"><circle cx="50%" cy="50%" r="4" fill="${e}"/></svg>`},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RolloverTooltipSvgAnnotation=void 0;const r=i(119),n=i(10),s=i(28),o=i(34),a=i(46),l=i(23),h=i(87);class u extends h.SvgAnnotationBase{constructor(e,t){var i,r;super(t),this.type=l.EAnnotationType.SVG,this.width=0,this.height=0,this.tooltipProps=e,this.height=null!==(i=null==t?void 0:t.height)&&void 0!==i?i:this.height,this.xCoordinateMode=s.ECoordinateMode.DataValue,this.yCoordinateMode=s.ECoordinateMode.DataValue,this.isHidden=!0,this.updateSize=this.updateSize.bind(this),this.placementDivIdProperty=null!==(r=null==t?void 0:t.placementDivId)&&void 0!==r?r:this.placementDivIdProperty}get seriesInfo(){return this.seriesInfoProperty}set seriesInfo(e){(e&&!this.seriesInfoProperty||!this.seriesInfoProperty.equals(e))&&(this.seriesInfoProperty=e,this.notifyPropertyChanged(a.PROPERTY.SERIES_INFO))}delete(){var e,t,i,r;if(this.parentSurface&&!this.parentSurface.isDeleted){if(this.svg){if(this.placementDivId)return void(null===(t=null===(e=this.svg)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.svg));null===(i=this.svgRoot)||void 0===i||i.removeChild(this.svg)}this.svgLegend&&(null===(r=this.svgLegend.parentNode)||void 0===r||r.removeChild(this.svgLegend))}}update(e,t,i,n){const s=this.tooltipProps.rolloverModifier.getMousePosition();this.previousMousePosition===s&&s!==r.EMousePosition.SeriesArea||(this.previousMousePosition=this.tooltipProps.rolloverModifier.getMousePosition(),this.svg&&this.delete(),this.placementDivId?this.updateExternalLegendTooltip():(super.update(e,t,i,n),this.updateLegendTooltip(i,n)))}updateSize(e,t){this.width=e,this.height=t}create(e,t,i,r){let n;n=this.seriesInfo?this.generateSvgString():"<svg></svg>";const s=o.annotationHelpers.createSvg(n,this.svgRoot);this.setSvg(s)}generateSvgString(){var e;const{tooltipTitle:t}=this.tooltipProps,i=(""+t).replace(/\s/g,""),r=`id${Math.floor(this.y1)}_${i}_${Date.now()}`;return(null!==(e=this.tooltipProps.tooltipTemplate)&&void 0!==e?e:c)(r,this.seriesInfo,this)}updateLegendTooltip(e,t){if(this.tooltipProps.tooltipLegendTemplate){const i=this.seriesInfo?this.tooltipProps.tooltipLegendTemplate(this.tooltipProps,this.seriesInfo):"<svg></svg>",r=o.annotationHelpers.createSvg(i,this.svgRoot);this.svgLegend=r,this.svgLegend.setAttribute("x",this.tooltipProps.tooltipLegendOffsetX.toString()+e),this.svgLegend.setAttribute("y",this.tooltipProps.tooltipLegendOffsetY.toString()+t)}}updateExternalLegendTooltip(){let e;e=this.seriesInfo?this.generateSvgString():"<svg style='display: none;'></svg>",this.svgDivRoot=document.getElementById(this.placementDivId);const t=o.annotationHelpers.createSvg(e,this.svgDivRoot);this.setSvg(t)}get placementDivId(){return this.placementDivIdProperty}set placementDivId(e){this.placementDivIdProperty!==e&&(this.placementDivIdProperty=e,this.notifyPropertyChanged(a.PROPERTY.PLACEMENT_DIV_ID))}}t.RolloverTooltipSvgAnnotation=u;const d=(e,t,i,r)=>{const s=[];if(t&&s.push(t),e.dataSeriesType===n.EDataSeriesType.Ohlc){const t=e;i&&s.push(`${i}: ${t.formattedXValue}`),s.push("Open: "+t.formattedOpenValue),s.push("Highest: "+t.formattedHighValue),s.push("Lowest: "+t.formattedLowValue),s.push("Close: "+t.formattedCloseValue)}else if(e.dataSeriesType===n.EDataSeriesType.Hlc){const t=e;i&&s.push(`${i}: ${t.formattedXValue}`),s.push("High: "+t.formattedHighValue),s.push("Low: "+t.formattedLowValue)}else if(e.dataSeriesType===n.EDataSeriesType.Xyy){const t=e;t.isFirstSeries?f(s,t.formattedXValue,t.formattedYValue,i,r):f(s,t.formattedXValue,t.formattedY1Value,i,r)}else if(e.dataSeriesType===n.EDataSeriesType.HeatmapUniform){const t=e;i&&s.push(`${i}: ${t.formattedXValue}`),r&&s.push(`${r}: ${t.formattedYValue}`),s.push("Z: "+t.formattedZValue)}else{const t=e;f(s,t.formattedXValue,t.formattedYValue,i,r)}return s},c=(e,t,i)=>{var r,n,s,o,a;let l="";const h=i.tooltipProps,{tooltipTitle:u,tooltipColor:c,tooltipTextColor:f,tooltipLabelX:y,tooltipLabelY:v}=h,m=(null!==(s=null!==(r=i.tooltipProps.tooltipDataTemplate)&&void 0!==r?r:null===(n=i.tooltipProps.rolloverModifier)||void 0===n?void 0:n.tooltipDataTemplate)&&void 0!==s?s:d)(t,u,y,v),S=null!==(o=h.width)&&void 0!==o?o:p(m.reduce((e,t)=>t.length>e?t.length:e,0)),P=null!==(a=h.height)&&void 0!==a?a:g(m.length);return i.updateSize(S,P),m.forEach((e,t)=>{l+=`<tspan x="8" dy="1.2em">${e}</tspan>`}),`<svg class="scichart__rollover-tooltip" width="${S}" height="${P}">\n <defs>\n <filter id="${e}" x="0" y="0" width="200%" height="200%">\n <feOffset result="offOut" in="SourceAlpha" dx="3" dy="3" />\n <feGaussianBlur result="blurOut" in="offOut" stdDeviation="3" />\n <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />\n </filter>\n </defs>\n <rect rx="4" ry="4" width="95%" height="90%" fill="${c}" filter="url(#${e})" />\n <svg width="100%">\n <text x="8" y="3" font-size="13" font-family="Verdana" dy="0" fill="${f}">${l}</text>\n </svg>\n </svg>`},p=(e=20,t=13)=>8*e+20,g=(e=2,t=13)=>17*e+16,f=(e,t,i,r,n)=>{if(r){const s=null!=n?n:"Y";e.push(`${r}: ${t} ${s}: ${i}`)}else{const t=n?n+": ":"";e.push(`${t}${i}`)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeriesSelectionModifier=void 0;const r=i(14),n=i(18),s=i(17),o=i(19),a=i(45),l=i(31),h=i(350),u=i(351),d=i(20),c=i(72);class p extends d.ChartModifierBase2D{constructor(e){var t,i;if(super(e),this.type=o.EChart2DModifierType.SeriesSelection,this.selectedSeries=[],this.hoveredSeries=[],this.selectionChanged=new n.EventHandler,this.hoverChanged=new n.EventHandler,this.hitTestRadiusProperty=(null==e?void 0:e.hitTestRadius)||l.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS,this.enableSelection=null===(t=null==e?void 0:e.enableSelection)||void 0===t||t,this.enableHover=null!==(i=null==e?void 0:e.enableHover)&&void 0!==i&&i,null==e?void 0:e.onSelectionChanged)if("string"==typeof e.onSelectionChanged){this.typeMap.set("onSelectionChanged",e.onSelectionChanged);const t=(0,r.getFunction)(s.EBaseType.OptionFunction,e.onSelectionChanged);this.selectionChanged.subscribe(t)}else this.selectionChanged.subscribe(e.onSelectionChanged);if(null==e?void 0:e.onHoverChanged)if("string"==typeof e.onHoverChanged){this.typeMap.set("onHoverChanged",e.onHoverChanged);const t=(0,r.getFunction)(s.EBaseType.OptionFunction,e.onHoverChanged);this.hoverChanged.subscribe(t)}else this.hoverChanged.subscribe(e.onHoverChanged);this.updateSeriesSelected=this.updateSeriesSelected.bind(this),this.updateSeriesHovered=this.updateSeriesHovered.bind(this),this.getAllSeries=this.getAllSeries.bind(this)}get hitTestRadius(){return this.hitTestRadiusProperty}set hitTestRadius(e){this.hitTestRadiusProperty=e,this.notifyPropertyChanged(c.PROPERTY.HIT_TEST_RADIUS)}onAttach(){var e;super.onAttach(),this.selectedSeries=[],null===(e=this.getAllSeries())||void 0===e||e.forEach(e=>this.onAttachSeries(e))}onDetach(){var e;super.onDetach(),this.selectedSeries=[],null===(e=this.getAllSeries())||void 0===e||e.forEach(e=>this.onDetachSeries(e))}onAttachSeries(e){super.onAttachSeries(e),e.isSelected&&this.selectedSeries.push(e),e.selected.subscribe(this.updateSeriesSelected),e.isHovered&&this.hoveredSeries.push(e),e.hovered.subscribe(this.updateSeriesHovered)}onDetachSeries(e){super.onDetachSeries(e),this.selectedSeries=(0,a.arrayRemove)(this.selectedSeries,e),e.selected.unsubscribe(this.updateSeriesSelected),this.hoveredSeries=(0,a.arrayRemove)(this.hoveredSeries,e),e.hovered.unsubscribe(this.updateSeriesHovered)}modifierMouseDown(e){if(super.modifierMouseDown(e),this.executeOn===e.button&&!this.isAttached)throw new Error("Should not call SeriesSelectionModifier.modifierMouseDown if not attached")}modifierMouseMove(e){var t;if(super.modifierMouseMove(e),!this.enableHover)return;const i=this.getAllSeries(),r=i.map(t=>t.hitTestProvider.hitTest(e.mousePoint.x,e.mousePoint.y,this.hitTestRadius));try{this.preventReentrancy=!0,this.hoveredSeries=[],(null==r?void 0:r.length)>0?(r.filter(e=>e.isHit).forEach(e=>{e.associatedSeries.isHovered=!0,this.hoveredSeries.push(e.associatedSeries)}),r.filter(e=>!e.isHit&&!e.isEmpty).forEach(e=>{e.associatedSeries.isHovered=!1})):i.forEach(e=>e.isHovered=!1),null===(t=this.hoverChanged)||void 0===t||t.raiseEvent(new h.HoveredChangedArgs(this,this.hoveredSeries,i))}finally{this.preventReentrancy=!1}}modifierMouseUp(e){var t;if(super.modifierMouseUp(e),this.executeOn!==e.button)return;if(!this.enableSelection)return;if(!this.isAttached)throw new Error("Should not call SeriesSelectionModifier.modifierMouseUp if not attached");const i=this.getAllSeries(),r=i.map(t=>t.hitTestProvider.hitTest(e.mousePoint.x,e.mousePoint.y,this.hitTestRadius));try{if(this.preventReentrancy=!0,this.selectedSeries=[],i.forEach(e=>e.isSelected=!1),(null==r?void 0:r.length)>0){const e=r.find(e=>e.isHit);e&&(e.associatedSeries.isSelected=!0,this.selectedSeries.push(e.associatedSeries))}null===(t=this.selectionChanged)||void 0===t||t.raiseEvent(new u.SelectionChangedArgs(this,this.selectedSeries,i))}finally{this.preventReentrancy=!1}}toJSON(){const e=super.toJSON(),t={enableHover:this.enableHover,enableSelection:this.enableSelection,hitTestRadius:this.hitTestRadius,onHoverChanged:this.typeMap.get("onHoverChanged"),onSelectionChanged:this.typeMap.get("onSelectionChanged")};return Object.assign(e.options,t),e}getAllSeries(){return super.getAllSeries().filter(e=>e.isVisible)}updateSeriesSelected(e){var t,i;this.preventReentrancy||(e.isSelected?(this.selectedSeries.push(e.sourceSeries),null===(t=this.selectionChanged)||void 0===t||t.raiseEvent(new u.SelectionChangedArgs(this,this.selectedSeries,this.getAllSeries()))):(this.selectedSeries=(0,a.arrayRemove)(this.selectedSeries,e.sourceSeries),null===(i=this.selectionChanged)||void 0===i||i.raiseEvent(new u.SelectionChangedArgs(this,this.selectedSeries,this.getAllSeries()))))}updateSeriesHovered(e){var t,i;this.preventReentrancy||(e.hovered?(this.hoveredSeries.push(e.sourceSeries),null===(t=this.hoverChanged)||void 0===t||t.raiseEvent(new h.HoveredChangedArgs(this,this.hoveredSeries,this.getAllSeries()))):(this.hoveredSeries=(0,a.arrayRemove)(this.hoveredSeries,e.sourceSeries),null===(i=this.hoverChanged)||void 0===i||i.raiseEvent(new h.HoveredChangedArgs(this,this.hoveredSeries,this.getAllSeries()))))}}t.SeriesSelectionModifier=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoveredChangedArgs=void 0;t.HoveredChangedArgs=class{constructor(e,t,i){this.source=e,this.hoveredSeries=t,this.allSeries=i}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionChangedArgs=void 0;t.SelectionChangedArgs=class{constructor(e,t,i){this.source=e,this.selectedSeries=t,this.allSeries=i}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XAxisDragModifier=void 0;const r=i(222),n=i(223),s=i(9),o=i(48),a=i(20),l=i(20),h=i(1),u=i(19);class d extends a.ChartModifierBase2D{constructor(e){var t,i;super(e),this.type=u.EChart2DModifierType.XAxisDrag,this.dragMode=n.EDragMode.Scaling,this.isClickedOverXAxis=!1,this.isVerticalChart=!1,this.includedSeriesMapProperty=new Map,this.dragMode=null!==(t=null==e?void 0:e.dragMode)&&void 0!==t?t:this.dragMode,null===(i=null==e?void 0:e.excludedAxisIds)||void 0===i||i.forEach(e=>{this.includedSeriesMapProperty.set(e,!1)})}includeAxis(e,t){h.Guard.notNull(e,"axis"),t||this.includedSeriesMapProperty.set(e.id,t),t&&this.includedSeriesMapProperty.delete(e.id)}getIncludedAxis(){var e,t;return null!==(t=null===(e=this.parentSurface)||void 0===e?void 0:e.xAxes.asArray().filter(e=>!1!==this.includedSeriesMapProperty.get(e.id)))&&void 0!==t?t:[]}get includedAxisMap(){return this.includedSeriesMapProperty}modifierMouseDown(e){if(super.modifierMouseDown(e),!this.isAttached)throw new Error("Should not call XAxisDragModifier.modifierMouseDown if not attached");(0,a.testIsOverAxes)(this.getHorizontalXAxes(),e.mousePoint)?(this.isVerticalChart=!1,this.startDragging(this.getHorizontalXAxes(),e)):(0,a.testIsOverAxes)(this.getVerticalXAxes(),e.mousePoint)&&(this.isVerticalChart=!0,this.startDragging(this.getVerticalXAxes(),e))}modifierMouseMove(e){if(this.isClickedOverXAxis){if(super.modifierMouseMove(e),void 0===this.pointFrom)return;this.dragMode===n.EDragMode.Panning?this.doPanning(e.mousePoint):this.dragMode===n.EDragMode.Scaling&&this.doScaling(e.mousePoint)}else this.updateCursor(e.mousePoint)}modifierMouseUp(e){super.modifierMouseUp(e),this.updateCursor(e.mousePoint),this.pointFrom=void 0,this.isClickedOverXAxis=!1}toJSON(){const e=super.toJSON(),t={dragMode:this.dragMode,excludedAxisIds:Array.from(this.includedSeriesMapProperty.entries()).filter(e=>!e[1]).map(e=>e[0])};return Object.assign(e.options,t),e}updateCursor(e){const t=this.parentSurface.getMainCanvas();(0,a.testIsOverAxes)(this.getHorizontalXAxes(),e)?this.cursorStyle!==r.ECursorStyle.EW&&(t.style.cursor=r.ECursorStyle.EW,this.cursorStyle=r.ECursorStyle.EW):(0,a.testIsOverAxes)(this.getVerticalXAxes(),e)?this.cursorStyle!==r.ECursorStyle.NS&&(t.style.cursor=r.ECursorStyle.NS,this.cursorStyle=r.ECursorStyle.NS):this.cursorStyle!==r.ECursorStyle.Defalut&&(t.style.cursor=r.ECursorStyle.Defalut,this.cursorStyle=r.ECursorStyle.Defalut)}doPanning(e){const t=e;if(this.isVerticalChart){const e=t.y-this.pointFrom.y;this.activeAxes.forEach(t=>{const i=t.flippedCoordinates?-e:e;t.scroll(i,o.EClipMode.None)})}else{const e=t.x-this.pointFrom.x;this.activeAxes.forEach(t=>{const i=t.flippedCoordinates?-e:e;t.scroll(i,o.EClipMode.None)})}this.pointFrom=t}doScaling(e){const{seriesViewRect:t}=this.parentSurface;if(this.isVerticalChart){const i=(0,s.translateFromCanvasToSeriesViewRectY)(this.pointFrom.y,t)>=t.height/2,r=(e.y-this.pointFrom.y)/t.width;(0,l.scaleAxes)(this.activeAxes,this.initialVisibleRanges,r,i)}else{const i=(0,s.translateFromCanvasToSeriesViewRectX)(this.pointFrom.x,t)>=t.width/2,r=(e.x-this.pointFrom.x)/t.width;(0,l.scaleAxes)(this.activeAxes,this.initialVisibleRanges,r,i)}}getHorizontalXAxes(){return this.getIncludedAxis().filter(e=>e.isHorizontalAxis)}getVerticalXAxes(){return this.getIncludedAxis().filter(e=>!e.isHorizontalAxis)}startDragging(e,t){this.isClickedOverXAxis=!0;const i=(0,a.getActiveAxes)(e,t.mousePoint),r=[];i.forEach(e=>{r.push(e.visibleRange)}),this.activeAxes=i,this.initialVisibleRanges=r,this.pointFrom=t.mousePoint,t.handled=!0}}t.XAxisDragModifier=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YAxisDragModifier=void 0;const r=i(19),n=i(222),s=i(223),o=i(9),a=i(48),l=i(20),h=i(20),u=i(20);class d extends l.ChartModifierBase2D{constructor(e){var t,i;super(e),this.type=r.EChart2DModifierType.YAxisDrag,this.dragMode=s.EDragMode.Scaling,this.isClickedOverYAxis=!1,this.isVerticalChart=!1,this.includedSeriesMapProperty=new Map,this.dragMode=null!==(t=null==e?void 0:e.dragMode)&&void 0!==t?t:this.dragMode,null===(i=null==e?void 0:e.excludedAxisIds)||void 0===i||i.forEach(e=>{this.includedSeriesMapProperty.set(e,!1)})}includeAxis(e,t){t||this.includedSeriesMapProperty.set(e.id,t),t&&this.includedSeriesMapProperty.delete(e.id)}getIncludedAxis(){var e,t;return null!==(t=null===(e=this.parentSurface)||void 0===e?void 0:e.yAxes.asArray().filter(e=>!1!==this.includedSeriesMapProperty.get(e.id)))&&void 0!==t?t:[]}get includedAxisMap(){return this.includedSeriesMapProperty}modifierMouseDown(e){if(super.modifierMouseDown(e),!this.isAttached)throw new Error("Should not call YAxisDragModifier.modifierMouseDown if not attached");(0,h.testIsOverAxes)(this.getVerticalYAxes(),e.mousePoint)?(this.isVerticalChart=!1,this.startDragging(this.getVerticalYAxes(),e)):(0,h.testIsOverAxes)(this.getHorizontalYAxes(),e.mousePoint)&&(this.isVerticalChart=!0,this.startDragging(this.getHorizontalYAxes(),e))}modifierMouseMove(e){if(this.isClickedOverYAxis){if(super.modifierMouseMove(e),void 0===this.pointFrom)return;this.dragMode===s.EDragMode.Panning?this.doPanning(e.mousePoint):this.dragMode===s.EDragMode.Scaling&&this.doScaling(e.mousePoint)}else this.updateCursor(e.mousePoint)}modifierMouseUp(e){super.modifierMouseUp(e),this.updateCursor(e.mousePoint),this.pointFrom=void 0,this.isClickedOverYAxis=!1}toJSON(){const e=super.toJSON(),t={dragMode:this.dragMode,excludedAxisIds:Array.from(this.includedSeriesMapProperty.entries()).filter(e=>!e[1]).map(e=>e[0])};return Object.assign(e.options,t),e}updateCursor(e){const t=this.parentSurface.getMainCanvas();(0,h.testIsOverAxes)(this.getVerticalYAxes(),e)?this.cursorStyle!==n.ECursorStyle.NS&&(t.style.cursor=n.ECursorStyle.NS,this.cursorStyle=n.ECursorStyle.NS):(0,h.testIsOverAxes)(this.getHorizontalYAxes(),e)?this.cursorStyle!==n.ECursorStyle.EW&&(t.style.cursor=n.ECursorStyle.EW,this.cursorStyle=n.ECursorStyle.EW):this.cursorStyle!==n.ECursorStyle.Defalut&&(t.style.cursor=n.ECursorStyle.Defalut,this.cursorStyle=n.ECursorStyle.Defalut)}doPanning(e){const t=e;if(this.isVerticalChart){const e=t.x-this.pointFrom.x;this.activeAxes.forEach(t=>{const i=t.flippedCoordinates?e:-e;t.scroll(i,a.EClipMode.None)})}else{const e=t.y-this.pointFrom.y;this.activeAxes.forEach(t=>{const i=t.flippedCoordinates?e:-e;t.scroll(i,a.EClipMode.None)})}this.pointFrom=t}doScaling(e){const{seriesViewRect:t}=this.parentSurface;if(this.isVerticalChart){const i=(0,o.translateFromCanvasToSeriesViewRectX)(this.pointFrom.x,t)<=t.width/2,r=-(e.x-this.pointFrom.x)/t.width;(0,u.scaleAxes)(this.activeAxes,this.initialVisibleRanges,r,i)}else{const i=(0,o.translateFromCanvasToSeriesViewRectY)(this.pointFrom.y,t)<=t.height/2,r=-(e.y-this.pointFrom.y)/t.height;(0,u.scaleAxes)(this.activeAxes,this.initialVisibleRanges,r,i)}}getVerticalYAxes(){return this.getIncludedAxis().filter(e=>!e.isHorizontalAxis)}getHorizontalYAxes(){return this.getIncludedAxis().filter(e=>e.isHorizontalAxis)}startDragging(e,t){this.isClickedOverYAxis=!0;const i=(0,l.getActiveAxes)(e,t.mousePoint),r=[];i.forEach(e=>{r.push(e.visibleRange)}),this.activeAxes=i,this.initialVisibleRanges=r,this.pointFrom=t.mousePoint,t.handled=!0}}t.YAxisDragModifier=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZoomExtentsModifier=void 0;const r=i(14),n=i(39),s=i(17),o=i(19),a=i(29),l=i(81),h=i(9),u=i(20);class d extends u.ChartModifierBase2D{constructor(e){var t,i,a,l,h;super(e),this.type=o.EChart2DModifierType.ZoomExtents,this.isAnimated=!0,this.animationDuration=400,this.easingFunction=n.easing.outExpo,this.applyToSeriesViewRect=!0,this.applyToAxes=!0,this.isAnimated=null!==(t=null==e?void 0:e.isAnimated)&&void 0!==t?t:this.isAnimated,this.animationDuration=null!==(i=null==e?void 0:e.animationDuration)&&void 0!==i?i:this.animationDuration,this.applyToSeriesViewRect=null!==(a=null==e?void 0:e.applyToSeriesViewRect)&&void 0!==a?a:this.applyToSeriesViewRect,this.applyToAxes=null!==(l=null==e?void 0:e.applyToAxes)&&void 0!==l?l:this.applyToAxes,(null==e?void 0:e.easingFunction)&&"string"==typeof e.easingFunction&&(e.easingFunction=n.easing[e.easingFunction]),this.easingFunction=null!==(h=null==e?void 0:e.easingFunction)&&void 0!==h?h:n.easing.outExpo,(null==e?void 0:e.onZoomExtents)&&"string"==typeof e.onZoomExtents&&(this.typeMap.set("onZoomExtents",e.onZoomExtents),e.onZoomExtents=(0,r.getFunction)(s.EBaseType.OptionFunction,e.onZoomExtents)),this.onZoomExtents=null==e?void 0:e.onZoomExtents}modifierDoubleClick(e){const t=this.parentSurface,i=this.isAnimated?this.animationDuration:0;if(void 0!==t){if((0,h.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect)&&this.applyToSeriesViewRect){if(!this.onZoomExtents||this.onZoomExtents(t)){switch(this.xyDirection){case a.EXyDirection.XyDirection:t.zoomExtents(i,this.easingFunction,()=>t.setZoomState(l.EZoomState.AtExtents));break;case a.EXyDirection.XDirection:t.zoomExtentsX(i,this.easingFunction);break;case a.EXyDirection.YDirection:t.zoomExtentsY(i,this.easingFunction)}e.handled=!0}}else if(this.applyToAxes){const r=[];[a.EXyDirection.XDirection,a.EXyDirection.XyDirection].includes(this.xyDirection)&&r.push(...this.parentSurface.xAxes.asArray()),[a.EXyDirection.YDirection,a.EXyDirection.XyDirection].includes(this.xyDirection)&&r.push(...this.parentSurface.yAxes.asArray());const n=(0,u.getActiveAxes)(r,e.mousePoint);n.length>0&&(e.handled=!0,n.forEach(e=>{if(e.isXAxis){const r=e.getMaximumRange();t.addAnimation(e.animateVisibleRange(r,i,this.easingFunction))}else{const r=e.getWindowedYRange(void 0);t.addAnimation(e.animateVisibleRange(r,i,this.easingFunction))}}))}}}toJSON(){const e=super.toJSON(),t={animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,isAnimated:this.isAnimated,applyToSeriesViewRect:this.applyToSeriesViewRect,applyToAxes:this.applyToAxes,onZoomExtents:this.typeMap.get("onZoomExtents")};return Object.assign(e.options,t),e}}t.ZoomExtentsModifier=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZoomPanModifier=void 0;const r=i(19),n=i(29),s=i(81),o=i(155),a=i(9),l=i(48),h=i(20);class u extends h.ChartModifierBase2D{constructor(e){var t,i,n,s;if(super(e),this.type=r.EChart2DModifierType.ZoomPan,this.includedXAxisMap=new Map,this.includedYAxisMap=new Map,this.activeTouchEvents=new Map,(null==e?void 0:e.includedXAxisIds)&&(null==e?void 0:e.excludedXAxisIds))throw new Error("You either should use includedXAxisIds or excludedXAxisIds");if((null==e?void 0:e.includedYAxisIds)&&(null==e?void 0:e.excludedYAxisIds))throw new Error("You either should use includedYAxisIds or excludedYAxisIds");null===(t=null==e?void 0:e.includedXAxisIds)||void 0===t||t.forEach(e=>{this.includedXAxisMap.set(e,!0)}),null===(i=null==e?void 0:e.includedYAxisIds)||void 0===i||i.forEach(e=>{this.includedYAxisMap.set(e,!0)}),null===(n=null==e?void 0:e.excludedXAxisIds)||void 0===n||n.forEach(e=>{this.includedXAxisMap.set(e,!1)}),null===(s=null==e?void 0:e.excludedYAxisIds)||void 0===s||s.forEach(e=>{this.includedYAxisMap.set(e,!1)})}modifierMouseDown(e){if(super.modifierMouseDown(e),this.executeOn!==e.button)return;if(!this.isAttached)throw new Error("Should not call ZoomPanModifier.modifierMouseDown if not attached");(0,a.translateFromCanvasToSeriesViewRect)(e.mousePoint,this.parentSurface.seriesViewRect)&&(this.activeTouchEvents.set(e.pointerId,e),this.activeTouchEvents.size>1||(this.parentSurface.setZoomState(s.EZoomState.UserZooming),e.handled=!0,this.lastPoint=e.mousePoint))}modifierMouseMove(e){if(super.modifierMouseMove(e),this.activeTouchEvents.set(e.pointerId,e),void 0===this.lastPoint||this.activeTouchEvents.size>1)return;if(this.activeTouchEvents.values().next().value.pointerId!==e.pointerId)return;const t=e.mousePoint,i=t.x-this.lastPoint.x,r=this.lastPoint.y-t.y;[n.EXyDirection.XDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(e=>{const t=e.isHorizontalAxis?i:-r;e.scroll(e.flippedCoordinates?-t:t,l.EClipMode.None)}),[n.EXyDirection.YDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(e=>{const t=e.isHorizontalAxis?-i:r;e.scroll(e.flippedCoordinates?-t:t,l.EClipMode.None)}),this.lastPoint=t}modifierMouseUp(e){if(super.modifierMouseUp(e),this.lastPoint=void 0,this.activeTouchEvents.delete(e.pointerId),this.activeTouchEvents.size>0){const t=this.activeTouchEvents.values().next().value;this.lastPoint=t.mousePoint,e.target.setPointerCapture(t.pointerId)}}modifierPointerCancel(e){super.modifierPointerCancel(e),this.lastPoint=void 0,this.activeTouchEvents.clear()}includeXAxis(e,t){this.includedXAxisMap.set(e.id,t)}includeYAxis(e,t){this.includedYAxisMap.set(e.id,t)}includeAllAxes(){this.includedXAxisMap.clear()}getIncludedXAxis(){return(0,o.getIncludedAxis)(this.parentSurface.xAxes.asArray(),this.includedXAxisMap)}getIncludedYAxis(){return(0,o.getIncludedAxis)(this.parentSurface.yAxes.asArray(),this.includedYAxisMap)}toJSON(){const e=super.toJSON(),t={includedXAxisIds:Array.from(this.includedXAxisMap.entries()).filter(e=>e[1]).map(e=>e[0]),includedYAxisIds:Array.from(this.includedYAxisMap.entries()).filter(e=>e[1]).map(e=>e[0]),excludedXAxisIds:Array.from(this.includedXAxisMap.entries()).filter(e=>!e[1]).map(e=>e[0]),excludedYAxisIds:Array.from(this.includedYAxisMap.entries()).filter(e=>!e[1]).map(e=>e[0])};return Object.assign(e.options,t),e}}t.ZoomPanModifier=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataPointSelectionPaletteProvider=void 0;const r=i(101),n=i(8),s=i(2),o=i(73);t.DataPointSelectionPaletteProvider=class{constructor(e){this.strokePaletteMode=o.EStrokePaletteMode.SOLID,this.fillPaletteMode=o.EFillPaletteMode.SOLID,(null==e?void 0:e.stroke)&&(this.selectedStroke=(0,s.parseColorToUIntArgb)(null==e?void 0:e.stroke)),(null==e?void 0:e.fill)&&(this.selectedFill=(0,s.parseColorToUIntArgb)(null==e?void 0:e.fill)),this.selectedPointMarker={stroke:this.selectedStroke,fill:this.selectedFill}}onAttached(e){this.seriesType?this.seriesType!==e.type&&(e.paletteProvider=o.DefaultPaletteProvider.createEmpty(),console.error("One instance of a DataPointSelectionPaletteProvider cannot be shared between series of different types")):this.seriesType=e.type}onDetached(){}overridePointMarkerArgb(e,t,i,r,n){if(null==n?void 0:n.isSelected)return this.selectedPointMarker}overrideStrokeArgb(e,t,i,r,s){if([n.ESeriesType.OhlcSeries,n.ESeriesType.CandlestickSeries,n.ESeriesType.ColumnSeries].includes(this.seriesType)&&(null==s?void 0:s.isSelected))return this.selectedStroke}overrideFillArgb(e,t,i,r,s){if([n.ESeriesType.StackedColumnSeries,n.ESeriesType.ColumnSeries,n.ESeriesType.CandlestickSeries].includes(this.seriesType)&&(null==s?void 0:s.isSelected))return this.selectedFill}toJSON(){return{type:r.EPaletteProviderType.DataPointSelection,options:{stroke:a(this.selectedStroke,s.parseArgbToHtmlColor),fill:a(this.selectedFill,s.parseArgbToHtmlColor)}}}};const a=(e,t)=>{if(e)return t(e)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FadeAnimation=void 0;const r=i(38),n=i(50);class s extends n.SeriesAnimation{constructor(e){var t;super(e),this.type=r.EAnimationType.Fade,this.isFadeEffectAnimation=null===(t=null==e?void 0:e.fadeEffect)||void 0===t||t}calculateAnimationValues(e,t,i,r,n=!1){e.SCRTAnimationHelperFade(t,r,i)}}t.FadeAnimation=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScaleAnimation=void 0;const r=i(38),n=i(50);class s extends n.SeriesAnimation{constructor(e){var t;super(e),this.type=r.EAnimationType.Scale,this.zeroLine=0,this.isOnStartAnimation=!0,this.zeroLine=null!==(t=null==e?void 0:e.zeroLine)&&void 0!==t?t:this.zeroLine}calculateAnimationValues(e,t,i,r,n=!1){const s=n?0:this.zeroLine;e.SCRTAnimationHelperScale(t,s,r,i)}toJSON(){const e=super.toJSON(),t={zeroLine:this.zeroLine};return Object.assign(e.options,t),e}}t.ScaleAnimation=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SweepAnimation=void 0;const r=i(38),n=i(50);class s extends n.SeriesAnimation{constructor(e){super(e),this.type=r.EAnimationType.Sweep,this.isOnStartAnimation=!0}calculateAnimationValues(e,t,i,r,n=!1){e.SCRTAnimationHelperSweep(t,r,i)}}t.SweepAnimation=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaveAnimation=void 0;const r=i(38),n=i(50);class s extends n.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Wave,this.pointDurationFraction=.2,this.zeroLine=0,this.isOnStartAnimation=!0,this.pointDurationFraction=null!==(t=null==e?void 0:e.pointDurationFraction)&&void 0!==t?t:this.pointDurationFraction,this.zeroLine=null!==(i=null==e?void 0:e.zeroLine)&&void 0!==i?i:this.zeroLine}calculateAnimationValues(e,t,i,r,n=!1){const{pointDurationFraction:s}=this,o=n?0:this.zeroLine;e.SCRTAnimationHelperWave(t,s,o,r,i)}toJSON(){const e=super.toJSON(),t={zeroLine:this.zeroLine,pointDurationFraction:this.pointDurationFraction};return Object.assign(e.options,t),e}}t.WaveAnimation=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastBandRenderableSeries=void 0;const r=i(8),n=i(362);class s extends n.BaseBandRenderableSeries{constructor(e,t){var i,n;super(e,t),this.type=r.ESeriesType.BandSeries,(null===(i=this.paletteProvider)||void 0===i?void 0:i.onAttached)&&(null===(n=this.paletteProvider)||void 0===n||n.onAttached(this))}}t.FastBandRenderableSeries=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBandRenderableSeries=void 0;const r=i(0),n=i(229),s=i(207),o=i(26),a=i(4),l=i(40),h=i(7),u=i(224),d=i(230),c=i(61),p=i(363);class g extends l.BaseRenderableSeries{constructor(e,t){var i,r,n,s;super(e,t),this.stroke=null!==(i=null==t?void 0:t.stroke)&&void 0!==i?i:a.SciChartSurfaceBase.DEFAULT_THEME.downBandSeriesLineColor,this.strokeY1Property=null!==(r=null==t?void 0:t.strokeY1)&&void 0!==r?r:a.SciChartSurfaceBase.DEFAULT_THEME.upBandSeriesLineColor,this.fillProperty=null!==(n=null==t?void 0:t.fill)&&void 0!==n?n:a.SciChartSurfaceBase.DEFAULT_THEME.upBandSeriesFillColor,this.fillY1Property=null!==(s=null==t?void 0:t.fillY1)&&void 0!==s?s:a.SciChartSurfaceBase.DEFAULT_THEME.downBandSeriesFillColor,this.strokeY1DashArrayProperty=null==t?void 0:t.strokeY1DashArray,this.strokeDashArrayProperty=null==t?void 0:t.strokeDashArray,this.drawingProviders.push(new d.BandSeriesDrawingProvider(e,this)),this.drawingProviders.push(new c.PointMarkerDrawingProvider(e,this)),this.drawingProviders.push(new c.PointMarkerDrawingProvider(e,this,e=>e.y1Values,e=>e.y1SplineValues)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new u.BandSeriesDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.stroke===t.downBandSeriesLineColor&&(this.stroke=e.downBandSeriesLineColor),this.strokeY1===t.upBandSeriesLineColor&&(this.strokeY1=e.upBandSeriesLineColor),this.fill===t.upBandSeriesFillColor&&(this.fill=e.upBandSeriesFillColor),this.fillY1===t.downBandSeriesFillColor&&(this.fillY1=e.downBandSeriesFillColor)}get fill(){return(0,o.stripAutoColor)(this.fillProperty)}set fill(e){this.fillProperty!==e&&(this.fillProperty=e,this.notifyPropertyChanged(h.PROPERTY.FILL))}get strokeY1(){return(0,o.stripAutoColor)(this.strokeY1Property)}set strokeY1(e){this.strokeY1Property!==e&&(this.strokeY1Property=e,this.notifyPropertyChanged(h.PROPERTY.STROKE_Y1))}get fillY1(){return(0,o.stripAutoColor)(this.fillY1Property)}set fillY1(e){this.fillY1Property!==e&&(this.fillY1Property=e,this.notifyPropertyChanged(h.PROPERTY.FILL_Y1))}get strokeDashArray(){return this.strokeDashArrayProperty}set strokeDashArray(e){this.strokeDashArrayProperty=e,this.notifyPropertyChanged(h.PROPERTY.STROKE_DASH_ARRAY)}get strokeY1DashArray(){return this.strokeY1DashArrayProperty}set strokeY1DashArray(e){this.strokeY1DashArrayProperty=e,this.notifyPropertyChanged(h.PROPERTY.STROKE_Y1_DASH_ARRAY)}getNativeY1Values(){return this.dataSeries.getNativeY1Values()}delete(){super.delete(),this.xyyTempPointSeries=(0,r.deleteSafe)(this.xyyTempPointSeries)}toPointSeries(e){if(e){this.xyyTempPointSeries?this.xyyTempPointSeries.xRange=e.xVisibleRange:this.xyyTempPointSeries=new n.XyyPointSeriesResampled(this.webAssemblyContext,e.xVisibleRange),this.pointSeries?this.pointSeries.xRange=e.xVisibleRange:this.pointSeries=new n.XyyPointSeriesResampled(this.webAssemblyContext,e.xVisibleRange);const t=this.pointSeries,i=this.dataSeries,r=i.getNativeXValues(),s=i.getNativeYValues(),o=i.getNativeY1Values();this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,e,r,s,this.xyyTempPointSeries.intIndexes,this.xyyTempPointSeries.xValues,this.xyyTempPointSeries.yValues,!1);const a=this.xyyTempPointSeries.intIndexes.size();this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,e,r,o,this.xyyTempPointSeries.intIndexes,this.xyyTempPointSeries.xValues,this.xyyTempPointSeries.y1Values);const l=this.xyyTempPointSeries.intIndexes.size()-a,h=this.resamplerHelper.mergeIndexes(this.xyyTempPointSeries.intIndexes,a,l,t.intIndexes);return this.xyyTempPointSeries.intIndexes.clear(),this.resamplerHelper.copyValuesByIndexes(t.intIndexes,r,s,o,h,e.isCategoryAxis,t.xValues,t.yValues,t.y1Values),e.isCategoryAxis&&t.updateIndexes(),t.clearIntIndexes(),t}return new s.XyyPointSeriesWrapped(this.dataSeries)}toJSON(e=!1){const t=super.toJSON(e),i={fill:this.fill,fillY1:this.fillY1,strokeDashArray:this.strokeDashArray,strokeY1:this.strokeY1,strokeY1DashArray:this.strokeY1DashArray};return Object.assign(t.options,i),t}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.fillProperty.startsWith(o.AUTO_COLOR)){const r=i.getFillColor(e,t,this.webAssemblyContext);this.fill=o.AUTO_COLOR+this.adjustAutoColor("fill",r)}const r=(e+Math.floor(t/2))%t;if(this.strokeY1Property.startsWith(o.AUTO_COLOR)){const e=i.getStrokeColor(r,t,this.webAssemblyContext);this.strokeY1=o.AUTO_COLOR+this.adjustAutoColor("strokeY1",e)}if(this.fillY1Property.startsWith(o.AUTO_COLOR)){const e=i.getFillColor(r,t,this.webAssemblyContext);this.fillY1=o.AUTO_COLOR+this.adjustAutoColor("fillY1",e)}}newHitTestProvider(){return new p.BandSeriesHitTestProvider(this,this.webAssemblyContext)}}t.BaseBandRenderableSeries=g},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BandSeriesHitTestProvider=void 0;const r=i(31),n=i(32),s=i(25);class o extends r.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return s.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:o,isVerticalChart:a}=this.currentRenderPassData,l=a?i.y:i.x,h=a?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return s.HitTestInfo.empty();const d=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),p=u.getNativeYValues(),g=u.getNativeY1Values(),f=n.hitTestHelpers.createHitTestInfo(this.parentSeries,r,o,a,u,c,p,l,h,d,0);if(u.dataDistributionCalculator.isSortedAscending&&d>=0){f.y1Value=g.get(d),f.y1Coord=o.getCoordinate(f.y1Value);const e=n.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine,r,o,u.getNativeXValues(),e=>p.get(e),e=>g.get(e),d,l,h);f.isHit=e.isHit,f.point2dataSeriesIndex=e.secondPointIndex,void 0!==e.secondPointIndex&&(f.point2xValue=c.get(e.secondPointIndex),f.point2xCoord=r.getCoordinate(f.point2xValue),f.point2yValue=p.get(e.secondPointIndex),f.point2yCoord=o.getCoordinate(f.point2yValue),f.point2y1Value=g.get(e.secondPointIndex),f.point2y1Coord=o.getCoordinate(f.point2y1Value))}else f.isHit=!1;return f}hitTestDataPoint(e,t,i=r.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){const o=this.getTranslatedHitTestPoint(e,t);if(!o)return s.HitTestInfo.empty();const{xCoordinateCalculator:a,yCoordinateCalculator:l,isVerticalChart:h}=this.currentRenderPassData,u=h?o.y:o.x,d=h?o.x:o.y,c=this.parentSeries.dataSeries;if(!c)return s.HitTestInfo.empty();const p=n.hitTestHelpers.getNearestXyyPoint(a,l,c,u,d),g=n.hitTestHelpers.createHitTestInfo(this.parentSeries,a,l,h,c,c.getNativeXValues(),c.getNativeYValues(),u,d,p,i);return p>=0?(g.y1Value=c.getNativeY1Values().get(p),g.y1Coord=l.getCoordinate(g.y1Value),g.isHit=n.hitTestHelpers.testIsHitForPoint(a,l,c.getNativeXValues(),c.getNativeYValues(),p,u,d,i)||n.hitTestHelpers.testIsHitForPoint(a,l,c.getNativeXValues(),c.getNativeY1Values(),p,u,d,i)):g.isHit=!1,g}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return s.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:o,isVerticalChart:a}=this.currentRenderPassData,l=a?i.y:i.x,h=a?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return s.HitTestInfo.empty();const d=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),p=u.getNativeYValues(),g=u.getNativeY1Values(),f=n.hitTestHelpers.createHitTestInfo(this.parentSeries,r,o,a,u,c,p,l,h,d,0);if(d>=0?(f.isHit=f.isWithinDataBounds,f.y1Value=g.get(d),f.y1Coord=o.getCoordinate(f.y1Value)):f.isHit=!1,u.dataDistributionCalculator.isSortedAscending&&d>=0){const e=c.size(),t=c.get(d),i=r.getDataValue(l);if(!(d===e-1&&i>=t||0===d&&i<=t)){const e=n.hitTestHelpers.testIsHitForLine(r,o,c,p,d,l,h,0);f.point2dataSeriesIndex=e.secondPointIndex,void 0!==e.secondPointIndex&&(f.point2xValue=c.get(e.secondPointIndex),f.point2xCoord=r.getCoordinate(f.point2xValue),f.point2yValue=p.get(e.secondPointIndex),f.point2yCoord=o.getCoordinate(f.point2yValue),f.point2y1Value=g.get(e.secondPointIndex),f.point2y1Coord=o.getCoordinate(f.point2y1Value))}}return f}}t.BandSeriesHitTestProvider=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastBubbleRenderableSeries=void 0;const r=i(8),n=i(365),s=i(97),o=i(40),a=i(366),l=i(367),h=i(225),u=i(7);class d extends o.BaseRenderableSeries{constructor(e,t){var i,n,o;super(e,t),this.type=r.ESeriesType.BubbleSeries,this.zMultiplierProperty=1,this.zMultiplierProperty=null!==(i=null==t?void 0:t.zMultiplier)&&void 0!==i?i:this.zMultiplierProperty,this.pointMarker||(this.pointMarker=new s.EllipsePointMarker(e,{width:64,height:64})),(null===(n=this.paletteProvider)||void 0===n?void 0:n.onAttached)&&(null===(o=this.paletteProvider)||void 0===o||o.onAttached(this)),this.drawingProviders=[],this.drawingProviders.push(new a.BubbleSeriesDrawingProvider(e,this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new h.BubbleSeriesDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}get paletteProvider(){return this.paletteProviderProperty}set paletteProvider(e){this.setPaletteProvider(e)}get zMultiplier(){return this.zMultiplierProperty}set zMultiplier(e){this.zMultiplierProperty=e,this.notifyPropertyChanged(u.PROPERTY.Z_MULTIPLIER)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.stroke===t.lineSeriesColor&&(this.stroke=e.lineSeriesColor)}getBubbleDiameter(e){return this.dataSeries.getNativeZValues().get(e)}delete(){super.delete()}getNativeZValues(){return this.dataSeries.getNativeZValues()}toPointSeries(e){return new n.XyzPointSeriesWrapped(this.dataSeries)}newHitTestProvider(){return new l.BubbleSeriesHitTestProvider(this,this.webAssemblyContext)}toJSON(e=!1){const t=super.toJSON(e),i={zMultiplier:this.zMultiplier};return Object.assign(t.options,i),t}}t.FastBubbleRenderableSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyzPointSeriesWrapped=void 0;const r=i(94);class n extends r.BasePointSeriesWrapped{constructor(e){super(e),this.zValues=e.getNativeZValues()}}t.XyzPointSeriesWrapped=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BubbleSeriesDrawingProvider=void 0;const r=i(0),n=i(6),s=i(49);class o extends s.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTBubbleSeriesDrawingProvider}onSeriesPropertyChange(e){}draw(e,t){const i=this.parentSeries.pointMarker;if(void 0===i)return;const r=i.getSprite(),s=t.pointSeries,o=t.xCoordinateCalculator.isCategoryCoordinateCalculator,a=new this.webAssemblyContext.SCRTPointDrawingParams,l=s.xValues,h=s.yValues,u=s.zValues;a.count=h.size(),a.verticalChart=t.isVerticalChart,a.forceShaderMethod=!0,a.SetSpriteTexture(r.getTexture()),super.applyStrokeFillPaletting(this.parentSeries.stroke,void 0,void 0,void 0,this.parentSeries.opacity),a.SetPalettedColors(this.palettingState.palettedColors),a.zMultiplier=this.parentSeries.zMultiplier*n.DpiHelper.PIXEL_RATIO;const d=e.getNativeContext();this.drawPoints(d,o?s.indexes:l,h,u,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,a,this.parentSeries.parentSurface.seriesViewRect),a.delete()}delete(){this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),super.delete()}overridePaletteProviderColors(e,t,i,r,n,s){if(e.hasPointMarkerPaletteProvider()){const o=e.paletteProvider.overridePointMarkerArgb(t,i,r,n,s);if(o)return o}return{stroke:void 0,fill:void 0}}isGradientFillPaletting(e){return!1}drawPoints(e,t,i,r,n,s,o,a){this.nativeDrawingProvider.DrawPointsVec(e,t,i,r,n,s,o)}}t.BubbleSeriesDrawingProvider=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BubbleSeriesHitTestProvider=void 0;const r=i(11),n=i(6),s=i(31),o=i(32),a=i(25);class l extends s.BaseHitTestProvider{hitTest(e,t,i=0){const s=this.getTranslatedHitTestPoint(e,t);if(!s)return a.HitTestInfo.empty();const{xCoordinateCalculator:l,yCoordinateCalculator:h,isVerticalChart:u}=this.currentRenderPassData,d=u?s.y:s.x,c=u?s.x:s.y,p=this.parentSeries.dataSeries;if(!p)return a.HitTestInfo.empty();const g=o.hitTestHelpers.getNearestXyPoint(l,h,p,d,c),f=p.getNativeXValues(),y=p.getNativeYValues(),v=p.getNativeZValues(),m=o.hitTestHelpers.createHitTestInfo(this.parentSeries,l,h,u,p,f,y,d,c,g,i);if(g>=0){m.zValue=v.get(g);const e=(0,r.calcDistance)(d,c,m.xCoord,m.yCoord);m.isHit=e<m.zValue*n.DpiHelper.PIXEL_RATIO/2+i;const t=l.isCategoryCoordinateCalculator,s=t?0:f.get(0),o=l.getCoordinate(s),a=p.getNativeZValues().get(0)/2,h=t?f.size()-1:f.get(f.size()-1),u=l.getCoordinate(h),y=p.getNativeZValues().get(f.size()-1)/2;m.isWithinDataBounds=o<u?o-a<=m.hitTestPoint.x&&m.hitTestPoint.x<=u+y:u-y<=m.hitTestPoint.x&&m.hitTestPoint.x<=o+a}else m.isHit=!1;return m}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return a.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:n,isVerticalChart:s}=this.currentRenderPassData,l=s?i.y:i.x,h=s?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return a.HitTestInfo.empty();const d=u.getNativeXValues(),c=u.getNativeYValues(),p=u.getNativeZValues(),g=o.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),f=o.hitTestHelpers.createHitTestInfo(this.parentSeries,r,n,s,u,d,c,l,h,g,0);if(g>=0){f.zValue=p.get(g);const e=r.isCategoryCoordinateCalculator,t=e?0:d.get(0),i=r.getCoordinate(t),n=u.getNativeZValues().get(0)/2,s=e?d.size()-1:d.get(d.size()-1),o=r.getCoordinate(s),a=u.getNativeZValues().get(d.size()-1)/2;f.isWithinDataBounds=i<o?i-n<=f.hitTestPoint.x&&f.hitTestPoint.x<=o+a:o-a<=f.hitTestPoint.x&&f.hitTestPoint.x<=i+n,f.isHit=f.isWithinDataBounds}else f.isHit=!1;return f}}t.BubbleSeriesHitTestProvider=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastCandlestickRenderableSeries=void 0;const r=i(8),n=i(26),s=i(4),o=i(369),a=i(7),l=i(160);class h extends o.BaseOhlcRenderableSeries{constructor(e,t){var i,n;super(e,t),this.type=r.ESeriesType.CandlestickSeries,this.brushUp=(null==t?void 0:t.brushUp)||s.SciChartSurfaceBase.DEFAULT_THEME.upBodyBrush,this.brushDown=(null==t?void 0:t.brushDown)||s.SciChartSurfaceBase.DEFAULT_THEME.downBodyBrush,(null===(i=this.paletteProvider)||void 0===i?void 0:i.onAttached)&&(null===(n=this.paletteProvider)||void 0===n||n.onAttached(this)),this.drawingProviders=[],this.drawingProviders.push(new l.OhlcSeriesDrawingProvider(e,this,l.EOhlcDrawingMode.Candles))}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.brushUp===t.upBodyBrush&&(this.brushUp=e.upBodyBrush),this.brushDown===t.downBodyBrush&&(this.brushDown=e.downBodyBrush)}get brushUp(){return(0,n.stripAutoColor)(this.brushUpProperty)}set brushUp(e){this.brushUpProperty=e,this.notifyPropertyChanged(a.PROPERTY.BRUSH_UP)}get brushDown(){return(0,n.stripAutoColor)(this.brushDownProperty)}set brushDown(e){this.brushDownProperty=e,this.notifyPropertyChanged(a.PROPERTY.BRUSH_DOWN)}toJSON(e=!1){const t=super.toJSON(e),i={brushDown:this.brushDown,brushUp:this.brushUp};return Object.assign(t.options,i),t}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.brushUpProperty.startsWith(n.AUTO_COLOR)){const r=i.getFillColor(e,t,this.webAssemblyContext);this.brushUp=n.AUTO_COLOR+this.adjustAutoColor("brushUp",r)}const r=(e+Math.floor(t/2))%t;if(this.brushDownProperty.startsWith(n.AUTO_COLOR)){const e=i.getFillColor(r,t,this.webAssemblyContext);this.brushDown=n.AUTO_COLOR+this.adjustAutoColor("brushDown",e)}}}t.FastCandlestickRenderableSeries=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseOhlcRenderableSeries=void 0;const r=i(0),n=i(3),s=i(10),o=i(370),a=i(371),l=i(229),h=i(114),u=i(26),d=i(4),c=i(40),p=i(7),g=i(372);class f extends c.BaseRenderableSeries{constructor(e,t){super(e,t),this.strokeUp=(null==t?void 0:t.strokeUp)||d.SciChartSurfaceBase.DEFAULT_THEME.upWickColor,this.strokeDown=(null==t?void 0:t.strokeDown)||d.SciChartSurfaceBase.DEFAULT_THEME.downWickColor,this.dataPointWidth=(null==t?void 0:t.dataPointWidth)||.5,this.strokeThickness=(null==t?void 0:t.strokeThickness)||1,(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.stroke===t.lineSeriesColor&&(this.stroke=e.lineSeriesColor),this.strokeUp===t.upWickColor&&(this.strokeUp=e.upWickColor),this.strokeDown===t.downWickColor&&(this.strokeDown=e.downWickColor)}get strokeUp(){return(0,u.stripAutoColor)(this.strokeUpProperty)}set strokeUp(e){this.strokeUpProperty=e,this.notifyPropertyChanged(p.PROPERTY.STROKE_UP)}get strokeDown(){return(0,u.stripAutoColor)(this.strokeDownProperty)}set strokeDown(e){this.strokeDownProperty=e,this.notifyPropertyChanged(p.PROPERTY.STROKE_DOWN)}get dataPointWidth(){return this.dataPointWidthProperty}set dataPointWidth(e){this.dataPointWidthProperty=e,this.notifyPropertyChanged(p.PROPERTY.DATA_POINT_WIDTH)}notifyPropertyChanged(e){if(super.notifyPropertyChanged(e),e===p.PROPERTY.DATA_SERIES&&void 0!==this.dataSeries&&this.dataSeries.type!==s.EDataSeriesType.Ohlc)throw new Error("DataSeries for Candlestick or Ohlc series must be type OhlcDataSeries")}getXRange(){const e=super.getXRange(),t=this.dataSeries.count();if(t>1){const i=e.diff/(t-1)*this.dataPointWidth/2;return new n.NumberRange(e.min-i,e.max+i)}return e}delete(){super.delete(),this.resamplerHelper=(0,r.deleteSafe)(this.resamplerHelper),this.xyyTempPointSeries=(0,r.deleteSafe)(this.xyyTempPointSeries),this.pointSeries=(0,r.deleteSafe)(this.pointSeries)}getNativeOpenValues(){return this.dataSeries.getNativeOpenValues()}getNativeHighValues(){return this.dataSeries.getNativeHighValues()}getNativeLowValues(){return this.dataSeries.getNativeLowValues()}getNativeCloseValues(){return this.dataSeries.getNativeYValues()}resolveAutoColors(e,t,i){if(this.strokeUpProperty.startsWith(u.AUTO_COLOR)){const r=i.getStrokeColor(e,t,this.webAssemblyContext);this.strokeUp=u.AUTO_COLOR+this.adjustAutoColor("strokeUp",r)}const r=(e+Math.floor(t/2))%t;if(this.strokeDownProperty.startsWith(u.AUTO_COLOR)){const e=i.getStrokeColor(r,t,this.webAssemblyContext);this.strokeDown=u.AUTO_COLOR+this.adjustAutoColor("strokeDown",e)}}toPointSeries(e){if(e){this.xyyTempPointSeries?this.xyyTempPointSeries.xRange=e.xVisibleRange:this.xyyTempPointSeries=new l.XyyPointSeriesResampled(this.webAssemblyContext,e.xVisibleRange),this.pointSeries?this.pointSeries.xRange=e.xVisibleRange:this.pointSeries=new o.OhlcPointSeriesResampled(this.webAssemblyContext,e.xVisibleRange);const t=this.pointSeries,i=this.dataSeries,r=i.getNativeXValues(),n=i.getNativeOpenValues(),s=i.getNativeHighValues(),a=i.getNativeLowValues(),u=i.getNativeCloseValues(),d=i.getNativeIndexes(),c=e.clone({resamplingMode:e.resamplingMode===h.EResamplingMode.None?h.EResamplingMode.None:h.EResamplingMode.Max});this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,c,r,s,this.xyyTempPointSeries.intIndexes,this.xyyTempPointSeries.xValues,t.highValues),this.xyyTempPointSeries.clearIntIndexes();const p=e.clone({resamplingMode:e.resamplingMode===h.EResamplingMode.None?h.EResamplingMode.None:h.EResamplingMode.Min});this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,p,r,a,this.xyyTempPointSeries.intIndexes,this.xyyTempPointSeries.xValues,t.lowValues),this.xyyTempPointSeries.clearIntIndexes(),this.xyyTempPointSeries.y1Values.clear();const g=e.clone({resamplingMode:e.resamplingMode===h.EResamplingMode.None?h.EResamplingMode.None:h.EResamplingMode.Min});this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,g,r,d,t.intIndexes,this.xyyTempPointSeries.xValues,this.xyyTempPointSeries.y1Values);const f=t.intIndexes.size();this.xyyTempPointSeries.y1Values.clear();const y=t.intIndexes.get(3)-t.intIndexes.get(2)-1;return this.resamplerHelper.copyValuesByIndexes(t.intIndexes,r,n,u,f,e.isCategoryAxis,t.xValues,t.openValues,t.closeValues,y),e.isCategoryAxis&&t.updateIndexes(),t.clearIntIndexes(),t}return new a.OhlcPointSeriesWrapped(this.dataSeries)}newHitTestProvider(){return new g.OhlcSeriesHitTestProvider(this,this.webAssemblyContext)}}t.BaseOhlcRenderableSeries=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcPointSeriesResampled=void 0;const r=i(197);class n extends r.BasePointSeriesResampled{constructor(e,t){super(e,t),this.openValues=new e.SCRTDoubleVector,this.highValues=new e.SCRTDoubleVector,this.lowValues=new e.SCRTDoubleVector,this.closeValues=this.yValues}delete(){super.delete(),this.openValues.delete(),this.highValues.delete(),this.lowValues.delete()}debugOutputForUnitTests(){console.log("points count "+this.count),console.log("xResampled at min",this.xValues.get(0)),console.log("openResampled at min",this.openValues.get(0)),console.log("highResampled at min",this.highValues.get(0)),console.log("lowResampled at min",this.lowValues.get(0)),console.log("closeResampled at min",this.closeValues.get(0));const e=Math.round(this.count/2);console.log("middle",e),console.log("xResampled at middle",this.xValues.get(e)),console.log("openResampled at middle",this.openValues.get(e)),console.log("highResampled at middle",this.highValues.get(e)),console.log("lowResampled at middle",this.lowValues.get(e)),console.log("closeResampled at middle",this.closeValues.get(e));const t=this.count-1;console.log("xResampled at end",this.xValues.get(t)),console.log("openResampled at end",this.openValues.get(t)),console.log("highResampled at end",this.highValues.get(t)),console.log("lowResampled at end",this.lowValues.get(t)),console.log("closeResampled at end",this.closeValues.get(t))}}t.OhlcPointSeriesResampled=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcPointSeriesWrapped=void 0;const r=i(94);class n extends r.BasePointSeriesWrapped{constructor(e){super(e),this.openValues=e.getNativeOpenValues(),this.highValues=e.getNativeHighValues(),this.lowValues=e.getNativeLowValues(),this.closeValues=this.yValues}}t.OhlcPointSeriesWrapped=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcSeriesHitTestProvider=void 0;const r=i(11),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t,i=0){const r=this.getTranslatedHitTestPoint(e,t);if(!r)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?r.y:r.x,u=l?r.x:r.y,d=this.parentSeries,c=this.parentSeries.dataSeries;if(!c)return o.HitTestInfo.empty();const p=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,c,h,c.dataDistributionCalculator.isSortedAscending),g=c.getNativeXValues(),f=c.getNativeYValues(),y=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,c,g,f,h,u,p,i);if(p>=0){const e=s.hitTestHelpers.testIsHitForOHLC(n,a,d,c,p,h,u,i);y.isHit=e.isHit,y.openValue=e.openValue,y.highValue=e.highValue,y.lowValue=e.lowValue,y.closeValue=e.closeValue}else y.isHit=!1;return y}hitTestForDataPointSelectionModifier(e,t,i=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){return this.hitTest(e,t,i)}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=d.getNativeXValues(),p=d.getNativeYValues(),g=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,d,h,d.dataDistributionCalculator.isSortedAscending),f=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,d,c,p,h,u,g,0);if(g>=0){f.openValue=d.getNativeOpenValues().get(g),f.highValue=d.getNativeHighValues().get(g),f.lowValue=d.getNativeLowValues().get(g),f.closeValue=d.getNativeCloseValues().get(g);const e=n.isCategoryCoordinateCalculator,t=e?0:c.get(0),i=e?c.size()-1:c.get(c.size()-1),{dataPointWidth:s}=this.parentSeries;f.isWithinDataBounds=(0,r.testIsInInterval)(f.hitTestPointValues.x,t,i,s/2),f.isHit=f.isWithinDataBounds}else f.isHit=!1;return f}}t.OhlcSeriesHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adjustRangeByStrokeThickness=t.FastErrorBarsRenderableSeries=void 0;const r=i(0),n=i(3),s=i(58),o=i(231),a=i(117),l=i(161),h=i(8),u=i(10),d=i(374),c=i(40),p=i(7),g=i(375),f=i(61),y=i(376);class v extends c.BaseRenderableSeries{constructor(e,t){var i,r,n,s,u,d,c,p,y;super(e,t),this.type=h.ESeriesType.ErrorBarsSeries,this.dataPointWidthProperty=.5,this.dataPointWidthModeProperty=o.EDataPointWidthMode.Relative,this.errorModeProperty=l.EErrorMode.Both,this.errorDirectionProperty=a.EErrorDirection.Vertical,this.strokeDashArrayProperty=[],this.drawWhiskersProperty=!0,this.drawConnectorProperty=!0,this.dataPointWidth=null!==(i=null==t?void 0:t.dataPointWidth)&&void 0!==i?i:this.dataPointWidthProperty,this.errorModeProperty=null!==(r=null==t?void 0:t.errorMode)&&void 0!==r?r:this.errorModeProperty,this.errorDirectionProperty=null!==(n=null==t?void 0:t.errorDirection)&&void 0!==n?n:this.errorDirectionProperty,this.dataPointWidthMode=null!==(s=null==t?void 0:t.dataPointWidthMode)&&void 0!==s?s:this.dataPointWidthModeProperty,this.strokeDashArray=null!==(u=null==t?void 0:t.strokeDashArray)&&void 0!==u?u:this.strokeDashArrayProperty,this.drawWhiskers=null!==(d=null==t?void 0:t.drawWhiskers)&&void 0!==d?d:this.drawWhiskersProperty,this.drawConnector=null!==(c=null==t?void 0:t.drawConnector)&&void 0!==c?c:this.drawConnectorProperty,this.drawingProviders=[new g.ErrorSeriesDrawingProvider(e,this),new f.PointMarkerDrawingProvider(e,this)],(null===(p=this.paletteProvider)||void 0===p?void 0:p.onAttached)&&(null===(y=this.paletteProvider)||void 0===y||y.onAttached(this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.stroke===t.lineSeriesColor&&(this.stroke=e.lineSeriesColor)}get strokeDashArray(){return this.strokeDashArrayProperty}set strokeDashArray(e){this.strokeDashArrayProperty=e,this.notifyPropertyChanged(p.PROPERTY.STROKE_DASH_ARRAY)}get drawWhiskers(){return this.drawWhiskersProperty}set drawWhiskers(e){this.drawWhiskersProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_WHISKERS)}get drawConnector(){return this.drawConnectorProperty}set drawConnector(e){this.drawConnectorProperty=e,this.notifyPropertyChanged(p.PROPERTY.DRAW_CONNECTOR)}get paletteProvider(){}set paletteProvider(e){throw new Error("paletteProvider is not supported by FastErrorBarsRenderableSeries!")}get dataPointWidth(){return this.dataPointWidthProperty}set dataPointWidth(e){this.dataPointWidthProperty=e,this.notifyPropertyChanged(p.PROPERTY.DATA_POINT_WIDTH)}get errorMode(){return this.errorModeProperty}set errorMode(e){this.errorModeProperty=e,this.notifyPropertyChanged(p.PROPERTY.ERROR_MODE)}get errorDirection(){return this.errorDirectionProperty}set errorDirection(e){this.errorDirectionProperty=e,this.notifyPropertyChanged(p.PROPERTY.ERROR_DIRECTION)}get dataPointWidthMode(){return this.dataPointWidthModeProperty}set dataPointWidthMode(e){this.dataPointWidthModeProperty=e,this.notifyPropertyChanged(p.PROPERTY.DATA_POINT_WIDTH_MODE)}delete(){super.delete(),this.pointSeries=(0,r.deleteSafe)(this.pointSeries)}getDataPointWidth(e,t){const i=this.errorDirection===a.EErrorDirection.Vertical?this.dataSeries.getNativeXValues():this.dataSeries.getNativeYValues(),r=e.viewportDimension,n=e.isCategoryCoordinateCalculator;return(0,c.getDataPointWidth)(i,e,r,t,n,this.webAssemblyContext)}getXRange(){var e;const i=this.errorDirection===a.EErrorDirection.Vertical,r=this.errorMode!==l.EErrorMode.Low,n=this.errorMode!==l.EErrorMode.High,o=this.dataSeries.getXRange(u.EDataSeriesValueType.Default,!i,r,n);return this.xAxis.type===s.EAxisType.LogarithmicAxis?o:i?this.adjustRangeByDataPointWidth(o):(0,t.adjustRangeByStrokeThickness)(o,this.strokeThickness,null===(e=this.parentSurface.seriesViewRect)||void 0===e?void 0:e.width)}getYRange(e,i=!1){var r;const n=this.errorDirection===a.EErrorDirection.Horizontal,o=this.errorMode!==l.EErrorMode.Low,h=this.errorMode!==l.EErrorMode.High,d=this.isRunningDataAnimation?u.EDataSeriesValueType.FinalAnimationValues:u.EDataSeriesValueType.Default,c=this.dataSeries.getWindowedYRange(e,!0,i,d,n,o,h);return this.yAxis.type===s.EAxisType.LogarithmicAxis?c:n?this.adjustRangeByDataPointWidth(c):(0,t.adjustRangeByStrokeThickness)(c,this.strokeThickness,null===(r=this.parentSurface.seriesViewRect)||void 0===r?void 0:r.height)}toJSON(e=!1){const t=super.toJSON(e),i={dataPointWidth:this.dataPointWidth,dataPointWidthMode:this.dataPointWidthMode,errorDirection:this.errorDirection,errorMode:this.errorMode,drawWhiskers:this.drawWhiskers,drawConnector:this.drawConnector,strokeDashArray:this.strokeDashArray};return Object.assign(t.options,i),t}toPointSeries(e){if(e)throw new Error("Error Bars Series don't support resampling!");return new d.HlcPointSeriesWrapped(this.dataSeries)}newHitTestProvider(){return new y.ErrorSeriesHitTestProvider(this,this.webAssemblyContext)}adjustRangeByDataPointWidth(e){var t,i,r,s;const l=this.dataSeries.count();if(l>1){const h=this.errorDirection===a.EErrorDirection.Vertical?null!==(i=null===(t=this.parentSurface.seriesViewRect)||void 0===t?void 0:t.width)&&void 0!==i?i:0:null!==(s=null===(r=this.parentSurface.seriesViewRect)||void 0===r?void 0:r.height)&&void 0!==s?s:0,u=this.dataPointWidthMode===o.EDataPointWidthMode.Relative?e.diff/(l-1)*this.dataPointWidth/2:h&&(0,c.getDelta)({range:e,areaSize:h,pointSize:this.dataPointWidth});return new n.NumberRange(e.min-u,e.max+u)}return e}}t.FastErrorBarsRenderableSeries=v;t.adjustRangeByStrokeThickness=(e,t,i=0)=>{const r=i&&(0,c.getDelta)({pointSize:t,areaSize:i,range:e});return new n.NumberRange(e.min-r,e.max+r)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlcPointSeriesWrapped=void 0;const r=i(94);class n extends r.BasePointSeriesWrapped{constructor(e){super(e),this.highValues=e.getNativeHighValues(),this.lowValues=e.getNativeLowValues(),this.closeValues=this.yValues}}t.HlcPointSeriesWrapped=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorSeriesDrawingProvider=void 0;const r=i(0),n=i(58),s=i(231),o=i(117),a=i(161),l=i(35),h=i(30),u=i(118),d=i(12),c=i(7),p=i(49);class g extends p.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.linesPenCache=new l.Pen2DCache(e)}onAttachSeries(){super.onAttachSeries();const{stroke:e,strokeThickness:t,opacity:i,strokeDashArray:r}=this.parentSeries;(0,l.createPenInCache)(this.linesPenCache,e,t,i,r)}onDetachSeries(){super.onDetachSeries(),this.delete()}delete(){this.linesPenCache=(0,r.deleteSafe)(this.linesPenCache),super.delete()}draw(e,t){const i=(0,l.getScrtPenFromCache)(this.linesPenCache);if(!i)return;const r=t.pointSeries,c=(0,d.getVectorColorVertex)(this.webAssemblyContext),p=t.xCoordinateCalculator.isCategoryCoordinateCalculator,g=r.xValues,f=p?r.indexes:g,y=r.yValues,v=r.highValues,m=r.lowValues,S=this.parentSeries.errorDirection===o.EErrorDirection.Vertical,P=S?t.xCoordinateCalculator:t.yCoordinateCalculator,C=.5*(this.parentSeries.dataPointWidthMode===s.EDataPointWidthMode.Absolute?this.parentSeries.dataPointWidth:this.parentSeries.getDataPointWidth(P,this.parentSeries.dataPointWidth)),A=this.parentSeries.xAxis.type===n.EAxisType.LogarithmicAxis,x=this.parentSeries.yAxis.type===n.EAxisType.LogarithmicAxis,b=this.parentSeries.xAxis.isNegative,T=this.parentSeries.yAxis.isNegative,E=this.parentSeries.errorMode!==a.EErrorMode.Low,w=this.parentSeries.errorMode!==a.EErrorMode.High,R=f.size();if(S)for(let e=0;e<R;++e){const i=f.get(e),r=y.get(e);let n=E?v.get(e):r,s=w?m.get(e):r;const o=x&&!T&&s<=0;o&&(s=this.parentSeries.yAxis.visibleRange.min);const a=x&&T&&n>=0;a&&(n=this.parentSeries.yAxis.visibleRange.max);const l=t.xCoordinateCalculator.getCoordinate(i),h=t.yCoordinateCalculator.getCoordinate(r),u=t.yCoordinateCalculator.getCoordinate(n),d=t.yCoordinateCalculator.getCoordinate(s),p=l-C,g=l+C;this.parentSeries.drawConnector&&this.addLineVertices(c,l,isNaN(n)?h:u,l,isNaN(s)?h:d),E&&!a&&this.parentSeries.drawWhiskers&&this.addLineVertices(c,p,u,g,u),w&&!o&&this.parentSeries.drawWhiskers&&this.addLineVertices(c,p,d,g,d)}else for(let e=0;e<R;++e){const i=f.get(e),r=y.get(e);let n=w?m.get(e):i,s=E?v.get(e):i;const o=A&&!b&&n<=0;o&&(n=u.MIN_LOG_AXIS_VALUE);const a=A&&b&&s>=0;a&&(s=-u.MIN_LOG_AXIS_VALUE);const l=t.xCoordinateCalculator.getCoordinate(i),h=t.yCoordinateCalculator.getCoordinate(r),d=t.xCoordinateCalculator.getCoordinate(s),p=t.xCoordinateCalculator.getCoordinate(n),g=h-C,S=h+C;this.parentSeries.drawConnector&&this.addLineVertices(c,isNaN(n)?l:p,h,isNaN(s)?l:d,h),E&&!a&&this.parentSeries.drawWhiskers&&this.addLineVertices(c,d,g,d,S),w&&!o&&this.parentSeries.drawWhiskers&&this.addLineVertices(c,p,g,p,S)}e.drawLinesNative(c,i,h.ELineDrawMode.DiscontinuousLine)}onDpiChanged(e){super.onDpiChanged(e),this.onSeriesPropertyChange(c.PROPERTY.STROKE)}onSeriesPropertyChange(e){super.onSeriesPropertyChange(e);const{stroke:t,strokeThickness:i,opacity:r,strokeDashArray:n}=this.parentSeries;e!==c.PROPERTY.STROKE&&e!==c.PROPERTY.STROKE_THICKNESS&&e!==c.PROPERTY.OPACITY&&e!==c.PROPERTY.STROKE_DASH_ARRAY||(0,l.createPenInCache)(this.linesPenCache,t,i,r,n)}addLineVertices(e,t,i,r,n){this.parentSeries.xAxis.isVerticalChart?(e.push_back((0,d.getVertex)(this.webAssemblyContext,i,t)),e.push_back((0,d.getVertex)(this.webAssemblyContext,n,r))):(e.push_back((0,d.getVertex)(this.webAssemblyContext,t,i)),e.push_back((0,d.getVertex)(this.webAssemblyContext,r,n)))}}t.ErrorSeriesDrawingProvider=g},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorSeriesHitTestProvider=void 0;const r=i(117),n=i(161),s=i(11),o=i(31),a=i(32),l=i(25);class h extends o.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return l.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:n,isVerticalChart:s}=this.currentRenderPassData,o=s?i.y:i.x,h=s?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return l.HitTestInfo.empty();const d=a.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,o,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),p=u.getNativeYValues(),g=a.hitTestHelpers.createHitTestInfo(this.parentSeries,r,n,s,u,c,p,o,h,d,0);if(d>=0){const e=a.hitTestHelpers.testIsHitForErrorBars(r,n,this.parentSeries,c,p,d,o,h);g.isHit=e.isHit,g.highValue=e.highValue,g.lowValue=e.lowValue}else g.isHit=!1;return g}hitTestForDataPointSelectionModifier(e,t,i=o.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){return this.hitTest(e,t)}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return l.HitTestInfo.empty();const{xCoordinateCalculator:o,yCoordinateCalculator:h,isVerticalChart:u}=this.currentRenderPassData,d=u?i.y:i.x,c=u?i.x:i.y,p=this.parentSeries.dataSeries;if(!p)return l.HitTestInfo.empty();const g=p.getNativeXValues(),f=p.getNativeYValues(),y=p.getNativeLowValues(),v=p.getNativeHighValues(),m=a.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,o,p,d,p.dataDistributionCalculator.isSortedAscending),S=a.hitTestHelpers.createHitTestInfo(this.parentSeries,o,h,u,p,g,f,d,c,m,0),P=o.isCategoryCoordinateCalculator;if(m>=0){const e=this.parentSeries.errorDirection===r.EErrorDirection.Vertical;S.highValue=v.get(m),S.lowValue=y.get(m);const t=this.parentSeries.errorMode!==n.EErrorMode.High,i=this.parentSeries.errorMode!==n.EErrorMode.Low;let a,l;e?(a=P?0:g.get(0),l=P?g.size()-1:g.get(g.size()-1)):(a=t?y.get(0):g.get(0),l=i?v.get(g.size()-1):g.get(g.size()-1));const u=this.parentSeries.getDataPointWidth(e?o:h,this.parentSeries.dataPointWidth)/2,d=o.getCoordinate(S.hitTestPointValues.x),c=o.getCoordinate(a),p=o.getCoordinate(l);S.isWithinDataBounds=(0,s.testIsInInterval)(d,c-u,p+u),S.isHit=S.isWithinDataBounds}else S.isHit=!1;return S}}t.ErrorSeriesHitTestProvider=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastImpulseRenderableSeries=void 0;const r=i(3),n=i(8),s=i(26),o=i(97),a=i(4),l=i(40),h=i(7),u=i(116),d=i(378);class c extends u.FastColumnRenderableSeries{constructor(e,t){var i,r,s,l;super(e,t),this.type=n.ESeriesType.ImpulseSeries,this.impulseFillProperty=a.SciChartSurfaceBase.DEFAULT_THEME.impulseFillBrush,this.impulseSizeProperty=10,this.impulseDataPointWidthProperty=0,this.impulseStrokeThicknessProperty=1,this.strokeThickness=null!==(i=null==t?void 0:t.strokeThickness)&&void 0!==i?i:this.impulseStrokeThicknessProperty,this.fill=null!==(r=null==t?void 0:t.fill)&&void 0!==r?r:this.impulseFillProperty,this.size=null!==(s=null==t?void 0:t.size)&&void 0!==s?s:this.impulseSizeProperty,this.stroke=null!==(l=null==t?void 0:t.fill)&&void 0!==l?l:this.impulseFillProperty,this.dataPointWidth=this.impulseDataPointWidthProperty,(null==t?void 0:t.pointMarker)||(this.pointMarker=new o.EllipsePointMarker(e,{width:this.impulseSizeProperty,height:this.impulseSizeProperty,fill:this.fill,stroke:this.fill}))}get fill(){return(0,s.stripAutoColor)(this.impulseFillProperty)}set fill(e){this.impulseFillProperty=e,this.stroke=e,this.pointMarker&&(this.pointMarker.fill=e,this.pointMarker.stroke=e),this.impulseFillProperty!==e&&this.notifyPropertyChanged(h.PROPERTY.STROKE)}get size(){return this.impulseSizeProperty}set size(e){this.impulseSizeProperty=e,this.pointMarker&&(this.pointMarker.width=e,this.pointMarker.height=e)}getXRange(){var e,t;const i=super.getXRange(),n=(0,l.getDelta)({pointSize:this.size,areaSize:null!==(t=null===(e=this.parentSurface.seriesViewRect)||void 0===e?void 0:e.width)&&void 0!==t?t:0,range:i});return new r.NumberRange(i.min-n,i.max+n)}getYRange(e,t=!1){var i,n;const s=super.getYRange(e,t);if(!s)return;const o=(0,l.getDelta)({pointSize:this.size,areaSize:null!==(n=null===(i=this.parentSurface.seriesViewRect)||void 0===i?void 0:i.height)&&void 0!==n?n:0,range:s});return new r.NumberRange(s.min-o,s.max+o)}toJSON(e=!1){const t=super.toJSON(e),i={fill:this.fill,size:this.size,zeroLineY:this.zeroLineY};return Object.assign(t.options,i),t}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.fill===t.impulseFillBrush&&(this.fill=e.impulseFillBrush)}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.impulseFillProperty.startsWith(s.AUTO_COLOR)){const r=i.getStrokeColor(e,t,this.webAssemblyContext);this.fill=s.AUTO_COLOR+this.adjustAutoColor("impulseFill",r)}}newHitTestProvider(){return new d.ImpulseSeriesHitTestProvider(this,this.webAssemblyContext)}}t.FastImpulseRenderableSeries=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImpulseSeriesHitTestProvider=void 0;const r=i(11),n=i(6),s=i(31),o=i(32),a=i(25);class l extends s.BaseHitTestProvider{hitTest(e,t,i=s.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){const r=this.getTranslatedHitTestPoint(e,t);if(!r)return a.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:l,isVerticalChart:h}=this.currentRenderPassData,u=h?r.y:r.x,d=h?r.x:r.y,c=this.parentSeries.dataSeries;if(!c)return a.HitTestInfo.empty();const p=o.hitTestHelpers.getNearestXyPoint(n,l,c,u,d),g=o.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,c,u,c.dataDistributionCalculator.isSortedAscending),f=c.getNativeXValues(),y=c.getNativeYValues(),v=o.hitTestHelpers.createHitTestInfo(this.parentSeries,n,l,h,c,f,y,u,d,g,0);return v.isHit=(g>=0||p>=0)&&(o.hitTestHelpers.testIsHitForImpulse(n,l,this.parentSeries,f,y,g,u,d,i)||o.hitTestHelpers.testIsHitForPoint(n,l,f,y,p,u,d,this.parentSeries.size)),v}hitTestForDataPointSelectionModifier(e,t,i=s.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){return this.hitTest(e,t,i)}hitTestXSlice(e,t){var i;const s=this.getTranslatedHitTestPoint(e,t);if(!s)return a.HitTestInfo.empty();const{xCoordinateCalculator:l,yCoordinateCalculator:h,isVerticalChart:u}=this.currentRenderPassData,d=u?s.y:s.x,c=u?s.x:s.y,p=this.parentSeries.dataSeries;if(!p)return a.HitTestInfo.empty();const g=p.getNativeXValues(),f=p.getNativeYValues(),y=o.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,l,p,d,p.dataDistributionCalculator.isSortedAscending),v=o.hitTestHelpers.createHitTestInfo(this.parentSeries,l,h,u,p,g,f,d,c,y,0),m=l.isCategoryCoordinateCalculator,S=(null!==(i=this.parentSeries.size)&&void 0!==i?i:0)*n.DpiHelper.PIXEL_RATIO,P=Math.abs(l.getDataValue(S)-l.getDataValue(0));if(y>=0){const e=m?0:g.get(0),t=m?g.size()-1:g.get(g.size()-1);v.isWithinDataBounds=(0,r.testIsInInterval)(v.hitTestPointValues.x,e,t,P/2),v.isHit=v.isWithinDataBounds}else v.isHit=!1;return v}}t.ImpulseSeriesHitTestProvider=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastLineRenderableSeries=void 0;const r=i(0),n=i(8),s=i(162);class o extends s.BaseLineRenderableSeries{constructor(e,t){var i,r;super(e,t),this.type=n.ESeriesType.LineSeries,(null===(i=this.paletteProvider)||void 0===i?void 0:i.onAttached)&&(null===(r=this.paletteProvider)||void 0===r||r.onAttached(this))}delete(){super.delete(),this.resamplerHelper=(0,r.deleteSafe)(this.resamplerHelper),this.pointSeries=(0,r.deleteSafe)(this.pointSeries)}}t.FastLineRenderableSeries=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineSeriesDrawingProvider=void 0;const r=i(0),n=i(8),s=i(35),o=i(30),a=i(162),l=i(7),h=i(49);class u extends h.BaseSeriesDrawingProvider{constructor(e,t,i,r){super(e,t,i,r),this.linesPenCache=new s.Pen2DCache(e),this.args=new e.SCRTLineDrawingParams}onDpiChanged(e){super.onDpiChanged(e),this.onSeriesPropertyChange(l.PROPERTY.STROKE)}onSeriesPropertyChange(e){if(super.onSeriesPropertyChange(e),e===l.PROPERTY.PALETTE_PROVIDER&&this.linesPenCache.invalidateCache(),e===l.PROPERTY.STROKE||e===l.PROPERTY.STROKE_THICKNESS||e===l.PROPERTY.PALETTE_PROVIDER||e===l.PROPERTY.OPACITY||e===l.PROPERTY.STROKE_DASH_ARRAY){const{stroke:e,strokeThickness:t,opacity:i,strokeDashArray:r}=this.getProperties(this.parentSeries);e&&(0,s.createPenInCache)(this.linesPenCache,e,t,null!=i?i:1,r)}}getProperties(e){const{stroke:t,strokeThickness:i,opacity:r,strokeDashArray:n,isDigitalLine:s,drawNaNAs:o,lineType:a}=e;return{stroke:t,strokeThickness:i,opacity:r,strokeDashArray:n,isDigitalLine:s,drawNaNAs:o,lineType:a,containsNaN:void 0}}onAttachSeries(){super.onAttachSeries(),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTLineSeriesDrawingProvider;const{stroke:e,strokeThickness:t,opacity:i,strokeDashArray:r}=this.getProperties(this.parentSeries);e&&(0,s.createPenInCache)(this.linesPenCache,e,t,null!=i?i:1,r)}onDetachSeries(){super.onDetachSeries(),this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider)}draw(e,t){const{stroke:i,isDigitalLine:r,lineType:l,drawNaNAs:h,containsNaN:u}=this.getProperties(this.parentSeries),d=(0,s.getScrtPenFromCache)(this.linesPenCache);if(!d||!i)return;const c=t.pointSeries;let p=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;p=null!=u?u:p,this.args.Reset(),this.args.SetLinesPen(d),this.args.isDigitalLine=r||l!==a.ELineType.Normal,this.args.drawDigitalVertical=l!==a.ELineType.DigitalNoEdge,this.args.digitalYX=l===a.ELineType.DigitalYX,this.args.forceShaderMethod=!0,this.args.containsNaN=p,this.args.lineGaps=p?h===o.ELineDrawMode.DiscontinuousLine?this.webAssemblyContext.SCRTLineGapMode.DrawGaps:this.webAssemblyContext.SCRTLineGapMode.CloseGaps:this.webAssemblyContext.SCRTLineGapMode.Default,this.args.verticalChart=t.isVerticalChart;const g=t.xCoordinateCalculator.isCategoryCoordinateCalculator,f=this.xSelector(c);let y=g?c.indexes:f,v=this.ySelector(c);if(this.parentSeries.type===n.ESeriesType.SplineLineSeries&&f.size()>1){const e=this.parentSeries;this.parentSeries.isRunningAnimation||e.updateSplineValues(),y=e.xSplineValues,v=e.ySplineValues}this.args.count=v.size(),this.applyStrokePaletting(d),this.palettingState.palettedColors&&this.args.SetPalettedColors(this.palettingState.palettedColors);const m=e.getNativeContext();this.drawLines(e,m,y,v,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect)}delete(){this.linesPenCache=(0,r.deleteSafe)(this.linesPenCache),this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),this.args=(0,r.deleteSafe)(this.args),super.delete()}drawLines(e,t,i,r,n,s,o,a){this.nativeDrawingProvider.DrawLinesVec(t,i,r,n,s,o)}}t.LineSeriesDrawingProvider=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineSeriesHitTestProvider=void 0;const r=i(11),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t,i=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){const r=this.getTranslatedHitTestPoint(e,t);if(!r)return o.HitTestInfo.empty();const{isVerticalChart:s}=this.currentRenderPassData,a=s?r.y:r.x,l=s?r.x:r.y;return this.parentSeries.dataSeries.dataDistributionCalculator.isSortedAscending?this.hitTestSorted(a,l,i):this.hitTestUnsorted(a,l,i)}hitTestSorted(e,t,i){const{xCoordinateCalculator:r,yCoordinateCalculator:n,isVerticalChart:a}=this.currentRenderPassData,l=this.parentSeries.dataSeries;if(!l)return o.HitTestInfo.empty();const h=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,l,e,l.dataDistributionCalculator.isSortedAscending),u=l.getNativeXValues(),d=l.getNativeYValues(),c=s.hitTestHelpers.createHitTestInfo(this.parentSeries,r,n,a,l,u,d,e,t,h,i);if(h>=0){const o=u.size(),a=u.get(h),l=r.getDataValue(e);if(h===o-1&&l>=a||0===h&&l<=a)c.isHit=s.hitTestHelpers.testIsHitForPoint(r,n,u,d,h,e,t,i);else{const o=s.hitTestHelpers.testIsHitForLine(r,n,u,d,h,e,t,i);c.isHit=o.isHit,c.point2dataSeriesIndex=o.secondPointIndex,c.point2xValue=u.get(o.secondPointIndex),c.point2xCoord=r.getCoordinate(c.point2xValue),c.point2yValue=d.get(o.secondPointIndex),c.point2yCoord=n.getCoordinate(c.point2yValue)}}else c.isHit=!1;return c}hitTestUnsorted(e,t,i){const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=this.parentSeries.dataSeries;if(!h)return o.HitTestInfo.empty();const u=s.hitTestHelpers.getNearestXyPoint(n,a,h,e,t),d=h.getNativeXValues(),c=h.getNativeYValues(),p=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,h,d,c,e,t,u,i);if(u>=0){const s=d.size();let o=Number.MAX_VALUE,l=Number.MIN_VALUE,h=Number.MAX_VALUE,u=Number.MIN_VALUE;for(let e=0;e<s;e++){const t=d.get(e),i=c.get(e);o=t<o?t:o,l=t>l?t:l,h=i<h?i:h,u=i>u?i:u}p.isWithinDataBounds=o<=p.hitTestPointValues.x&&p.hitTestPointValues.x<=l&&h<=p.hitTestPointValues.y&&p.hitTestPointValues.y<=u;if((0,r.calcDistance)(e,t,p.xCoord,p.yCoord)<i)return p.isHit=!0,p;let g=Number.MAX_VALUE,f=-1;for(let o=0;o<s-1;o++){const s=d.get(o),l=c.get(o),h=d.get(o+1),u=c.get(o+1),p=n.getCoordinate(s),y=a.getCoordinate(l),v=n.getCoordinate(h),m=a.getCoordinate(u),S=(0,r.calcDistance)(p,y,v,m),P=(0,r.calcDistance)(p,y,e,t),C=(0,r.calcDistance)(v,m,e,t);if(P<=S+i&&C<=S+i){const i=(0,r.calcDistanceFromLine)(e,t,p,y,v,m);i<=g&&(g=i,f=o)}}if(-1!==f)return p.dataSeriesIndex=f,p.xValue=d.get(f),p.xCoord=n.getCoordinate(p.xValue),p.yValue=c.get(f),p.yCoord=a.getCoordinate(p.yValue),p.point2dataSeriesIndex=f+1,p.point2xValue=d.get(f+1),p.point2xCoord=n.getCoordinate(p.point2xValue),p.point2yValue=c.get(f+1),p.point2yCoord=a.getCoordinate(p.point2yValue),p.isHit=g<=i,p}return p.isHit=!1,p}}t.LineSeriesHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastMountainRenderableSeries=void 0;const r=i(8),n=i(383);class s extends n.BaseMountainRenderableSeries{constructor(e,t){var i,n;super(e,t),this.type=r.ESeriesType.MountainSeries,(null===(i=this.paletteProvider)||void 0===i?void 0:i.onAttached)&&(null===(n=this.paletteProvider)||void 0===n||n.onAttached(this))}}t.FastMountainRenderableSeries=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMountainRenderableSeries=void 0;const r=i(26),n=i(4),s=i(40),o=i(7),a=i(83),l=i(384),h=i(61),u=i(385);class d extends s.BaseRenderableSeries{constructor(e,t){var i,r,s,o,u;super(e,t),this.zeroLineYProperty=0,this.fillProperty=n.SciChartSurfaceBase.DEFAULT_THEME.mountainAreaBrush,this.strokeDashArrayProperty=[],this.stroke=null!==(i=null==t?void 0:t.stroke)&&void 0!==i?i:n.SciChartSurfaceBase.DEFAULT_THEME.mountainLineColor,this.strokeDashArrayProperty=null!==(r=null==t?void 0:t.strokeDashArray)&&void 0!==r?r:this.strokeDashArrayProperty,this.fillProperty=null!==(s=null==t?void 0:t.fill)&&void 0!==s?s:this.fillProperty,this.zeroLineYProperty=null!==(o=null==t?void 0:t.zeroLineY)&&void 0!==o?o:this.zeroLineYProperty,this.fillLinearGradientProperty=null!==(u=null==t?void 0:t.fillLinearGradient)&&void 0!==u?u:this.fillLinearGradientProperty,this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new a.DataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),this.drawingProviders.push(new l.MountainSeriesDrawingProvider(e,this)),this.drawingProviders.push(new h.PointMarkerDrawingProvider(e,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}applyTheme(e){super.applyTheme(e);const t=this.parentSurface.previousThemeProvider;this.fill===t.mountainAreaBrush&&(this.fill=e.mountainAreaBrush),this.stroke===t.mountainLineColor&&(this.stroke=e.mountainLineColor)}get fill(){return(0,r.stripAutoColor)(this.fillProperty)}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(o.PROPERTY.FILL)}get zeroLineY(){return this.zeroLineYProperty}set zeroLineY(e){this.zeroLineYProperty=e,this.notifyPropertyChanged(o.PROPERTY.ZERO_LINE_Y)}get fillLinearGradient(){return this.fillLinearGradientProperty}set fillLinearGradient(e){e!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=e,this.notifyPropertyChanged(o.PROPERTY.FILL_LINEAR_GRADIENT))}get strokeDashArray(){return this.strokeDashArrayProperty}set strokeDashArray(e){this.strokeDashArrayProperty=e,this.notifyPropertyChanged(o.PROPERTY.STROKE_DASH_ARRAY)}toJSON(e=!1){const t=super.toJSON(e),i={fill:this.fill,fillLinearGradient:this.fillLinearGradient,strokeDashArray:this.strokeDashArray,zeroLineY:this.zeroLineY};return Object.assign(t.options,i),t}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.fillProperty.startsWith(r.AUTO_COLOR)){const n=i.getFillColor(e,t,this.webAssemblyContext);this.fill=r.AUTO_COLOR+this.adjustAutoColor("fill",n)}}newHitTestProvider(){return new u.MountainSeriesHitTestProvider(this,this.webAssemblyContext)}}t.BaseMountainRenderableSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MountainSeriesDrawingProvider=void 0;const r=i(0),n=i(8),s=i(54),o=i(35),a=i(30),l=i(4),h=i(7),u=i(49);class d extends u.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.strokePenCache=new o.Pen2DCache(e),this.fillBrushCache=new s.BrushCache(e)}delete(){this.nativeDrawingProvider=(0,r.deleteSafe)(this.nativeDrawingProvider),this.strokePenCache=(0,r.deleteSafe)(this.strokePenCache),this.fillBrushCache=(0,r.deleteSafe)(this.fillBrushCache),super.delete()}draw(e,t){var i;const r=t.pointSeries,s=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN,l=new this.webAssemblyContext.SCRTMountainDrawingParams;l.forceShaderMethod=!0,l.lineGaps=s?this.parentSeries.drawNaNAs===a.ELineDrawMode.DiscontinuousLine?this.webAssemblyContext.SCRTLineGapMode.DrawGaps:this.webAssemblyContext.SCRTLineGapMode.CloseGaps:this.webAssemblyContext.SCRTLineGapMode.Default,l.verticalChart=t.isVerticalChart,l.zeroLineY=this.parentSeries.zeroLineY,l.isDigitalLine=this.parentSeries.isDigitalLine;const h=this.createBrush();h&&l.SetFillBrush(h);const u=(0,o.getScrtPenFromCache)(this.strokePenCache);u&&l.SetLinesPen(u),super.applyStrokeFillPaletting(this.parentSeries.stroke,u,this.parentSeries.fill,h,this.parentSeries.opacity,!0,void 0!==this.parentSeries.fillLinearGradient);const d=null===(i=this.palettingState.paletteTextureCache)||void 0===i?void 0:i.value;d&&l.SetPalette(d),l.isSmoothColors=this.palettingState.gradientPaletting;const c=t.xCoordinateCalculator.isCategoryCoordinateCalculator,p=r.xValues;let g=c?r.indexes:p,f=r.yValues;if(this.parentSeries.type===n.ESeriesType.SplineMountainSeries&&p.size()>1){const e=this.parentSeries;this.parentSeries.isRunningAnimation||e.updateSplineValues(),g=e.xSplineValues,f=e.ySplineValues}l.count=f.size();const y=e.getNativeContext();this.parentSeries.parentSurface.seriesViewRect;this.nativeDrawingProvider.DrawPointsVec(y,g,f,t.xCoordinateCalculator.nativeCalculator,t.yCoordinateCalculator.nativeCalculator,l),l.delete()}onDpiChanged(e){super.onDpiChanged(e),this.onSeriesPropertyChange(h.PROPERTY.STROKE)}onSeriesPropertyChange(e){super.onSeriesPropertyChange(e),e!==h.PROPERTY.STROKE&&e!==h.PROPERTY.STROKE_DASH_ARRAY&&e!==h.PROPERTY.STROKE_THICKNESS&&e!==h.PROPERTY.OPACITY||this.createPen(),e!==h.PROPERTY.FILL&&e!==h.PROPERTY.OPACITY&&e!==h.PROPERTY.FILL_LINEAR_GRADIENT||this.createBrush()}onAttachSeries(){super.onAttachSeries(),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTMountainSeriesDrawingProvider,this.createPen(),this.createBrush()}createBrush(){const{fill:e,opacity:t,fillLinearGradient:i,parentSurface:r}=this.parentSeries,n=(null==r?void 0:r.isCopyCanvasSurface)?r.domCanvas2D.height/l.SciChartSurfaceBase.domMasterCanvas.height:1,o=(null==r?void 0:r.isCopyCanvasSurface)?r.domCanvas2D.width/l.SciChartSurfaceBase.domMasterCanvas.width:1;return(0,s.createBrushInCache)(this.fillBrushCache,e,t,n,o,i)}createPen(){const{stroke:e,strokeThickness:t,opacity:i,strokeDashArray:r}=this.parentSeries;return(0,o.createPenInCache)(this.strokePenCache,e,t,i,r)}}t.MountainSeriesDrawingProvider=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MountainSeriesHitTestProvider=void 0;const r=i(31),n=i(32),s=i(25);class o extends r.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return s.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:o,isVerticalChart:a}=this.currentRenderPassData,l=a?i.y:i.x,h=a?i.x:i.y,u=this.parentSeries,d=u.dataSeries;if(!d)return s.HitTestInfo.empty();const c=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,d,l,d.dataDistributionCalculator.isSortedAscending),p=d.getNativeXValues(),g=d.getNativeYValues(),f=n.hitTestHelpers.createHitTestInfo(u,r,o,a,d,p,g,l,h,c,0);if(d.dataDistributionCalculator.isSortedAscending&&c>=0){const e=n.hitTestHelpers.testIsHitForMountain(this.parentSeries.isDigitalLine,r,o,d,u.zeroLineY,c,l,h);f.isHit=e.isHit,f.point2dataSeriesIndex=e.secondPointIndex,void 0!==e.secondPointIndex&&(f.point2xValue=p.get(e.secondPointIndex),f.point2xCoord=r.getCoordinate(f.point2xValue),f.point2yValue=g.get(e.secondPointIndex),f.point2yCoord=o.getCoordinate(f.point2yValue))}else f.isHit=!1;return f}}t.MountainSeriesHitTestProvider=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastOhlcRenderableSeries=void 0;const r=i(8),n=i(369),s=i(160);class o extends n.BaseOhlcRenderableSeries{constructor(e,t){var i,n;super(e,t),this.type=r.ESeriesType.OhlcSeries,(null===(i=this.paletteProvider)||void 0===i?void 0:i.onAttached)&&(null===(n=this.paletteProvider)||void 0===n||n.onAttached(this)),this.drawingProviders=[],this.drawingProviders.push(new s.OhlcSeriesDrawingProvider(e,this,s.EOhlcDrawingMode.Ohlc))}toJSON(e=!1){const t=super.toJSON(e),i={dataPointWidth:this.dataPointWidth,strokeDown:this.strokeDown,strokeUp:this.strokeUp};return Object.assign(t.options,i),t}}t.FastOhlcRenderableSeries=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastTextRenderableSeries=void 0;const r=i(8),n=i(40),s=i(228),o=i(61),a=i(388);class l extends n.BaseRenderableSeries{constructor(e,t){super(e,t),this.type=r.ESeriesType.TextSeries,this.drawingProviders=[],this.drawingProviders.push(new o.PointMarkerDrawingProvider(e,this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new s.TextDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation)}newHitTestProvider(){return new a.TextSeriesHitTestProvider(this,this.webAssemblyContext)}}t.FastTextRenderableSeries=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextSeriesHitTestProvider=void 0;const r=i(11),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t,i){const n=this.getTranslatedHitTestPoint(e,t);if(!n)return o.HitTestInfo.empty();const{xCoordinateCalculator:a,yCoordinateCalculator:l,isVerticalChart:h}=this.currentRenderPassData,u=h?n.y:n.x,d=h?n.x:n.y,c=this.parentSeries.dataSeries,p=s.hitTestHelpers.getNearestXyPoint(a,l,c,u,d),g=c.getNativeXValues(),f=c.getNativeYValues(),y=s.hitTestHelpers.createHitTestInfo(this.parentSeries,a,l,h,c,g,f,u,d,p,i),v=this.parentSeries.dataLabelProvider.dataLabels;let m=!1;for(const e of v){const{left:t,top:i,right:s,bottom:o}=e.rect;if((0,r.testIsInBounds)(n.x,n.y,t,i,s,o)){m=!0;break}}return y.isHit=m,y}}t.TextSeriesHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlowEffect=void 0;const r=i(163),n=i(390);class s extends n.ShaderEffect{constructor(e,t){super(e,new e.SCRTGlowEffect,{range:(null==t?void 0:t.range)||1,intensity:(null==t?void 0:t.intensity)||1}),this.type=r.EShaderEffectType.Glow}}t.GlowEffect=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShaderEffect=void 0;const r=i(13),n=i(0),s=i(18),o=i(1),a=i(5),l=i(70),h=i(2),u=i(111),d=i(7),c=i(12);t.ShaderEffect=class{constructor(e,t,i){o.Guard.notNull(e,"webAssemblyContext"),r.IS_TEST_ENV||o.Guard.notNull(t,"seriesEffect"),this.webAssemblyContext=e,this.propertyChanged=new s.EventHandler,this.nativeEffect=t,this.intensity=(null==i?void 0:i.intensity)||1,this.range=(null==i?void 0:i.range)||0,this.offset=(null==i?void 0:i.offset)||new a.Point(0,0),this.color=(null==i?void 0:i.color)||"#444444"}delete(){this.nativeEffect=(0,n.deleteSafe)(this.nativeEffect)}getNativeEffect(){return this.nativeEffect}get intensity(){return this.intensityProperty}set intensity(e){this.intensityProperty=e,this.nativeEffect.SetIntensity(e),this.notifyPropertyChanged(d.PROPERTY.INTENSITY)}get offset(){return this.offsetProperty}set offset(e){o.Guard.notNull(e,"offset"),this.offsetProperty=e;const t=new this.webAssemblyContext.TSRVector2(e.x,e.y);this.nativeEffect.SetOffset(t),t.delete(),this.notifyPropertyChanged(d.PROPERTY.OFFSET)}get color(){return this.colorProperty}set color(e){this.colorProperty=e;const t=(0,h.parseColorToTArgb)(e),i=(0,c.getVector4)(this.webAssemblyContext,0,0,0,0);(0,u.updateTsrVector4)(t,i),this.nativeEffect.SetColor(i),this.notifyPropertyChanged(d.PROPERTY.COLOR)}get range(){return this.rangeProperty}set range(e){this.rangeProperty=e,this.nativeEffect.SetRange(e),this.notifyPropertyChanged(d.PROPERTY.RANGE)}notifyPropertyChanged(e){var t;null===(t=this.propertyChanged)||void 0===t||t.raiseEvent(new l.PropertyChangedEventArgs(e))}toJSON(){const e={color:this.color,intensity:this.intensity,offset:this.offset,range:this.range};return{type:this.type,options:e}}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformHeatmapRenderableSeries=void 0;const r=i(13),n=i(8),s=i(120),o=i(227),a=i(392),l=i(394);class h extends s.BaseHeatmapRenderableSeries{constructor(e,t){super(e,t),this.type=n.ESeriesType.NonUniformHeatmapSeries,this.drawingProviders=[],r.IS_TEST_ENV||this.drawingProviders.push(new a.NonUniformHeatmapDrawingProvider(e,this)),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new o.NonUniformHeatMapDataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this))}newHitTestProvider(){return new l.NonUniformHeatmapHitTestProvider(this,this.webAssemblyContext)}}t.NonUniformHeatmapRenderableSeries=h},function(e,t,i){"use strict";var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformHeatmapDrawingProvider=void 0;const n=i(0),s=i(3),o=i(15),a=i(27),l=i(393),h=i(2),u=i(131),d=i(120),c=i(7),p=i(49);class g extends p.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.heatTextureCache=new u.TextureCache(e),this.colorDataVector=new e.UIntVector,this.onSeriesPropertyChange(c.PROPERTY.DATA_SERIES),this.onSeriesPropertyChange(c.PROPERTY.COLOR_MAP)}delete(){this.colorDataVector=(0,n.deleteSafe)(this.colorDataVector),this.heatTextureCache=(0,n.deleteSafe)(this.heatTextureCache),super.delete()}onSeriesPropertyChange(e){(e===c.PROPERTY.DATA_SERIES||e===c.PROPERTY.COLOR_MAP||e.includes(d.COLOR_MAP_PREFIX)||e===c.PROPERTY.OPACITY)&&(this.colorGradientScale=v(this.parentSeries.colorMap.gradientStops,100))}draw(e,t){const{isVerticalChart:i}=t,r=this.parentSeries.dataSeries,n=this.parentSeries.parentSurface.seriesViewRect,o=this.parentSeries.colorMap,a=this.colorGradientScale,l=r.getZValues(),h=r.getXIndicesRange(new s.NumberRange(t.xCoordinateCalculator.visibleMin,t.xCoordinateCalculator.visibleMax),!1),u=r.getYIndicesRange(new s.NumberRange(t.yCoordinateCalculator.visibleMin,t.yCoordinateCalculator.visibleMax),!1),d=r.getXValue(h.min),c=r.getXValue(h.max),p=r.getYValue(u.min),g=r.getYValue(u.max),f=!t.xCoordinateCalculator.hasFlippedCoordinates,y=t.yCoordinateCalculator.hasFlippedCoordinates,v=t.xCoordinateCalculator.getCoordinate(f?c:d),m=t.xCoordinateCalculator.getCoordinate(f?d:c),S=t.yCoordinateCalculator.getCoordinate(y?p:g),P=t.yCoordinateCalculator.getCoordinate(y?g:p),C=Math.ceil(Math.abs(v-m)),A=Math.ceil(Math.abs(S-P)),x=C<=0||A<=0;if(!(v>(i?n.height:n.width)||S>(i?n.width:n.height)||m<0||P<0)&&!x){const s=h,d=u;let c=f?s.max-1:s.min;const p=y?d.min:d.max-1;let g=f?-1:1;const m=y?1:-1;i&&(c=f?s.min:s.max-1,g=f?1:-1);const P=s.diff,x=d.diff,b=e.getNativeContext();this.drawHeatmapInTypescript(b,r.xCellOffsets,r.yCellOffsets,l,t.xCoordinateCalculator,t.yCoordinateCalculator,{horCellCount:P,vertCellCount:x,arrayWidth:r.arrayWidth,arrayHeight:r.arrayHeight,opacity:this.parentSeries.opacity,colorGradientScale:a,colorMin:o.minimum,colorMax:o.maximum,horStartInd:c,vertStartInd:p,horInc:g,vertInc:m,isVerticalChart:i,heatmapStartX:v,heatmapStartY:S,heatmapWidth:C,heatmapHeight:A,xCellSizes:r.xCellSizes,yCellSizes:r.yCellSizes,seriesViewRect:n})}}drawHeatmapInTypescript(e,t,i,r,n,s,a){const{horStartInd:l,horInc:h,vertStartInd:u,vertInc:d,horCellCount:c,vertCellCount:p,heatmapStartX:g,heatmapStartY:f,heatmapWidth:y,heatmapHeight:v,opacity:m,colorGradientScale:P,colorMin:C,colorMax:A,isVerticalChart:x,arrayWidth:b,arrayHeight:T,xCellSizes:E,yCellSizes:w,seriesViewRect:R}=a,D=t[0],L=t[t.length-1],M=i[0],I=i[i.length-1],O=Math.max(D,n.visibleMin),k=Math.min(L,n.visibleMax),V=Math.max(M,s.visibleMin),_=Math.min(I,s.visibleMax),N=!n.hasFlippedCoordinates,F=s.hasFlippedCoordinates,B=n.getCoordinate(N?k:O),H=n.getCoordinate(N?O:k),Y=s.getCoordinate(F?_:V),z=s.getCoordinate(F?V:_),j=Math.ceil(Math.abs(B-H)),G=Math.ceil(Math.abs(Y-z)),X=new o.Rect(g,f,y,v),{horCellOffsets:W,vertCellOffsets:U}=S(X,x,E,w,l,c,h,u,p,d,R),$=this.calculateHeatmapTexture({xStartInd:l,textureWidth:j,xInc:h,yStartInd:u,textureHeight:G,yInc:d,zValues:r,webAssemblyContext:this.webAssemblyContext,colorMap:P,opacity:m,horCellCount:c,vertCellCount:p,horCellOffsets:W,vertCellOffsets:U,colorMin:C,colorMax:A,arrayWidth:b,arrayHeight:T,fillValuesOutOfRange:this.parentSeries.fillValuesOutOfRange,useInterpolation:this.parentSeries.useLinearTextureFiltering});if(x){e.PushMatrix(),e.PushState(),e.Rotate(-90);const t=N?-B:-j-B;e.Translate(t,0);const i=N?0:j,r=Y;return e.DrawTexture($,i-j,r-G,j,G),e.PopMatrix(),void e.PopState()}e.DrawTexture($,B,z,j,G)}calculateHeatmapTexture(e){if(!this.getMemoizedHeatmapTexture){const e=(e,i)=>{var[n]=e,{horCellOffsets:s,vertCellOffsets:o}=n,a=r(n,["horCellOffsets","vertCellOffsets"]),l=i[0],h=l.horCellOffsets,u=l.vertCellOffsets,d=r(l,["horCellOffsets","vertCellOffsets"]);return t(Object.values(a),Object.values(d))&&t(s,h)&&t(o,u)};this.getMemoizedHeatmapTexture=(0,l.memoize)(C,e)}const t=(e,t)=>!e.some((e,i)=>e!==t[i]);return this.getMemoizedHeatmapTexture(e,this.colorDataVector,this.heatTextureCache)}}t.NonUniformHeatmapDrawingProvider=g;const f=(e,t,i,r,n,s,o,l,h,u,d)=>{if(e>=u||t>=h)return 0;const c=n[e][t],p=y(c,i,o,l,d,s);return(0,a.uintArgbColorMultiplyOpacity)(p,r)},y=(e,t,i,r,n,s)=>{if(isNaN(e))return 0;if(n)e=(e=e<i?i:e)>r?r:e;else if(e<i||e>r)return 0;const o=(e-i)*(99/Math.abs(r-i));let a=Math.floor(o+.5*Math.sign(e));return a=s.NumberUtil.Constrain(a,0,t.length-1),t[a]},v=(e,t)=>{const i=Array.from(Array(t)),r=e.length,n=e[0].offset;let s=e[e.length-1].offset-n;const o=s/(t-1);let a=e[0].color,l=e[0].offset,u=a,d=l;r>1&&(u=e[1].color,d=e[1].offset),s=d-l;let c=0;for(let p=0;p<t;++p){const t=n+p*o;let g;if(t>=d&&(c++,l=d,a=u,c+1<r&&(u=e[c+1].color,d=e[c+1].offset),s=d-l),a===u||s<=Number.EPSILON)g=Number.parseInt((0,h.parseColorToHexStringArgb)(u),16);else{g=m(a,u,(t-l)/s)}i[p]=g}return i},m=(e,t,i)=>{const r=(0,h.parseColorToTArgb)(e),n=(0,h.parseColorToTArgb)(t),s=r.opacity,o=n.opacity,a=r.red,l=n.red,u=r.green,d=n.green,c=r.blue,p=n.blue,g=a+Math.floor((l-a)*i),f=u+Math.floor((d-u)*i),y=c+Math.floor((p-c)*i),v=s+Math.floor((o-s)*i);return Number.parseInt("0x"+(0,h.toHex)(v)+(0,h.toHex)(g)+(0,h.toHex)(f)+(0,h.toHex)(y),16)},S=(e,t,i,r,n,s,o,a,l,h,u)=>{let d=e.left<0?-e.left:0;const c=e.top<0?-e.top:0;t&&(d=e.right>u.bottom?e.right-u.bottom:0);return{horCellOffsets:P(i,e.width,n,s,o,-d),vertCellOffsets:P(r,e.height,a,l,h,-c)}},P=(e,t,i,r,n,s)=>{let o=0,a=i;for(let t=0;t<r;t++,a+=n)o+=e[a];const l=1/o,h=new Array(r);let u=s;for(let s=0;s<r-1;s++){u+=e[s*n+i]*l*t,h[s]=u}return h[r-1]=t+s,h},C=(e,t,i)=>{const{textureWidth:r,textureHeight:n,webAssemblyContext:s,useInterpolation:o}=e,a=((e,t)=>{const{xStartInd:i,textureWidth:r,xInc:n,yStartInd:s,textureHeight:o,yInc:a,zValues:l,webAssemblyContext:h,colorMap:u,opacity:d,horCellCount:c,vertCellCount:p,horCellOffsets:g,vertCellOffsets:y,colorMin:v,colorMax:m,arrayWidth:S,arrayHeight:P,fillValuesOutOfRange:C}=e;t.resize(r*o,0);let A=0,x=y[A];const b=new Array(c);let T,E=!1,w=i,R=s;for(let e=0;e<o;e++){let o=0,c=g[o];if(e>x){E=!1,A++,x=y[A];if(e-x>Number.EPSILON&&Math.floor(x)+1===e){e--;continue}}E?T=b[o]:(w=i+o*n,R=s+A*a,T=f(R,w,u,d,l,h,v,m,S,P,C),b[o]=T);for(let s=0;s<r;s++){if(s>c){o++,c=g[o];if(s-c>Number.EPSILON&&Math.floor(c)+1===s){s--;continue}E?T=b[o]:(w=i+o*n,T=f(R,w,u,d,l,h,v,m,S,P,C),b[o]=T)}t.set(e*r+s,T)}E=!0}return t})(e,t),l=i.create(r,n,s.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8);return s.SCRTSetTextureLinearSamplerEnabled(l,o),s.SCRTFillTextureAbgr(l,r,n,a),l}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoize=void 0,t.memoize=function(e,t){let i,r;const n=null!=t?t:(e,t)=>!e.some((e,i)=>e!==t[i]);return(...t)=>{const s=r&&n(t,r);return r&&s||(r=t,i=e(...t)),i}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonUniformHeatmapHitTestProvider=void 0;const r=i(5),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=s.hitTestHelpers.getNearestNonUniformHeatmapPoint(n,a,d,h,u),{xIndex:p,yIndex:g,zValue:f}=c,y=new o.HitTestInfo(this.parentSeries);y.dataSeriesName=this.parentSeries.type,y.dataSeriesType=d.type,y.hitTestPoint=new r.Point(h,u);const v=n.getDataValue(h),m=a.getDataValue(u);return y.hitTestPointValues=new r.Point(v,m),y.xValue=v,y.yValue=m,y.heatmapXIndex=p,y.heatmapYIndex=g,y.zValue=f,y.heatmapValue=f,y.xCoord=h,y.yCoord=u,y.isHit=-1!==p&&-1!==g,y.isWithinDataBounds=y.isHit,-1!==p&&-1!==g&&(y.metadata=d.getMetadataAt(g,p)),y}hitTestDataPoint(e,t){throw Error("hitTestDataPoint method is not supported for NonUniformHeatmapHitTestProvider")}hitTestXSlice(e,t){return this.hitTest(e,t)}}t.NonUniformHeatmapHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowEffect=void 0;const r=i(5),n=i(163),s=i(390);class o extends s.ShaderEffect{constructor(e,t){super(e,new e.SCRTShadowEffect,{offset:(null==t?void 0:t.offset)||new r.Point(10,10),range:(null==t?void 0:t.range)||1,color:t?`rgba(${(null==t?void 0:t.brightness)||68},${(null==t?void 0:t.brightness)||68},${(null==t?void 0:t.brightness)||68},1)`:"#444444"}),this.type=n.EShaderEffectType.Shadow}}t.ShadowEffect=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplineBandRenderableSeries=void 0;const r=i(0),n=i(8),s=i(165),o=i(24),a=i(362),l=i(7);class h extends a.BaseBandRenderableSeries{constructor(e,t){var i,r,s;super(e,t),this.type=n.ESeriesType.SplineBandSeries,this.warnOnSplineFailure=!0,this.isSplineProperty=!0,this.recalculateSpline=!0,this.interpolationPointsProperty=10,this.xSplineValues=new e.SCRTDoubleVector,this.ySplineValues=new e.SCRTDoubleVector,this.y1SplineValues=new e.SCRTDoubleVector,this.interpolationPointsProperty=null!==(i=null==t?void 0:t.interpolationPoints)&&void 0!==i?i:this.interpolationPointsProperty,(null===(r=this.paletteProvider)||void 0===r?void 0:r.onAttached)&&(null===(s=this.paletteProvider)||void 0===s||s.onAttached(this))}get isSpline(){return this.isSplineProperty}get interpolationPoints(){return this.interpolationPointsProperty}set interpolationPoints(e){this.interpolationPointsProperty=e,this.notifyPropertyChanged(l.PROPERTY.INTERPOLATION_POINTS)}delete(){this.xSplineValues=(0,r.deleteSafe)(this.xSplineValues),this.ySplineValues=(0,r.deleteSafe)(this.ySplineValues),this.y1SplineValues=(0,r.deleteSafe)(this.y1SplineValues),super.delete()}updateSplineValues(){if(!(this.dataSeries&&this.recalculateSpline&&this.parentSurface))return;this.isSplineProperty=!0;const e=this.dataSeries,t=this.xAxis.isCategoryAxis?e.getNativeIndexes():e.getNativeXValues(),i=e.getNativeYValues(),r=e.getNativeY1Values(),n=t.size();this.webAssemblyContext.SCRTSplineHelperCubicSpline(t,i,this.xSplineValues,this.ySplineValues,n,this.interpolationPoints,e.dataDistributionCalculator.containsNaN),isNaN(this.ySplineValues.get(0))?this.onSplineFailure():this.webAssemblyContext.SCRTSplineHelperCubicSpline(t,r,this.xSplineValues,this.y1SplineValues,n,this.interpolationPoints,e.dataDistributionCalculator.containsNaN),this.recalculateSpline=!1}onSplineFailure(){this.warnOnSplineFailure&&console.warn("Could not calculate spline values. X data may contain duplicates. Falling back to original values.\nTo disable this warning set warnOnSplineFailure = false. To change this behaviour, override onSplineFailure");const e=this.xAxis.isCategoryAxis?this.dataSeries.getNativeIndexes():this.dataSeries.getNativeXValues();(0,s.copyDoubleVector)(e,this.xSplineValues,this.webAssemblyContext),(0,s.copyDoubleVector)(this.dataSeries.getNativeYValues(),this.ySplineValues,this.webAssemblyContext),(0,s.copyDoubleVector)(this.dataSeries.getNativeY1Values(),this.y1SplineValues,this.webAssemblyContext),this.isSplineProperty=!1}getYRange(e,t=!1){return this.dataSeries.getWindowedYRange(e,!0,t)}toJSON(e=!1){const t=super.toJSON(e),i={interpolationPoints:this.interpolationPoints};return Object.assign(t.options,i),t}setAnimationVectors(e){this.updateSplineValues(),o.animationHelpers.setSplineBandAnimationVectors(this.webAssemblyContext,e,this.dataSeries,e.dataSeries,this.xSplineValues,this.ySplineValues,this.y1SplineValues,this.xAxis.isCategoryAxis,this.interpolationPoints)}updateAnimationProperties(e,t){const{animation:i}=t;i.updateSeriesProperties(this,t.initialStyles,t.animationProgress);const r=this.dataSeries;r&&o.animationHelpers.updateSplineBandAnimationProperties(this.webAssemblyContext,i,e,r,this.xSplineValues,this.ySplineValues,this.y1SplineValues),this.invalidateParentCallback&&this.invalidateParentCallback()}dataSeriesDataChanged(){this.recalculateSpline=!0,super.dataSeriesDataChanged()}}t.SplineBandRenderableSeries=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplineLineRenderableSeries=void 0;const r=i(0),n=i(8),s=i(165),o=i(24),a=i(162),l=i(7);class h extends a.BaseLineRenderableSeries{constructor(e,t){var i,r,s;super(e,t),this.type=n.ESeriesType.SplineLineSeries,this.warnOnSplineFailure=!0,this.isSplineProperty=!0,this.interpolationPointsProperty=10,this.recalculateSpline=!0,this.xSplineValues=new e.SCRTDoubleVector,this.ySplineValues=new e.SCRTDoubleVector,this.interpolationPointsProperty=null!==(i=null==t?void 0:t.interpolationPoints)&&void 0!==i?i:this.interpolationPointsProperty,(null===(r=this.paletteProvider)||void 0===r?void 0:r.onAttached)&&(null===(s=this.paletteProvider)||void 0===s||s.onAttached(this))}get isSpline(){return this.isSplineProperty}get interpolationPoints(){return this.interpolationPointsProperty}set interpolationPoints(e){this.interpolationPointsProperty=e,this.notifyPropertyChanged(l.PROPERTY.INTERPOLATION_POINTS)}delete(){this.xSplineValues=(0,r.deleteSafe)(this.xSplineValues),this.ySplineValues=(0,r.deleteSafe)(this.ySplineValues),super.delete()}updateSplineValues(){if(!this.dataSeries||!this.recalculateSpline||!this.parentSurface)return;this.isSplineProperty=!0;const e=this.dataSeries,t=this.xAxis.isCategoryAxis?e.getNativeIndexes():e.getNativeXValues(),i=e.getNativeYValues(),r=t.size();this.webAssemblyContext.SCRTSplineHelperCubicSpline(t,i,this.xSplineValues,this.ySplineValues,r,this.interpolationPoints,e.dataDistributionCalculator.containsNaN),isNaN(this.ySplineValues.get(0))&&this.onSplineFailure(),this.recalculateSpline=!1}onSplineFailure(){this.warnOnSplineFailure&&console.warn("Could not calculate spline values. X data may contain duplicates. Falling back to original values.\nTo disable this warning set warnOnSplineFailure = false. To change this behaviour, override onSplineFailure");const e=this.xAxis.isCategoryAxis?this.dataSeries.getNativeIndexes():this.dataSeries.getNativeXValues();(0,s.copyDoubleVector)(e,this.xSplineValues,this.webAssemblyContext),(0,s.copyDoubleVector)(this.dataSeries.getNativeYValues(),this.ySplineValues,this.webAssemblyContext),this.isSplineProperty=!1}getYRange(e,t=!1){return this.dataSeries.getWindowedYRange(e,!0,t)}toJSON(e=!1){const t=super.toJSON(e),i={interpolationPoints:this.interpolationPoints};return Object.assign(t.options,i),t}pushPalettedColors(e,t){for(let i=0;i<=this.interpolationPoints;i++)t.palettedColors.push_back(e)}setAnimationVectors(e){this.updateSplineValues(),o.animationHelpers.setSplineAnimationVectors(this.webAssemblyContext,e,this.dataSeries,e.dataSeries,this.xSplineValues,this.ySplineValues,this.xAxis.isCategoryAxis,this.interpolationPoints)}updateAnimationProperties(e,t){const{animation:i}=t;i.updateSeriesProperties(this,t.initialStyles,t.animationProgress);const r=this.dataSeries;r&&o.animationHelpers.updateSplineAnimationProperties(this.webAssemblyContext,i,e,r,this.xSplineValues,this.ySplineValues),this.invalidateParentCallback&&this.invalidateParentCallback()}dataSeriesDataChanged(){this.recalculateSpline=!0,super.dataSeriesDataChanged()}}t.SplineLineRenderableSeries=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplineMountainRenderableSeries=void 0;const r=i(0),n=i(8),s=i(165),o=i(24),a=i(383),l=i(7);class h extends a.BaseMountainRenderableSeries{constructor(e,t){var i,r,s;super(e,t),this.type=n.ESeriesType.SplineMountainSeries,this.warnOnSplineFailure=!0,this.isSplineProperty=!0,this.recalculateSpline=!0,this.interpolationPointsProperty=10,this.xSplineValues=new e.SCRTDoubleVector,this.ySplineValues=new e.SCRTDoubleVector,this.interpolationPointsProperty=null!==(i=null==t?void 0:t.interpolationPoints)&&void 0!==i?i:this.interpolationPointsProperty,(null===(r=this.paletteProvider)||void 0===r?void 0:r.onAttached)&&(null===(s=this.paletteProvider)||void 0===s||s.onAttached(this))}get isSpline(){return this.isSplineProperty}get interpolationPoints(){return this.interpolationPointsProperty}set interpolationPoints(e){this.interpolationPointsProperty=e,this.notifyPropertyChanged(l.PROPERTY.INTERPOLATION_POINTS)}delete(){this.xSplineValues=(0,r.deleteSafe)(this.xSplineValues),this.ySplineValues=(0,r.deleteSafe)(this.ySplineValues),super.delete()}updateSplineValues(){if(!(this.dataSeries&&this.recalculateSpline&&this.parentSurface))return;this.isSplineProperty=!0;const e=this.dataSeries,t=this.xAxis.isCategoryAxis?e.getNativeIndexes():e.getNativeXValues(),i=e.getNativeYValues(),r=t.size();this.webAssemblyContext.SCRTSplineHelperCubicSpline(t,i,this.xSplineValues,this.ySplineValues,r,this.interpolationPoints,e.dataDistributionCalculator.containsNaN),isNaN(this.ySplineValues.get(0))&&this.onSplineFailure(),this.recalculateSpline=!1}onSplineFailure(){this.warnOnSplineFailure&&console.warn("Could not calculate spline values. X data may contain duplicates. Falling back to original values.\nTo disable this warning set warnOnSplineFailure = false. To change this behaviour, override onSplineFailure");const e=this.xAxis.isCategoryAxis?this.dataSeries.getNativeIndexes():this.dataSeries.getNativeXValues();(0,s.copyDoubleVector)(e,this.xSplineValues,this.webAssemblyContext),(0,s.copyDoubleVector)(this.dataSeries.getNativeYValues(),this.ySplineValues,this.webAssemblyContext),this.isSplineProperty=!1}getYRange(e,t=!1){return this.dataSeries.getWindowedYRange(e,!0,t)}toJSON(e=!1){const t=super.toJSON(e),i={interpolationPoints:this.interpolationPoints};return Object.assign(t.options,i),t}setAnimationVectors(e){this.updateSplineValues(),o.animationHelpers.setSplineAnimationVectors(this.webAssemblyContext,e,this.dataSeries,e.dataSeries,this.xSplineValues,this.ySplineValues,this.xAxis.isCategoryAxis,this.interpolationPoints)}updateAnimationProperties(e,t){const{animation:i}=t;i.updateSeriesProperties(this,t.initialStyles,t.animationProgress);const r=this.dataSeries;r&&o.animationHelpers.updateSplineAnimationProperties(this.webAssemblyContext,i,e,r,this.xSplineValues,this.ySplineValues),this.invalidateParentCallback&&this.invalidateParentCallback()}dataSeriesDataChanged(){this.recalculateSpline=!0,super.dataSeriesDataChanged()}}t.SplineMountainRenderableSeries=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedColumnRenderableSeries=void 0;const r=i(0),n=i(8),s=i(54),o=i(35),a=i(26),l=i(4),h=i(400),u=i(7),d=i(402);class c extends h.BaseStackedRenderableSeries{constructor(e,t){var i,r,a,h,u;super(e,t),this.type=n.ESeriesType.StackedColumnSeries,this.fillProperty="#7e8486",this.spacingProperty=0,this.stackedGroupIdProperty="default",this.getGroupIndex=this.getGroupIndex.bind(this),this.getGroupsCount=this.getGroupsCount.bind(this),this.getColumnWidth=this.getColumnWidth.bind(this),this.fillBrushCache=new s.BrushCache(e),this.strokePenCache=new o.Pen2DCache(e),this.fill=null!==(i=null==t?void 0:t.fill)&&void 0!==i?i:this.fillProperty,this.stroke=null!==(r=null==t?void 0:t.stroke)&&void 0!==r?r:l.SciChartSurfaceBase.DEFAULT_THEME.mountainLineColor,this.strokeThickness=null!==(a=null==t?void 0:t.strokeThickness)&&void 0!==a?a:1,this.spacingProperty=null!==(h=null==t?void 0:t.spacing)&&void 0!==h?h:this.spacingProperty,this.stackedGroupIdProperty=null!==(u=null==t?void 0:t.stackedGroupId)&&void 0!==u?u:this.stackedGroupIdProperty}delete(){this.strokePenCache=(0,r.deleteSafe)(this.strokePenCache),this.fillBrushCache=(0,r.deleteSafe)(this.fillBrushCache),super.delete()}onAttachToParentCollection(e,t,i,r){if(this.parentCollection)throw new Error("Invalid operation in StackedColumnRenderableSeries.onAttachToParentCollection, this series has been already attached to collection. Please detach it from the collection before attaching to another");this.parentCollection=e,this.getParentSurfaceFn=t,this.notifyParentPropertyChangedFn=i,this.getColumnWidthFn=r;const{stroke:n,strokeThickness:a,fill:l,opacity:h}=this;(0,o.createPenInCache)(this.strokePenCache,n,a,h),(0,s.createBrushInCache)(this.fillBrushCache,l,h)}getFillBrush(){return(0,s.getScrtBrushFromCache)(this.fillBrushCache)}getStrokePen(){const{stroke:e,strokeThickness:t,opacity:i}=this;return(0,o.createPenInCache)(this.strokePenCache,e,t,i)}getGroupIndex(){return this.groupIndex}setGroupIndex(e){this.groupIndex=e}getGroupsCount(){return this.groupsCount}setGroupsCount(e){this.groupsCount=e}getColumnWidth(e){return this.getColumnWidthFn(e)}onDpiChanged(e){this.notifyPropertyChanged(u.PROPERTY.STROKE)}notifyPropertyChanged(e){super.notifyPropertyChanged(e),e!==u.PROPERTY.STROKE&&e!==u.PROPERTY.STROKE_THICKNESS&&e!==u.PROPERTY.OPACITY||(0,o.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity),e!==u.PROPERTY.FILL&&e!==u.PROPERTY.OPACITY||(0,s.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)}get fill(){return(0,a.stripAutoColor)(this.fillProperty)}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(u.PROPERTY.FILL)}get drawingProviders(){throw Error("drawingProviders property is not supported for StackedColumnRenderableSeries")}set drawingProviders(e){throw Error("drawingProviders property is not supported for StackedColumnRenderableSeries")}get effect(){throw Error("effect property is not supported for StackedColumnRenderableSeries")}set effect(e){throw Error("effect property is not supported for StackedColumnRenderableSeries")}get spacing(){return this.spacingProperty}set spacing(e){this.spacingProperty=e,this.notifyPropertyChanged(u.PROPERTY.SPACING)}get stackedGroupId(){return this.stackedGroupIdProperty}set stackedGroupId(e){this.stackedGroupIdProperty=e,this.notifyPropertyChanged(u.PROPERTY.STACKED_GROUP_ID)}toJSON(e=!1){const t=super.toJSON(e),i={fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness,spacing:this.spacing,stackedGroupId:this.stackedGroupId};return Object.assign(t.options,i),t}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.fillProperty.startsWith(a.AUTO_COLOR)){const r=i.getFillColor(e,t,this.webAssemblyContext);this.fill=a.AUTO_COLOR+this.adjustAutoColor("fill",r)}}newHitTestProvider(){return new d.StackedColumnSeriesHitTestProvider(this,this.webAssemblyContext)}}t.StackedColumnRenderableSeries=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStackedRenderableSeries=void 0;const r=i(0),n=i(22),s=i(401),o=i(10),a=i(114),l=i(40),h=i(7),u=i(205);class d extends l.BaseRenderableSeries{constructor(e,t){super(e,t),this.id=(0,n.generateGuid)(),this.isStacked=!0,this.rolloverModifierProps=new u.RolloverModifierRenderableSeriesProps(this),this.typeMap=new Map,this.opacityOriginalValue=1,this.isStacked=!0,this.accumulatedValues=new e.SCRTDoubleVector,this.accumulatedFinalAnimationValues=new e.SCRTDoubleVector}dataSeriesDataChanged(){this.notifyPropertyChanged(h.PROPERTY.DATA_SERIES)}delete(){super.delete(),this.accumulatedValues=(0,r.deleteSafe)(this.accumulatedValues),this.accumulatedFinalAnimationValues=(0,r.deleteSafe)(this.accumulatedFinalAnimationValues)}onDetachFromParentCollection(){this.parentCollection=void 0,this.getParentSurfaceFn=void 0,this.notifyParentPropertyChangedFn=void 0,this.delete()}notifyPropertyChanged(e){this.notifyParentPropertyChangedFn&&this.notifyParentPropertyChangedFn(e)}checkIsOutOfDataRange(e,t){const i=this.getDataSeriesValuesCount(),r=this.xAxis.getCurrentCoordinateCalculator().isCategoryCoordinateCalculator,n=r?0:this.getNativeXValues().get(0),s=r?i-1:this.getNativeXValues().get(i-1);return e<n||e>s}draw(e,t){throw Error("draw() is not supported for BaseStackedRenderableSeries")}getBaseXValues(){throw Error("getBaseXValues() is not supported for BaseStackedRenderableSeries")}getXRange(){throw Error("getXRange() method is not supported for BaseStackedRenderableSeries")}getYRange(e,t){throw Error("getYRange() method is not supported for BaseStackedRenderableSeries")}hasDataSeries(){throw Error("hasDataSeries() method is not supported for BaseStackedRenderableSeries")}hasDataSeriesValues(){throw Error("hasDataSeriesValues() method is not supported for BaseStackedRenderableSeries")}hasStrokePaletteProvider(){throw Error("hasStrokePaletteProvider() method is not supported for BaseStackedRenderableSeries")}hasPointMarkerPaletteProvider(){throw Error("hasFillPaletteProvider() method is not supported for BaseStackedRenderableSeries")}hasFillPaletteProvider(){throw Error("hasFillPaletteProvider() method is not supported for BaseStackedRenderableSeries")}onAttach(e){throw Error("onAttach() method is not supported for BaseStackedRenderableSeries")}onDetach(){throw Error("onDetach() method is not supported for BaseStackedRenderableSeries")}set animation(e){throw Error("animation() method is not supported for BaseStackedRenderableSeries")}get animation(){throw Error("animation() method is not supported for BaseStackedRenderableSeries")}getIndicesRange(e){throw Error("getIndicesRange() method is not supported for BaseStackedRenderableSeries")}get resamplingMode(){return a.EResamplingMode.None}set resamplingMode(e){throw Error("Setting resamplingMode property is not supported for BaseStackedRenderableSeries")}get resamplingPrecision(){throw Error("resamplingPrecision property is not supported for BaseStackedRenderableSeries")}set resamplingPrecision(e){throw Error("resamplingPrecision property is not supported for BaseStackedRenderableSeries")}get parentSurface(){return this.getParentSurfaceFn()}set parentSurface(e){throw Error("set parentSurface property is not supported for BaseStackedRenderableSeries")}get xAxis(){return this.parentCollection.xAxis}get yAxis(){return this.parentCollection.yAxis}beforeAnimationStart(){const e=this.accumulatedValues.size();this.accumulatedFinalAnimationValues.resize(e,0);for(let t=0;t<e;t++)this.accumulatedFinalAnimationValues.set(t,this.accumulatedValues.get(t));this.opacityOriginalValue=this.opacity}afterAnimationComplete(){this.opacityProperty=this.opacityOriginalValue}updateAnimationProperties(e,t){t.animation.isFadeEffectAnimation?this.opacity=e*this.opacityOriginalValue:this.opacity=this.opacityOriginalValue,t.animation.calculateAnimationValues(this.webAssemblyContext,this.accumulatedFinalAnimationValues,this.accumulatedValues,e)}getSeriesInfo(e){return new s.StackedXySeriesInfo(this,e)}toJSON(e=!1){var t;const i={opacity:this.opacity};return(null===(t=this.dataSeries)||void 0===t?void 0:t.type)===o.EDataSeriesType.Xy?{type:this.type,options:i,xyData:this.dataSeries.toJSON(e)}:{type:this.type,options:i}}toPointSeries(e){throw Error("toPointSeries method is not supported for BaseStackedRenderableSeries")}getCurrentRenderPassData(){throw Error("getCurrentRenderPassData method is not supported for BaseStackedRenderableSeries")}get xAxisId(){throw Error("xAxisId property is not supported for BaseStackedRenderableSeries")}set xAxisId(e){throw Error("xAxisId property is not supported for BaseStackedRenderableSeries")}get yAxisId(){throw Error("yAxisId property is not supported for BaseStackedRenderableSeries")}set yAxisId(e){throw Error("yAxisId property is not supported for BaseStackedRenderableSeries")}onAnimate(){throw Error("onAnimate is not supported for BaseStackedRenderableSeries")}get isRunningAnimation(){throw Error("isAnimationRunning is not supported for BaseStackedRenderableSeries")}enqueueAnimation(e){throw Error("animationEnqueue is not supported for BaseStackedRenderableSeries")}runAnimation(e){throw Error("runAnimation is not supported for BaseStackedRenderableSeries")}}t.BaseStackedRenderableSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedXySeriesInfo=void 0;const r=i(82);class n extends r.SeriesInfo{constructor(e,t){super(e,t),this.yValue=t.y1Value,this.accumulatedValue=t.yValue}}t.StackedXySeriesInfo=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedColumnSeriesHitTestProvider=void 0;const r=i(11),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,d,h,d.dataDistributionCalculator.isSortedAscending),p=d.getNativeXValues(),g=d.getNativeYValues(),{accumulatedValues:f,getGroupIndex:y,getGroupsCount:v,getColumnWidth:m}=this.parentSeries,S=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,d,p,f,h,u,c,0);if(c>=0){const e=y(),t=v(),i=m(n),s=i/2,o=(.5+e-t/2)*i;S.xValue=n.getDataValue(S.xCoord+o);const l=g.get(c),d=f.get(c),P=a.getCoordinate(d),C=a.getCoordinate(d-l),A=S.xCoord+o;S.isHit=(0,r.testIsInBounds)(h,u,A-s,C,A+s,P);const x=n.isCategoryCoordinateCalculator,b=x?0:p.get(0),T=n.getCoordinate(b),E=x?p.size()-1:p.get(p.size()-1),w=n.getCoordinate(E);S.isWithinDataBounds=(0,r.testIsInInterval)(S.hitTestPoint.x,T,w,i*t/2),S.y1Value=g.get(c)}else S.isHit=!1;return S}hitTestDataPoint(e,t,i=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){throw Error("hitTestDataPoint method is not supported for StackedColumnSeriesHitTestProvider")}hitTestForDataPointSelectionModifier(e,t,i=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){return this.hitTest(e,t)}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,d,h,d.dataDistributionCalculator.isSortedAscending),p=d.getNativeXValues(),g=d.getNativeYValues(),{accumulatedValues:f,getGroupIndex:y,getGroupsCount:v,getColumnWidth:m}=this.parentSeries,S=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,d,p,f,h,u,c,0);if(c>=0){const e=y(),t=v(),i=m(n),s=i/2,o=n.isCategoryCoordinateCalculator,a=o?0:p.get(0),l=n.getCoordinate(a),u=o?p.size()-1:p.get(p.size()-1),d=n.getCoordinate(u);S.isWithinDataBounds=(0,r.testIsInInterval)(S.hitTestPoint.x,l,d,i*t/2);const f=(.5+e-t/2)*i;S.xValue=n.getDataValue(S.xCoord+f);const P=S.xCoord+f;S.isHit=(0,r.testIsInInterval)(h,P-s,P+s),S.y1Value=g.get(c)}else S.isHit=!1;return S}}t.StackedColumnSeriesHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedMountainRenderableSeries=void 0;const r=i(8),n=i(148),s=i(26),o=i(4),a=i(400),l=i(7),h=i(230),u=i(61),d=i(404);class c extends a.BaseStackedRenderableSeries{constructor(e,t){var i,n,s;super(e,t),this.type=r.ESeriesType.StackedMountainSeries,this.fillProperty="#7e8486",this.strokeY1Property="transparent",this.strokeDashArrayProperty=[],this.strokeY1DashArrayProperty=[],this.fillProperty=null!==(i=null==t?void 0:t.fill)&&void 0!==i?i:this.fillProperty,this.stroke=null!==(n=null==t?void 0:t.stroke)&&void 0!==n?n:o.SciChartSurfaceBase.DEFAULT_THEME.mountainLineColor,this.strokeDashArrayProperty=null!==(s=null==t?void 0:t.strokeDashArray)&&void 0!==s?s:this.strokeDashArrayProperty,this.drawingProviders.push(new h.BandSeriesDrawingProvider(e,this,e=>e.y1Values,e=>e.yValues),new u.PointMarkerDrawingProvider(e,this,e=>e.y1Values))}onAttachToParentCollection(e,t,i){if(this.parentCollection)throw new Error("Invalid operation in StackedMountainRenderableSeries.onAttachToParentCollection, this series has been already attached to collection. Please detach it from the collection before attaching to another");this.parentCollection=e,this.getParentSurfaceFn=t,this.notifyParentPropertyChangedFn=i}onAttach(e){if(this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=e.invalidateElement,this.drawingProviders.forEach(e=>e.onAttachSeries()),this.rolloverModifierProps.setInvalidateParentCallback(e.invalidateElement)}onDetach(){this.invalidateParentCallback=void 0,this.drawingProviders.forEach(e=>e.onDetachSeries()),this.rolloverModifierProps.setInvalidateParentCallback(void 0)}draw(e,t){var i;this.currentRenderPassData=t,null===(i=this.hitTestProvider)||void 0===i||i.update(t);try{e.pushShaderEffect(this.effect),this.drawingProviders.forEach(i=>i.draw(e,t))}finally{e.popShaderEffect()}}onDpiChanged(e){super.onDpiChanged(e),this.notifyPropertyChanged(l.PROPERTY.STROKE)}get fill(){return(0,s.stripAutoColor)(this.fillProperty)}set fill(e){this.fillProperty!==e&&(this.fillProperty=e,this.drawingProviders.forEach(e=>e.onSeriesPropertyChange(l.PROPERTY.FILL)),this.drawingProviders.forEach(e=>e.onSeriesPropertyChange(l.PROPERTY.FILL_Y1)),this.notifyPropertyChanged(l.PROPERTY.FILL))}get strokeY1(){return this.strokeY1Property}set strokeY1(e){this.strokeY1Property!==e&&(this.strokeY1Property=e,this.drawingProviders.forEach(e=>e.onSeriesPropertyChange(l.PROPERTY.STROKE_Y1)))}get fillY1(){return(0,s.stripAutoColor)(this.fillProperty)}set fillY1(e){throw new Error("Setting fillY1 property is not supported on StackedMountainRenderableSeries")}get strokeDashArray(){return this.strokeDashArrayProperty}set strokeDashArray(e){this.strokeDashArrayProperty=e,this.notifyPropertyChanged(l.PROPERTY.STROKE_DASH_ARRAY)}get strokeY1DashArray(){return this.strokeY1DashArrayProperty}set strokeY1DashArray(e){this.strokeY1DashArrayProperty=e,this.drawingProviders.forEach(e=>e.onSeriesPropertyChange(l.PROPERTY.STROKE_Y1_DASH_ARRAY))}getCurrentRenderPassData(){return this.currentRenderPassData}toJSON(e=!1){const t=super.toJSON(e),i={fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness,strokeDashArray:this.strokeDashArray,paletteProvider:this.paletteProvider};return Object.assign(t.options,i),t}toPointSeries(e){return new n.XyPointSeriesWrapped(this.dataSeries)}hasStrokePaletteProvider(){const e=this.paletteProvider;return void 0!==(null==e?void 0:e.overrideStrokeArgb)}hasFillPaletteProvider(){const e=this.paletteProvider;return void 0!==(null==e?void 0:e.overrideFillArgb)}hasPointMarkerPaletteProvider(){const e=this.paletteProvider;return void 0!==(null==e?void 0:e.overridePointMarkerArgb)}resolveAutoColors(e,t,i){if(super.resolveAutoColors(e,t,i),this.fillProperty.startsWith(s.AUTO_COLOR)){const r=i.getFillColor(e,t,this.webAssemblyContext);this.fill=s.AUTO_COLOR+this.adjustAutoColor("fill",r)}}newHitTestProvider(){return new d.StackedMountainSeriesHitTestProvider(this,this.webAssemblyContext)}}t.StackedMountainRenderableSeries=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackedMountainSeriesHitTestProvider=void 0;const r=i(31),n=i(32),s=i(25);class o extends r.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return s.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:o,isVerticalChart:a}=this.currentRenderPassData,l=a?i.y:i.x,h=a?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return s.HitTestInfo.empty();const d=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),{accumulatedValues:p}=this.parentSeries,g=n.hitTestHelpers.createHitTestInfo(this.parentSeries,r,o,a,u,c,p,l,h,d,0);if(d>=0){const e=e=>p.get(e),t=e=>p.get(e)-u.getNativeYValues().get(e),i=n.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine,r,o,c,e,t,d,l,h);g.isHit=i.isHit,g.point2dataSeriesIndex=i.secondPointIndex}else g.isHit=!1;return g}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return s.HitTestInfo.empty();const{xCoordinateCalculator:r,yCoordinateCalculator:o,isVerticalChart:a}=this.currentRenderPassData,l=a?i.y:i.x,h=a?i.x:i.y,u=this.parentSeries.dataSeries;if(!u)return s.HitTestInfo.empty();const d=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,r,u,l,u.dataDistributionCalculator.isSortedAscending),c=u.getNativeXValues(),p=u.getNativeYValues(),{accumulatedValues:g}=this.parentSeries,f=n.hitTestHelpers.createHitTestInfo(this.parentSeries,r,o,a,u,c,g,l,h,d,0);return d>=0?(f.y1Value=p.get(d),f.isHit=f.isWithinDataBounds):f.isHit=!1,f}hitTestDataPoint(e,t,i=r.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS){throw Error("hitTestDataPoint method is not supported for StackedMountainSeriesHitTestProvider")}}t.StackedMountainSeriesHitTestProvider=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformContoursDrawingProvider=void 0;const r=i(13),n=i(0),s=i(1),o=i(2),a=i(131),l=i(12),h=i(75),u=i(120),d=i(7),c=i(49);class p extends c.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.heightsTextureCache=new a.TextureCache(e),this.onSeriesPropertyChange(d.PROPERTY.DATA_SERIES),this.onSeriesPropertyChange(d.PROPERTY.COLOR_MAP)}delete(){this.heightsTextureCache=(0,n.deleteSafe)(this.heightsTextureCache),this.heightData=(0,n.deleteSafe)(this.heightData),this.paletteTexture=(0,n.deleteSafe)(this.paletteTexture),super.delete()}onSeriesPropertyChange(e){const t=e===d.PROPERTY.COLOR_MAP||e.includes(u.COLOR_MAP_PREFIX),i=e===d.PROPERTY.DATA_SERIES;if(t&&(this.paletteTexture=(0,n.deleteSafe)(this.paletteTexture),this.parentSeries.colorMap&&this.parentSeries.colorMap.gradientStops?this.paletteTexture=this.createPaletteTexture(256,1,this.parentSeries.colorMap.gradientStops):this.paletteTexture=this.createPaletteTexture(256,1,void 0)),i){const e=this.parentSeries.dataSeries;if(e){const t=this.heightsTextureCache.create(e.arrayWidth,e.arrayHeight,this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_R32F);this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(t,!0)}}}draw(e,t){var i,r;const n=null===(i=this.heightsTextureCache)||void 0===i?void 0:i.value;if(n){const i=this.parentSeries.dataSeries;this.webAssemblyContext.SCRTFillTextureFloat32(n,i.arrayWidth,i.arrayHeight,i.getNormalizedVector(null!==(r=this.parentSeries.colorMap)&&void 0!==r?r:this.getDefaultColorMap(i)));const s=this.parentSeries.getContourDrawingParams(),{isVerticalChart:o}=t;let a=t.xCoordinateCalculator.getCoordinate(s.xMin);const l=t.yCoordinateCalculator.getCoordinate(s.yMin);let h=t.xCoordinateCalculator.getCoordinate(s.xMax);const u=t.yCoordinateCalculator.getCoordinate(s.yMax),d=Math.abs(a-h),c=()=>{this.parentSeries.minorsPerMajor>0&&this.drawContours(e,a,l,h,u,s.zMin,s.zMax,s.minorStepZ,s.minorLineStyle),this.drawContours(e,a,l,h,u,s.zMin,s.zMax,s.majorStepZ,s.majorLineStyle)};if(o){const i=e.getNativeContext(),r=t.xCoordinateCalculator.hasFlippedCoordinates;i.PushMatrix(),i.PushState(),i.Rotate(-90);const n=r?-d-a:-a;i.Translate(n,0),a=r?d:0,h=r?0:d,c(),i.PopMatrix(),i.PopState()}else c()}}drawContours(e,t,i,n,s,a,h,u,d){const c=(0,l.getVector4)(this.webAssemblyContext,0,1,0,0),p=new this.webAssemblyContext.SCRTContourParams,g=Math.abs(a)<r.EPSILON?.5:.01,f=(0,o.parseColorToTArgb)(d.color);p.SetColorVector(f.red/255,f.green/255,f.blue/255,f.opacity/255),p.SetParamsAVector(d.strokeThickness,u/2,g,0),p.SetParamsBVector(a,h,0,0);const y=e.getNativeContext(),v=this.heightsTextureCache.value;y.DrawHeatmapRectWithContours(null,v,t,i,n,s,c,p),null==p||p.delete()}computeHeightMap(e,t,i,r,s,o){var a;const l=e*t;(null===(a=this.heightData)||void 0===a?void 0:a.size())!==l&&(this.heightData=(0,n.deleteSafe)(this.heightData),this.heightData=new this.webAssemblyContext.FloatVector,this.heightData.resize(l,0));for(let n=0;n<e;n++)for(let a=0;a<t;a++){const l=r?i[o?a:t-1-a][s?e-n-1:n]:i[o?n:e-1-n][s?t-a-1:a];this.heightData.set(n*t+a,isNaN(l)?-1:l)}return this.heightData}createPaletteTexture(e,t,i){if(r.IS_TEST_ENV)return;s.Guard.isTrue(e>0,"width must be greater than 0"),s.Guard.isTrue(t>0,"height must be greater than 0");const n=new h.CanvasTexture(this.webAssemblyContext,e,t);n.clear();const o=n.getContext(),a=e;if(i){const e=o.createLinearGradient(0,0,a,0);i.forEach(t=>{e.addColorStop(t.offset,t.color)}),o.fillStyle=e}else o.fillStyle="black";return o.fillRect(0,0,e,t),n.copyTexture(),n}getDefaultColorMap(e){const t=e.zRange;return{minimum:t.min,maximum:t.max}}}t.UniformContoursDrawingProvider=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformHeatmapDrawingProvider=void 0;const r=i(13),n=i(0),s=i(1),o=i(131),a=i(75),l=i(120),h=i(7),u=i(49);class d extends u.BaseSeriesDrawingProvider{constructor(e,t){super(e,t),this.heatTextureCache=new o.TextureCache(e),this.recreatePalette(),this.onSeriesPropertyChange(h.PROPERTY.DATA_SERIES),this.onSeriesPropertyChange(h.PROPERTY.COLOR_MAP)}delete(){this.paletteTexture=(0,n.deleteSafe)(this.paletteTexture),this.heatTextureCache=(0,n.deleteSafe)(this.heatTextureCache),super.delete()}onSeriesPropertyChange(e){const t=e===h.PROPERTY.COLOR_MAP||e.includes(l.COLOR_MAP_PREFIX)||e===h.PROPERTY.OPACITY,i=e===h.PROPERTY.DATA_SERIES||h.PROPERTY.USE_LINEAR_TEXTURE_FILTERING;if(t&&this.recreatePalette(),i){const e=this.parentSeries.dataSeries,t=this.parentSeries.useLinearTextureFiltering;if(e){const i=this.heatTextureCache.create(e.arrayWidth,e.arrayHeight,this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_R32F);this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(i,t)}}}draw(e,t){var i;const{isVerticalChart:r}=t,n=!t.xCoordinateCalculator.hasFlippedCoordinates,s=(t.yCoordinateCalculator.hasFlippedCoordinates,null===(i=this.heatTextureCache)||void 0===i?void 0:i.value);if(s){const i=this.parentSeries.dataSeries,o=i.getNormalizedVector(this.parentSeries.colorMap,this.parentSeries.fillValuesOutOfRange);this.packedFloatParams=this.webAssemblyContext.SCRTFillTextureFloat32(s,i.arrayWidth,i.arrayHeight,o),this.packedFloatParams.x=0,this.packedFloatParams.y=1;const a=i.xRange,l=i.yRange,h=t.xCoordinateCalculator.getCoordinate(a.min),u=t.yCoordinateCalculator.getCoordinate(l.min),d=t.xCoordinateCalculator.getCoordinate(a.max),c=t.yCoordinateCalculator.getCoordinate(l.max),p=e.getNativeContext(),g=(this.parentSeries.parentSurface.seriesViewRect,Math.abs(h-d));if(r){p.PushMatrix(),p.PushState(),p.Rotate(-90);const e=n?-h:-g-h;p.Translate(e,0);const t=n?0:g,i=n?g:0,r=u,s=c;this.drawHeatmap(p,t,r,i,s),p.PopMatrix(),p.PopState()}else this.drawHeatmap(p,h,u,d,c)}}createPaletteTexture(e,t,i,n,o){if(r.IS_TEST_ENV)return;s.Guard.isTrue(e>0,"width must be greater than 0"),s.Guard.isTrue(t>0,"height must be greater than 0"),s.Guard.notNull(i,"gradientStops");const l=new a.CanvasTexture(this.webAssemblyContext,e,t);l.clear();const h=l.getContext();o&&(h.fillStyle="#ffffff00",h.fillRect(0,0,1,t));const u=e,d=h.createLinearGradient(0,0,u,0);i.forEach(e=>{d.addColorStop(e.offset,e.color)}),h.fillStyle=d,h.globalAlpha=n;const c=o?1:0;return h.fillRect(c,0,e,t),l.copyTexture(),l}recreatePalette(){var e,t;const i=null===(e=this.parentSeries.dataSeries)||void 0===e?void 0:e.hasNaNs;this.hasNaNs===i&&this.opacity===this.parentSeries.opacity&&this.gradientStops===(null===(t=this.parentSeries.colorMap)||void 0===t?void 0:t.gradientStops)||(this.paletteTexture=(0,n.deleteSafe)(this.paletteTexture),this.parentSeries.colorMap&&this.parentSeries.colorMap.gradientStops&&(this.hasNaNs=i,this.opacity=this.parentSeries.opacity,this.gradientStops=this.parentSeries.colorMap.gradientStops,this.paletteTexture=this.createPaletteTexture(256,1,this.parentSeries.colorMap.gradientStops,this.parentSeries.opacity,i)))}drawHeatmap(e,t,i,r,n){const s=this.packedFloatParams,o=new this.webAssemblyContext.SCRTContourParams,a=this.heatTextureCache.value;this.recreatePalette(),e.DrawHeatmapRectWithContours(this.paletteTexture.getTexture(),a,t,i,r,n,s,o),o.delete(),s.delete()}}t.UniformHeatmapDrawingProvider=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformHeatmapHitTestProvider=void 0;const r=i(5),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=s.hitTestHelpers.getNearestUniformHeatmapPoint(n,a,d,h,u),{xIndex:p,yIndex:g,zValue:f}=c,y=new o.HitTestInfo(this.parentSeries);y.dataSeriesName=this.parentSeries.type,y.dataSeriesType=d.type,y.hitTestPoint=new r.Point(h,u);const v=n.getDataValue(h),m=a.getDataValue(u);return y.hitTestPointValues=new r.Point(v,m),y.xValue=v,y.yValue=m,y.heatmapXIndex=p,y.heatmapYIndex=g,y.zValue=f,y.heatmapValue=f,y.xCoord=h,y.yCoord=u,y.isHit=-1!==p&&-1!==g,y.isWithinDataBounds=y.isHit,-1!==p&&-1!==g&&(y.metadata=d.getMetadataAt(g,p)),y}hitTestDataPoint(e,t){throw Error("hitTestDataPoint method is not supported for UniformHeatmapHitTestProvider")}hitTestXSlice(e,t){return this.hitTest(e,t)}}t.UniformHeatmapHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyScatterRenderableSeries=void 0;const r=i(8),n=i(148),s=i(97),o=i(40),a=i(7),l=i(83),h=i(61),u=i(409);class d extends o.BaseRenderableSeries{constructor(e,t){var i,n,o;super(e,t),this.type=r.ESeriesType.ScatterSeries,this.scatterOpacityProperty=1,this.pointMarker||(this.pointMarker=new s.EllipsePointMarker(e,{width:10,height:10})),this.drawingProviders=[],this.drawingProviders.push(new h.PointMarkerDrawingProvider(e,this)),(null==t?void 0:t.animation)&&this.animationQueue.push(t.animation),this.dataLabelProviderProperty||(this.dataLabelProviderProperty=new l.DataLabelProvider(null==t?void 0:t.dataLabels),this.dataLabelProviderProperty.onAttach(this.webAssemblyContext,this)),(null===(i=this.paletteProvider)||void 0===i?void 0:i.onAttached)&&(null===(n=this.paletteProvider)||void 0===n||n.onAttached(this)),this.scatterOpacityProperty=null!==(o=null==t?void 0:t.opacity)&&void 0!==o?o:this.scatterOpacityProperty}toPointSeries(e){return new n.XyPointSeriesWrapped(this.dataSeries)}newHitTestProvider(){return new u.ScatterSeriesHitTestProvider(this,this.webAssemblyContext)}get opacity(){return this.scatterOpacityProperty}set opacity(e){this.scatterOpacityProperty=e,this.notifyPropertyChanged(a.PROPERTY.OPACITY),this.pointMarker&&(this.pointMarker.opacity=e,this.notifyPropertyChanged(a.PROPERTY.POINT_MARKER))}}t.XyScatterRenderableSeries=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScatterSeriesHitTestProvider=void 0;const r=i(11),n=i(31),s=i(32),o=i(25);class a extends n.BaseHitTestProvider{hitTest(e,t,i=0){const n=this.getTranslatedHitTestPoint(e,t);if(!n)return o.HitTestInfo.empty();const{xCoordinateCalculator:a,yCoordinateCalculator:l,isVerticalChart:h}=this.currentRenderPassData,u=h?n.y:n.x,d=h?n.x:n.y,c=this.parentSeries.dataSeries;if(!c)return o.HitTestInfo.empty();const p=s.hitTestHelpers.getNearestXyPoint(a,l,c,u,d),g=c.getNativeXValues(),f=c.getNativeYValues(),y=s.hitTestHelpers.createHitTestInfo(this.parentSeries,a,l,h,c,g,f,u,d,p,i);if(p>=0){const{width:e,height:t}=this.parentSeries.pointMarker,n=a.isCategoryCoordinateCalculator,s=n?0:g.get(0),o=a.getCoordinate(s),l=n?g.size()-1:g.get(g.size()-1),h=a.getCoordinate(l);y.isWithinDataBounds=(0,r.testIsInInterval)(u,o,h,e/2),y.isHit=(0,r.testIsInBounds)(u,d,y.xCoord-e/2-i,y.yCoord+t/2+i,y.xCoord+e/2+i,y.yCoord-t/2-i)}else y.isHit=!1;return y}hitTestXSlice(e,t){const i=this.getTranslatedHitTestPoint(e,t);if(!i)return o.HitTestInfo.empty();const{xCoordinateCalculator:n,yCoordinateCalculator:a,isVerticalChart:l}=this.currentRenderPassData,h=l?i.y:i.x,u=l?i.x:i.y,d=this.parentSeries.dataSeries;if(!d)return o.HitTestInfo.empty();const c=d.getNativeXValues(),p=d.getNativeYValues(),g=s.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,n,d,h,d.dataDistributionCalculator.isSortedAscending),f=s.hitTestHelpers.createHitTestInfo(this.parentSeries,n,a,l,d,c,p,h,u,g,0);if(g>=0){const e=n.isCategoryCoordinateCalculator,t=e?0:c.get(0),i=n.getCoordinate(t),s=e?c.size()-1:c.get(c.size()-1),o=n.getCoordinate(s),{width:a}=this.parentSeries.pointMarker;f.isWithinDataBounds=(0,r.testIsInInterval)(h,i,o,a/2),f.isHit=f.isWithinDataBounds}else f.isHit=!1;return f}}t.ScatterSeriesHitTestProvider=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy=void 0;const r=i(15),n=i(37),s=i(16),o=i(59);class a extends o.BaseAxisLayoutStrategy{constructor(){super(),this.type=n.ELayoutStrategyType.BottomStacked,this.isStacked=!0,this.layoutAxisPartsStrategy=s.layoutAxisPartsBottomStrategy}measureAxes(e,t,i){var r;let n=0;i.forEach(e=>{e.measure(),(0,s.updateAxisLayoutState)(e);const t=(0,s.getHorizontalAxisRequiredSize)(e.axisLayoutState);n=t>n?t:n});const[o]=i,a=i[i.length-1];(0,s.updateLeftAndRightChartLayoutState)(t,null==o?void 0:o.axisLayoutState.additionalLeftSize,null==a?void 0:a.axisLayoutState.additionalRightSize);const{bottomViewportBorder:l,bottomCanvasBorder:h,adjustedPadding:u}=e;n+=null!==(r=l+h+(null==u?void 0:u.bottom))&&void 0!==r?r:0,t.bottomOuterAreaSize=Math.max(t.bottomOuterAreaSize,n)}layoutAxes(e,t,i,n,o){const a=i-e,[l]=o,h=o[o.length-1],u=o.filter(e=>e.stackedAxisLength),d=o.reduce((e,t)=>e-t.axisLayoutState.additionalBottomSize-t.axisLayoutState.additionalTopSize,a+(null==l?void 0:l.axisLayoutState.additionalLeftSize)+(null==h?void 0:h.axisLayoutState.additionalRightSize)),c=u.reduce((e,t)=>e+this.calculateTotalAxisWidth(t,d),0),p=a+(null==l?void 0:l.axisLayoutState.additionalLeftSize)+(null==h?void 0:h.axisLayoutState.additionalRightSize)-c;if(p<0)throw new Error(`Bottom stacked axes with defined size total ${c} pixels which is ${-p} more than the space available`);const g=p/(o.length-u.length);let f=e-(null==l?void 0:l.axisLayoutState.additionalLeftSize);o.forEach(i=>{const{axisSize:n,additionalLeftSize:o,additionalRightSize:a,additionalTopSize:l}=i.axisLayoutState,h=t+l,u=h+n,c=i.stackedAxisLength?this.calculateTotalAxisWidth(i,d):g,p=f+c-a;f+=o,i.offset=f-e,i.axisLength=p-f,i.isPrimaryAxis=!0,i.viewRect=r.Rect.createWithCoords(f,h,p,u),f=p+a,(0,s.layoutAxisParts)(i,this.layoutAxisPartsStrategy)})}}t.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CentralAxesLayoutManager=void 0;const r=i(33),n=i(113),s=i(142),o=i(294),a=i(143),l=i(112),h=i(145),u=i(146),d=i(147);class c extends l.LayoutManager{constructor(e){var t,i,r,o;super(e),this.type=n.ELayoutManagerType.CentralAxes,this.horizontalAxisPositionCoordinateModeProperty=a.EInnerAxisPlacementCoordinateMode.Relative,this.verticalAxisPositionCoordinateModeProperty=a.EInnerAxisPlacementCoordinateMode.Relative,this.horizontalAxisPositionProperty=.5,this.verticalAxisPositionProperty=.5,this.verticalAxisPositionProperty=null!==(t=null==e?void 0:e.verticalAxisPosition)&&void 0!==t?t:this.verticalAxisPositionProperty,this.verticalAxisPositionCoordinateModeProperty=null!==(i=null==e?void 0:e.verticalAxisPositionCoordinateMode)&&void 0!==i?i:this.verticalAxisPositionCoordinateModeProperty,this.horizontalAxisPositionProperty=null!==(r=null==e?void 0:e.horizontalAxisPosition)&&void 0!==r?r:this.horizontalAxisPositionProperty,this.horizontalAxisPositionCoordinateModeProperty=null!==(o=null==e?void 0:e.horizontalAxisPositionCoordinateMode)&&void 0!==o?o:this.horizontalAxisPositionCoordinateModeProperty,this.leftInnerAxesLayoutStrategy=new h.LeftAlignedInnerAxisLayoutStrategy({axisPosition:this.verticalAxisPositionProperty,coordinateMode:this.verticalAxisPositionCoordinateModeProperty}),this.rightInnerAxesLayoutStrategy=new u.RightAlignedInnerAxisLayoutStrategy({axisPosition:this.verticalAxisPositionProperty,coordinateMode:this.verticalAxisPositionCoordinateModeProperty}),this.topInnerAxesLayoutStrategy=new d.TopAlignedInnerAxisLayoutStrategy({axisPosition:this.horizontalAxisPositionProperty,coordinateMode:this.horizontalAxisPositionCoordinateModeProperty}),this.bottomInnerAxesLayoutStrategy=new s.BottomAlignedInnerAxisLayoutStrategy({axisPosition:this.horizontalAxisPositionProperty,coordinateMode:this.horizontalAxisPositionCoordinateModeProperty})}get horizontalAxisPositionCoordinateMode(){return this.horizontalAxisPositionCoordinateModeProperty}set horizontalAxisPositionCoordinateMode(e){this.horizontalAxisPositionCoordinateModeProperty=e,this.topInnerAxesLayoutStrategy.coordinateMode=e,this.bottomInnerAxesLayoutStrategy.coordinateMode=e,this.notifyPropertyChanged(o.PROPERTY.COORDINATE_MODE)}get verticalAxisPositionCoordinateMode(){return this.verticalAxisPositionCoordinateModeProperty}set verticalAxisPositionCoordinateMode(e){this.verticalAxisPositionCoordinateModeProperty=e,this.rightInnerAxesLayoutStrategy.coordinateMode=e,this.leftInnerAxesLayoutStrategy.coordinateMode=e,this.notifyPropertyChanged(o.PROPERTY.COORDINATE_MODE)}get horizontalAxisPosition(){return this.horizontalAxisPositionProperty}set horizontalAxisPosition(e){this.horizontalAxisPositionProperty=e,this.topInnerAxesLayoutStrategy.axisPosition=e,this.bottomInnerAxesLayoutStrategy.axisPosition=e,this.notifyPropertyChanged(o.PROPERTY.AXIS_POSITION_COORDINATE)}get verticalAxisPosition(){return this.verticalAxisPositionProperty}set verticalAxisPosition(e){this.verticalAxisPositionProperty=e,this.rightInnerAxesLayoutStrategy.axisPosition=e,this.leftInnerAxesLayoutStrategy.axisPosition=e,this.notifyPropertyChanged(o.PROPERTY.AXIS_POSITION_COORDINATE)}toJSON(){const e=super.toJSON(),t={horizontalAxisPosition:this.horizontalAxisPosition,horizontalAxisPositionCoordinateMode:this.horizontalAxisPositionCoordinateMode,verticalAxisPosition:this.verticalAxisPosition,verticalAxisPositionCoordinateMode:this.verticalAxisPositionCoordinateMode};return Object.assign(e,t),e}notifyPropertyChanged(e){var t;(null===(t=this.sciChartSurface)||void 0===t?void 0:t.invalidateElement)&&this.sciChartSurface.invalidateElement()}groupAxesByLayoutStrategy(){this.axesGroupedByLayoutStrategy.clear();const{topInnerAxes:e,bottomInnerAxes:t,leftInnerAxes:i,rightInnerAxes:n}=this.axesGroupedByLayoutStrategy,s=s=>{s.forEach(s=>{const{axisAlignment:o}=s;switch(s.isInnerAxis=!0,o){case r.EAxisAlignment.Top:e.push(s);break;case r.EAxisAlignment.Bottom:t.push(s);break;case r.EAxisAlignment.Left:i.push(s);break;case r.EAxisAlignment.Right:n.push(s)}})};s(this.sciChartSurface.xAxes.asArray()),s(this.sciChartSurface.yAxes.asArray())}}t.CentralAxesLayoutManager=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy=void 0;const r=i(15),n=i(37),s=i(16),o=i(59);class a extends o.BaseAxisLayoutStrategy{constructor(){super(),this.type=n.ELayoutStrategyType.LeftStacked,this.isStacked=!0,this.layoutAxisPartsStrategy=s.layoutAxisPartsLeftStrategy}measureAxes(e,t,i){var r;let n=0;i.forEach(e=>{e.measure(),(0,s.updateAxisLayoutState)(e);const t=(0,s.getVerticalAxisRequiredSize)(e.axisLayoutState);n=t>n?t:n});const[o]=i,a=i[i.length-1];(0,s.updateTopAndBottomChartLayoutState)(t,null==o?void 0:o.axisLayoutState.additionalTopSize,null==a?void 0:a.axisLayoutState.additionalBottomSize);const{leftViewportBorder:l,leftCanvasBorder:h,adjustedPadding:u}=e;n+=null!==(r=l+h+(null==u?void 0:u.left))&&void 0!==r?r:0,t.leftOuterAreaSize=Math.max(t.leftOuterAreaSize,n)}layoutAxes(e,t,i,n,o){const a=n-t,[l]=o,h=o[o.length-1],u=o.filter(e=>void 0!==e.stackedAxisLength),d=o.reduce((e,t)=>e-t.axisLayoutState.additionalBottomSize-t.axisLayoutState.additionalTopSize,a+(null==l?void 0:l.axisLayoutState.additionalTopSize)+(null==h?void 0:h.axisLayoutState.additionalBottomSize)),c=u.reduce((e,t)=>e+this.calculateTotalAxisHeight(t,d),0),p=a+(null==l?void 0:l.axisLayoutState.additionalTopSize)+(null==h?void 0:h.axisLayoutState.additionalBottomSize)-c;if(p<0)throw new Error(`Left stacked axes with defined size total ${c} pixels which is ${-p} more than the space available`);const g=p/(o.length-u.length);let f=t-(null==l?void 0:l.axisLayoutState.additionalTopSize);o.forEach(e=>{const{axisSize:n,additionalRightSize:o,additionalBottomSize:a,additionalTopSize:l}=e.axisLayoutState,h=i-o,u=h-n,c=void 0!==e.stackedAxisLength?this.calculateTotalAxisHeight(e,d):g,p=f+c-a;f+=l,e.offset=f-t,e.axisLength=p-f,e.isPrimaryAxis=!0,e.viewRect=r.Rect.createWithCoords(u,f,h,p),f=p+a,(0,s.layoutAxisParts)(e,this.layoutAxisPartsStrategy)})}}t.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RightAlignedOuterVerticallyStackedAxisLayoutStrategy=void 0;const r=i(15),n=i(37),s=i(16),o=i(59);class a extends o.BaseAxisLayoutStrategy{constructor(){super(),this.type=n.ELayoutStrategyType.RightStacked,this.isStacked=!0,this.layoutAxisPartsStrategy=s.layoutAxisPartsRightStrategy}measureAxes(e,t,i){var r;let n=0;i.forEach(e=>{e.measure(),(0,s.updateAxisLayoutState)(e);const t=(0,s.getVerticalAxisRequiredSize)(e.axisLayoutState);n=t>n?t:n});const[o]=i,a=i[i.length-1];(0,s.updateTopAndBottomChartLayoutState)(t,null==o?void 0:o.axisLayoutState.additionalTopSize,null==a?void 0:a.axisLayoutState.additionalBottomSize);const{rightViewportBorder:l,rightCanvasBorder:h,adjustedPadding:u}=e;n+=null!==(r=l+h+(null==u?void 0:u.right))&&void 0!==r?r:0,t.rightOuterAreaSize=Math.max(t.rightOuterAreaSize,n)}layoutAxes(e,t,i,n,o){const a=n-t,[l]=o,h=o[o.length-1],u=o.filter(e=>e.stackedAxisLength),d=o.reduce((e,t)=>e-t.axisLayoutState.additionalBottomSize-t.axisLayoutState.additionalTopSize,a+(null==l?void 0:l.axisLayoutState.additionalTopSize)+(null==h?void 0:h.axisLayoutState.additionalBottomSize)),c=u.reduce((e,t)=>e+this.calculateTotalAxisHeight(t,d),0),p=a+(null==l?void 0:l.axisLayoutState.additionalTopSize)+(null==h?void 0:h.axisLayoutState.additionalBottomSize)-c;if(p<0)throw new Error(`Right stacked axes with defined size total ${c} pixels which is ${-p} more than the space available`);const g=p/(o.length-u.length);let f=t-(null==l?void 0:l.axisLayoutState.additionalTopSize);o.forEach(i=>{const{axisSize:n,additionalLeftSize:o,additionalBottomSize:a,additionalTopSize:l}=i.axisLayoutState,h=e+o,u=h+n,c=i.stackedAxisLength?this.calculateTotalAxisHeight(i,d):g,p=f+c-a;f+=l,i.offset=f-t,i.axisLength=p-f,i.isPrimaryAxis=!0,i.viewRect=r.Rect.createWithCoords(h,f,u,p),f=p+a,(0,s.layoutAxisParts)(i,this.layoutAxisPartsStrategy)})}}t.RightAlignedOuterVerticallyStackedAxisLayoutStrategy=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy=void 0;const r=i(15),n=i(37),s=i(16),o=i(59);class a extends o.BaseAxisLayoutStrategy{constructor(){super(),this.type=n.ELayoutStrategyType.TopStacked,this.isStacked=!0,this.layoutAxisPartsStrategy=s.layoutAxisPartsTopStrategy}measureAxes(e,t,i){var r;let n=0;i.forEach(e=>{e.measure(),(0,s.updateAxisLayoutState)(e);const t=(0,s.getHorizontalAxisRequiredSize)(e.axisLayoutState);n=t>n?t:n});const[o]=i,a=i[i.length-1];(0,s.updateLeftAndRightChartLayoutState)(t,null==o?void 0:o.axisLayoutState.additionalLeftSize,null==a?void 0:a.axisLayoutState.additionalRightSize);const{topViewportBorder:l,topCanvasBorder:h,adjustedPadding:u}=e;n+=null!==(r=l+h+(null==u?void 0:u.top))&&void 0!==r?r:0,t.topOuterAreaSize=Math.max(t.topOuterAreaSize,n)}layoutAxes(e,t,i,n,o){const a=i-e,[l]=o,h=o[o.length-1],u=o.filter(e=>e.stackedAxisLength),d=o.reduce((e,t)=>e-t.axisLayoutState.additionalBottomSize-t.axisLayoutState.additionalTopSize,a+(null==l?void 0:l.axisLayoutState.additionalLeftSize)+(null==h?void 0:h.axisLayoutState.additionalRightSize)),c=u.reduce((e,t)=>e+this.calculateTotalAxisWidth(t,d),0),p=a+(null==l?void 0:l.axisLayoutState.additionalLeftSize)+(null==h?void 0:h.axisLayoutState.additionalRightSize)-c;if(p<0)throw new Error(`Top stacked axes with defined size total ${c} pixels which is ${-p} more than the space available`);const g=p/(o.length-u.length);let f=e-(null==l?void 0:l.axisLayoutState.additionalLeftSize);o.forEach(t=>{const{axisSize:i,additionalLeftSize:o,additionalRightSize:a,additionalBottomSize:l}=t.axisLayoutState,h=n-l,u=h-i,c=t.stackedAxisLength?this.calculateTotalAxisWidth(t,d):g,p=f+c-a;f+=o,t.offset=f-e,t.axisLength=p-f,t.isPrimaryAxis=!0,t.viewRect=r.Rect.createWithCoords(f,u,p,h),f=p+a,(0,s.layoutAxisParts)(t,this.layoutAxisPartsStrategy)})}}t.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartJsNavyTheme=void 0;const r=i(85),n=i(26),s=i(128);class o extends s.SciChartJSDarkv2Theme{constructor(){super(),this.type=r.EThemeProviderType.Navy,this.background1="#22365B",this.background2="#17243d",this.loadingBackground1="#21253D",this.loadingBackground2="#09090F",this.sciChartBackground=`radial-gradient(circle, ${this.background1} 0%, ${this.background2} 100%)`,this.loadingAnimationBackground=`radial-gradient(circle, ${this.loadingBackground1} 0%, ${this.loadingBackground2} 100%)`,this.loadingAnimationForeground="#2A2F4C",this.axisBandsFill="#52469503",this.majorGridLineBrush="#191C6D77",this.minorGridLineBrush="#2B2D7077",this.tickTextBrush="#8398ba",this.strokePalette=["#274b92","#47bde6","#ae418d","#e97064","#68bcae","#634e96"],this.fillPalette=["#274b9288","#47bde688","#ae418d88","#e9706488","#68bcae88","#634e9688"],this.lineSeriesColor=n.AUTO_COLOR,this.planeBorderColor="#191C6D77",this.axisPlaneBackgroundFill="TRANSPARENT",this.axis3DBandsFill="#52469503",this.isLightBackground=!1}}t.SciChartJsNavyTheme=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartJSLightTheme=void 0;const r=i(85),n=i(26);class s extends n.ThemeProvider{constructor(){super(...arguments),this.strokePalette=["#F48420","#AE408E","#30BC9A","#209FD9","#264B93"],this.fillPalette=["#F4842077","#AE408E77","#30BC9A77","#209FD977","#264B9377"],this.type=r.EThemeProviderType.Light,this.sciChartBackground="#F9F9F9FF",this.loadingAnimationBackground="#F9F9F9FF",this.loadingAnimationForeground="#777777FF",this.gridBorderBrush="#33333399",this.axisBandsFill="#AAAAAA09",this.axisBorder="#00000000",this.tickTextBrush="#333333FF",this.majorGridLineBrush="#CFCFCFFF",this.minorGridLineBrush="#CFCFCF77",this.gridBackgroundBrush="#05333377",this.rolloverLineBrush="#33333333",this.cursorLineBrush="#33333355",this.rubberBandFillBrush="#33333333",this.rubberBandStrokeBrush="#33333377",this.legendBackgroundBrush="#33333333",this.labelBackgroundBrush="#D0D0D0BB",this.labelBorderBrush="#33333377",this.labelForegroundBrush="#555555FF",this.textAnnotationForeground="#000000FF",this.textAnnotationBackground="#FFFFFFFF",this.annotationsGripsBorderBrush="#232323FF",this.annotationsGripsBackroundBrush="#FFFFFF33",this.annotationSelectionStroke="#f00e0e66",this.overviewFillBrush="#33333322",this.scrollbarBackgroundBrush="#33333322",this.scrollbarBorderBrush="#12121255",this.scrollbarGripsBackgroundBrush="#FFFFFF66",this.scrollbarViewportBackgroundBrush="#FFFFFF44",this.scrollbarViewportBorderBrush="#12121255",this.upWickColor="#52CC54FF",this.downWickColor="#E26565FF",this.upBodyBrush="#52CC54A0",this.downBodyBrush="#E26565D0",this.upBandSeriesLineColor="#52CC54FF",this.downBandSeriesLineColor="#E26565FF",this.upBandSeriesFillColor="#52CC5490",this.downBandSeriesFillColor="#E26565A0",this.mountainAreaBrush="#76B7E2B4",this.mountainLineColor="#777777FF",this.lineSeriesColor="#777777FF",this.columnLineColor="#777777FF",this.columnFillBrush="#777777FF",this.impulseFillBrush="#777777FF",this.defaultColorMapBrush=[{offset:0,color:"DARKBLUE"},{offset:.5,color:"CORNFLOWERBLUE"},{offset:1,color:"#FF22AAFF"}],this.axisTitleColor="#777777FF",this.shadowEffectColor="#A0AABAFA",this.planeBorderColor="#EEEEEEFF",this.axisPlaneBackgroundFill="TRANSPARENT",this.axis3DBandsFill="#33333333",this.isLightBackground=!0}}t.SciChartJSLightTheme=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PieSegment=void 0;const r=i(14),n=i(5),s=i(17),o=i(22),a=i(139),l=i(319);t.PieSegment=class{constructor(e){var t,i,a,l,h,u,d,c,p,g;this.colorProperty="grey",this.isSelectedProperty=!1,this.textProperty="",this.deltaProperty=15,this.shiftProperty=0,this.labelOffsetProperty=new n.Point(0,0),this.radiusAdjustmentProperty=1,this.id=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:(0,o.generateGuid)(),this.colorProperty=null!==(i=null==e?void 0:e.color)&&void 0!==i?i:this.colorProperty,this.colorLinearGradientProperty=null!==(a=null==e?void 0:e.colorLinearGradient)&&void 0!==a?a:this.colorLinearGradientProperty,this.isSelectedProperty=null!==(l=null==e?void 0:e.isSelected)&&void 0!==l?l:this.isSelectedProperty,this.textProperty=null!==(h=null==e?void 0:e.text)&&void 0!==h?h:this.textProperty,this.valueProperty=null!==(u=null==e?void 0:e.value)&&void 0!==u?u:this.valueProperty,this.deltaProperty=null!==(d=null==e?void 0:e.delta)&&void 0!==d?d:this.deltaProperty,this.showLabelProperty=null===(c=null==e?void 0:e.showLabel)||void 0===c||c,(null==e?void 0:e.labelProvider)&&("getSegmentText"in(null==e?void 0:e.labelProvider)||(e.labelProvider=(0,r.createType)(s.EBaseType.LabelProvider,e.labelProvider.type,void 0,e.labelProvider.options))),this.labelProviderProperty=null==e?void 0:e.labelProvider,this.labelOffsetProperty=null!==(p=null==e?void 0:e.labelOffset)&&void 0!==p?p:this.labelOffsetProperty,this.labelStyleProperty=null==e?void 0:e.labelStyle,this.radiusAdjustmentProperty=null!==(g=null==e?void 0:e.radiusAdjustment)&&void 0!==g?g:this.radiusAdjustmentProperty}onAttach(e){this.parentSurface=e,this.labelProviderProperty&&this.labelProviderProperty.attachedToSurface(e),this.invalidateParentCallback=e.invalidateElement}onDetach(){this.invalidateParentCallback=void 0}get showLabel(){return this.showLabelProperty}set showLabel(e){this.showLabelProperty=e,this.notifyPropertyChanged(l.PROPERTY.SHOW_LABEL)}get colorLinearGradient(){return this.colorLinearGradientProperty}set colorLinearGradient(e){this.colorLinearGradientProperty=e,this.notifyPropertyChanged(l.PROPERTY.COLOR_LINEAR_GRADIENT)}get color(){return this.colorProperty}set color(e){this.colorProperty=e,this.notifyPropertyChanged(l.PROPERTY.COLOR)}get isSelected(){return this.isSelectedProperty}set isSelected(e){this.isSelectedProperty!==e&&(this.isSelectedProperty=e,this.notifyPropertyChanged(l.PROPERTY.IS_SELECTED))}get text(){return this.textProperty}set text(e){this.textProperty=e,this.notifyPropertyChanged(l.PROPERTY.TEXT)}get labelProvider(){return void 0===this.labelProviderProperty&&(this.labelProvider=new a.PieLabelProvider),this.labelProviderProperty}set labelProvider(e){this.labelProviderProperty=e,this.notifyPropertyChanged(l.PROPERTY.LABEL_PROVIDER)}getPercentage(e){return 100*this.value/e}get value(){return this.valueProperty}set value(e){this.oldValueProperty=this.valueProperty,this.valueProperty=e,this.notifyPropertyChanged(l.PROPERTY.VALUE)}get oldValue(){return this.oldValueProperty}get delta(){return this.deltaProperty}set delta(e){this.deltaProperty!==e&&(this.deltaProperty=e,this.notifyPropertyChanged(l.PROPERTY.DELTA))}get shift(){return this.shiftProperty}set shift(e){this.shiftProperty!==e&&(this.shiftProperty=e,this.notifyPropertyChanged(l.PROPERTY.SHIFT))}get labelStyle(){var e;return Object.assign(Object.assign({},null===(e=this.parentSurface)||void 0===e?void 0:e.labelStyle),this.labelStyleProperty)}set labelStyle(e){this.labelStyleProperty=Object.assign(Object.assign({},this.labelStyleProperty),e),this.notifyPropertyChanged(l.PROPERTY.LABEL_STYLE)}get labelOffset(){return this.labelOffsetProperty}set labelOffset(e){var t,i;(null===(t=this.labelOffsetProperty)||void 0===t?void 0:t.x)!==e.x&&(null===(i=this.labelOffsetProperty)||void 0===i?void 0:i.y)!==e.y&&(this.labelOffsetProperty=e,this.notifyPropertyChanged(l.PROPERTY.LABEL_OFFSET))}get radiusAdjustment(){return this.radiusAdjustmentProperty}set radiusAdjustment(e){this.radiusAdjustmentProperty=e,this.notifyPropertyChanged(l.PROPERTY.RADIUS_ADJUSTMENT)}toJSON(){var e;return{id:this.id,color:this.color,colorLinearGradient:this.colorLinearGradient,isSelected:this.isSelected,delta:this.delta,text:this.text,value:this.value,labelProvider:null===(e=this.labelProviderProperty)||void 0===e?void 0:e.toJSON(),labelOffset:this.labelOffset,labelStyle:this.labelStyle,radiusAdjustment:this.radiusAdjustment}}getLabelText(e){return this.labelProviderProperty?this.labelProvider.getSegmentText(this,e):this.parentSurface.labelProvider.getSegmentText(this,e)}notifyPropertyChanged(e){e===l.PROPERTY.LABEL_PROVIDER&&this.labelProviderProperty&&this.labelProviderProperty.attachedToSurface(this.parentSurface),this.invalidateParentCallback&&this.invalidateParentCallback(e)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SynchronizedLayoutManager=void 0;const r=i(113),n=i(22),s=i(112);class o extends s.LayoutManager{constructor(e,t){super(t),this.type=r.ELayoutManagerType.Synchronised,this.id=(0,n.generateGuid)(),this.verticalGroup=e}layoutChart(e){const t=super.layoutChart(e);return this.verticalGroup.synchronizeAxisSizes(),t}trySynchronizeLayouts(){this.lastLeftOuterAreaSize===this.verticalGroup.groupLeftSize&&this.lastRightOuterAreaSize===this.verticalGroup.groupRightSize||this.sciChartSurface.invalidateElement()}measureLeftOuterAxes(){super.measureLeftOuterAxes(),this.verticalGroup.onLeftSizeChanged(this.id,this.chartLayoutState.leftOuterAreaSize);const e=Math.max(this.chartLayoutState.leftOuterAreaSize,this.verticalGroup.groupLeftSize);this.chartLayoutState.leftOuterAreaSize=e,this.lastLeftOuterAreaSize=e}measureRightOuterAxes(){super.measureRightOuterAxes(),this.verticalGroup.onRightSizeChanged(this.id,this.chartLayoutState.rightOuterAreaSize);const e=Math.max(this.chartLayoutState.rightOuterAreaSize,this.verticalGroup.groupRightSize);this.chartLayoutState.rightOuterAreaSize=e,this.lastRightOuterAreaSize=e}}t.SynchronizedLayoutManager=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroArray2D=void 0;t.zeroArray2D=e=>{if(!e)return;const i=[];for(let r=0;r<e[0];++r)i.push(1===e.length?0:(0,t.zeroArray2D)(e.slice(1)));return i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAxis3dById=t.getAxisById=void 0;const r=i(1);function n(e,t){r.Guard.notNull(e,"axes");for(let i=0;i<e.size();i++){const r=e.get(i);if(r.id===t)return r}console.warn(`scichart getAxisGeneric(): Axis with Id '${t}' was not found`)}t.getAxisById=function(e,t){return n(e,t)},t.getAxis3dById=function(e,t){return n(e,t)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BandAnimationStyle=void 0;const r=i(2),n=i(63);class s extends n.BaseAnimationStyle{constructor(e){var t,i,r;super(e),this.strokeY1=null!==(t=null==e?void 0:e.strokeY1)&&void 0!==t?t:this.strokeY1Property,this.fill=null!==(i=null==e?void 0:e.fill)&&void 0!==i?i:this.fillProperty,this.fillY1=null!==(r=null==e?void 0:e.fillY1)&&void 0!==r?r:this.fillY1Property}set strokeY1(e){this.strokeY1Property=e,e&&(this.strokeY1ARGBProperty=(0,r.parseColorToUIntArgb)(e))}get strokeY1(){return this.strokeY1Property}get strokeY1ARGB(){return this.strokeY1ARGBProperty}set fill(e){this.fillProperty=e,e&&(this.fillARGBProperty=(0,r.parseColorToUIntArgb)(e))}get fill(){return this.fillProperty}get fillARGB(){return this.fillARGBProperty}set fillY1(e){this.fillY1Property=e,e&&(this.fillY1ARGBProperty=(0,r.parseColorToUIntArgb)(e))}get fillY1(){return this.fillY1Property}get fillY1ARGB(){return this.fillY1ARGBProperty}}t.BandAnimationStyle=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CandlestickAnimationStyle=void 0;const r=i(2),n=i(234);class s extends n.OhlcAnimationStyle{constructor(e){var t,i;super(e),this.brushUp=null!==(t=null==e?void 0:e.brushUp)&&void 0!==t?t:this.brushUpProperty,this.brushDown=null!==(i=null==e?void 0:e.brushDown)&&void 0!==i?i:this.brushDownProperty}set brushUp(e){this.brushUpProperty=e,e&&(this.brushUpARGBProperty=(0,r.parseColorToUIntArgb)(e))}get brushUp(){return this.brushUpProperty}get brushUpARGB(){return this.brushUpARGBProperty}set brushDown(e){this.brushDownProperty=e,e&&(this.brushDownARGBProperty=(0,r.parseColorToUIntArgb)(e))}get brushDown(){return this.brushDownProperty}get brushDownARGB(){return this.brushDownARGBProperty}}t.CandlestickAnimationStyle=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcAnimation=void 0;const r=i(38),n=i(2),s=i(24),o=i(50),a=i(234);class l extends o.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new a.OhlcAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}getSeriesStyle(e){var t;if(!e.isStacked)return new a.OhlcAnimationStyle({stroke:e.stroke,strokeThickness:e.strokeThickness,opacity:e.opacity,strokeUp:e.strokeUp,strokeDown:e.strokeDown,dataPointWidth:e.dataPointWidth,pointMarker:null===(t=e.pointMarker)||void 0===t?void 0:t.getPointMarkerStyle()})}updateSeriesProperties(e,t,i){if(super.updateSeriesProperties(e,t,i),this.isStyleAnimation){const r=this.styles;if(void 0!==r.strokeUp){const o=s.animationHelpers.interpolateColor(t.strokeUpARGB,r.strokeUpARGB,i);e.strokeUp=(0,n.parseArgbToHtmlColor)(o)}if(void 0!==r.strokeDown){const o=s.animationHelpers.interpolateColor(t.strokeDownARGB,r.strokeDownARGB,i);e.strokeDown=(0,n.parseArgbToHtmlColor)(o)}void 0!==r.dataPointWidth&&(e.dataPointWidth=s.animationHelpers.interpolateNumber(t.dataPointWidth,r.dataPointWidth,i))}}}t.OhlcAnimation=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnAnimationStyle=void 0;const r=i(2),n=i(63);class s extends n.BaseAnimationStyle{constructor(e){var t,i,r;super(e),this.fill=null!==(t=null==e?void 0:e.fill)&&void 0!==t?t:this.fillProperty,this.zeroLineY=null!==(i=null==e?void 0:e.zeroLineY)&&void 0!==i?i:this.zeroLineY,this.dataPointWidth=null!==(r=null==e?void 0:e.dataPointWidth)&&void 0!==r?r:this.dataPointWidth}set fill(e){this.fillProperty=e,e&&(this.fillARGBProperty=(0,r.parseColorToUIntArgb)(e))}get fill(){return this.fillProperty}get fillARGB(){return this.fillARGBProperty}}t.ColumnAnimationStyle=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MountainAnimationStyle=void 0;const r=i(2),n=i(63);class s extends n.BaseAnimationStyle{constructor(e){var t,i;super(e),this.fill=null!==(t=null==e?void 0:e.fill)&&void 0!==t?t:this.fillProperty,this.zeroLineY=null!==(i=null==e?void 0:e.zeroLineY)&&void 0!==i?i:this.zeroLineY}set fill(e){this.fillProperty=e,e&&(this.fillARGBProperty=(0,r.parseColorToUIntArgb)(e))}get fill(){return this.fillProperty}get fillARGB(){return this.fillARGBProperty}}t.MountainAnimationStyle=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DoubleAnimator=void 0;const r=i(427),n=i(39);class s{static animate(e,t,i,o,a,l=n.easing.outExpo){return(0,r.animateAny)(i,e,t,o,s.interpolate,a,l)}static interpolate(e,t,i){return(t-e)*i+e}}t.DoubleAnimator=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animateAny=void 0;const r=i(428),n=i(1),s=i(180);t.animateAny=function(e,t,i,o,a,l,h){n.Guard.notNull(o,"onAnimate"),n.Guard.notNull(t,"from"),n.Guard.notNull(i,"to"),n.Guard.notNull(a,"interpolate");const u=(new Date).getTime()+e;o(t);const d=new r.AnimationToken(setInterval(()=>{const r=(new Date).getTime(),n=s.NumberUtil.constrain(1-(u-r)/e,0,1),l=h(n),c=a(t,i,l);o(c),r>u&&(1!==l&&o(a(t,i,h(1))),d.completeAnimation())},16.67),l);return d}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationToken=void 0;t.AnimationToken=class{constructor(e,t){this.token=e,this.onCompleted=t}cancelAnimation(){this.token&&(clearInterval(this.token),this.token=void 0)}completeAnimation(){this.token&&(clearInterval(this.token),this.token=void 0),this.onCompleted&&this.onCompleted()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisBase3D=t.EWhichAxis=void 0;const r=i(57),n=i(3),s=i(2),o=i(430),a=i(431),l=i(6);var h;!function(e){e[e.xAxis=0]="xAxis",e[e.yAxis=1]="yAxis",e[e.zAxis=2]="zAxis"}(h=t.EWhichAxis||(t.EWhichAxis={}));class u extends r.AxisCore{constructor(e,t){super(t),this.labelDepthTestEnabledProperty=!1,this.planeBorderThicknessProperty=2,this.isYAxisProperty=!1,this.isZAxisProperty=!1,this.titleOffsetProperty=50,this.backgroundColorProperty="black",this.tickLabelsOffsetProperty=10,this.labelStyle=new o.AxisBase3DLabelStyle(this),this.webAssemblyContext3D=e,this.isXAxisProperty=!1}applyTheme(e){this.labelStyle.foreground=e.labelForegroundBrush,this.axisBandsFill=e.axisBandsFill,this.majorGridLineStyle={color:e.majorGridLineBrush},this.majorTickLineStyle={color:e.majorGridLineBrush},this.minorGridLineStyle={color:e.minorGridLineBrush},this.minorTickLineStyle={color:e.minorGridLineBrush},this.axisTitleStyle={color:e.axisTitleColor}}get isYAxis(){return this.isYAxisProperty}setIsYAxis(e){this.isYAxisProperty=e,this.notifyPropertyChanged(a.PROPERTY.IS_Y_AXIS)}get isZAxis(){return this.isZAxisProperty}setIsZAxis(e){this.isZAxisProperty=e,this.notifyPropertyChanged(a.PROPERTY.IS_Z_AXIS)}get labelDepthTestEnabled(){return this.labelDepthTestEnabledProperty}set labelDepthTestEnabled(e){this.labelDepthTestEnabledProperty=e,this.notifyPropertyChanged(a.PROPERTY.LABEL_DEPTH_TEST)}get planeBorderThickness(){return this.planeBorderThicknessProperty}set planeBorderThickness(e){this.planeBorderThicknessProperty=e,this.notifyPropertyChanged(a.PROPERTY.PLANE_BORDER_THICKNESS)}get planeBorderColor(){return this.planeBorderColorProperty}set planeBorderColor(e){this.planeBorderColorProperty=e,this.notifyPropertyChanged(a.PROPERTY.PLANE_BORDER_COLOR)}get tickLabelAlignment(){return this.tickLabelAlignmentProperty}set tickLabelAlignment(e){this.tickLabelAlignmentProperty=e,this.notifyPropertyChanged(a.PROPERTY.TICK_LABEL_ALIGNMENT)}get positiveSideClipping(){return this.positiveSideClippingProperty}set positiveSideClipping(e){this.positiveSideClippingProperty=e,this.notifyPropertyChanged(a.PROPERTY.POSITIVE_SIDE_CLIPPING)}get negativeSideClipping(){return this.negativeSideClippingProperty}set negativeSideClipping(e){this.negativeSideClippingProperty=e,this.notifyPropertyChanged(a.PROPERTY.NEGATIVE_SIDE_CLIPPING)}get axisPlaneBackgroundFill(){return this.axisPlaneBackgroundFillProperty}set axisPlaneBackgroundFill(e){this.axisPlaneBackgroundFillProperty=e,this.notifyPropertyChanged(a.PROPERTY.AXIS_PLANE_BACKGROUND_FILL)}get titleOffset(){return this.titleOffsetProperty}set titleOffset(e){this.titleOffsetProperty=e,this.notifyPropertyChanged(a.PROPERTY.TITLE_OFFSET)}get backgroundColor(){return this.backgroundColorProperty}set backgroundColor(e){this.backgroundColorProperty=e,this.notifyPropertyChanged(a.PROPERTY.BACKGROUND_COLOR)}get tickLabelsOffset(){return this.tickLabelsOffsetProperty}set tickLabelsOffset(e){this.tickLabelsOffsetProperty=e,this.notifyPropertyChanged(a.PROPERTY.TICK_LABELS_OFFSET)}onAttach(e,t,i,r){this.parentSurface=e,this.setIsXAxis(t),this.setIsYAxis(i),this.setIsZAxis(r)}toAxisDescriptor(){const{majorTickCoords:e,minorTickCoords:t,majorTickLabels:i}=this.getTickCoordsAndLabels();return{axisTitle:Array.isArray(this.axisTitle)?this.axisTitle.join(" "):this.axisTitle,axisSize:this.getAxisSize(),backgroundColor:(0,s.parseColorToUIntArgb)(this.backgroundColor||"black"),bandColor:(0,s.parseColorToTArgb)(this.axisBandsFill||"#202123"),borderColor:(0,s.parseColorToUIntArgb)(this.planeBorderColor||"black"),borderThickness:this.planeBorderThickness,drawBands:this.drawMajorBands,drawMajorGridlines:this.drawMajorGridLines,drawMajorTicks:this.drawMajorTickLines,drawMinorGridlines:this.drawMinorGridLines,drawMinorTicks:this.drawMinorTickLines,isVisible:this.isVisible,labelDepthTestEnabled:this.labelDepthTestEnabled,labelStyle:{alignment:this.labelStyle.alignment,dpiScaling:this.labelStyle.dpiScaling/96,fontFamily:this.labelStyle.fontFamily,fontSize:this.labelStyle.fontSize*l.DpiHelper.PIXEL_RATIO,foreground:(0,s.parseColorToUIntArgb)(this.labelStyle.foreground)},majorCoordinates:e,majorLineStyle:d(this.majorGridLineStyle),minorLineStyle:d(this.minorGridLineStyle),majorTickStyle:c(this.majorTickLineStyle),minorTickStyle:c(this.minorTickLineStyle),minorCoordinates:t,smoothLabelOverlapAvoidance:!1,tickLabels:i,tickLabelsOffset:this.tickLabelsOffset*l.DpiHelper.PIXEL_RATIO,titleOffset:this.titleOffset*l.DpiHelper.PIXEL_RATIO,titleStyle:void 0}}validateAxis(){}getMaximumRange(){var e,t,i,r,s;let o=new n.NumberRange(NaN,NaN);if((null===(t=null===(e=this.parentSurface)||void 0===e?void 0:e.renderableSeries)||void 0===t?void 0:t.size())>0){let e;if(this.isXAxis)e=h.xAxis;else if(this.isYAxis)e=h.yAxis;else{if(!this.isZAxis)throw Error("AxisBase3D: isXAxis, isYAxis, isZAxis flag are not set");e=h.zAxis}o=null!==(i=this.getMaximumRangeAs(this.parentSurface.renderableSeries,e))&&void 0!==i?i:o,o.isZero()&&(o=this.coerceZeroVisibleRange(o)),(null===(r=this.growBy)||void 0===r?void 0:r.isDefined())&&(o=o.growBy(this.growBy))}const a=(null===(s=this.visibleRange)||void 0===s?void 0:s.isDefined())?this.visibleRange:this.getDefaultNonZeroRange();return(null==o?void 0:o.isDefined())?o:a}getMaximumRangeAs(e,t){let i;return e.asArray().forEach(e=>{if(e.isVisible&&e.dataSeries){const r=t===h.xAxis?e.dataSeries.xRange:t===h.yAxis?e.dataSeries.yRange:e.dataSeries.zRange;(null==r?void 0:r.isDefined())&&(i=i?r.union(i):r)}}),i}getAxisSize(){if(!this.parentSurface)return 0;const e=this.parentSurface.worldDimensions;if(!e)throw new Error("Must set property sciChart3DSurface.worldDimensions to a valid Vector3 with X,Y,Z world size");return this.isXAxis?e.x:this.isYAxis?e.y:e.z}getLabels(e){return e.map(e=>this.labelProvider.formatLabel(e))}getTicks(){const e=this.getMaxAutoTicks();if(this.autoTicks){const t=this.deltaCalculator.getDeltaFromRange(this.visibleRange.min,this.visibleRange.max,this.minorsPerMajor,e);this.minorDeltaProperty=t.min,this.majorDeltaProperty=t.max}return{majorTicks:this.tickProvider.getMajorTicks(this.minorDeltaProperty,this.majorDeltaProperty,this.visibleRange),minorTicks:this.tickProvider.getMinorTicks(this.minorDeltaProperty,this.majorDeltaProperty,this.visibleRange)}}getTickCoordsAndLabels(){const e=this.getCurrentCoordinateCalculator(),t=t=>t.map(t=>e.getCoordinate(t)),{majorTicks:i,minorTicks:r}=this.getTicks();return{majorTicks:i,majorTickLabels:this.getLabels(i),majorTickCoords:t(i),minorTicks:r,minorTickCoords:t(r)}}}t.AxisBase3D=u;const d=e=>({stroke:(0,s.parseColorToTArgb)(e.color),strokeThickness:e.strokeThickness*l.DpiHelper.PIXEL_RATIO,start:1,end:1}),c=e=>({stroke:(0,s.parseColorToTArgb)(e.color),strokeThickness:e.strokeThickness*l.DpiHelper.PIXEL_RATIO,start:0,end:e.tickSize*l.DpiHelper.PIXEL_RATIO})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AxisBase3DLabelStyle=void 0;const r=i(431);t.AxisBase3DLabelStyle=class{constructor(e){this.dpiScalingProperty=96,this.fontFamilyProperty="Arial",this.fontSizeProperty=14,this.foregroundProperty="#c8c7c3",this.parentAxis=e}get alignment(){return this.alignmentProperty}set alignment(e){this.alignmentProperty=e,this.notifyPropertyChanged(r.TEXT_STYLE_PROPERTY.ALIGNMENT)}get dpiScaling(){return this.dpiScalingProperty}set dpiScaling(e){this.dpiScalingProperty=e,this.notifyPropertyChanged(r.TEXT_STYLE_PROPERTY.DPI_SCALING)}get fontFamily(){return this.fontFamilyProperty}set fontFamily(e){this.fontFamilyProperty=e,this.notifyPropertyChanged(r.TEXT_STYLE_PROPERTY.FONT_FAMILY)}get fontSize(){return this.fontSizeProperty}set fontSize(e){this.fontSizeProperty=e,this.notifyPropertyChanged(r.TEXT_STYLE_PROPERTY.FONT_SIZE)}get foreground(){return this.foregroundProperty}set foreground(e){this.foregroundProperty=e,this.notifyPropertyChanged(r.TEXT_STYLE_PROPERTY.FOREGROUND)}notifyPropertyChanged(e){var t;const i=null===(t=this.parentAxis)||void 0===t?void 0:t.invalidateParentCallback;i&&i()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_STYLE_PROPERTY=t.PROPERTY=void 0,function(e){e.AXIS_PLANE_BACKGROUND_FILL="AXIS_PLANE_BACKGROUND_FILL",e.IS_Y_AXIS="IS_Y_AXIS",e.IS_Z_AXIS="IS_Z_AXIS",e.LABEL_DEPTH_TEST="LABEL_DEPTH_TEST",e.NEGATIVE_SIDE_CLIPPING="NEGATIVE_SIDE_CLIPPING",e.PLANE_BORDER_COLOR="PLANE_BORDER_COLOR",e.PLANE_BORDER_THICKNESS="PLANE_BORDER_THICKNESS",e.POSITIVE_SIDE_CLIPPING="POSITIVE_SIDE_CLIPPING",e.TICK_LABEL_ALIGNMENT="TICK_LABEL_ALIGNMENT",e.TICK_LABELS_OFFSET="TICK_LABELS_OFFSET",e.TITLE_OFFSET="TITLE_OFFSET",e.BACKGROUND_COLOR="BACKGROUND_COLOR"}(t.PROPERTY||(t.PROPERTY={})),function(e){e.ALIGNMENT="ALIGNMENT",e.DPI_SCALING="DPI_SCALING",e.FONT_FAMILY="FONT_FAMILY",e.FONT_SIZE="FONT_SIZE",e.FOREGROUND="FOREGROUND"}(t.TEXT_STYLE_PROPERTY||(t.TEXT_STYLE_PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScatterPointsSceneEntity=void 0;const r=i(0),n=i(79),s=i(2),o=i(98),a=i(121),l=i(433),h=i(236);class u extends l.RenderableSeriesSceneEntity{constructor(e,t){super(e,t,new h.RenderableSeriesSceneEntityState),this.type=n.ESceneEntityType.ScatterPointsSceneEntity,this.setNativeEntity(e.SCRTPoint3DSceneEntity.implement(this))}delete(){this.pointColors=(0,r.deleteSafe)(this.pointColors),this.pointScales=(0,r.deleteSafe)(this.pointScales),super.delete()}Render(){this.nativeEntity.SetOpacity(this.parentSeries.opacity),super.Render()}updateSeries(){const e=this.parentSeries.dataSeries;if(!e)return;if(e.type!==o.EDataSeriesType3D.Xyz3D)throw new Error("DataSeries type for a ScatterRenderableSeries3D must be XyzDataSeries3D");const t=this.parentSeries.pointMarker;if(!t)throw new Error("To render 3D Scatter, bubble or point-clouds, you must provider a PointMarker on BaseRenderableSeries3D");const i=this.webAssemblyContext.eSCRT_POINT_MARKER_TYPE,n=(0,s.parseColorToUIntArgb)(t.fill);switch(t.markerType){case a.EMarkerType.Pixel:this.nativeEntity.SetPointMarkerType(i.SCRT_POINT_MARKER_TYPE_PIXEL),this.nativeEntity.SetPointSize(0),this.nativeEntity.SetPointColor(n);break;case a.EMarkerType.TexturedQuad:const e=t;if(!e.pointsTexture)throw new Error("Expected a BaseTexturePointMarker3D.pointsTexture on 3D pointmarker of type TexturedQuad");this.nativeEntity.SetPointMarkerType(i.SCRT_POINT_MARKER_TYPE_TEXTURED_QUAD),this.nativeEntity.SetPointSize(t.size),this.nativeEntity.SetPointColor(n),this.nativeEntity.SetPointMarkerTexture(e.pointsTexture);break;case a.EMarkerType.InstancedMesh:const r=t;if(!r.pointsMesh)throw new Error("Expected a BaseMeshPointMarker3D.pointsMesh on 3D pointmarker of type InstancedMesh");this.nativeEntity.SetPointMarkerType(i.SCRT_POINT_MARKER_TYPE_INSTANCED_MESH),this.nativeEntity.SetPointSize(t.size),this.nativeEntity.SetPointColor(n),this.nativeEntity.SetPointMarkerMesh(r.pointsMesh);break;default:throw new Error("Unknown pointMarker.markerType "+t.markerType)}const l=e.getNativeXValues(),h=e.getNativeYValues(),u=e.getNativeZValues(),d=e.getMetadataValues(),c=e.count(),{colors:p,scales:g}=this.rebuildPointMetadata(d,c,n);let f;try{f=new this.webAssemblyContext.SCRTPoint3DSceneEntityParams,f.useDefaultColors=!1,f.useDefaultScale=!1,f.SetCoordinateCalculators(this.currentRenderPassData.xCalc.nativeCalculator,this.currentRenderPassData.yCalc.nativeCalculator,this.currentRenderPassData.zCalc.nativeCalculator),this.nativeEntity.UpdateMeshesVec(l,h,u,p,g,f)}finally{(0,r.deleteSafe)(f)}}rebuildPointMetadata(e,t,i){return this.pointColors||(this.pointColors=new this.webAssemblyContext.UIntVector),this.pointScales||(this.pointScales=new this.webAssemblyContext.FloatVector),this.pointColors.resize(t,i),this.pointScales.resize(t,1),e.forEach((e,t)=>{e&&(e.vertexColorAbgr&&this.pointColors.set(t,e.vertexColorAbgr),e.pointScale&&this.pointScales.set(t,e.pointScale))}),{colors:this.pointColors,scales:this.pointScales}}}t.ScatterPointsSceneEntity=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderableSeriesSceneEntity=void 0;const r=i(141);class n extends r.BaseSceneEntity3D{constructor(e,t,i){super(e),this.parentSeries=t,this.state=i,this.state.setInitialState()}Update(e){this.currentRenderPassData&&(this.state.validate(this.parentSeries,this.currentRenderPassData)||(this.updateSeries(),this.state.reset(this.parentSeries,this.currentRenderPassData)),super.Update(e))}onEngineRestart(){super.onEngineRestart(),this.state.setInitialState()}notifySeriesPropertyChanged(e){this.state.setRenderableSeriesPropertyChanged()}}t.RenderableSeriesSceneEntity=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderableSeries3D=void 0;const r=i(0),n=i(22),s=i(122);t.BaseRenderableSeries3D=class{constructor(e,t){var i,r;this.id=null!==(i=null==t?void 0:t.id)&&void 0!==i?i:(0,n.generateGuid)(),this.webAssemblyContext=e,this.dataSeriesProperty=(null==t?void 0:t.dataSeries)||void 0,this.isVisibleProperty=void 0===(null==t?void 0:t.isVisible)||(null==t?void 0:t.isVisible),this.pointMarkerProperty=(null==t?void 0:t.pointMarker)||void 0,this.strokeProperty=(null==t?void 0:t.stroke)||"#FFFFFF",this.shininessProperty=void 0===(null==t?void 0:t.shininess)?64:t.shininess,this.opacityProperty=null!==(r=null==t?void 0:t.opacity)&&void 0!==r?r:1,this.pointMarkerPropertyChanged=this.pointMarkerPropertyChanged.bind(this),this.onDpiChanged=this.onDpiChanged.bind(this)}applyTheme(e){}get opacity(){return this.opacityProperty}set opacity(e){this.opacityProperty=e,this.notifyPropertyChanged(s.PROPERTY.OPACITY)}get sceneEntity(){return this.sceneEntityProperty}get shininess(){return this.shininessProperty}set shininess(e){this.shininessProperty=e,this.notifyPropertyChanged(s.PROPERTY.SHININESS)}get paletteProvider(){return this.paletteProviderProperty}set paletteProvider(e){this.paletteProviderProperty=e,this.notifyPropertyChanged(s.PROPERTY.PALETTE_PROVIDER)}get stroke(){return this.strokeProperty}set stroke(e){this.strokeProperty=e,this.notifyPropertyChanged(s.PROPERTY.STROKE)}get dataSeries(){return this.dataSeriesProperty}set dataSeries(e){this.dataSeriesProperty=e,this.notifyPropertyChanged(s.PROPERTY.DATA_SERIES)}get pointMarker(){return this.pointMarkerProperty}set pointMarker(e){this.detachPointMarker(this.pointMarkerProperty),this.pointMarkerProperty=e,this.attachPointMarker(this.pointMarkerProperty),this.notifyPropertyChanged(s.PROPERTY.POINT_MARKER3D)}get parentSurface(){return this.parentSurfaceProperty}set parentSurface(e){this.parentSurfaceProperty=e,this.notifyPropertyChanged(s.PROPERTY.PARENT_SURFACE)}get isVisible(){return this.isVisibleProperty}set isVisible(e){this.isVisibleProperty=e,this.sceneEntityProperty&&(this.sceneEntityProperty.isVisible=this.isVisibleProperty),this.notifyPropertyChanged(s.PROPERTY.IS_VISIBLE)}onAttach(e){if(this.parentSurface=e,this.invalidateParentCallback)throw new Error("Invalid operation in sciChart3DSurface.attachSeries, this series has already been attached to a SciChart3DSurface. Please detach it from a SciChart3DSurface before attaching to another");this.invalidateParentCallback=e.invalidateElement}onDetach(){this.invalidateParentCallback=void 0,this.parentSurface=void 0}delete(){this.sceneEntityProperty=(0,r.deleteSafe)(this.sceneEntityProperty),this.dataSeries=(0,r.deleteSafe)(this.dataSeries)}onDpiChanged(e){var t;null===(t=this.sceneEntityProperty)||void 0===t||t.onDpiChanged(e)}setSceneEntity(e){this.sceneEntityProperty=e,this.sceneEntityProperty&&(this.sceneEntityProperty.isVisible=this.isVisible),this.notifyPropertyChanged(s.PROPERTY.SCENE_ENTITY)}notifyPropertyChanged(e){var t;null===(t=this.sceneEntityProperty)||void 0===t||t.notifySeriesPropertyChanged(e),this.invalidateParentCallback&&this.invalidateParentCallback()}attachPointMarker(e){e&&e.propertyChanged.subscribe(this.pointMarkerPropertyChanged)}detachPointMarker(e){e&&e.propertyChanged.unsubscribe(this.pointMarkerPropertyChanged)}pointMarkerPropertyChanged(e){this.notifyPropertyChanged("pointMarker."+e.propertyName)}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeshColorPalette=void 0;const r=i(18),n=i(70);t.MeshColorPalette=class{constructor(e){this.webAssemblyContext=e,this.propertyChanged=new r.EventHandler}notifyPropertyChanged(e){var t;null===(t=this.propertyChanged)||void 0===t||t.raiseEvent(new n.PropertyChangedEventArgs(e))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcAverageForArray=t.calcAverageForDoubleVector=void 0;t.calcAverageForDoubleVector=(e,t,i)=>{const r=e.size(),n=null!=i?i:r-1;if(n>=r||n<0)throw Error("index should be in range [0, length-1]");if(n+1<t)return NaN;let s=0;for(let i=n+1-t;i<n+1;i++)s+=e.get(i);return s/=t,s};t.calcAverageForArray=(e,t,i)=>{const r=e.length,n=null!=i?i:r-1;if(n>=r||n<0)throw Error("index should be in range [0, length-1]");if(n+1<t)return NaN;let s=0;for(let i=n+1-t;i<n+1;i++)s+=e[i];return s/=t,s}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertRgbToHexColor=t.convertColor=void 0;t.convertColor=(e,t=1)=>{const i=r(t),n=e.toLowerCase();return 0===n.length?"":"#"===n[0]?`0x${i}${n.substr(1)}`:`0x${i}${n}`};t.convertRgbToHexColor=(e,t,i)=>"#"+r(e)+r(t)+r(i);const r=e=>{if(e>=1)return"ff";if(e<=0)return"00";const t=Math.floor(256*e).toString(16);return 1===t.length?"0"+t:t}},function(e,t,i){"use strict";function r(e){return new Promise((t,i)=>{const r=new Image;r.onload=()=>t(r),r.onerror=i,r.src=e})}Object.defineProperty(t,"__esModule",{value:!0}),t.createImagesArrayAsync=t.createImageAsync=void 0,t.createImageAsync=r,t.createImagesArrayAsync=function(e){const t=e.map(e=>r(e));return Promise.all(t)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInRange=void 0;t.getRandomInRange=(e,t,i)=>{const r=Math.random();return parseInt(((e+r*(t-e))*Math.pow(10,i)).toFixed(i),10)/Math.pow(10,i)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNextRandomPriceBarFactory=t.getStocksDataFactory=void 0;const r=i(439);t.getStocksDataFactory=(e,t,i)=>(n,s)=>{const o=n+e,a=s,l=(0,r.getRandomInRange)(t,i,3),h=Math.abs(a-l),u=Math.max(a,l),d=(0,r.getRandomInRange)(u,Math.min(i,u+.7*h),3),c=Math.min(a,l);return{xValue:o,openValue:a,highValue:d,lowValue:(0,r.getRandomInRange)(Math.max(t,c-.7*h),c,3),closeValue:l}};class n{constructor(e,t,i,r,n,s){this.xValue=e,this.openValue=t,this.highValue=i,this.lowValue=r,this.closeValue=n,this.volume=s}}t.getNextRandomPriceBarFactory=(e,t,i,r)=>{let o=e,a=new n(e,r,r,r,r,0);return(e=!1)=>e?(()=>{const e=a.closeValue+(Math.random()-.48)*(a.closeValue/100),t=e>a.highValue?e:a.highValue,i=e<a.lowValue?e:a.lowValue,r=.05*(3e4*Math.random()+2e4);return a=new n(a.xValue,a.openValue,t,i,e,a.volume+r),a})():(()=>{const e=a.closeValue,l=(Math.random()-.9)*r/30,h=Math.random(),u=.5*r+r/2*Math.sin(727220521664304e-20*o)+r/16*Math.cos(727220521664304e-19*o)+r/32*Math.sin(727220521664304e-19*(10+h)*o)+r/64*Math.cos(727220521664304e-19*(20+h)*o)+l,d=Math.max(e,u)+Math.random()*r/100,c=Math.min(e,u)-Math.random()*r/100,p=3e4*Math.random()+2e4,g=i?s(a.xValue):a.xValue;return a=new n(g+60*t,e,d,c,u,p),o+=60*t,a})()};const s=e=>e},function(e,t,i){e.exports=i(442)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=i(167),n=i(177),s=i(210),o=i(217),a=i(157),l=i(166),h=i(166),u=i(166),d=i(36),c=i(36),p=i(36),g=i(36),f=i(36),y=i(14),v=i(14),m=i(14),S=i(14),P=i(14),C=i(14),A=i(100),x=i(20),b=i(20),T=i(20),E=i(153),w=i(153),R=i(153),D=i(339),L=i(340),M=i(218),I=i(218),O=i(341),k=i(246),V=i(245),_=i(220),N=i(220),F=i(221),B=i(344),H=i(345),Y=i(154),z=i(154),j=i(349),G=i(352),X=i(353),W=i(354),U=i(355),$=i(292),Z=i(54),K=i(54),J=i(54),q=i(35),Q=i(35),ee=i(35),te=i(293),ie=i(173),re=i(134),ne=i(30),se=i(30),oe=i(30),ae=i(16),le=i(16),he=i(16),ue=i(16),de=i(16),ce=i(16),pe=i(16),ge=i(16),fe=i(16),ye=i(16),ve=i(16),me=i(16),Se=i(16),Pe=i(142),Ce=i(190),Ae=i(410),xe=i(411),be=i(143),Te=i(112),Ee=i(145),we=i(191),Re=i(412),De=i(146),Le=i(192),Me=i(413),Ie=i(459),Oe=i(418),ke=i(147),Ve=i(193),_e=i(414),Ne=i(60),Fe=i(356),Be=i(211),He=i(10),Ye=i(10),ze=i(10),je=i(73),Ge=i(73),Xe=i(73),We=i(115),Ue=i(335),$e=i(213),Ze=i(169),Ke=i(216),Je=i(212),qe=i(337),Qe=i(214),et=i(215),tt=i(301),it=i(302),rt=i(303),nt=i(82),st=i(401),ot=i(304),at=i(305),lt=i(314),ht=i(323),ut=i(322),dt=i(325),ct=i(324),pt=i(330),gt=i(62),ft=i(62),yt=i(326),vt=i(327),mt=i(328),St=i(329),Pt=i(332),Ct=i(331),At=i(334),xt=i(333),bt=i(94),Tt=i(374),Et=i(370),wt=i(371),Rt=i(306),Dt=i(148),Lt=i(229),Mt=i(207),It=i(365),Ot=i(259),kt=i(260),Vt=i(184),_t=i(320),Nt=i(185),Ft=i(307),Bt=i(114),Ht=i(297),Yt=i(263),zt=i(152),jt=i(152),Gt=i(152),Xt=i(136),Wt=i(194),Ut=i(460),$t=i(298),Zt=i(295),Kt=i(137),Jt=i(26),qt=i(26),Qt=i(129),ei=i(128),ti=i(416),ii=i(415),ri=i(195),ni=i(461),si=i(127),oi=i(91),ai=i(105),li=i(462),hi=i(66),ui=i(66),di=i(66),ci=i(4),pi=i(4),gi=i(4),fi=i(4),yi=i(4),vi=i(170),mi=i(299),Si=i(28),Pi=i(28),Ci=i(250),Ai=i(251),xi=i(34),bi=i(239),Ti=i(252),Ei=i(338),wi=i(174),Ri=i(255),Di=i(23),Li=i(23),Mi=i(88),Ii=i(175),Oi=i(175),ki=i(343),Vi=i(346),_i=i(347),Ni=i(348),Fi=i(257),Bi=i(258),Hi=i(48),Yi=i(264),zi=i(265),ji=i(267),Gi=i(178),Xi=i(271),Wi=i(420),Ui=i(420),$i=i(118),Zi=i(118),Ki=i(89),Ji=i(249),qi=i(268),Qi=i(272),er=i(321),tr=i(108),ir=i(183),rr=i(133),nr=i(109),sr=i(186),or=i(90),ar=i(139),lr=i(138),hr=i(138),ur=i(209),dr=i(209),cr=i(86),pr=i(254),gr=i(172),fr=i(182),yr=i(64),vr=i(64),mr=i(64),Sr=i(64),Pr=i(12),Cr=i(12),Ar=i(12),xr=i(12),br=i(12),Tr=i(12),Er=i(12),wr=i(12),Rr=i(12),Dr=i(12),Lr=i(342),Mr=i(84),Ir=i(84),Or=i(84),kr=i(84),Vr=i(84),_r=i(318),Nr=i(198),Fr=i(97),Br=i(200),Hr=i(202),Yr=i(203),zr=i(204),jr=i(162),Gr=i(361),Xr=i(364),Wr=i(368),Ur=i(116),$r=i(116),Zr=i(373),Kr=i(377),Jr=i(379),qr=i(382),Qr=i(386),en=i(387),tn=i(389),rn=i(164),nn=i(350),sn=i(391),on=i(351),an=i(309),ln=i(310),hn=i(311),un=i(395),dn=i(396),cn=i(397),pn=i(398),gn=i(196),fn=i(399),yn=i(206),vn=i(403),mn=i(232),Sn=i(232),Pn=i(233),Cn=i(408),An=i(24),xn=i(463),bn=i(421),Tn=i(63),En=i(199),wn=i(464),Rn=i(465),Dn=i(422),Ln=i(466),Mn=i(424),In=i(201),On=i(357),kn=i(467),Vn=i(468),_n=i(425),Nn=i(423),Fn=i(234),Bn=i(96),Hn=i(358),Yn=i(469),zn=i(359),jn=i(360),Gn=i(224),Xn=i(225),Wn=i(149),Un=i(149),$n=i(226),Zn=i(83),Kn=i(151),Jn=i(159),qn=i(158),Qn=i(227),es=i(228),ts=i(230),is=i(366),rs=i(316),ns=i(375),ss=i(380),os=i(384),as=i(392),ls=i(160),hs=i(160),us=i(61),ds=i(405),cs=i(406),ps=i(363),gs=i(367),fs=i(317),ys=i(376),vs=i(32),ms=i(25),Ss=i(378),Ps=i(381),Cs=i(385),As=i(394),xs=i(372),bs=i(409),Ts=i(402),Es=i(404),ws=i(388),Rs=i(407),Ds=i(205),Ls=i(219),Ms=i(78),Is=i(78),Os=i(78),ks=i(78),Vs=i(417),_s=i(75),Ns=i(6),Fs=i(76),Bs=i(76),Hs=i(76),Ys=i(110),zs=i(110),js=i(187),Gs=i(470),Xs=i(471),Ws=i(472),Us=i(98),$s=i(473),Zs=i(475),Ks=i(280),Js=i(281),qs=i(282),Qs=i(283),eo=i(284),to=i(140),io=i(140),ro=i(429),no=i(430),so=i(279),oo=i(476),ao=i(477),lo=i(93),ho=i(93),uo=i(93),co=i(93),po=i(93),go=i(478),fo=i(121),yo=i(68),vo=i(68),mo=i(68),So=i(68),Po=i(68),Co=i(68),Ao=i(68),xo=i(68),bo=i(285),To=i(236),Eo=i(286),wo=i(432),Ro=i(287),Do=i(237),Lo=i(237),Mo=i(238),Io=i(482),Oo=i(483),ko=i(484),Vo=i(123),_o=i(123),No=i(123),Fo=i(123),Bo=i(428),Ho=i(53),Yo=i(53),zo=i(0),jo=i(99),Go=i(18),Xo=i(485),Wo=i(1),Uo=i(486),$o=i(3),Zo=i(180),Ko=i(69),Jo=i(168),qo=i(168),Qo=i(290),ea=i(5),ta=i(70),ia=i(15),ra=i(126),na=i(126),sa=i(126),oa=i(52),aa=i(71),la=i(71),ha=i(65),ua=i(65),da=i(65),ca=i(65),pa=i(427),ga=i(426),fa=i(39),ya=i(39),va=i(179),ma=i(107),Sa=i(244),Pa=i(240),Ca=i(135),Aa=i(135),xa=i(38),ba=i(291),Ta=i(74),Ea=i(33),wa=i(33),Ra=i(33),Da=i(33),La=i(58),Ma=i(17),Ia=i(19),Oa=i(19),ka=i(243),Va=i(222),_a=i(56),Na=i(44),Fa=i(315),Ba=i(231),Ha=i(181),Ya=i(223),za=i(117),ja=i(161),Ga=i(247),Xa=i(104),Wa=i(102),Ua=i(102),$a=i(102),Za=i(77),Ka=i(113),Ja=i(37),qa=i(67),Qa=i(67),el=i(41),tl=i(101),il=i(43),rl=i(487),nl=i(79),sl=i(176),ol=i(313),al=i(8),ll=i(163),hl=i(80),ul=i(189),dl=i(47),cl=i(47),pl=i(47),gl=i(47),fl=i(85),yl=i(248),vl=i(29),ml=i(81),Sl=i(45),Pl=i(45),Cl=i(45),Al=i(45),xl=i(45),bl=i(45),Tl=i(436),El=i(436),wl=i(27),Rl=i(27),Dl=i(27),Ll=i(27),Ml=i(27),Il=i(27),Ol=i(27),kl=i(437),Vl=i(437),_l=i(488),Nl=i(165),Fl=i(42),Bl=i(42),Hl=i(42),Yl=i(42),zl=i(42),jl=i(42),Gl=i(42),Xl=i(42),Wl=i(42),Ul=i(42),$l=i(266),Zl=i(22),Kl=i(22),Jl=i(489),ql=i(296),Ql=i(208),eh=i(208),th=i(438),ih=i(438),rh=i(155),nh=i(155),sh=i(51),oh=i(300),ah=i(103),lh=i(103),hh=i(103),uh=i(393),dh=i(21),ch=i(21),ph=i(21),gh=i(21),fh=i(21),yh=i(21),vh=i(2),mh=i(2),Sh=i(2),Ph=i(2),Ch=i(2),Ah=i(2),xh=i(2),bh=i(11),Th=i(11),Eh=i(11),wh=i(11),Rh=i(11),Dh=i(11),Lh=i(11),Mh=i(11),Ih=i(11),Oh=i(439),kh=i(440),Vh=i(440),_h=i(490),Nh=i(256),Fh=i(156),Bh=i(156),Hh=i(156),Yh=i(9),zh=i(9),jh=i(9),Gh=i(9),Xh=i(9),Wh=i(9),Uh=i(9),$h=i(9),Zh=i(9),Kh=i(9),Jh=i(111),qh=i(111),Qh=i(419),eu={buildAnnotations:r.buildAnnotations,buildAxes:n.buildAxes,buildDataSeries:s.buildDataSeries,buildModifiers:o.buildModifiers,buildSeries:a.buildSeries,build2DChart:l.build2DChart,buildPieChart:h.buildPieChart,configure2DSurface:u.configure2DSurface,chartReviver:d.chartReviver,buildChart:c.buildChart,configureChart:p.configureChart,ensureRegistrations:g.ensureRegistrations,chartBuilder:f.chartBuilder,registerType:y.registerType,registerWasmType:v.registerWasmType,registerFunction:m.registerFunction,getFunction:S.getFunction,createType:P.createType,getSubTypes:C.getSubTypes,EModifierType:A.EModifierType,testIsOverAxes:x.testIsOverAxes,getActiveAxes:b.getActiveAxes,scaleAxes:T.scaleAxes,CursorModifier:E.CursorModifier,calcTooltipSize:w.calcTooltipSize,adjustTooltipPosition:R.adjustTooltipPosition,DataPointInfo:D.DataPointInfo,DataPointSelectionChangedArgs:L.DataPointSelectionChangedArgs,ESelectionMode:M.ESelectionMode,DataPointSelectionModifier:I.DataPointSelectionModifier,LegendModifier:O.LegendModifier,ModifierArgsBase:k.ModifierArgsBase,ModifierMouseArgs:V.ModifierMouseArgs,EActionType:_.EActionType,MouseWheelZoomModifier:N.MouseWheelZoomModifier,OverviewRangeSelectionModifier:F.OverviewRangeSelectionModifier,PinchZoomModifier:B.PinchZoomModifier,RolloverModifier:H.RolloverModifier,RubberBandXyZoomModifier:Y.RubberBandXyZoomModifier,getRubberBandRect:z.getRubberBandRect,SeriesSelectionModifier:j.SeriesSelectionModifier,XAxisDragModifier:G.XAxisDragModifier,YAxisDragModifier:X.YAxisDragModifier,ZoomExtentsModifier:W.ZoomExtentsModifier,ZoomPanModifier:U.ZoomPanModifier,BatchRenderContext:$.BatchRenderContext,getWebGlBrushFromCache:Z.getWebGlBrushFromCache,getScrtBrushFromCache:K.getScrtBrushFromCache,createBrushInCache:J.createBrushInCache,getWebGlPenFromCache:q.getWebGlPenFromCache,getScrtPenFromCache:Q.getScrtPenFromCache,createPenInCache:ee.createPenInCache,RenderContext2D:te.RenderContext2D,WebGlBrush:ie.WebGlBrush,WebGlPen:re.WebGlPen,calculateAbsoluteRenderLayer:ne.calculateAbsoluteRenderLayer,ELineDrawMode:se.ELineDrawMode,WebGlRenderContext2D:oe.WebGlRenderContext2D,updateAxisLayoutState:ae.updateAxisLayoutState,layoutAxisParts:le.layoutAxisParts,layoutAxisPartsLeftStrategy:he.layoutAxisPartsLeftStrategy,layoutAxisPartsRightStrategy:ue.layoutAxisPartsRightStrategy,layoutAxisPartsTopStrategy:de.layoutAxisPartsTopStrategy,layoutAxisPartsBottomStrategy:ce.layoutAxisPartsBottomStrategy,getHorizontalAxisRequiredSize:pe.getHorizontalAxisRequiredSize,getVerticalAxisRequiredSize:ge.getVerticalAxisRequiredSize,updateLeftAndRightChartLayoutState:fe.updateLeftAndRightChartLayoutState,updateTopAndBottomChartLayoutState:ye.updateTopAndBottomChartLayoutState,getValueWithCoordinateMode:ve.getValueWithCoordinateMode,getCoordinateWithCoordinateMode:me.getCoordinateWithCoordinateMode,testLayoutManager:Se.testLayoutManager,BottomAlignedInnerAxisLayoutStrategy:Pe.BottomAlignedInnerAxisLayoutStrategy,BottomAlignedOuterAxisLayoutStrategy:Ce.BottomAlignedOuterAxisLayoutStrategy,BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy:Ae.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy,CentralAxesLayoutManager:xe.CentralAxesLayoutManager,EInnerAxisPlacementCoordinateMode:be.EInnerAxisPlacementCoordinateMode,LayoutManager:Te.LayoutManager,LeftAlignedInnerAxisLayoutStrategy:Ee.LeftAlignedInnerAxisLayoutStrategy,LeftAlignedOuterAxisLayoutStrategy:we.LeftAlignedOuterAxisLayoutStrategy,LeftAlignedOuterVerticallyStackedAxisLayoutStrategy:Re.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy,RightAlignedInnerAxisLayoutStrategy:De.RightAlignedInnerAxisLayoutStrategy,RightAlignedOuterAxisLayoutStrategy:Le.RightAlignedOuterAxisLayoutStrategy,RightAlignedOuterVerticallyStackedAxisLayoutStrategy:Me.RightAlignedOuterVerticallyStackedAxisLayoutStrategy,SciChartVerticalGroup:Ie.SciChartVerticalGroup,SynchronizedLayoutManager:Oe.SynchronizedLayoutManager,TopAlignedInnerAxisLayoutStrategy:ke.TopAlignedInnerAxisLayoutStrategy,TopAlignedOuterAxisLayoutStrategy:Ve.TopAlignedOuterAxisLayoutStrategy,TopAlignedOuterHorizontallyStackedAxisLayoutStrategy:_e.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy,getWindowedYRange:Ne.getWindowedYRange,DataPointSelectionPaletteProvider:Fe.DataPointSelectionPaletteProvider,HlcDataSeries:Be.HlcDataSeries,EDataSeriesType:He.EDataSeriesType,EDataChangeType:Ye.EDataChangeType,EDataSeriesValueType:ze.EDataSeriesValueType,EStrokePaletteMode:je.EStrokePaletteMode,EFillPaletteMode:Ge.EFillPaletteMode,DefaultPaletteProvider:Xe.DefaultPaletteProvider,TemplateMetadataGenerator:We.TemplateMetadataGenerator,NonUniformHeatmapDataSeries:Ue.NonUniformHeatmapDataSeries,OhlcDataSeries:$e.OhlcDataSeries,PaletteFactory:Ze.PaletteFactory,UniformHeatmapDataSeries:Ke.UniformHeatmapDataSeries,XyDataSeries:Je.XyDataSeries,XyTextDataSeries:qe.XyTextDataSeries,XyyDataSeries:Qe.XyyDataSeries,XyzDataSeries:et.XyzDataSeries,HeatmapSeriesInfo:tt.HeatmapSeriesInfo,HlcSeriesInfo:it.HlcSeriesInfo,OhlcSeriesInfo:rt.OhlcSeriesInfo,SeriesInfo:nt.SeriesInfo,StackedXySeriesInfo:st.StackedXySeriesInfo,XySeriesInfo:ot.XySeriesInfo,XyySeriesInfo:at.XyySeriesInfo,DataDistributionCalculator:lt.DataDistributionCalculator,HlcCustomFilter:ht.HlcCustomFilter,HlcScaleOffsetFilter:ut.HlcScaleOffsetFilter,OhlcCustomFilter:dt.OhlcCustomFilter,OhlcScaleOffsetFilter:ct.OhlcScaleOffsetFilter,XyCustomFilter:pt.XyCustomFilter,EDataSeriesField:gt.EDataSeriesField,switchData:ft.switchData,XyLinearTrendFilter:yt.XyLinearTrendFilter,XyMovingAverageFilter:vt.XyMovingAverageFilter,XyRatioFilter:mt.XyRatioFilter,XyScaleOffsetFilter:St.XyScaleOffsetFilter,XyyCustomFilter:Pt.XyyCustomFilter,XyyScaleOffsetFilter:Ct.XyyScaleOffsetFilter,XyzCustomFilter:At.XyzCustomFilter,XyzScaleOffsetFilter:xt.XyzScaleOffsetFilter,BasePointSeriesWrapped:bt.BasePointSeriesWrapped,HlcPointSeriesWrapped:Tt.HlcPointSeriesWrapped,OhlcPointSeriesResampled:Et.OhlcPointSeriesResampled,OhlcPointSeriesWrapped:wt.OhlcPointSeriesWrapped,XyPointSeriesResampled:Rt.XyPointSeriesResampled,XyPointSeriesWrapped:Dt.XyPointSeriesWrapped,XyyPointSeriesResampled:Lt.XyyPointSeriesResampled,XyyPointSeriesWrapped:Mt.XyyPointSeriesWrapped,XyzPointSeriesWrapped:It.XyzPointSeriesWrapped,CategoryCoordinateCalculator:Ot.CategoryCoordinateCalculator,FlippedCategoryCoordinateCalculator:kt.FlippedCategoryCoordinateCalculator,FlippedNumericCoordinateCalculator:Vt.FlippedNumericCoordinateCalculator,LogarithmicCoordinateCalculator:_t.LogarithmicCoordinateCalculator,NumericCoordinateCalculator:Nt.NumericCoordinateCalculator,ExtremeResamplerHelper:Ft.ExtremeResamplerHelper,EResamplingMode:Bt.EResamplingMode,ResamplingParams:Ht.ResamplingParams,DefaultTickCoordinatesProvider:Yt.DefaultTickCoordinatesProvider,ELogarithmicMinorTickMode:zt.ELogarithmicMinorTickMode,ELogarithmicMajorTickMode:jt.ELogarithmicMajorTickMode,LogarithmicTickProvider:Gt.LogarithmicTickProvider,NumericTickProvider:Xt.NumericTickProvider,RenderPassData:Wt.RenderPassData,RenderPassDataCollection:Ut.RenderPassDataCollection,RenderPassInfo:$t.RenderPassInfo,SciChartRenderer:Zt.SciChartRenderer,textureWorker:Kt.textureWorker,AUTO_COLOR:Jt.AUTO_COLOR,stripAutoColor:qt.stripAutoColor,SciChartJSDarkTheme:Qt.SciChartJSDarkTheme,SciChartJSDarkv2Theme:ei.SciChartJSDarkv2Theme,SciChartJSLightTheme:ti.SciChartJSLightTheme,SciChartJsNavyTheme:ii.SciChartJsNavyTheme,sciChartSingleDestinations:ri.sciChartSingleDestinations,HeatmapLegend:ni.HeatmapLegend,licenseManager2dState:si.licenseManager2dState,DefaultSciChartLoader:oi.DefaultSciChartLoader,SciChartDefaults:ai.SciChartDefaults,SciChartOverview:li.SciChartOverview,sciChartConfig:hi.sciChartConfig,SciChartSurface:ui.SciChartSurface,SciChartSubSurface:di.SciChartSubSurface,DebugForDpi:ci.DebugForDpi,ESurfaceType:pi.ESurfaceType,createChartDestination:gi.createChartDestination,getMasterCanvas:fi.getMasterCanvas,copyToCanvas:yi.copyToCanvas,UpdateSuspender:vi.UpdateSuspender,AdornerLayer:mi.AdornerLayer,EDraggingGripPoint:Si.EDraggingGripPoint,ECoordinateMode:Pi.ECoordinateMode,AnnotationClickEventArgs:Ci.AnnotationClickEventArgs,AnnotationDragDeltaEventArgs:Ai.AnnotationDragDeltaEventArgs,annotationHelpers:xi.annotationHelpers,AxisMarkerAnnotation:bi.AxisMarkerAnnotation,BoxAnnotation:Ti.BoxAnnotation,CursorTooltipSvgAnnotation:Ei.CursorTooltipSvgAnnotation,CustomAnnotation:wi.CustomAnnotation,HorizontalLineAnnotation:Ri.HorizontalLineAnnotation,EAnnotationLayer:Di.EAnnotationLayer,EAnnotationType:Li.EAnnotationType,LineAnnotation:Mi.LineAnnotation,EWrapTo:Ii.EWrapTo,NativeTextAnnotation:Oi.NativeTextAnnotation,OverviewCustomResizableAnnotation:ki.OverviewCustomResizableAnnotation,RolloverLegendSvgAnnotation:Vi.RolloverLegendSvgAnnotation,RolloverMarkerSvgAnnotation:_i.RolloverMarkerSvgAnnotation,RolloverTooltipSvgAnnotation:Ni.RolloverTooltipSvgAnnotation,TextAnnotation:Fi.TextAnnotation,VerticalLineAnnotation:Bi.VerticalLineAnnotation,EClipMode:Hi.EClipMode,AxisLayoutState:Yi.AxisLayoutState,AxisRenderer:zi.AxisRenderer,AxisTitleRenderer:ji.AxisTitleRenderer,CategoryAxis:Gi.CategoryAxis,DateTimeNumericAxis:Xi.DateTimeNumericAxis,getAxisById:Wi.getAxisById,getAxis3dById:Ui.getAxis3dById,MIN_LOG_AXIS_VALUE:$i.MIN_LOG_AXIS_VALUE,LogarithmicAxis:Zi.LogarithmicAxis,NumericAxis:Ki.NumericAxis,VisibleRangeChangedArgs:Ji.VisibleRangeChangedArgs,CategoryDeltaCalculator:qi.CategoryDeltaCalculator,DateTimeDeltaCalculator:Qi.DateTimeDeltaCalculator,LogarithmicDeltaCalculator:er.LogarithmicDeltaCalculator,NumericDeltaCalculator:tr.NumericDeltaCalculator,DateLabelProvider:ir.DateLabelProvider,labelCache:rr.labelCache,LabelInfo:nr.LabelInfo,LogarithmicLabelProvider:sr.LogarithmicLabelProvider,NumericLabelProvider:or.NumericLabelProvider,PieLabelProvider:ar.PieLabelProvider,ETradeChartLabelFormat:lr.ETradeChartLabelFormat,SmartDateLabelProvider:hr.SmartDateLabelProvider,TextLabelProvider:ur.TextLabelProvider,wrapText:dr.wrapText,createNativeRect:cr.createNativeRect,createSCRTPen:pr.createSCRTPen,createSolidBrush:gr.createSolidBrush,drawBorder:fr.drawBorder,drawModifiersAxisLabel:yr.drawModifiersAxisLabel,drawLineAnnotation:vr.drawLineAnnotation,drawAxisMarkerAnnotation:mr.drawAxisMarkerAnnotation,getLabelCoordinates:Sr.getLabelCoordinates,FontKey:Pr.FontKey,freeCache:Cr.freeCache,getVectorRectVertex:Ar.getVectorRectVertex,getVectorColorVertex:xr.getVectorColorVertex,getVertex:br.getVertex,getTextBounds:Tr.getTextBounds,getNativeRect:Er.getNativeRect,getVector4:wr.getVector4,getFontKey:Rr.getFontKey,getAllFontKeys:Dr.getAllFontKeys,SciChartLegend:Lr.SciChartLegend,ELegendOrientation:Mr.ELegendOrientation,ELegendPlacement:Ir.ELegendPlacement,ELegendType:Or.ELegendType,getLegendItemHtml:kr.getLegendItemHtml,getLegendContainerHtml:Vr.getLegendContainerHtml,SciChartPieLegend:_r.SciChartPieLegend,CrossPointMarker:Nr.CrossPointMarker,EllipsePointMarker:Fr.EllipsePointMarker,SpritePointMarker:Br.SpritePointMarker,SquarePointMarker:Hr.SquarePointMarker,TrianglePointMarker:Yr.TrianglePointMarker,XPointMarker:zr.XPointMarker,ELineType:jr.ELineType,FastBandRenderableSeries:Gr.FastBandRenderableSeries,FastBubbleRenderableSeries:Xr.FastBubbleRenderableSeries,FastCandlestickRenderableSeries:Wr.FastCandlestickRenderableSeries,FastColumnRenderableSeries:Ur.FastColumnRenderableSeries,getXRange:$r.getXRange,FastErrorBarsRenderableSeries:Zr.FastErrorBarsRenderableSeries,FastImpulseRenderableSeries:Kr.FastImpulseRenderableSeries,FastLineRenderableSeries:Jr.FastLineRenderableSeries,FastMountainRenderableSeries:qr.FastMountainRenderableSeries,FastOhlcRenderableSeries:Qr.FastOhlcRenderableSeries,FastTextRenderableSeries:en.FastTextRenderableSeries,GlowEffect:tn.GlowEffect,HeatmapColorMap:rn.HeatmapColorMap,HoveredChangedArgs:nn.HoveredChangedArgs,NonUniformHeatmapRenderableSeries:sn.NonUniformHeatmapRenderableSeries,SelectionChangedArgs:on.SelectionChangedArgs,SeriesHoveredArgs:an.SeriesHoveredArgs,SeriesSelectedArgs:ln.SeriesSelectedArgs,SeriesVisibleChangedArgs:hn.SeriesVisibleChangedArgs,ShadowEffect:un.ShadowEffect,SplineBandRenderableSeries:dn.SplineBandRenderableSeries,SplineLineRenderableSeries:cn.SplineLineRenderableSeries,SplineMountainRenderableSeries:pn.SplineMountainRenderableSeries,StackedColumnCollection:gn.StackedColumnCollection,StackedColumnRenderableSeries:fn.StackedColumnRenderableSeries,StackedMountainCollection:yn.StackedMountainCollection,StackedMountainRenderableSeries:vn.StackedMountainRenderableSeries,EContourColorMapMode:mn.EContourColorMapMode,UniformContoursRenderableSeries:Sn.UniformContoursRenderableSeries,UniformHeatmapRenderableSeries:Pn.UniformHeatmapRenderableSeries,XyScatterRenderableSeries:Cn.XyScatterRenderableSeries,animationHelpers:An.animationHelpers,BandAnimation:xn.BandAnimation,BandAnimationStyle:bn.BandAnimationStyle,BaseAnimationStyle:Tn.BaseAnimationStyle,BasePointMarkerStyle:En.BasePointMarkerStyle,BubbleAnimation:wn.BubbleAnimation,CandlestickAnimation:Rn.CandlestickAnimation,CandlestickAnimationStyle:Dn.CandlestickAnimationStyle,ColumnAnimation:Ln.ColumnAnimation,ColumnAnimationStyle:Mn.ColumnAnimationStyle,CustomPointMarkerStyle:In.CustomPointMarkerStyle,FadeAnimation:On.FadeAnimation,LineAnimation:kn.LineAnimation,MountainAnimation:Vn.MountainAnimation,MountainAnimationStyle:_n.MountainAnimationStyle,OhlcAnimation:Nn.OhlcAnimation,OhlcAnimationStyle:Fn.OhlcAnimationStyle,PointMarkerStyle:Bn.PointMarkerStyle,ScaleAnimation:Hn.ScaleAnimation,ScatterAnimation:Yn.ScatterAnimation,SweepAnimation:zn.SweepAnimation,WaveAnimation:jn.WaveAnimation,BandSeriesDataLabelProvider:Gn.BandSeriesDataLabelProvider,BubbleSeriesDataLabelProvider:Xn.BubbleSeriesDataLabelProvider,EColumnDataLabelPosition:Wn.EColumnDataLabelPosition,ColumnSeriesDataLabelProvider:Un.ColumnSeriesDataLabelProvider,ContoursDataLabelProvider:$n.ContoursDataLabelProvider,DataLabelProvider:Zn.DataLabelProvider,DataLabelState:Kn.DataLabelState,HeatMapDataLabelProvider:Jn.HeatMapDataLabelProvider,LineSeriesDataLabelProvider:qn.LineSeriesDataLabelProvider,NonUniformHeatMapDataLabelProvider:Qn.NonUniformHeatMapDataLabelProvider,TextDataLabelProvider:es.TextDataLabelProvider,BandSeriesDrawingProvider:ts.BandSeriesDrawingProvider,BubbleSeriesDrawingProvider:is.BubbleSeriesDrawingProvider,ColumnSeriesDrawingProvider:rs.ColumnSeriesDrawingProvider,ErrorSeriesDrawingProvider:ns.ErrorSeriesDrawingProvider,LineSeriesDrawingProvider:ss.LineSeriesDrawingProvider,MountainSeriesDrawingProvider:os.MountainSeriesDrawingProvider,NonUniformHeatmapDrawingProvider:as.NonUniformHeatmapDrawingProvider,EOhlcDrawingMode:ls.EOhlcDrawingMode,OhlcSeriesDrawingProvider:hs.OhlcSeriesDrawingProvider,PointMarkerDrawingProvider:us.PointMarkerDrawingProvider,UniformContoursDrawingProvider:ds.UniformContoursDrawingProvider,UniformHeatmapDrawingProvider:cs.UniformHeatmapDrawingProvider,BandSeriesHitTestProvider:ps.BandSeriesHitTestProvider,BubbleSeriesHitTestProvider:gs.BubbleSeriesHitTestProvider,ColumnSeriesHitTestProvider:fs.ColumnSeriesHitTestProvider,ErrorSeriesHitTestProvider:ys.ErrorSeriesHitTestProvider,hitTestHelpers:vs.hitTestHelpers,HitTestInfo:ms.HitTestInfo,ImpulseSeriesHitTestProvider:Ss.ImpulseSeriesHitTestProvider,LineSeriesHitTestProvider:Ps.LineSeriesHitTestProvider,MountainSeriesHitTestProvider:Cs.MountainSeriesHitTestProvider,NonUniformHeatmapHitTestProvider:As.NonUniformHeatmapHitTestProvider,OhlcSeriesHitTestProvider:xs.OhlcSeriesHitTestProvider,ScatterSeriesHitTestProvider:bs.ScatterSeriesHitTestProvider,StackedColumnSeriesHitTestProvider:Ts.StackedColumnSeriesHitTestProvider,StackedMountainSeriesHitTestProvider:Es.StackedMountainSeriesHitTestProvider,TextSeriesHitTestProvider:ws.TextSeriesHitTestProvider,UniformHeatmapHitTestProvider:Rs.UniformHeatmapHitTestProvider,RolloverModifierRenderableSeriesProps:Ds.RolloverModifierRenderableSeriesProps,RubberBandSvgRect:Ls.RubberBandSvgRect,ESizingMode:Ms.ESizingMode,EPieType:Is.EPieType,EPieValueMode:Os.EPieValueMode,SciChartPieSurface:ks.SciChartPieSurface,PieSegment:Vs.PieSegment,CanvasTexture:_s.CanvasTexture,DpiHelper:Ns.DpiHelper,TextureManager:Fs.TextureManager,measureTextHeight:Bs.measureTextHeight,measureTextWidth:Hs.measureTextWidth,ECameraProjectionMode:Ys.ECameraProjectionMode,CameraController:zs.CameraController,Vector3:js.Vector3,MouseWheelZoomModifier3D:Gs.MouseWheelZoomModifier3D,OrbitModifier3D:Xs.OrbitModifier3D,ResetCamera3DModifier:Ws.ResetCamera3DModifier,EDataSeriesType3D:Us.EDataSeriesType3D,UniformGridDataSeries3D:$s.UniformGridDataSeries3D,XyzDataSeries3D:Zs.XyzDataSeries3D,createSingle3dInternal:Ks.createSingle3dInternal,DefaultViewportManager3D:Js.DefaultViewportManager3D,GizmoEntity:qs.GizmoEntity,RootSceneEntity:Qs.RootSceneEntity,SciChart3DRenderer:eo.SciChart3DRenderer,sciChartConfig3D:to.sciChartConfig3D,SciChart3DSurface:io.SciChart3DSurface,EWhichAxis:ro.EWhichAxis,AxisBase3DLabelStyle:no.AxisBase3DLabelStyle,AxisCubeEntity:so.AxisCubeEntity,EAxisSideClipping:oo.EAxisSideClipping,ETextAlignment3D:ao.ETextAlignment3D,getDescriptorsEqual:lo.getDescriptorsEqual,getLineStylesEqual:ho.getLineStylesEqual,getTArgbEqual:uo.getTArgbEqual,getTextStylesEqual:co.getTextStylesEqual,getArraysEqual:po.getArraysEqual,NumericAxis3D:go.NumericAxis3D,EMarkerType:fo.EMarkerType,SpherePointMarker3D:yo.SpherePointMarker3D,CubePointMarker3D:vo.CubePointMarker3D,PyramidPointMarker3D:mo.PyramidPointMarker3D,CylinderPointMarker3D:So.CylinderPointMarker3D,PixelPointMarker3D:Po.PixelPointMarker3D,QuadPointMarker:Co.QuadPointMarker,EllipsePointMarker3D:Ao.EllipsePointMarker3D,TrianglePointMarker3D:xo.TrianglePointMarker3D,AxisCubeDescriptor:bo.AxisCubeDescriptor,RenderableSeriesSceneEntityState:To.RenderableSeriesSceneEntityState,RenderPassInfo3D:Eo.RenderPassInfo3D,ScatterPointsSceneEntity:wo.ScatterPointsSceneEntity,SceneDescriptor:Ro.SceneDescriptor,SurfaceMeshSceneEntityState:Do.SurfaceMeshSceneEntityState,SurfaceMeshSceneEntity:Lo.SurfaceMeshSceneEntity,ESeriesType3D:Mo.ESeriesType3D,ScatterRenderableSeries3D:Io.ScatterRenderableSeries3D,GradientColorPalette:Oo.GradientColorPalette,SolidColorBrushPalette:ko.SolidColorBrushPalette,EDrawMeshAs:Vo.EDrawMeshAs,EMeshPaletteMode:_o.EMeshPaletteMode,EMeshResolution:No.EMeshResolution,SurfaceMeshRenderableSeries3D:Fo.SurfaceMeshRenderableSeries3D,AnimationToken:Bo.AnimationToken,libraryVersion:Ho.libraryVersion,checkBuildStamp:Yo.checkBuildStamp,deleteSafe:zo.deleteSafe,Dictionary:jo.Dictionary,EventHandler:Go.EventHandler,GradientParams:Xo.GradientParams,Guard:Wo.Guard,List:Uo.List,NumberRange:$o.NumberRange,NumberUtil:Zo.NumberUtil,ObservableArray:Ko.ObservableArray,EObservableArrayChangedAction:Jo.EObservableArrayChangedAction,ObservableArrayChangedArgs:qo.ObservableArrayChangedArgs,OneTimePerformanceWarning:Qo.OneTimePerformanceWarning,Point:ea.Point,PropertyChangedEventArgs:ta.PropertyChangedEventArgs,Rect:ia.Rect,getUserCookie:ra.getUserCookie,shouldSendTelemetry:na.shouldSendTelemetry,sendTelemetry:sa.sendTelemetry,Thickness:oa.Thickness,EWebGLSupport:aa.EWebGLSupport,WebGlHelper:la.WebGlHelper,EAnimationState:ha.EAnimationState,EAnimationStateTransition:ua.EAnimationStateTransition,AnimationFiniteStateMachine:da.AnimationFiniteStateMachine,SeriesAnimationFiniteStateMachine:ca.SeriesAnimationFiniteStateMachine,animateAny:pa.animateAny,DoubleAnimator:ga.DoubleAnimator,easing:fa.easing,autoReverseEasing:ya.autoReverseEasing,GenericAnimation:va.GenericAnimation,NumberRangeAnimator:ma.NumberRangeAnimator,MouseManager:Sa.MouseManager,localStorageApi:Pa.localStorageApi,EHorizontalAnchorPoint:Ca.EHorizontalAnchorPoint,EVerticalAnchorPoint:Aa.EVerticalAnchorPoint,EAnimationType:xa.EAnimationType,EAutoColorMode:ba.EAutoColorMode,EAutoRange:Ta.EAutoRange,EAxisAlignment:Ea.EAxisAlignment,getIsHorizontal:wa.getIsHorizontal,getIsVertical:Ra.getIsVertical,handleInvalidAxisAlignment:Da.handleInvalidAxisAlignment,EAxisType:La.EAxisType,EBaseType:Ma.EBaseType,EChart2DModifierType:Ia.EChart2DModifierType,EChart3DModifierType:Oa.EChart3DModifierType,EColor:ka.EColor,ECursorStyle:Va.ECursorStyle,EDataFilterType:_a.EDataFilterType,EDataLabelProviderType:Na.EDataLabelProviderType,EDataLabelSkipMode:Fa.EDataLabelSkipMode,EDataPointWidthMode:Ba.EDataPointWidthMode,EDefaultRenderLayer:Ha.EDefaultRenderLayer,EDragMode:Ya.EDragMode,EErrorDirection:za.EErrorDirection,EErrorMode:ja.EErrorMode,EExecuteOn:Ga.EExecuteOn,ELabelAlignment:Xa.ELabelAlignment,ELabelPlacement:Wa.ELabelPlacement,EHorizontalAlignment:Ua.EHorizontalAlignment,EVerticalAlignment:$a.EVerticalAlignment,ELabelProviderType:Za.ELabelProviderType,ELayoutManagerType:Ka.ELayoutManagerType,ELayoutStrategyType:Ja.ELayoutStrategyType,isTypedArray:qa.isTypedArray,isNumberArray:Qa.isNumberArray,ENumericFormat:el.ENumericFormat,EPaletteProviderType:tl.EPaletteProviderType,EPointMarkerType:il.EPointMarkerType,ERenderLayer:rl.ERenderLayer,ESceneEntityType:nl.ESceneEntityType,ESciChartSurfaceType:sl.ESciChartSurfaceType,ESearchMode:ol.ESearchMode,ESeriesType:al.ESeriesType,EShaderEffectType:ll.EShaderEffectType,Size:hl.Size,ESvgClippingMode:ul.ESvgClippingMode,EHorizontalTextPosition:dl.EHorizontalTextPosition,EVerticalTextPosition:cl.EVerticalTextPosition,EMultiLineAlignment:pl.EMultiLineAlignment,convertMultiLineAlignment:gl.convertMultiLineAlignment,EThemeProviderType:fl.EThemeProviderType,EColorMapMode:yl.EColorMapMode,EXyDirection:vl.EXyDirection,EZoomState:ml.EZoomState,getUniqueValues:Sl.getUniqueValues,countUnique:Pl.countUnique,areArraysEqual:Cl.areArraysEqual,arrayRemove:Al.arrayRemove,isArraySorted:xl.isArraySorted,makeIncArray:bl.makeIncArray,calcAverageForDoubleVector:Tl.calcAverageForDoubleVector,calcAverageForArray:El.calcAverageForArray,uintArgbColorLerp24bit:wl.uintArgbColorLerp24bit,uintArgbColorLerp:Rl.uintArgbColorLerp,linearColorMapLerp:Dl.linearColorMapLerp,uintArgbColorToAbgr:Ll.uintArgbColorToAbgr,uintArgbColorMultiplyOpacity:Ml.uintArgbColorMultiplyOpacity,uintArgbColorOverrideOpacity:Il.uintArgbColorOverrideOpacity,uintArgbColorIsTransparent:Ol.uintArgbColorIsTransparent,convertColor:kl.convertColor,convertRgbToHexColor:Vl.convertRgbToHexColor,convertToPixel:_l.convertToPixel,copyDoubleVector:Nl.copyDoubleVector,formatUnixDateToHumanString:Fl.formatUnixDateToHumanString,formatUnixDateToHumanStringDDMMYY:Bl.formatUnixDateToHumanStringDDMMYY,formatUnixDateToHumanStringDDMMHHMM:Hl.formatUnixDateToHumanStringDDMMHHMM,formatUnixDateToHumanStringDDMM:Yl.formatUnixDateToHumanStringDDMM,formatUnixDateToHumanStringHHMMSS:zl.formatUnixDateToHumanStringHHMMSS,formatUnixDateToHumanStringHHMM:jl.formatUnixDateToHumanStringHHMM,formatUnixDateToHumanStringMMMDD:Gl.formatUnixDateToHumanStringMMMDD,formatUnixDateToHumanStringMMM:Xl.formatUnixDateToHumanStringMMM,formatUnixDateToHumanStringDD:Wl.formatUnixDateToHumanStringDD,formatUnixDateToHumanStringYYYY:Ul.formatUnixDateToHumanStringYYYY,getFontString:$l.getFontString,generateGuid:Zl.generateGuid,base64Id:Kl.base64Id,hasAllProperties:Jl.hasAllProperties,hashUtils:ql.hashUtils,htmlToElement:Ql.htmlToElement,stringOccurrences:eh.stringOccurrences,createImageAsync:th.createImageAsync,createImagesArrayAsync:ih.createImagesArrayAsync,getIncludedAxis:rh.getIncludedAxis,testHasExcluded:nh.testHasExcluded,isRealNumber:sh.isRealNumber,Logger:oh.Logger,getNoisySinewave:ah.getNoisySinewave,fillNoisySinewave:lh.fillNoisySinewave,logToBase:hh.logToBase,memoize:uh.memoize,formatNumber2Digits:dh.formatNumber2Digits,numericHashCode:ch.numericHashCode,formatNumber:ph.formatNumber,toSuperScript:gh.toSuperScript,toScientific:fh.toScientific,checkIsNaN:yh.checkIsNaN,parseColorToHexStringArgb:vh.parseColorToHexStringArgb,parseColorToHexStringAbgr:mh.parseColorToHexStringAbgr,parseColorToUIntArgb:Sh.parseColorToUIntArgb,toHex:Ph.toHex,parseColorToTArgb:Ch.parseColorToTArgb,parseArgbToHtmlColor:Ah.parseArgbToHtmlColor,parseTArgbToHtmlColor:xh.parseTArgbToHtmlColor,calcDistanceFromLine:bh.calcDistanceFromLine,calcCrossProduct:Th.calcCrossProduct,calcDistance:Eh.calcDistance,testIsInBounds:wh.testIsInBounds,calcAnnotationBordersForAxisMarker:Rh.calcAnnotationBordersForAxisMarker,testIsInXBounds:Dh.testIsInXBounds,testIsInInterval:Lh.testIsInInterval,calcDotProduct:Mh.calcDotProduct,calcDistanceFromLineSegment:Ih.calcDistanceFromLineSegment,getRandomInRange:Oh.getRandomInRange,getStocksDataFactory:kh.getStocksDataFactory,getNextRandomPriceBarFactory:Vh.getNextRandomPriceBarFactory,getAttributeFromString:_h.getAttributeFromString,wrapNativeText:Nh.wrapNativeText,ESize:Fh.ESize,ECoord:Bh.ECoord,EShift:Hh.EShift,translateFromCanvasToSeriesViewRect:Yh.translateFromCanvasToSeriesViewRect,translateFromSeriesViewRectToCanvas:zh.translateFromSeriesViewRectToCanvas,translateFromCanvasToSeriesViewRectX:jh.translateFromCanvasToSeriesViewRectX,translateFromCanvasToSeriesViewRectY:Gh.translateFromCanvasToSeriesViewRectY,translateFromSeriesViewRectToCanvasX:Xh.translateFromSeriesViewRectToCanvasX,translateFromSeriesViewRectToCanvasY:Wh.translateFromSeriesViewRectToCanvasY,translateToNotScaled:Uh.translateToNotScaled,translateDataValueRectToAbsolute:$h.translateDataValueRectToAbsolute,convertToHtmlPx:Zh.convertToHtmlPx,convertToRelativeHtmlSize:Kh.convertToRelativeHtmlSize,updateTsrVector4:Jh.updateTsrVector4,fromTsrVector4:qh.fromTsrVector4,zeroArray2D:Qh.zeroArray2D};t.default=eu,ui.SciChartSurface.useWasmFromCDN()},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CategoryAxisBase=void 0;const r=i(0),n=i(3),s=i(8),o=i(55),a=i(259),l=i(260),h=i(136),u=i(48),d=i(268);class c extends u.AxisBase2D{constructor(e,t){var i,r,n;super(e,t),this.defaultXValuesProperty=[],this.defaultXStartProperty=0,this.defaultXStepProperty=1,this.defaultXValuesProperty=null!==(i=null==t?void 0:t.defaultXValues)&&void 0!==i?i:this.defaultXValuesProperty,this.defaultXStartProperty=null!==(r=null==t?void 0:t.defaultXStart)&&void 0!==r?r:this.defaultXStartProperty,this.defaultXStepProperty=null!==(n=null==t?void 0:t.defaultXStep)&&void 0!==n?n:this.defaultXStepProperty,this.tickProvider=new h.NumericTickProvider(this.webAssemblyContext2D),this.deltaCalculator=new d.CategoryDeltaCalculator(this.webAssemblyContext2D),this.defaultBaseXValues=new this.webAssemblyContext2D.SCRTDoubleVector}get isCategoryAxis(){return!0}get defaultXValues(){return this.defaultXValuesProperty}set defaultXValues(e){this.defaultXValuesProperty=e,this.invalidateParentCallback&&this.invalidateParentCallback()}get defaultXStart(){return this.defaultXStartProperty}set defaultXStart(e){this.defaultXStartProperty=e,this.invalidateParentCallback&&this.invalidateParentCallback()}get defaultXStep(){return this.defaultXStepProperty}set defaultXStep(e){this.defaultXStepProperty=e,this.invalidateParentCallback&&this.invalidateParentCallback()}prepareRenderData(){(0,r.deleteSafe)(this.coordCalcCache);const e=this.getCurrentCoordinateCalculatorInternal(),t=this.parentSurface.renderableSeries.asArray().find(e=>e.xAxisId===this.id);this.setBaseXValues(e,t),this.coordCalcCache=e}delete(){super.delete(),this.defaultBaseXValues=(0,r.deleteSafe)(this.defaultBaseXValues)}getCurrentCoordinateCalculatorInternal(){const e=this.visibleRange.min,t=this.visibleRange.max,i=this.axisLength,r=this.parentSurface.renderableSeries.asArray().find(e=>e.xAxisId===this.id),n=this.isXAxis!==this.flippedCoordinates?new a.CategoryCoordinateCalculator(this.webAssemblyContext2D,i,0,0,e,t,this.offset):new l.FlippedCategoryCoordinateCalculator(this.webAssemblyContext2D,i,0,0,e,t,this.offset);return this.setBaseXValues(n,r),n}getXDataRange(){let e;if(this.parentSurface){this.parentSurface.renderableSeries.asArray().filter(e=>e.xAxisId===this.id&&e.isVisible&&e.hasDataSeriesValues()).forEach(t=>{const i=t.getDataSeriesValuesCount(),r=new n.NumberRange(-.5,i-1+.5);r&&(e=e?e.union(r):r)})}return e}getMaxAutoTicks(){const e=this.getCurrentCoordinateCalculator();return Math.min(Math.max(1,this.maxAutoTicks),e.baseXValues.size())}generateDefaultXValuesForCategoryAxis(){if(this.defaultBaseXValues.clear(),this.defaultXValues&&this.defaultXValues.length>0)(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext2D,this.defaultBaseXValues,this.defaultXValues);else{const e=[],t=10;for(let i=0;i<t;i++)e.push(this.defaultXStart+i*this.defaultXStep);(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext2D,this.defaultBaseXValues,e)}return this.defaultBaseXValues}setBaseXValues(e,t){if((null==t?void 0:t.type)===s.ESeriesType.UniformHeatmapSeries)throw Error("Category Axis is not supported for UniformHeatmapRenderableSeries");if(null==t?void 0:t.isStacked){const i=t;if(0===i.size())throw Error("BaseStackedCollection should have at least one BaseStackedRenderableSeries");const r=i.get(0);if(!(null==r?void 0:r.dataSeries))return void(e.baseXValues||(e.baseXValues=this.generateDefaultXValuesForCategoryAxis()));e.baseXValues=r.dataSeries.getNativeXValues()}else{if(!(null==t?void 0:t.dataSeries))return void(e.baseXValues||(e.baseXValues=this.generateDefaultXValuesForCategoryAxis()));e.baseXValues=t.dataSeries.getNativeXValues()}}}t.CategoryAxisBase=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TickCoordinatesProvider=void 0;t.TickCoordinatesProvider=class{attachedToAxis(e){this.parentAxis=e}}},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var r,n,s,o,a,l=1,h={},u=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){g(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){g(e.data)},r=function(e){s.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(n=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){g(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):r=function(e){setTimeout(g,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&g(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(o+t,"*")}),c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return h[l]=n,r(l),l++},c.clearImmediate=p}function p(e){delete h[e]}function g(e){if(u)setTimeout(g,0,e);else{var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(void 0,i)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(276),i(124))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportManager3DBase=void 0;const r=i(74);t.ViewportManager3DBase=class{attachSciChartSurface(e){if(this.isAttached)throw Error("This ViewportManager instance is already attached to a SciChart3DSurface. Detach it before attaching to another");this.parentSurface=e,this.isAttached=!0}detachSciChartSurface(){this.isAttached=!1,this.parentSurface=void 0}calculateAutoRange(e){if(e.autoRange===r.EAutoRange.Always||e.autoRange===r.EAutoRange.Once){const t=e.getMaximumRange();if(t&&t.isDefined)return t}return e.visibleRange}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderSurface=void 0;const r=i(13),n=i(71),s=i(30);t.RenderSurface=class{constructor(e,t,i){this.webAssemblyContext=e,this.viewportSize=t,this.canvasId=i}getRenderContext(){return new s.WebGlRenderContext2D(this.webAssemblyContext,this.viewportSize,this.canvasId)}invalidateElement(e){var t;r.IS_TEST_ENV||(null===(t=n.WebGlHelper.getContext(this.webAssemblyContext.canvas))||void 0===t?void 0:t.isContextLost())||this.webAssemblyContext.TSRRequestCanvasDraw(e)}onRenderTimeElapsed(){this.handleDraw()}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChartLayoutState=void 0;class r{constructor(){this.leftInnerAreaSize=r.DEFAULT_SIZE,this.topInnerAreaSize=r.DEFAULT_SIZE,this.bottomInnerAreaSize=r.DEFAULT_SIZE,this.rightInnerAreaSize=r.DEFAULT_SIZE,this.leftOuterAreaSize=r.DEFAULT_SIZE,this.topOuterAreaSize=r.DEFAULT_SIZE,this.bottomOuterAreaSize=r.DEFAULT_SIZE,this.rightOuterAreaSize=r.DEFAULT_SIZE}clear(){this.leftInnerAreaSize=r.DEFAULT_SIZE,this.topInnerAreaSize=r.DEFAULT_SIZE,this.bottomInnerAreaSize=r.DEFAULT_SIZE,this.rightInnerAreaSize=r.DEFAULT_SIZE,this.leftOuterAreaSize=r.DEFAULT_SIZE,this.topOuterAreaSize=r.DEFAULT_SIZE,this.bottomOuterAreaSize=r.DEFAULT_SIZE,this.rightOuterAreaSize=r.DEFAULT_SIZE}}t.ChartLayoutState=r,r.DEFAULT_SIZE=0},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutStrategyAxes=void 0;t.LayoutStrategyAxes=class{constructor(){this.topInnerAxes=[],this.bottomInnerAxes=[],this.leftInnerAxes=[],this.rightInnerAxes=[],this.topOuterAxes=[],this.bottomOuterAxes=[],this.leftOuterAxes=[],this.rightOuterAxes=[]}clear(){this.topInnerAxes=[],this.bottomInnerAxes=[],this.leftInnerAxes=[],this.rightInnerAxes=[],this.topOuterAxes=[],this.bottomOuterAxes=[],this.leftOuterAxes=[],this.rightOuterAxes=[]}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.MARKER_COLOR="MARKER_COLOR",e.SHOWS_ROLLOVER="SHOWS_ROLLOVER",e.TOOLTIP_COLOR="TOOLTIP_COLOR",e.TOOLTIP_DATA_TEMPLATE="TOOLTIP_DATA_TEMPLATE",e.TOOLTIP_TEXT_COLOR="TOOLTIP_TEXT_COLOR",e.TOOLTIP_TITLE="TOOLTIP_TITLE"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaletteCache=void 0;const r=i(0),n=i(132);class s extends n.BaseCache{get value(){return!this.cachedEntity&&this.fillColors&&(this.cachedEntity=this.create(this.fillColors)),this.cachedEntity}create(e){return this.cachedEntity&&e===this.fillColors?this.cachedEntity:((0,r.deleteSafe)(this.cachedEntity),this.fillColors=e,this.cachedEntity=new this.webAssemblyContext.SCRTCreatePalette(e))}reset(){this.invalidateCache(),this.fillColors=void 0}}t.PaletteCache=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.HOLE_RADIUS="HOLE_RADIUS",e.HOLE_RADIUS_SIZING_MODE="HOLE_RADIUS_SIZING_MODE",e.PIE_TYPE="PIE_TYPE",e.SERIES_SPACING="SERIES_SPACING",e.PADDING="PADDING",e.CANVAS_BORDER="CANVAS_BORDER",e.LABEL_PROVIDER="LABEL_PROVIDER",e.VALUE_MODE="VALUE_MODE",e.LABEL_RADIUS="LABEL_RADIUS",e.TEXT_STYLE="TEXT_STYLE"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlcFilterBase=void 0;const r=i(211),n=i(10),s=i(62);class o extends r.HlcDataSeries{constructor(e,t){var i,r;switch(super(e.webAssemblyContext,t),this.closefield=s.EDataSeriesField.Close,this.highfield=s.EDataSeriesField.High,this.lowfield=s.EDataSeriesField.Low,this.originalSeries=e,this.closefield=null!==(i=null==t?void 0:t.closefield)&&void 0!==i?i:this.closefield,this.highfield=null!==(r=null==t?void 0:t.highfield)&&void 0!==r?r:this.highfield,this.onBaseDataChanged=this.onBaseDataChanged.bind(this),e.dataChanged.subscribe(this.onBaseDataChanged),this.originalSeries.type){case n.EDataSeriesType.Ohlc:const e=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.closefield,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues()),this.getOriginalHighValues=()=>(0,s.switchData)(this.highfield,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues()),this.getOriginalLowValues=()=>(0,s.switchData)(this.lowfield,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues());break;case n.EDataSeriesType.Xy:const t=this.originalSeries;this.getOriginalYValues=()=>t.getNativeYValues(),this.getOriginalHighValues=()=>t.getNativeYValues(),this.getOriginalLowValues=()=>t.getNativeYValues();break;case n.EDataSeriesType.Xyy:const i=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.closefield,i.getNativeYValues(),i.getNativeY1Values()),this.getOriginalHighValues=()=>(0,s.switchData)(this.highfield,i.getNativeYValues(),i.getNativeY1Values()),this.getOriginalLowValues=()=>(0,s.switchData)(this.lowfield,i.getNativeYValues(),i.getNativeY1Values());break;case n.EDataSeriesType.Xyz:const r=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.closefield,r.getNativeYValues(),r.getNativeZValues()),this.getOriginalHighValues=()=>(0,s.switchData)(this.highfield,r.getNativeYValues(),r.getNativeZValues()),this.getOriginalLowValues=()=>(0,s.switchData)(this.lowfield,r.getNativeYValues(),r.getNativeZValues())}}getOriginalXValues(){return this.originalSeries.getNativeXValues()}getOriginalYValues(){return this.originalSeries.getNativeYValues()}getOriginalHighValues(){return this.originalSeries.getNativeHighValues()}getOriginalLowValues(){return this.originalSeries.getNativeLowValues()}getOriginalCount(){return this.originalSeries.count()}onOriginalPropertyChanged(e){}filterOnAppend(e){this.filterAll()}filterOnUpdate(e){this.filterAll()}filterOnInsert(e,t){this.filterAll()}filterOnRemove(e,t){this.filterAll()}onClear(){this.clear()}onBaseDataChanged(e){const{changeType:t,name:i,index:r,count:s}=e;switch(t){case n.EDataChangeType.Property:return void this.onOriginalPropertyChanged(i);case n.EDataChangeType.Append:this.filterOnAppend(s);break;case n.EDataChangeType.Clear:this.onClear();break;case n.EDataChangeType.Insert:this.filterOnInsert(r,s);break;case n.EDataChangeType.Remove:this.filterOnRemove(r,s);break;case n.EDataChangeType.Update:this.filterOnUpdate(r)}}}t.HlcFilterBase=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OhlcFilterBase=void 0;const r=i(10),n=i(213);class s extends n.OhlcDataSeries{constructor(e,t){super(e.webAssemblyContext,t),this.originalSeries=e,this.onBaseDataChanged=this.onBaseDataChanged.bind(this),e.dataChanged.subscribe(this.onBaseDataChanged)}getOriginalXValues(){return this.originalSeries.getNativeXValues()}getOriginalCount(){return this.originalSeries.count()}onOriginalPropertyChanged(e){}filterOnAppend(e){this.filterAll()}filterOnUpdate(e){this.filterAll()}filterOnInsert(e,t){this.filterAll()}filterOnRemove(e,t){this.filterAll()}onClear(){this.clear()}onBaseDataChanged(e){const{changeType:t,name:i,index:n,count:s}=e;switch(t){case r.EDataChangeType.Property:return void this.onOriginalPropertyChanged(i);case r.EDataChangeType.Append:this.filterOnAppend(s);break;case r.EDataChangeType.Clear:this.onClear();break;case r.EDataChangeType.Insert:this.filterOnInsert(n,s);break;case r.EDataChangeType.Remove:this.filterOnRemove(n,s);break;case r.EDataChangeType.Update:this.filterOnUpdate(n)}}}t.OhlcFilterBase=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyyFilterBase=void 0;const r=i(10),n=i(214),s=i(62);class o extends n.XyyDataSeries{constructor(e,t){var i,n;switch(super(e.webAssemblyContext,t),this.yfield=s.EDataSeriesField.Y,this.y1field=s.EDataSeriesField.Y1,this.originalSeries=e,this.yfield=null!==(i=null==t?void 0:t.yfield)&&void 0!==i?i:this.yfield,this.yfield=null!==(n=null==t?void 0:t.yfield)&&void 0!==n?n:this.yfield,this.onBaseDataChanged=this.onBaseDataChanged.bind(this),e.dataChanged.subscribe(this.onBaseDataChanged),this.originalSeries.type){case r.EDataSeriesType.Ohlc:const e=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.yfield,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues()),this.getOriginalY1Values=()=>(0,s.switchData)(this.y1field,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues());break;case r.EDataSeriesType.Xy:const t=this.originalSeries;this.getOriginalYValues=()=>t.getNativeYValues(),this.getOriginalY1Values=()=>t.getNativeYValues();break;case r.EDataSeriesType.Xyz:const i=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.yfield,i.getNativeYValues(),i.getNativeZValues()),this.getOriginalY1Values=()=>(0,s.switchData)(this.y1field,i.getNativeYValues(),i.getNativeZValues());break;case r.EDataSeriesType.Hlc:const n=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.yfield,n.getNativeYValues(),void 0,n.getNativeHighValues(),n.getNativeLowValues()),this.getOriginalY1Values=()=>(0,s.switchData)(this.y1field,n.getNativeYValues(),void 0,n.getNativeHighValues(),n.getNativeLowValues())}}getOriginalXValues(){return this.originalSeries.getNativeXValues()}getOriginalYValues(){return this.originalSeries.getNativeYValues()}getOriginalY1Values(){return this.originalSeries.getNativeY1Values()}getOriginalCount(){return this.originalSeries.count()}onOriginalPropertyChanged(e){}filterOnAppend(e){this.filterAll()}filterOnUpdate(e){this.filterAll()}filterOnInsert(e,t){this.filterAll()}filterOnRemove(e,t){this.filterAll()}onClear(){this.clear()}onBaseDataChanged(e){const{changeType:t,name:i,index:n,count:s}=e;switch(t){case r.EDataChangeType.Property:return void this.onOriginalPropertyChanged(i);case r.EDataChangeType.Append:this.filterOnAppend(s);break;case r.EDataChangeType.Clear:this.onClear();break;case r.EDataChangeType.Insert:this.filterOnInsert(n,s);break;case r.EDataChangeType.Remove:this.filterOnRemove(n,s);break;case r.EDataChangeType.Update:this.filterOnUpdate(n)}}}t.XyyFilterBase=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyzFilterBase=void 0;const r=i(10),n=i(215),s=i(62);class o extends n.XyzDataSeries{constructor(e,t){var i,n;switch(super(e.webAssemblyContext,t),this.yfield=s.EDataSeriesField.Y,this.zfield=s.EDataSeriesField.Z,this.originalSeries=e,this.yfield=null!==(i=null==t?void 0:t.yfield)&&void 0!==i?i:this.yfield,this.zfield=null!==(n=null==t?void 0:t.zfield)&&void 0!==n?n:this.zfield,this.onBaseDataChanged=this.onBaseDataChanged.bind(this),e.dataChanged.subscribe(this.onBaseDataChanged),this.originalSeries.type){case r.EDataSeriesType.Ohlc:const e=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.yfield,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues()),this.getOriginalZValues=()=>(0,s.switchData)(this.zfield,e.getNativeYValues(),e.getNativeOpenValues(),e.getNativeHighValues(),e.getNativeLowValues());break;case r.EDataSeriesType.Xy:const t=this.originalSeries;this.getOriginalYValues=()=>t.getNativeYValues(),this.getOriginalZValues=()=>t.getNativeYValues();break;case r.EDataSeriesType.Xyy:const i=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.yfield,i.getNativeYValues(),i.getNativeY1Values()),this.getOriginalZValues=()=>(0,s.switchData)(this.zfield,i.getNativeYValues(),i.getNativeY1Values());break;case r.EDataSeriesType.Hlc:const n=this.originalSeries;this.getOriginalYValues=()=>(0,s.switchData)(this.yfield,n.getNativeYValues(),void 0,n.getNativeHighValues(),n.getNativeLowValues()),this.getOriginalZValues=()=>(0,s.switchData)(this.zfield,n.getNativeYValues(),void 0,n.getNativeHighValues(),n.getNativeLowValues())}}getOriginalXValues(){return this.originalSeries.getNativeXValues()}getOriginalYValues(){return this.originalSeries.getNativeYValues()}getOriginalZValues(){return this.originalSeries.getNativeZValues()}getOriginalCount(){return this.originalSeries.count()}onOriginalPropertyChanged(e){}filterOnAppend(e){this.filterAll()}filterOnUpdate(e){this.filterAll()}filterOnInsert(e,t){this.filterAll()}filterOnRemove(e,t){this.filterAll()}onClear(){this.clear()}onBaseDataChanged(e){const{changeType:t,name:i,index:n,count:s}=e;switch(t){case r.EDataChangeType.Property:return void this.onOriginalPropertyChanged(i);case r.EDataChangeType.Append:this.filterOnAppend(s);break;case r.EDataChangeType.Clear:this.onClear();break;case r.EDataChangeType.Insert:this.filterOnInsert(n,s);break;case r.EDataChangeType.Remove:this.filterOnRemove(n,s);break;case r.EDataChangeType.Update:this.filterOnUpdate(n)}}}t.XyzFilterBase=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.IS_HIDDEN="IS_HIDDEN",e.X1="X1",e.X2="X2",e.Y1="Y1",e.Y2="Y2"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartVerticalGroup=void 0;const r=i(80),n=i(418);t.SciChartVerticalGroup=class{constructor(){this.groupRightSize=0,this.groupLeftSize=0,this.layoutManagers=[],this.leftOuterLayoutSizes={},this.rightOuterLayoutSizes={}}addSurfaceToGroup(e){const t=new n.SynchronizedLayoutManager(this);this.layoutManagers.push(t),e.layoutManager=t;const{width:i,height:s}=e.domCanvas2D;e.layoutManager.layoutChart(new r.Size(i,s)),this.synchronizeAxisSizes()}synchronizeAxisSizes(){this.layoutManagers.forEach(e=>{e.trySynchronizeLayouts()})}onLeftSizeChanged(e,t){this.leftOuterLayoutSizes[e]=t,this.groupLeftSize=s(this.leftOuterLayoutSizes)}onRightSizeChanged(e,t){this.rightOuterLayoutSizes[e]=t,this.groupRightSize=s(this.rightOuterLayoutSizes)}};const s=e=>{let t=0;return Object.keys(e).forEach(i=>{t=Math.max(t,e[i])}),t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderPassDataCollection=void 0;t.RenderPassDataCollection=class{}},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HeatmapLegend=void 0;const n=i(1),s=i(3),o=i(419),a=i(216),l=i(89),h=i(164),u=i(233),d=i(66),c=i(0);class p{constructor(e,t){var i,r,o,d,c,p,g;this.SIZE=100,n.Guard.notNull(e,"sciChartSurface"),this.sciChartSurface=e,this.wasmContext=e.webAssemblyContext2D;const f=null!==(r=null===(i=null==t?void 0:t.colorMap)||void 0===i?void 0:i.minimum)&&void 0!==r?r:0,y=null!==(d=null===(o=null==t?void 0:t.colorMap)||void 0===o?void 0:o.maximum)&&void 0!==d?d:100,v=null!==(p=null===(c=null==t?void 0:t.colorMap)||void 0===c?void 0:c.gradientStops)&&void 0!==p?p:this.getDefaultGradientStops();e.xAxes.add(new l.NumericAxis(this.wasmContext,Object.assign({},this.getDefaultXAxisOptions()))),e.yAxes.add(new l.NumericAxis(this.wasmContext,Object.assign(Object.assign(Object.assign({},this.getDefaultYAxisOptions()),null==t?void 0:t.yAxisOptions),{visibleRange:new s.NumberRange(f,y)})));const m=this.getZValues(f,y);e.renderableSeries.add(new u.UniformHeatmapRenderableSeries(this.wasmContext,{dataSeries:new a.UniformHeatmapDataSeries(this.wasmContext,{xStart:0,xStep:1,yStart:f,yStep:(y-f)/this.SIZE,zValues:m}),useLinearTextureFiltering:!0,colorMap:null!==(g=null==t?void 0:t.colorMap)&&void 0!==g?g:new h.HeatmapColorMap({minimum:f,maximum:y,gradientStops:v})}))}static create(e,t){return r(this,void 0,void 0,(function*(){const{sciChartSurface:i,wasmContext:r}=yield d.SciChartSurface.create(e,{theme:null==t?void 0:t.theme});return{wasmContext:r,heatmapLegend:new p(i,t)}}))}delete(){this.sciChartSurface=(0,c.deleteSafe)(this.sciChartSurface)}get innerSciChartSurface(){return{sciChartSurface:this.sciChartSurface,wasmContext:this.wasmContext}}getDefaultGradientStops(){return[{offset:1,color:"Red"},{offset:0,color:"Blue"}]}getDefaultXAxisOptions(){return{drawMajorGridLines:!1,drawMinorGridLines:!1,drawMajorTickLines:!1,drawMinorTickLines:!1,drawLabels:!1}}getDefaultYAxisOptions(){return{maxAutoTicks:5,drawMajorGridLines:!1,drawMinorGridLines:!1,drawLabels:!0,drawMajorTickLines:!0,drawMinorTickLines:!0}}getZValues(e,t){const i=(0,o.zeroArray2D)([this.SIZE,1]),r=(t-e)/(this.SIZE-1);for(let t=0,n=e;t<this.SIZE;t++,n+=r)i[t][0]=n;return i}}t.HeatmapLegend=p},function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SciChartOverview=void 0;const n=i(157),s=i(3),o=i(74),a=i(58),l=i(221),h=i(48),u=i(178),d=i(118),c=i(89),p=i(66);class g{constructor(e,t,i,r,n,s){this.overviewXAxisProperty=n,this.overviewYAxisProperty=s,this.rangeSelectionModifierProperty=r,this.parentSciChartSurfaceProperty=e,this.overviewSciChartSurfaceProperty=t,this.overviewWasmContext=i}static create(e,t,i){return r(this,void 0,void 0,(function*(){const{sciChartSurface:r,wasmContext:n,rangeSelectionModifier:s,xAxis:o,yAxis:a}=yield f(e,t,i);return new g(e,r,n,s,o,a)}))}get overviewSciChartSurface(){return this.overviewSciChartSurfaceProperty}get parentSciChartSurface(){return this.parentSciChartSurfaceProperty}get rangeSelectionModifier(){return this.rangeSelectionModifierProperty}get overviewXAxis(){return this.overviewXAxisProperty}get overviewYAxis(){return this.overviewYAxisProperty}applyTheme(e){this.overviewSciChartSurface.applyTheme(e)}delete(){var e;null===(e=this.overviewSciChartSurface)||void 0===e||e.delete()}}t.SciChartOverview=g;const f=(e,t,i)=>r(void 0,void 0,void 0,(function*(){var r,g,f,y;const{wasmContext:v,sciChartSurface:m}=yield p.SciChartSurface.create(t,i),S=null!==(r=null==i?void 0:i.mainAxisId)&&void 0!==r?r:h.AxisBase2D.DEFAULT_AXIS_ID,P=null!==(g=null==i?void 0:i.secondaryAxisId)&&void 0!==g?g:h.AxisBase2D.DEFAULT_AXIS_ID,C=e.getXAxisById(S),A=e.getYAxisById(P);if(!C)throw new Error(`Could not find a main axis with id ${S}.`+((null==i?void 0:i.mainAxisId)?"":"Please specify mainAxisId in the options"));if(!C)throw new Error(`Could not find a secondary axis with id ${P}.`+((null==i?void 0:i.secondaryAxisId)?"":"Please specify secondaryAxisId in the options"));const x=C.isXAxis?C:A,b=C.isXAxis?A:C,T=Object.assign({axisAlignment:x.axisAlignment,isVisible:!1,autoRange:o.EAutoRange.Always,visibleRange:x.visibleRange},null==i?void 0:i.overviewXAxisOptions),E=Object.assign({axisAlignment:b.axisAlignment,isVisible:!1,autoRange:o.EAutoRange.Always,visibleRange:b.visibleRange},null==i?void 0:i.overviewYAxisOptions),w=x.isCategoryAxis?new u.CategoryAxis(v,T):x.type===a.EAxisType.LogarithmicAxis?new d.LogarithmicAxis(v,T):new c.NumericAxis(v,T),R=b.isCategoryAxis?new u.CategoryAxis(v,E):x.type===a.EAxisType.LogarithmicAxis?new d.LogarithmicAxis(v,E):new c.NumericAxis(v,E),D=C.isXAxis?w:R,L=e.renderableSeries.asArray().map(null!==(f=null==i?void 0:i.transformRenderableSeries)&&void 0!==f?f:e=>{if(e.xAxisId!==x.id||e.yAxisId!==b.id)return;const[t]=(0,n.buildSeries)(v,e.toJSON(!0));return t.dataSeries=e.dataSeries,t.xAxisId=w.id,t.yAxisId=R.id,t}).filter(e=>e);m.xAxes.add(w),m.yAxes.add(R),m.renderableSeries.add(...L),m.zoomExtents();const M=null!==(y=null==i?void 0:i.customRangeSelectionModifier)&&void 0!==y?y:new l.OverviewRangeSelectionModifier;return M.xAxisId=w.id,M.yAxisId=R.id,M.onSelectedAreaChanged=e=>{e.equals(C.visibleRange)||(C.visibleRange=e)},M.selectedArea=new s.NumberRange(Math.max(w.visibleRange.min,C.visibleRange.min),Math.min(w.visibleRange.max,C.visibleRange.max)),m.chartModifiers.add(M),void 0!==(null==i?void 0:i.rangeSelectionAnnotationSvgString)&&(M.rangeSelectionAnnotation.svgString=i.rangeSelectionAnnotationSvgString),w.visibleRangeChanged.subscribe(({visibleRange:e})=>{const t=C.visibleRange.clip(e);M.selectedArea=t}),C.visibleRangeChanged.subscribe(({visibleRange:e})=>{const t=e.clip(D.visibleRange);!t.equals(M.selectedArea)&&(M.selectedArea=t)}),{sciChartSurface:m,xAxis:w,yAxis:R,rangeSelectionModifier:M,wasmContext:v}}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BandAnimation=void 0;const r=i(38),n=i(2),s=i(24),o=i(421),a=i(50);class l extends a.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new o.BandAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}getSeriesStyle(e){var t;if(!e.isStacked)return new o.BandAnimationStyle({stroke:e.stroke,strokeY1:e.strokeY1,fill:e.fill,fillY1:e.fillY1,strokeThickness:e.strokeThickness,opacity:e.opacity,pointMarker:null===(t=e.pointMarker)||void 0===t?void 0:t.getPointMarkerStyle()})}updateSeriesProperties(e,t,i){if(super.updateSeriesProperties(e,t,i),this.isStyleAnimation){const r=this.styles;if(void 0!==r.strokeY1){const o=s.animationHelpers.interpolateColor(t.strokeY1ARGB,r.strokeY1ARGB,i);e.strokeY1=(0,n.parseArgbToHtmlColor)(o)}if(void 0!==r.fill){const o=s.animationHelpers.interpolateColor(t.fillARGB,r.fillARGB,i);e.fill=(0,n.parseArgbToHtmlColor)(o)}if(void 0!==r.fillY1){const o=s.animationHelpers.interpolateColor(t.fillY1ARGB,r.fillY1ARGB,i);e.fillY1=(0,n.parseArgbToHtmlColor)(o)}}}}t.BandAnimation=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BubbleAnimation=void 0;const r=i(38),n=i(50),s=i(63);class o extends n.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new s.BaseAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}}t.BubbleAnimation=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CandlestickAnimation=void 0;const r=i(38),n=i(2),s=i(24),o=i(422),a=i(423);class l extends a.OhlcAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new o.CandlestickAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}getSeriesStyle(e){var t;if(!e.isStacked)return new o.CandlestickAnimationStyle({stroke:e.stroke,strokeThickness:e.strokeThickness,opacity:e.opacity,strokeUp:e.strokeUp,strokeDown:e.strokeDown,brushUp:e.brushUp,brushDown:e.brushDown,pointMarker:null===(t=e.pointMarker)||void 0===t?void 0:t.getPointMarkerStyle()})}updateSeriesProperties(e,t,i){if(super.updateSeriesProperties(e,t,i),this.isStyleAnimation){const r=this.styles;if(void 0!==r.brushUp){const o=s.animationHelpers.interpolateColor(t.brushUpARGB,r.brushUpARGB,i);e.brushUp=(0,n.parseArgbToHtmlColor)(o)}if(void 0!==r.brushDown){const o=s.animationHelpers.interpolateColor(t.brushDownARGB,r.brushDownARGB,i);e.brushDown=(0,n.parseArgbToHtmlColor)(o)}}}}t.CandlestickAnimation=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnAnimation=void 0;const r=i(38),n=i(2),s=i(24),o=i(50),a=i(424),l=i(96);class h extends o.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new a.ColumnAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}getSeriesStyle(e){var t,i;if(!e.isStacked)return new a.ColumnAnimationStyle({stroke:e.stroke,strokeThickness:e.strokeThickness,opacity:e.opacity,pointMarker:null!==(i=null===(t=e.pointMarker)||void 0===t?void 0:t.getPointMarkerStyle())&&void 0!==i?i:new l.PointMarkerStyle,fill:e.fill,zeroLineY:e.zeroLineY,dataPointWidth:e.dataPointWidth})}updateSeriesProperties(e,t,i){if(super.updateSeriesProperties(e,t,i),this.isStyleAnimation){const r=this.styles;if(void 0!==r.fill){const o=s.animationHelpers.interpolateColor(t.fillARGB,r.fillARGB,i);e.fill=(0,n.parseArgbToHtmlColor)(o)}void 0!==r.zeroLineY&&(e.zeroLineY=s.animationHelpers.interpolateNumber(t.zeroLineY,r.zeroLineY,i)),void 0!==r.dataPointWidth&&(e.dataPointWidth=s.animationHelpers.interpolateNumber(t.dataPointWidth,r.dataPointWidth,i))}}}t.ColumnAnimation=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LineAnimation=void 0;const r=i(38),n=i(50),s=i(63);class o extends n.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new s.BaseAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}}t.LineAnimation=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MountainAnimation=void 0;const r=i(38),n=i(2),s=i(24),o=i(50),a=i(425),l=i(96);class h extends o.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new a.MountainAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}getSeriesStyle(e){var t,i;if(!e.isStacked)return new a.MountainAnimationStyle({stroke:e.stroke,strokeThickness:e.strokeThickness,opacity:e.opacity,pointMarker:null!==(i=null===(t=e.pointMarker)||void 0===t?void 0:t.getPointMarkerStyle())&&void 0!==i?i:new l.PointMarkerStyle,fill:e.fill,zeroLineY:e.zeroLineY})}updateSeriesProperties(e,t,i){if(super.updateSeriesProperties(e,t,i),this.isStyleAnimation){const r=this.styles;if(void 0!==r.fill){const o=s.animationHelpers.interpolateColor(t.fillARGB,r.fillARGB,i);e.fill=(0,n.parseArgbToHtmlColor)(o)}void 0!==r.zeroLineY&&(e.zeroLineY=s.animationHelpers.interpolateNumber(t.zeroLineY,r.zeroLineY,i))}}}t.MountainAnimation=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScatterAnimation=void 0;const r=i(38),n=i(50),s=i(63);class o extends n.SeriesAnimation{constructor(e){var t,i;super(e),this.type=r.EAnimationType.Style,this.duration=null!==(t=null==e?void 0:e.duration)&&void 0!==t?t:1e3,this.styles=(null==e?void 0:e.styles)?new s.BaseAnimationStyle(e.styles):this.styles,this.dataSeries=null!==(i=null==e?void 0:e.dataSeries)&&void 0!==i?i:this.dataSeries}}t.ScatterAnimation=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseWheelZoomModifier3D=void 0;const r=i(19),n=i(110),s=i(235);class o extends s.ChartModifierBase3D{constructor(e){super(e),this.mouseWheelSensitivity=(null==e?void 0:e.mouseWheelSensitivity)||.1}modifierMouseWheel(e){super.modifierMouseWheel(e);const t=this.parentSurface;if(!t)return;const i=t.camera;if(!i)return;const r=e.mouseWheelDelta,s=i.radius,o=(s+r*this.mouseWheelSensitivity)/s;i.projectionMode===n.ECameraProjectionMode.Perspective?i.radius*=o:(i.orthoWidth*=o,i.orthoHeight*=o),e.handled=!0}toJSON(){return{type:r.EChart3DModifierType.MouseWheelZoom,options:{mouseWheelSensitivity:this.mouseWheelSensitivity}}}}t.MouseWheelZoomModifier3D=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrbitModifier3D=void 0;const r=i(5),n=i(19),s=i(235);class o extends s.ChartModifierBase3D{constructor(){super()}modifierMouseDown(e){super.modifierMouseDown(e);const{x:t,y:i}=e.mousePoint;this.pointStart=new r.Point(t,i),this.isDragging=!0,e.handled=!0}modifierMouseMove(e){if(super.modifierMouseMove(e),!this.isDragging)return;const t=this.parentSurface.camera;if(!t)return;const{x:i,y:n}=e.mousePoint,s=new r.Point(this.pointStart.x-i,this.pointStart.y-n),o=.2*s.x,a=.2*s.y;t.orbitalYaw+=o,t.orbitalPitch-=a,this.pointStart=new r.Point(i,n),e.handled=!0}modifierMouseUp(e){super.modifierMouseUp(e),this.isDragging=!1,this.pointStart=void 0}toJSON(){return{type:n.EChart3DModifierType.Orbit}}}t.OrbitModifier3D=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResetCamera3DModifier=void 0;const r=i(426),n=i(39),s=i(179),o=i(19),a=i(110),l=i(235);class h extends l.ChartModifierBase3D{constructor(e){var t,i,r;super(e),this.isAnimated=!0,this.animationDuration=400,this.easingFunction=n.easing.outExpo,this.isAnimated=null===(t=null==e?void 0:e.isAnimated)||void 0===t||t,this.animationDuration=null!==(i=null==e?void 0:e.animationDuration)&&void 0!==i?i:400,(null==e?void 0:e.easingFunction)&&"string"==typeof e.easingFunction&&(e.easingFunction=n.easing[e.easingFunction]),this.easingFunction=null!==(r=null==e?void 0:e.easingFunction)&&void 0!==r?r:n.easing.outExpo}onAttach(){if(!this.destination){const e=this.parentSurface;if(!e)return;const t=e.camera;if(!t)return;this.destination={radius:t.radius,pitch:t.orbitalPitch,yaw:t.orbitalYaw,width:t.orthoWidth,height:t.orthoHeight}}}modifierDoubleClick(e){var t,i;const n=this.parentSurface;if(!n)return;const o=n.camera;if(!o)return;o.radius;if(o.projectionMode===a.ECameraProjectionMode.Perspective){const e=new s.GenericAnimation({from:{radius:o.radius,pitch:o.orbitalPitch,yaw:o.orbitalYaw},to:null!==(t=this.destination)&&void 0!==t?t:{radius:1,pitch:0,yaw:0},onAnimate:(e,t,i)=>{o.radius=r.DoubleAnimator.interpolate(e.radius,t.radius,i),o.orbitalPitch=r.DoubleAnimator.interpolate(e.pitch,t.pitch,i),o.orbitalYaw=r.DoubleAnimator.interpolate(e.yaw,t.yaw,i)},duration:this.isAnimated?this.animationDuration:0,ease:this.easingFunction});n.addAnimation(e)}else{const e=new s.GenericAnimation({from:{width:o.orthoWidth,height:o.orthoHeight},to:null!==(i=this.destination)&&void 0!==i?i:{width:1,height:1},onAnimate:(e,t,i)=>{o.orthoWidth=r.DoubleAnimator.interpolate(e.width,t.width,i),o.orthoHeight=r.DoubleAnimator.interpolate(e.height,t.height,i)},duration:this.isAnimated?this.animationDuration:0,ease:this.easingFunction});n.addAnimation(e)}e.handled=!0}toJSON(){return{type:o.EChart3DModifierType.ZoomExtents,options:{animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,isAnimated:this.isAnimated}}}}t.ResetCamera3DModifier=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UniformGridDataSeries3D=void 0;const r=i(3),n=i(98),s=i(474);class o extends s.BaseGridDataSeries3D{constructor(e,t){super(e,t),this.type=n.EDataSeriesType3D.UniformGrid3D,this.xStartProperty=(null==t?void 0:t.xStart)||0,this.xStepProperty=(null==t?void 0:t.xStep)||1,this.zStartProperty=(null==t?void 0:t.zStart)||0,this.zStepProperty=(null==t?void 0:t.zStep)||1}get xStart(){return this.xStartProperty}set xStart(e){this.xStartProperty=e,this.notifyDataChanged()}get xStep(){return this.xStepProperty}set xStep(e){this.xStepProperty=e,this.notifyDataChanged()}get zStart(){return this.zStartProperty}set zStart(e){this.zStartProperty=e,this.notifyDataChanged()}get zStep(){return this.zStepProperty}set zStep(e){this.zStepProperty=e,this.notifyDataChanged()}get xRange(){return new r.NumberRange(this.xStart,this.xStart+this.xStep*(this.xSize-1))}get zRange(){return new r.NumberRange(this.zStart,this.zStart+this.zStep*(this.zSize-1))}}t.UniformGridDataSeries3D=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseGridDataSeries3D=void 0;const r=i(3),n=i(98);class s extends n.BaseDataSeries3D{constructor(e,t){super(e,t),this.setYValues(null==t?void 0:t.yValues)}get yRange(){if(!this.yRangeCached){let e=-Number.MAX_VALUE,t=Number.MAX_VALUE;for(let i=0;i<this.zSizeProperty;i++)for(let r=0;r<this.xSizeProperty;r++){const n=this.yValuesProperty[i][r];e=Math.max(n,e),t=Math.min(n,t)}this.yRangeCached=new r.NumberRange(t,e)}return this.yRangeCached}get zSize(){return this.zSizeProperty}get xSize(){return this.xSizeProperty}setYValues(e){if(!e||!e[0])return this.yValuesProperty=void 0,this.xSizeProperty=0,void(this.zSizeProperty=0);const t=e[0].length;e.forEach(e=>{if(!e)throw new Error("Each row in YValues must be defined. See how to declare a 2D array in Javascript here https://stackoverflow.com/a/966234/303612");if(e.length!==t)throw new Error("Each row in YValues must be the same length, so that the overall 2D array is square")});const i=e[0].length,r=e.length;this.xSizeProperty=i,this.zSizeProperty=r,this.yValuesProperty=e,this.notifyDataChanged()}getYValues(){return this.yValuesProperty}getYValue(e,t){try{return this.yValuesProperty[e][t]}catch(i){return console.log(`error at get z,x ${e}, ${t}`),0}}setYValue(e,t,i){this.yValuesProperty[e][t]=i,this.notifyDataChanged()}notifyDataChanged(){super.notifyDataChanged(),this.yRangeCached=void 0}}t.BaseGridDataSeries3D=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XyzDataSeries3D=void 0;const r=i(0),n=i(1),s=i(3),o=i(98);class a extends o.BaseDataSeries3D{constructor(e,t){super(e),this.type=o.EDataSeriesType3D.Xyz3D,this.xValues=new e.SCRTDoubleVector,this.yValues=new e.SCRTDoubleVector,this.zValues=new e.SCRTDoubleVector,this.metadata=[],(null==t?void 0:t.xValues)&&(null==t?void 0:t.yValues)&&(null==t?void 0:t.zValues)&&this.appendRange(t.xValues,t.yValues,t.zValues,null==t?void 0:t.metadata)}getNativeXValues(){return this.xValues}getNativeYValues(){return this.yValues}getNativeZValues(){return this.zValues}getMetadataValues(){return this.metadata}get xRange(){const e=this.webAssemblyContext.NumberUtil.MinMax(this.xValues),t=new s.NumberRange(e.minD,e.maxD);return e.delete(),t}get yRange(){const e=this.webAssemblyContext.NumberUtil.MinMax(this.yValues),t=new s.NumberRange(e.minD,e.maxD);return e.delete(),t}get zRange(){const e=this.webAssemblyContext.NumberUtil.MinMax(this.zValues),t=new s.NumberRange(e.minD,e.maxD);return e.delete(),t}append(e,t,i,r){this.getIsDeleted()||(this.xValues.push_back(e),this.yValues.push_back(t),this.zValues.push_back(i),this.metadata.push(r),this.notifyDataChanged())}appendRange(e,t,i,r){if(!this.getIsDeleted()){n.Guard.arraysSameLength(e,"xValues",t,"yValues"),n.Guard.arraysSameLength(t,"yValues",i,"zValues");const s=this.xValues,o=this.yValues,a=this.zValues;for(let n=0;n<e.length;n++)if(s.push_back(e[n]),o.push_back(t[n]),a.push_back(i[n]),r){const e=r[n];this.metadata.push(e)}else this.metadata.push(void 0);this.notifyDataChanged()}}update(e,t,i,r,n){this.getIsDeleted()||(this.xValues.set(e,t),this.yValues.set(e,i),this.zValues.set(e,r),this.metadata[e]=n,this.notifyDataChanged())}insert(e,t,i,r,n){if(!this.getIsDeleted()){if(e<0||e>=this.count())throw new Error("Start index is out of range");this.xValues.insertAt(e,t),this.yValues.insertAt(e,i),this.zValues.insertAt(e,r),this.metadata.splice(e,0,n),this.notifyDataChanged()}}insertRange(e,t,i,r,s){if(!this.getIsDeleted()){if(n.Guard.arraysSameLength(t,"xValues",i,"yValues"),n.Guard.arraysSameLength(r,"zValues",i,"yValues"),e<0||e>=this.count())throw new Error("Start index is out of range");const o=t.length;for(let n=0;n<o;n++,e++)this.xValues.insertAt(e,t[n]),this.yValues.insertAt(e,i[n]),this.zValues.insertAt(e,r[n]),this.metadata.splice(e,0,s?s[n]:void 0);this.notifyDataChanged()}}removeAt(e){if(!this.getIsDeleted()){if(e<0||e>=this.count())throw new Error("index is out of range");this.xValues.removeAt(e),this.yValues.removeAt(e),this.zValues.removeAt(e),this.metadata.splice(e,1),this.notifyDataChanged()}}removeRange(e,t){if(!this.getIsDeleted()){if(e<0||e+t>this.count())throw new Error("index is out of range");this.xValues.removeRange(e,t),this.yValues.removeRange(e,t),this.zValues.removeRange(e,t),this.metadata.splice(e,t),this.notifyDataChanged()}}clear(){this.getIsDeleted()||(this.xValues.clear(),this.yValues.clear(),this.zValues.clear(),this.metadata=[],this.notifyDataChanged())}delete(){this.xValues=(0,r.deleteSafe)(this.xValues),this.yValues=(0,r.deleteSafe)(this.yValues),this.zValues=(0,r.deleteSafe)(this.zValues),this.metadata=[],super.delete()}count(){return this.xValues?this.xValues.size():0}}t.XyzDataSeries3D=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAxisSideClipping=void 0,function(e){e[e.Default=0]="Default",e[e.None=1]="None",e[e.VisibleRange=2]="VisibleRange"}(t.EAxisSideClipping||(t.EAxisSideClipping={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ETextAlignment3D=void 0,function(e){e[e.Default=0]="Default",e[e.Camera=1]="Camera",e[e.ScreenHorizontal=2]="ScreenHorizontal",e[e.ScreenAutoRotated=3]="ScreenAutoRotated"}(t.ETextAlignment3D||(t.ETextAlignment3D={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumericAxis3D=void 0;const r=i(184),n=i(185),s=i(136),o=i(108),a=i(90),l=i(39),h=i(107),u=i(3),d=i(58),c=i(429);class p extends c.AxisBase3D{constructor(e,t){var i,r;super(e,t),this.type=d.EAxisType.NumericAxis3D,this.tickProvider=new s.NumericTickProvider(this.webAssemblyContext3D),this.labelProvider=new a.NumericLabelProvider,this.deltaCalculator=new o.NumericDeltaCalculator(this.webAssemblyContext3D),this.labelProvider.numericFormat=null!==(i=null==t?void 0:t.labelFormat)&&void 0!==i?i:this.labelProvider.numericFormat,this.labelProvider.precision=null!==(r=null==t?void 0:t.precision)&&void 0!==r?r:this.labelProvider.precision}getDefaultNonZeroRange(){return new u.NumberRange(0,10)}animateVisibleRange(e,t,i=l.easing.outCubic,r=(()=>{})){var n;return t<=0?(this.visibleRange=e||this.visibleRange,void r()):(null===(n=this.visibleRangeAnimationToken)||void 0===n||n.cancel(),this.visibleRangeAnimationToken=h.NumberRangeAnimator.animate(this.visibleRange,e,t,e=>{this.visibleRangeProperty=e},()=>{this.visibleRangeAnimationToken=void 0,r()},i),this.parentSurface.addAnimation(this.visibleRangeAnimationToken),this.visibleRangeAnimationToken)}getCurrentCoordinateCalculatorInternal(){const e=this.visibleRange.min,t=this.visibleRange.max,i=this.getAxisSize();return!this.flippedCoordinatesProperty?new r.FlippedNumericCoordinateCalculator(this.webAssemblyContext3D,i,e,t):new n.NumericCoordinateCalculator(this.webAssemblyContext3D,i,e,t)}}t.NumericAxis3D=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY=void 0,function(e){e.FILL="Fill",e.SIZE="Size"}(t.PROPERTY||(t.PROPERTY={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMeshPointMarker3D=void 0;const r=i(121);class n extends r.BasePointMarker3D{constructor(e,t){super(e,t)}get markerType(){return r.EMarkerType.InstancedMesh}}t.BaseMeshPointMarker3D=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTexturePointMarker3D=void 0;const r=i(121);class n extends r.BasePointMarker3D{constructor(e,t){super(e,t)}get markerType(){return r.EMarkerType.TexturedQuad}}t.BaseTexturePointMarker3D=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScatterRenderableSeries3D=void 0;const r=i(432),n=i(434),s=i(238);class o extends n.BaseRenderableSeries3D{constructor(e,t){super(e,t),this.type=s.ESeriesType3D.ScatterRenderableSeries3D,this.setSceneEntity(new r.ScatterPointsSceneEntity(e,this))}}t.ScatterRenderableSeries3D=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GradientColorPalette=void 0;const r=i(75),n=i(13),s=i(1),o=i(122),a=i(435);class l extends a.MeshColorPalette{constructor(e,t){super(e),this.gradientStops=(null==t?void 0:t.gradientStops)||[{offset:0,color:"Red"},{offset:1,color:"Green"}]}get gradientStops(){return this.gradientStopsProperty}set gradientStops(e){this.gradientStopsProperty=e,this.notifyPropertyChanged(o.PROPERTY.GRADIENT_STOPS)}getTexture(e){if(n.IS_TEST_ENV)return;s.Guard.notNull(e,"size"),s.Guard.isTrue(e.width>0,"size.width must be greater than 0"),s.Guard.isTrue(e.height>0,"size.height must be greater than 0"),s.Guard.notNull(this.gradientStopsProperty,"GradientColorPalette.gradientStops");const t=new r.CanvasTexture(this.webAssemblyContext,e.width,e.height);t.clear();const i=t.getContext(),o=e.width,a=i.createLinearGradient(0,0,o,0);return this.gradientStops.forEach(e=>{a.addColorStop(e.offset,e.color)}),i.fillStyle=a,i.fillRect(0,0,e.width,e.height),t.copyTexture(),t}}t.GradientColorPalette=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolidColorBrushPalette=void 0;const r=i(75),n=i(13),s=i(1),o=i(2),a=i(122),l=i(435);class h extends l.MeshColorPalette{constructor(e,t){super(e),this.fillProperty=(null==t?void 0:t.fill)||"#777777"}get fill(){return this.fillProperty}set fill(e){this.fillProperty=e,this.notifyPropertyChanged(a.PROPERTY.FILL)}getTexture(e){if(s.Guard.notNull(e,"size"),s.Guard.isTrue(e.width>0,"size.width must be greater than 0"),s.Guard.isTrue(e.height>0,"size.height must be greater than 0"),n.IS_TEST_ENV)return;const t=(0,o.parseColorToUIntArgb)(this.fill);if(isNaN(t))throw Error(`SolidColorBrushPalette.fill ${this.fill} cannot be converted to an ABGR color`);const i=new r.CanvasTexture(this.webAssemblyContext,e.width,e.height);i.clear();const a=i.getContext();return a.fillStyle=this.fill,a.fillRect(0,0,e.width,e.height),i.copyTexture(),i}}t.SolidColorBrushPalette=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GradientParams=void 0;t.GradientParams=class{constructor(e,t,i){if(this.gradientStops=[],i.length<2)throw Error("At least two gradient point should be provided");if(e.x<0||e.y<0||e.x>1||e.y>1)throw Error("startPoint values should be within [0,1]");if(t.x<0||t.y<0||t.x>1||t.y>1)throw Error("endPoint values should be within [0,1]");i.forEach(e=>{if(e.offset<0||e.offset>1)throw Error("gradientStops offset should be within [0,1]")}),this.startPoint=e,this.endPoint=t,this.gradientStops=i}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.List=void 0;t.List=class{constructor(){this.items=[]}size(){return this.items.length}add(e){this.items.push(e)}get(e){return this.items[e]}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERenderLayer=void 0,function(e){e[e.First=0]="First",e[e.Second=1]="Second",e[e.Third=2]="Third"}(t.ERenderLayer||(t.ERenderLayer={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToPixel=void 0;t.convertToPixel=(e,t,i,n)=>{const s="0x"+r(n)+r(e)+r(t)+r(i);return parseInt(s,16)};const r=e=>e>=255?"ff":e<=0?"00":e.toString(16)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasAllProperties=void 0;t.hasAllProperties=(e,t)=>{for(let i=0;i<t.length;i++)if(!e.hasOwnProperty(t[i]))return!1;return!0}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributeFromString=void 0;t.getAttributeFromString=(e,t)=>{const i=e.indexOf(t);if(i>=0){const t=e.indexOf('"',i),r=t>=0?e.indexOf('"',t+1):-1;if(r>=0){const i=e.substr(t+1,r-t-1),n=parseInt(i,10);if(!isNaN(n))return n}}}}]).default;
|