})\n prop('showAvgVolume', { type: 'boolean', def: true })\n prop('avgVolumeSMA', { type: 'number', def: 20 })\n prop('colorAvgVol', { type: 'color', def: '#1cccb777'})\n prop('scaleSymbol', { type: 'string|boolean', def: false })\n prop('priceLine', { type: 'boolean', def: true })\n prop('showValueTracker', { type: 'boolean', def: true })\n prop('coloringBodies', { type: 'boolean', def: true })\n prop('coloringWicks', { type: 'boolean', def: false })\n prop('coloringVolume', { type: 'boolean', def: false })\n \n \u002F\u002F Draw call\n draw(ctx) {\n \n let cnv = $lib.layoutCnv($core, true, $props.showVolume)\n let bodies = cnv.upBodies.length ? cnv.upBodies : cnv.dwBodies\n if (!bodies.length) return\n let w = Math.max(bodies[0].w, 1)\n let sw = $props.showWicks\n let cb = $props.coloringBodies\n let cw = $props.coloringWicks\n let cv = $props.coloringVolume\n \n if (sw) {\n drawCvPart(ctx, $lib.candleWick, cnv.dwWicks, 1, 'colorWickDw', cw)\n drawCvPart(ctx, $lib.candleWick, cnv.upWicks, 1, 'colorWickUp', cw)\n }\n drawCvPart(ctx, $lib.candleBody, cnv.dwBodies, w, 'colorBodyDw', cb)\n drawCvPart(ctx, $lib.candleBody, cnv.upBodies, w, 'colorBodyUp', cb)\n drawCvPart(ctx, $lib.volumeBar, cnv.dwVolbars, w, 'colorVolDw', cv)\n drawCvPart(ctx, $lib.volumeBar, cnv.upVolbars, w, 'colorVolUp', cv)\n \n if ($props.showVolume && $props.showAvgVolume) {\n $lib.avgVolume(ctx, $core, $props, cnv)\n }\n \n }\n \n \u002F\u002F Draw candle part\n drawCvPart(ctx, f, arr, w, color, coloring = false) {\n let layout = $core.layout\n let prevColor = null\n ctx.lineWidth = w\n ctx.strokeStyle = $props[color]\n ctx.beginPath()\n for (var i = 0, n = arr.length; i \u003C n; i++) {\n if (coloring) {\n var c = arr[i].src[6]\n if (c) {\n if (c !== prevColor) {\n ctx.stroke()\n ctx.beginPath()\n }\n ctx.strokeStyle = c\n } else if (prevColor !== $props[color]) {\n ctx.stroke()\n ctx.beginPath()\n ctx.strokeStyle = $props[color]\n prevColor = $props[color]\n }\n prevColor = c\n }\n f(ctx, arr[i], layout)\n }\n ctx.stroke()\n }\n \n \u002F\u002F Define y-range (by finding max High, min Low)\n static yRange(data) {\n let len = data.length\n var h, l, high = -Infinity, low = Infinity\n for(var i = 0; i \u003C len; i++) {\n let point = data[i]\n if (point[2] \u003E high) high = point[2]\n if (point[3] \u003C low) low = point[3]\n }\n return [high, low]\n }\n \n \u002F\u002F Use [Open, Close] for precision detection\n static preSampler(x) =\u003E [x[1], x[4]]\n \n \u002F\u002F Map data item to OHLC (for candle magnets etc.)\n ohlc(x) =\u003E [x[1], x[2], x[3], x[4]]\n \n \u002F\u002F Price label + Scale symbol + price line\n valueTracker(x) =\u003E {\n show: $props.showValueTracker,\n symbol: $props.scaleSymbol,\n line: $props.priceLine,\n color: $lib.candleColor($props, $core.data[$core.data.length - 1]),\n value: x[4] \u002F\u002F close\n }\n \n \u002F\u002F Define the OHLCV legend\n legendHtml(x, prec, f) {\n let color1 = $core.colors.text\n let v = $core.cursor.getValue($core.paneId, $core.id)\n let sym = $props.currencySymbol\n let color2 = v[4] \u003E= v[1] ?\n $props.colorBodyUp : $props.colorBodyDw\n if ($props.coloringBodies && x[6]) {\n color2 = x[6]\n }\n let fc = $lib.formatCash\n return \\`\n \u003Cspan style=\"color: \\${color2}\"\u003E\n \u003Cspan style=\"margin-left: 3px;\"\u003E\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EO\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[1])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EH\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[2])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EL\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[3])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EC\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[4])}\u003C\u002Fspan\u003E\n \\`\n + ($props.showVolume ? \\`\n \u003Cspan style=\"color: \\${color1}\"\u003EV\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${sym+fc(x[5])}\u003C\u002Fspan\u003E\\` : \\`\\`)\n + \\`\u003C\u002Fspan\u003E\\`\n }\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n kl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ECloud\u003C\u002Fds\u003E, format [\u003Ctimestamp\u003E, \u003Cline1\u003E, \u003Cline2\u003E]\n [OVERLAY name=Cloud, ctx=Canvas, verion=0.1.0]\n \n \u002F\u002F Overlay props\n prop('color1', { type: 'color', def: '#55d7b0aa' })\n prop('color2', { type: 'color', def: '#d94d64aa' })\n prop('back1', { type: 'color', def: '#79ffde22' })\n prop('back2', { type: 'color', def: '#ff246c22' })\n prop('drawLines', { type: 'boolean', def: false })\n \n \u002F\u002F Draw call\n \u002F\u002F TODO: speed-up (draw segment with the same color together)\n draw(ctx) {\n \n const layout = $core.layout\n const data = $core.data\n const view = $core.view\n \n ctx.lineWidth = 1\n \n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p1 = map(layout, data[i], i)\n let p2 = map(layout, data[i+1], i+1)\n \n if (!p2) continue\n if (p1.y1 !== p1.y1) continue \u002F\u002F Fix NaN\n \n \u002F\u002F Background\n ctx.beginPath()\n ctx.fillStyle = p1.y1 \u003C p1.y2 ? $props.back1 : $props.back2\n ctx.moveTo(p1.x, p1.y1)\n ctx.lineTo(p2.x + 0.1, p2.y1)\n ctx.lineTo(p2.x + 0.1, p2.y2)\n ctx.lineTo(p1.x, p1.y2)\n ctx.fill()\n \u002F\u002F Lines\n if (!$props.drawLines) continue\n ctx.beginPath()\n ctx.strokeStyle = $props.color1\n ctx.moveTo(p1.x, p1.y1)\n ctx.lineTo(p2.x, p2.y1)\n ctx.stroke()\n ctx.beginPath()\n ctx.strokeStyle = $props.color2\n ctx.moveTo(p1.x, p1.y2)\n ctx.lineTo(p2.x, p2.y2)\n ctx.stroke()\n }\n }\n \n map(layout, p, i) {\n return p && {\n x: layout.ti2x(p[0], i),\n y1: layout.value2y(p[1]),\n y2: layout.value2y(p[2])\n }\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[x[1], $props.color1], [x[2], $props.color2]]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n zl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003EColored histogram, can be used for MACD\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Chist\u003E, \u003C?value\u003E, \u003C?signal\u003E]\n \u002F\u002F \u003Chist\u003E :: histogram value (e.g. MACD bars)\n \u002F\u002F \u003C?value\u003E :: value of the first line (e.g. MACD value)\n \u002F\u002F \u003C?signal\u003E :: value of the second line (e.g. MACD signal)\n \n [OVERLAY name=Histogram, ctx=Canvas, verion=1.0.1]\n \u002F\u002F \"#35a776\", \"#79e0b3\", \"#e54150\", \"#ea969e\"\n \u002F\u002F Overlay props\n prop('barWidth', { type: 'number', def: 4 })\n prop('lineWidth', { type: 'number', def: 1 })\n prop('colorUp', { type: 'Color', def: '#35a776' })\n prop('colorDw', { type: 'Color', def: '#e54150' })\n prop('colorSemiUp', { type: 'Color', def: '#79e0b3' })\n prop('colorSemiDw', { type: 'Color', def: '#ea969e' })\n prop('colorValue', { type: 'Color', def: '#3782f2' })\n prop('colorSignal', { type: 'Color', def: '#f48709' })\n \n \u002F\u002F Draw call\n draw(ctx) {\n \n const layout = $core.layout\n const view = $core.view\n \n let groups = splitBars(view, layout, view.src)\n \n ctx.lineWidth = detectBarWidth(view, layout, view.src)\n \n \u002F\u002F Semi-down\n \n ctx.strokeStyle = $props.colorSemiDw\n drawBars(ctx, layout, groups.semiDw)\n \n \u002F\u002F Semi-up\n ctx.strokeStyle = $props.colorSemiUp\n drawBars(ctx, layout, groups.semiUp)\n \n \u002F\u002F Down\n ctx.strokeStyle = $props.colorDw\n drawBars(ctx, layout, groups.dw)\n \n \u002F\u002F Up\n ctx.strokeStyle = $props.colorUp\n drawBars(ctx, layout, groups.up)\n \n \u002F\u002F Drawing the lines\n ctx.lineWidth = $props.lineWidth\n ctx.lineJoin = \"round\"\n \n ctx.strokeStyle = $props.colorValue\n drawSpline(ctx, view, layout, 2)\n \n ctx.strokeStyle = $props.colorSignal\n drawSpline(ctx, view, layout, 3)\n \n }\n \n detectBarWidth(view, layout, data) {\n if (!data[view.i2 - 1]) return 0\n let p1 = layout.ti2x(data[view.i2 - 1][0], view.i2 - 1)\n let p2 = layout.ti2x(data[view.i2][0], view.i2)\n if ((p2 - p1) \u003C 1) {\n return 1\n } else {\n return $props.barWidth\n }\n }\n \n splitBars(view, layout, data) {\n const off = $props.barWidth % 2 ? 0 : 0.5\n let semiDw = []\n let semiUp = []\n let dw = []\n let up = []\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let prev = data[i - 1]\n let p = data[i]\n let x = layout.ti2x(p[0], i) - off\n let y = layout.value2y(p[1]) - 0.5\n let bar = {x, y}\n if (p[1] \u003E= 0) {\n var color = 0\n if (prev && p[1] \u003C prev[1]) color = 1\n } else {\n var color = 2\n if (prev && p[1] \u003E prev[1]) color = 3\n }\n switch(color) {\n case 0:\n up.push(bar)\n break\n case 1:\n semiUp.push(bar)\n break\n case 2:\n dw.push(bar)\n break\n case 3:\n semiDw.push(bar)\n break\n }\n }\n return { semiDw, semiUp, dw, up }\n }\n \n drawBars(ctx, layout, group) {\n const data = $core.data\n const base = layout.value2y(0) + 0.5\n ctx.beginPath()\n for (var bar of group) {\n ctx.moveTo(bar.x, base)\n ctx.lineTo(bar.x, bar.y)\n }\n ctx.stroke()\n }\n \n drawSpline(ctx, view, layout, idx) {\n ctx.beginPath()\n const data = view.src\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[idx])\n ctx.lineTo(x, y)\n }\n ctx.stroke()\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n \u002F\u002F TODO: colorize the hist point\n legend(x) =\u003E [\n [x[1], $props.color],\n [x[2], $props.colorValue],\n [x[3], $props.colorSignal]\n ]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Vl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003EPrice labels that stick to candles\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003CLabelObject\u003E]\n \u002F\u002F \u003CLabelObject\u003E {\n \u002F\u002F text :: string, text of the label\n \u002F\u002F dir :: direction, 1 = points up, -1 = points down\n \u002F\u002F pin :: \"open\" | \"high\" | \"low\" | \"close\"\n \u002F\u002F ?color :: color, text color\n \u002F\u002F ?back :: color, background\n \u002F\u002F ?stroke :: stroke color\n \u002F\u002F ?offset, px, offest from the pin\n \u002F\u002F }\n \n [OVERLAY name=PriceLabels, ctx=Canvas, verion=1.0.0]\n \n \u002F\u002F Overlay props\n prop('color', { type: 'Color', def: $core.colors.text })\n prop('back', { type: 'Color', def: $core.colors.back })\n prop('stroke', { type: 'Color', def: $core.colors.scale })\n prop('borderRadius', { type: 'number', def: 3 })\n prop('offset', { type: 'number', def: 5 })\n \n const PINMAP = {\n open: 0,\n high: 1,\n low: 2,\n close: 3\n }\n \n \u002F\u002F Draw call\n draw(ctx) {\n const layout = $core.layout\n const view = $core.view\n const data = $core.data\n \n ctx.font = $core.props.config.FONT\n \n let items = calcItems(ctx, layout, view, data)\n \n \u002F\u002F Draw items\n ctx.lineWidth = 1\n ctx.textAlign = 'center'\n for (var item of items) {\n let off = (item.o ?? $props.offset) * item.dir\n let dy = (item.dir \u003E 0 ? 19 : -11)\n item.y += off\n ctx.strokeStyle = item.s || $props.stroke\n ctx.fillStyle = item.b || $props.back\n ctx.beginPath()\n drawBody(ctx, item)\n ctx.stroke()\n ctx.fill()\n ctx.fillStyle = item.c || $props.color\n ctx.fillText(item.text, item.x, item.y + dy)\n }\n }\n \n calcItems(ctx, layout, view, data) {\n \n let items = []\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let specs = p[1]\n let ohlc = layout.ohlc(p[0])\n if (!ohlc) continue\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(ohlc[PINMAP[specs.pin]])\n let w = ctx.measureText(specs.text).width\n let h = 20\n let dir = specs.dir\n items.push({\n x, y, w, h, dir,\n c: specs.color,\n b: specs.back,\n s: specs.stroke,\n o: specs.offset,\n text: specs.text})\n }\n return items\n }\n \n drawBody(ctx, item) {\n let r = $props.borderRadius\n let hw = item.w \u002F\u002F half width\n let d = - item.dir\n let x = item.x\n let y = item.y\n ctx.moveTo(x, y)\n ctx.lineTo(x + 5, y - 5 * d)\n ctx.lineTo(x + hw - r, y - 5 * d)\n ctx.quadraticCurveTo(x + hw, y - 5 * d, x + hw, y - (5 + r) * d)\n ctx.lineTo(x + hw, y - (5 + item.h - r) * d)\n ctx.quadraticCurveTo(x + hw, y - (5 + item.h) * d, x + hw - r, y - (5 + item.h) * d)\n ctx.lineTo(x - hw + r, y - (5 + item.h) * d)\n ctx.quadraticCurveTo(x - hw, y - (5 + item.h) * d, x - hw, y - (5 + item.h - r) * d)\n ctx.lineTo(x - hw, y - (5 + r) * d)\n ctx.quadraticCurveTo(x - hw, y - 5 * d, x - hw + r, y - 5 * d)\n ctx.lineTo(x - 5, y - 5 * d)\n ctx.lineTo(x, y)\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[x[1].text, x[1].color || $props.color]]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Hl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ERanging indicator, e.g. RSI\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Cvalue\u003E]\n \n [OVERLAY name=Range, ctx=Canvas, verion=1.0.1]\n \n \u002F\u002F Overlay props\n prop('color', { type: 'Color', def: '#ec206e' })\n prop('backColor', { type: 'Color', def: '#381e9c16' })\n prop('bandColor', { type: 'Color', def: '#535559' })\n prop('lineWidth', { type: 'number', def: 1 })\n prop('upperBand', { type: 'number', def: 70 })\n prop('lowerBand', { type: 'number', def: 30 })\n \n \u002F\u002F Draw call\n draw(ctx) {\n const layout = $core.layout\n const upper = layout.value2y($props.upperBand)\n const lower = layout.value2y($props.lowerBand)\n const data = $core.data\n const view = $core.view\n \u002F\u002F RSI values\n ctx.lineWidth = $props.lineWidth\n ctx.lineJoin = \"round\"\n ctx.strokeStyle = $props.color\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[1])\n ctx.lineTo(x, y)\n }\n ctx.stroke()\n ctx.strokeStyle = $props.bandColor\n ctx.setLineDash([5]) \u002F\u002F Will be removed after draw()\n ctx.beginPath()\n \u002F\u002F Fill the area between the bands\n ctx.fillStyle = $props.backColor\n ctx.fillRect(0, upper, layout.width, lower - upper)\n \u002F\u002F Upper band\n ctx.moveTo(0, upper)\n ctx.lineTo(layout.width, upper)\n \u002F\u002F Lower band\n ctx.moveTo(0, lower)\n ctx.lineTo(layout.width, lower)\n ctx.stroke()\n }\n \n yRange(data, hi, lo) =\u003E [\n Math.max(hi, $props.upperBand),\n Math.min(lo, $props.lowerBand)\n ]\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[x[1], $props.color]]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Al = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ESparse data: points, squares, crosses, triangles\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Cvalue\u003E, \u003C?direction\u003E]\n \u002F\u002F \u003Cvalue\u003E :: Price\u002Fvalue\n \u002F\u002F \u003C?direction\u003E :: Triangle direction: 1 | -1\n \n [OVERLAY name=Sparse, ctx=Canvas, verion=1.0.0]\n \n \u002F\u002F Overlay props\n prop('color', { type: 'Color', def: '#898989' })\n prop('size', { type: 'number', def: 3 })\n prop('shape', {\n type: 'string',\n def: 'point',\n options: ['point', 'square', 'cross', 'triangle']\n })\n \n \u002F\u002F Draw call\n draw(ctx) {\n const layout = $core.layout\n const view = $core.view\n \n ctx.fillStyle = $props.color\n ctx.strokeStyle = $props.color\n \n switch($props.shape) {\n case 'point':\n drawArcs(ctx, view, layout)\n break\n case 'square':\n drawSquares(ctx, view, layout)\n break\n case 'cross':\n drawCrosses(ctx, view, layout)\n break\n case 'triangle':\n drawTriandles(ctx, view, layout)\n break\n }\n }\n \n drawArcs(ctx, view, layout) {\n const radius = $props.size\n const data = view.src\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[1])\n ctx.moveTo(x+radius, y)\n ctx.arc(x, y, radius, 0, Math.PI * 2, false)\n }\n ctx.fill()\n }\n \n drawSquares(ctx, view, layout) {\n const half = $props.size\n const side = half * 2\n const data = view.src\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[1])\n ctx.moveTo(x-half, y-half)\n ctx.lineTo(x+half, y-half)\n ctx.lineTo(x+half, y+half)\n ctx.lineTo(x-half, y+half)\n }\n ctx.fill()\n }\n \n drawCrosses(ctx, view, layout) {\n const half = $props.size\n const side = half * 2\n const data = view.src\n ctx.lineWidth = Math.max(half - 1, 1)\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[1])\n ctx.moveTo(x-half, y)\n ctx.lineTo(x+half, y)\n ctx.moveTo(x, y-half)\n ctx.lineTo(x, y+half)\n }\n ctx.stroke()\n }\n \n drawTriandles(ctx, view, layout) {\n const half = $props.size\n const side = half * 2\n const data = view.src\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[1])\n let dir = p[2] ?? 1\n ctx.moveTo(x, y)\n ctx.lineTo(x + side * dir * 0.63, y + side * dir)\n ctx.lineTo(x - side * dir * 0.63, y + side * dir)\n }\n ctx.fill()\n }\n \n static yRange(data) {\n let len = data.length\n var h, l, high = -Infinity, low = Infinity\n for(var i = 0; i \u003C len; i++) {\n let point = data[i][1]\n if (point \u003E high) high = point\n if (point \u003C low) low = point\n }\n return [high, low]\n }\n \n static preSampler(x) =\u003E [x[1]]\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[Math.random(), $props.color]]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Kl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F NavyJS ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003EMultiple splines\u003C\u002Fds\u003E \n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Cline1\u003E, \u003Cline2\u003E, ...]\n \n [OVERLAY name=Splines, ctx=Canvas, version=1.0.0]\n \n prop('lineWidth', { type: 'number', def: 1 })\n prop('widths', { type: 'Array', def: [] })\n prop('colors', { type: 'Array', def: [] })\n prop('skipNan', { type: 'boolean', def: false })\n \n const COLORS = $props.colors.length ? $props.colors : [\n '#53c153', '#d1c045', '#d37734', '#d63953', '#c43cb9',\n '#6c3cc4', '#444bc9', '#44c2c9', '#44c98d'\n ]\n draw(ctx) {\n \n let num = ($core.data[0] || []).length ?? 0\n for (var i = 0; i \u003C num; i++) {\n let _i = i % COLORS.length\n ctx.strokeStyle = COLORS[_i]\n ctx.lineJoin = \"round\"\n ctx.lineWidth = $props.widths[i] || $props.lineWidth\n ctx.beginPath()\n drawSpline(ctx, i)\n ctx.stroke()\n }\n \n }\n \n drawSpline(ctx, idx) {\n const layout = $core.layout\n const data = $core.data\n const view = $core.view\n if (!this.skipNan) {\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[idx + 1])\n ctx.lineTo(x, y)\n }\n } else {\n var skip = false\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[idx + 1])\n if (p[idx + 1] == null || y !== y) {\n skip = true\n } else {\n if (skip) ctx.moveTo(x, y)\n ctx.lineTo(x, y)\n skip = false\n }\n }\n }\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E x.slice(1) \u002F\u002F remove time\n .map((v, i) =\u003E [ \u002F\u002F map value =\u003E color\n v, COLORS[i % COLORS.length]\n ])\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Jl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ETwo bands: above and below the price (like LuxAlgo Reverse Zones)\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Chigh1\u003E, \u003Cmid1\u003E, \u003Clow1\u003E, \u003Chigh2\u003E, \u003Cmid2\u003E, \u003Clow2\u003E]\n \u002F*\n --- \u003Chigh1\u003E ---\n --- \u003Cmid1\u003E ---\n --- \u003Clow1\u003E ---\n ~~~ price ~~~\n --- \u003Chigh2\u003E ---\n --- \u003Cmid2\u003E ---\n --- \u003Clow2\u003E ---\n *\u002F\n \n [OVERLAY name=SuperBands, ctx=Canvas, verion=1.0.0]\n \n \u002F\u002F Overlay props\n prop('color1', { type: 'color', def: '#d80d3848' })\n prop('color1dark', { type: 'color', def: '#d80d3824' })\n prop('color2', { type: 'color', def: '#1edbbe33' })\n prop('color2dark', { type: 'color', def: '#1edbbe15' })\n \n \u002F\u002F Draw call\n draw(ctx) {\n const view = $core.view\n const layout = $core.layout\n \n ctx.fillStyle = $props.color1\n drawBand(ctx, layout, view, 1, 2)\n \n ctx.fillStyle = $props.color1dark\n drawBand(ctx, layout, view, 2, 3)\n \n ctx.fillStyle = $props.color2dark\n drawBand(ctx, layout, view, 4, 5)\n \n ctx.fillStyle = $props.color2\n drawBand(ctx, layout, view, 5, 6)\n \n }\n \n \n drawBand(ctx, layout, view, i1, i2) {\n let data = $core.view.src\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[i1] || undefined)\n ctx.lineTo(x, y)\n }\n for (var i = view.i2, i1 = view.i1; i \u003E= i1; i--) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[i2] || undefined)\n ctx.lineTo(x, y)\n }\n ctx.fill()\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [\n [x[1], $props.color1], [x[2], $props.color1], [x[3], $props.color1],\n [x[4], $props.color2], [x[5], $props.color2], [x[6], $props.color2]\n ]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Fl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ESimple trades\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Cdir\u003E, \u003Cprice\u003E, \u003C?label\u003E]\n \u002F\u002F \u003Cdir\u003E :: 1 for buy -1 for sell\n \u002F\u002F \u003Cprice\u003E :: trade price\n \u002F\u002F \u003C?label\u003E :: trade label\n [OVERLAY name=Trades, ctx=Canvas, version=1.0.0]\n \n prop('buyColor', { type: 'color', def: '#08b2c6' })\n prop('sellColor', { type: 'color', def: '#e42633' })\n prop('radius', { type: 'number', def: 4 })\n prop('showLabels', { type: 'boolean', def: true })\n prop('markerOutline', { type: 'boolean', def: true })\n prop('outlineWidth', { type: 'number', def: 4 })\n \n \u002F\u002F Draw function (called on each update)\n \u002F\u002F Library provides a lot of useful variables to make\n \u002F\u002F overlays ($core in the main collection)\n draw(ctx) {\n ctx.lineWidth = $props.outlineWidth\n const layout = $core.layout\n const data = $core.data \u002F\u002F Full dataset\n const view = $core.view \u002F\u002F Visible view\n \n \u002F\u002F Outline\n if ($props.markerOutline) {\n ctx.strokeStyle = $core.colors.back\n ctx.beginPath()\n iterArcs(ctx, view, data, layout)\n ctx.stroke()\n }\n \n \u002F\u002F Fill sell trades\n ctx.fillStyle = $props.buyColor\n ctx.beginPath()\n iterArcs(ctx, view, data, layout, -1)\n ctx.fill()\n \n \u002F\u002F Fill buy trades\n ctx.fillStyle = $props.sellColor\n ctx.beginPath()\n iterArcs(ctx, view, data, layout, 1)\n ctx.fill()\n \n \u002F\u002F Draw labels\n if ($props.showLabels) {\n ctx.fillStyle = $core.colors.textHL\n ctx.font = $core.props.config.FONT\n ctx.textAlign = 'center'\n drawLabels(ctx, view, data, layout)\n }\n \n }\n \n \u002F\u002F Iter through arcs\n iterArcs(ctx, view, data, layout, dir) {\n const radius = $props.radius\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n if (Math.sign(p[1]) === dir) continue\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[2])\n ctx.moveTo(x+radius, y)\n ctx.arc(x, y, radius, 0, Math.PI * 2, false)\n }\n }\n \n \u002F\u002F Draw simple lables\n drawLabels(ctx, view, data, layout) {\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[2])\n ctx.fillText(p[3], x, y - 25)\n }\n }\n \n \u002F\u002F Sample data point with index 2\n static preSampler(x) =\u003E x[2]\n \n \u002F\u002F Not affecting the y-range\n static yRange() =\u003E null\n \n \u002F\u002F Legend formatter, Array of [value, color] pairs\n \u002F\u002F x represents one data item e.g. [\u003Ctime\u003E, \u003Cvalue\u003E]\n legend(x) {\n if (x[1] \u003E 0) {\n return [\n ['Buy', $props.buyColor],\n [x[2], $core.colors.text],\n [x[3]]\n ]\n } else {\n return [\n ['Sell', $props.sellColor],\n [x[2], $core.colors.text],\n [x[3]]\n ]\n }\n }\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Pl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ERegular volume\u003C\u002Fds\u003E \n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Cvolume\u003E, \u003Cdirection\u003E]\n \u002F\u002F \u003Cdirection\u003E :: 1 for green volume, - 1 for red volume\n \n [OVERLAY name=Volume, ctx=Canvas, verion=1.0.0]\n \n \u002F\u002F Overlay props\n prop('colorVolUp', { type: 'color', def: '#41a37682' })\n prop('colorVolDw', { type: 'color', def: '#de464682' })\n prop('barsHeight', { type: 'number', def: 0.15, step: 0.1 })\n prop('currencySymbol', { type: 'string', def: '
})\n prop('showAvgVolume', { type: 'boolean', def: true })\n prop('avgVolumeSMA', { type: 'number', def: 20 })\n prop('colorAvgVol', { type: 'color', def: '#17e2bb99'})\n \n \u002F\u002F Draw call\n draw(ctx) {\n \n let height = $core.id === 0 ? 0.8 : $props.barsHeight\n let cnv = $lib.layoutCnv($core, false, true, 1, 2, height)\n let bars = cnv.upVolbars.length ? cnv.upVolbars : cnv.dwVolbars\n if (!bars.length) return\n \n drawCvPart(ctx, $lib.volumeBar, cnv.dwVolbars, 'colorVolDw')\n drawCvPart(ctx, $lib.volumeBar, cnv.upVolbars, 'colorVolUp')\n \n if ($props.showAvgVolume) $lib.avgVolume(ctx, $core, $props, cnv, 1)\n }\n \n \u002F\u002F Draw candle part\n drawCvPart(ctx, f, arr, color) {\n let layout = $core.layout\n ctx.strokeStyle = $props[color]\n ctx.beginPath()\n for (var i = 0, n = arr.length; i \u003C n; i++) {\n f(ctx, arr[i], layout)\n }\n ctx.stroke()\n }\n \n \u002F\u002F Custom y-range\n yRange(data, hi, lo) {\n \u002F\u002F Remove this overlay for yRange calculation\n \u002F\u002F if it's not the main overlay of the pane\n if ($core.id !== 0) {\n return null\n } else {\n return [hi, lo, false]\n }\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) {\n let v = $core.cursor.getValue($core.paneId, $core.id)\n let sym = $props.currencySymbol\n let color = v[2] \u003E 0 ?\n $props.colorVolUp : $props.colorVolDw\n let fc = $lib.formatCash\n return [[sym + fc(x[1]), color.slice(0, 7)]]\n }\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Nl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003EVolume bars with delta ( = buyVol - sellVol)\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003CbuyVol\u003E, \u003CsellVol\u003E, \u003Ctotal\u003E, \u003Cdelta\u003E]\n \n [OVERLAY name=VolumeDelta, ctx=Canvas, verion=1.0.0]\n \n \u002F\u002F Overlay props\n prop('colorVolUp', { type: 'color', def: '#41a37682' })\n prop('colorVolDw', { type: 'color', def: '#de464682' })\n prop('colorVolDeltaUp', { type: 'color', def: '#41a376' })\n prop('colorVolDeltaDw', { type: 'color', def: '#de4646' })\n prop('barsHeight', { type: 'number', def: 0.15, step: 0.1 })\n \n \u002F\u002F Draw call\n draw(ctx) {\n \n let height = $core.id === 0 ? 0.8 : $props.barsHeight\n let cnv = $lib.layoutCnv($core, false, true, 1, 4, height)\n let bars = cnv.upVolbars.length ? cnv.upVolbars : cnv.dwVolbars\n if (!bars.length) return\n \n drawCvPart(ctx, $lib.volumeBar, cnv.dwVolbars, 'colorVolDw')\n drawCvPart(ctx, $lib.volumeBar, cnv.upVolbars, 'colorVolUp')\n \n let dwDelta = makeDelta(cnv.dwVolbars)\n let upDelta = makeDelta(cnv.upVolbars)\n \n drawCvPart(ctx, $lib.volumeBar, dwDelta, 'colorVolDeltaDw')\n drawCvPart(ctx, $lib.volumeBar, upDelta, 'colorVolDeltaUp')\n \n }\n \n \u002F\u002F Draw candle part\n drawCvPart(ctx, f, arr, color) {\n let layout = $core.layout\n ctx.strokeStyle = $props[color]\n ctx.beginPath()\n for (var i = 0, n = arr.length; i \u003C n; i++) {\n f(ctx, arr[i], layout)\n }\n ctx.stroke()\n }\n \n makeDelta(bars) {\n let delta = []\n for (var bar of bars) {\n let src = bar.src\n let k = Math.abs(src[4]) \u002F src[3]\n bar.h = bar.h * k\n delta.push(bar)\n }\n return delta\n }\n \n \u002F\u002F Custom y-range\n yRange(data, hi, lo) {\n \u002F\u002F Remove this overlay for yRange calculation\n \u002F\u002F if it's not the main overlay of the pane\n if ($core.id !== 0) {\n return null\n } else {\n return [hi, lo, false]\n }\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legendHtml(x) {\n let v = $core.cursor.getValue($core.paneId, $core.id)\n let sym = $props.currencySymbol\n let color1 = $core.colors.text\n let color2 = v[4] \u003E 0 ?\n $props.colorVolDeltaUp : $props.colorVolDeltaDw\n let fc = $lib.formatCash\n let sign = v[4] \u003E 0 ? '+' : ''\n return \\`\n \u003Cspan style=\"color: \\${color2}\"\u003E\n \u003Cspan style=\"margin-left: 3px;\"\u003E\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EB\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${fc(x[1])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003ES\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${fc(x[2])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EΣ\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${fc(x[3])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EΔ\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${sign}\\${fc(x[4])}\u003C\u002Fspan\u003E\n \\`\n \u002F\u002Freturn [[sym + fc(x[1]), color.slice(0, 7)]]\n }\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Bl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F NavyJS ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003EArea chart\u003C\u002Fds\u003E, format: [\u003Ctimestamp\u003E, \u003Cvalue\u003E]\n \n [OVERLAY name=Area, ctx=Canvas, version=1.0.0]\n \n \u002F\u002F Define new props\n prop('color', { type: 'color', def: '#31ce31' })\n prop('lineWidth', { type: 'number', def: 1.25 })\n prop('back1', { type: 'color', def: $props.color + '15' })\n prop('back2', { type: 'color', def: $props.color + '01' })\n prop('dataIndex', { type: 'integer', def: 1 })\n \n draw(ctx) {\n \n const layout = $core.layout\n const data = $core.data \u002F\u002F Full dataset\n const view = $core.view \u002F\u002F Visible view\n const idx = $props.dataIndex\n const grd = ctx.createLinearGradient(0, 0, 0, layout.height)\n grd.addColorStop(0, $props.back1)\n grd.addColorStop(1, $props.back2)\n \n \u002F\u002F Line\n ctx.lineWidth = $props.lineWidth\n ctx.strokeStyle = $props.color\n ctx.lineJoin = \"round\"\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[idx])\n ctx.lineTo(x, y)\n }\n ctx.stroke()\n \n \u002F\u002F Area\n ctx.fillStyle = grd\n ctx.beginPath()\n let p0 = (data[0] || [])[0]\n let pN = (data[data.length - 1] || [])[0]\n ctx.lineTo(layout.ti2x(p0, 0), layout.height)\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[idx])\n ctx.lineTo(x, y)\n }\n ctx.lineTo(layout.ti2x(pN, i - 1), layout.height)\n ctx.fill()\n \n }\n \n \u002F\u002F Precision sampling\n preSampler(x) =\u003E [x[$props.dataIndex]]\n \n \u002F\u002F Map data item to OHLC (for candle magnets etc.)\n \u002F\u002F Here we simulate a candle with 0 height\n ohlc(x) =\u003E Array(4).fill(x[$props.dataIndex])\n \n \u002F\u002F Legend, defined as pairs [value, color]\n yRange(data) {\n let di = $props.dataIndex\n let len = data.length\n var h, l, high = -Infinity, low = Infinity\n for(var i = 0; i \u003C len; i++) {\n let point = data[i][di]\n if (point \u003E high) high = point\n if (point \u003C low) low = point\n }\n return [high, low]\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[x[$props.dataIndex], $props.color]]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n El = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F NavyJS ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003EStandart japanese candles\u003C\u002Fds\u003E, format:\n \u002F\u002F [\u003Ctimestamp\u003E, \u003Copen\u003E, \u003Chigh\u003E, \u003Clow\u003E, \u003Cclose\u003E, \u003C?volume\u003E]\n \n [OVERLAY name=Candles, ctx=Canvas, version=1.0.0]\n \n \u002F\u002F Define the props\n prop('colorBodyUp', { type: 'color', def: $core.colors.candleUp })\n prop('colorBodyDw', { type: 'color', def: $core.colors.candleDw })\n prop('colorWickUp', { type: 'color', def: $core.colors.wickUp })\n prop('colorWickDw', { type: 'color', def: $core.colors.wickDw })\n prop('colorVolUp', { type: 'color', def: $core.colors.volUp })\n prop('colorVolDw', { type: 'color', def: $core.colors.volDw })\n prop('showVolume', { type: 'boolean', def: true })\n prop('currencySymbol', { type: 'string', def: '
})\n prop('showAvgVolume', { type: 'boolean', def: true })\n prop('avgVolumeSMA', { type: 'number', def: 20 })\n prop('colorAvgVol', { type: 'color', def: '#1cccb777'})\n prop('scaleSymbol', { type: 'string|boolean', def: false })\n prop('priceLine', { type: 'boolean', def: true })\n prop('showValueTracker', { type: 'boolean', def: true })\n \n \n \u002F\u002F Draw call\n draw(ctx) {\n \n let cnv = $lib.layoutCnv($core, true, $props.showVolume)\n let bodies = cnv.upBodies.length ? cnv.upBodies : cnv.dwBodies\n if (!bodies.length) return\n let w = Math.max(bodies[0].w, 1)\n \n drawCvPart(ctx, $lib.candleWick, cnv.dwWicks, 1, 'colorWickDw')\n drawCvPart(ctx, $lib.candleWick, cnv.upWicks, 1, 'colorWickUp')\n drawCvPart(ctx, $lib.candleBody, cnv.dwBodies, w, 'colorBodyDw')\n drawCvPart(ctx, $lib.candleBody, cnv.upBodies, w, 'colorBodyUp')\n drawCvPart(ctx, $lib.volumeBar, cnv.dwVolbars, w, 'colorVolDw')\n drawCvPart(ctx, $lib.volumeBar, cnv.upVolbars, w, 'colorVolUp')\n \n if ($props.showVolume && $props.showAvgVolume) {\n $lib.avgVolume(ctx, $core, $props, cnv)\n }\n \n }\n \n \u002F\u002F Draw candle part\n drawCvPart(ctx, f, arr, w, color) {\n let layout = $core.layout\n ctx.lineWidth = w\n ctx.strokeStyle = $props[color]\n ctx.beginPath()\n for (var i = 0, n = arr.length; i \u003C n; i++) {\n f(ctx, arr[i], layout)\n }\n ctx.stroke()\n }\n \n \u002F\u002F Define y-range (by finding max High, min Low)\n static yRange(data) {\n let len = data.length\n var h, l, high = -Infinity, low = Infinity\n for(var i = 0; i \u003C len; i++) {\n let point = data[i]\n if (point[2] \u003E high) high = point[2]\n if (point[3] \u003C low) low = point[3]\n }\n return [high, low]\n }\n \n \u002F\u002F Use [Open, Close] for precision detection\n static preSampler(x) =\u003E [x[1], x[4]]\n \n \u002F\u002F Map data item to OHLC (for candle magnets etc.)\n ohlc(x) =\u003E [x[1], x[2], x[3], x[4]]\n \n \u002F\u002F Price label + Scale symbol + price line\n valueTracker(x) =\u003E {\n show: $props.showValueTracker,\n symbol: $props.scaleSymbol,\n line: $props.priceLine,\n color: $lib.candleColor($props, $core.data[$core.data.length - 1]),\n value: x[4] \u002F\u002F close\n }\n \n \u002F\u002F Define the OHLCV legend\n legendHtml(x, prec, f) {\n let color1 = $core.colors.text\n let v = $core.cursor.getValue($core.paneId, $core.id)\n let sym = $props.currencySymbol\n let color2 = v[4] \u003E= v[1] ?\n $props.colorBodyUp : $props.colorBodyDw\n let fc = $lib.formatCash\n return \\`\n \u003Cspan style=\"color: \\${color2}\"\u003E\n \u003Cspan style=\"margin-left: 3px;\"\u003E\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EO\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[1])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EH\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[2])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EL\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[3])}\u003C\u002Fspan\u003E\n \u003Cspan style=\"color: \\${color1}\"\u003EC\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${f(x[4])}\u003C\u002Fspan\u003E\n \\`\n + ($props.showVolume ? \\`\n \u003Cspan style=\"color: \\${color1}\"\u003EV\u003C\u002Fspan\u003E\n \u003Cspan class=\"nvjs-ll-value\"\u003E\\${sym+fc(x[5])}\u003C\u002Fspan\u003E\\` : \\`\\`)\n + \\`\u003C\u002Fspan\u003E\\`\n }\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n _l = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F NavyJS ~ 0.2-lite\n \n \u002F\u002F \u003Cds\u003ESingle spline\u003C\u002Fds\u003E\n \u002F\u002F Format: [\u003Ctimestamp\u003E, \u003Cnumber\u003E]\n \n [OVERLAY name=Spline, ctx=Canvas, version=1.1.0]\n \n \u002F\u002F Define new props\n prop('color', { type: 'color', def: '#31ce31' })\n prop('lineWidth', { type: 'number', def: 1 })\n prop('dataIndex', { type: 'integer', def: 1 })\n \n \n draw(ctx) {\n ctx.lineWidth = $props.lineWidth\n ctx.lineJoin = \"round\"\n ctx.strokeStyle = $props.color\n ctx.beginPath()\n const layout = $core.layout\n const data = $core.data \u002F\u002F Full dataset\n const view = $core.view \u002F\u002F Visible view\n const idx = $props.dataIndex\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[idx])\n ctx.lineTo(x, y)\n }\n ctx.stroke()\n }\n \n \u002F\u002F Price label + Scale symbol + price line\n \u002F*valueTracker(x) =\u003E {\n show: true,\n symbol: $core.src.name,\n line: true,\n color: $props.color,\n value: x[$props.dataIndex]\n }*\u002F\n \n preSampler(x) =\u003E [x[$props.dataIndex]]\n \n \u002F\u002F Map data item to OHLC (for candle magnets etc.)\n \u002F\u002F Here we simulate a candle with 0 height\n ohlc(x) =\u003E Array(4).fill(x[$props.dataIndex])\n \n yRange(data) {\n let di = $props.dataIndex\n let len = data.length\n var h, l, high = -Infinity, low = Infinity\n for(var i = 0; i \u003C len; i++) {\n let point = data[i][di]\n if (point \u003E high) high = point\n if (point \u003C low) low = point\n }\n return [high, low]\n }\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[x[$props.dataIndex], $props.color]]\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Ol = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ETime & value measurment tool [Shift+Click]\u003C\u002Fds\u003E\n \n [OVERLAY name=RangeTool, ctx=Canvas, verion=1.0.1, author=GPT4]\n \n let pin1 = null \n let pin2 = null \n let shift = false\n let state = 'idle'\n \n draw(ctx) {\n const layout = $core.layout \n \n if (pin1 && pin2) {\n const x1 = layout.time2x(pin1.t) \u002F\u002F time to x coordinate\n const x2 = layout.time2x(pin2.t) \u002F\u002F time to x coordinate\n const y1 = layout.value2y(pin1.v) \u002F\u002F value to y coordinate\n const y2 = layout.value2y(pin2.v) \u002F\u002F value to y coordinate\n \n \u002F\u002F change fill color based on percentage\n let color = percent() \u003E= 0 ? '#3355ff' : '#ff3333';\n ctx.fillStyle = color + '33';\n ctx.fillRect(x1, y1, x2 - x1, y2 - y1)\n \n \u002F\u002F draw arrows in the middle of rectangle\n let midX = (x1 + x2) \u002F 2;\n let midY = (y1 + y2) \u002F 2;\n $lib.drawArrow(ctx, midX, y1, midX, y2, color, Math.abs(y2 - y1) \u003E 42); \n $lib.drawArrow(ctx, x1, midY, x2, midY, color, Math.abs(x2 - x1) \u003E 42); \n \n \u002F\u002F draw rounded rectangle with text\n const text1 = \\`\\${deltaValue().toFixed(2)} (\\${percent().toFixed(2)}%)\\`;\n const text2 = \\`\\${bars()} bars, \\${timeText()}\\`;\n const text = \\`\\${text1}\\\\n\\${text2}\\`;\n const textWidth = ctx.measureText(text).width;\n \n const padding = 10;\n const mainRectCenterX = (x1 + x2) \u002F 2; \u002F\u002F calculate center of the main rectangle\n const roundRectX = mainRectCenterX - textWidth \u002F 2 - padding; \u002F\u002F center the text rectangle relative to the main rectangle\n const roundRectWidth = textWidth + 2 * padding;\n const roundRectHeight = 50; \u002F\u002F adjust as needed\n const roundRectY = percent() \u003E 0 ? Math.min(y1, y2) - roundRectHeight - padding : Math.max(y1, y2) + padding;\n const roundRectRadius = 5; \u002F\u002F adjust as needed\n ctx.fillStyle = color + 'cc';\n $lib.roundRect(ctx, roundRectX, roundRectY, roundRectWidth, roundRectHeight, roundRectRadius);\n \n \u002F\u002F draw text\n ctx.fillStyle = '#ffffffcc' \u002F\u002F color;\n ctx.font = $lib.rescaleFont($core.props.config.FONT, 14);\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillText(text1, roundRectX + roundRectWidth \u002F 2, roundRectY + roundRectHeight \u002F 4);\n ctx.fillText(text2, roundRectX + roundRectWidth \u002F 2, roundRectY + 3 * roundRectHeight \u002F 4);\n \n }\n }\n \n \u002F\u002F Calculate the percentage of the are between pins v-values\n \u002F\u002F assuming that pin2 is above pin1 equals positive value\n \u002F\u002F and negative otherwise\n percent() {\n if (pin1 && pin2) {\n let delta = pin2.v - pin1.v;\n return (delta \u002F pin1.v) * 100;\n }\n return 0;\n }\n \n \u002F\u002F Calculate delta time between pins t-values\n \u002F\u002F assuming that pin2 on the right of pin1 equals positive value\n \u002F\u002F and negative otherwise\n deltaTime() {\n if (pin1 && pin2) {\n return pin2.t - pin1.t\n }\n return 0\n }\n \n \u002F\u002F Calculate delta value between pins v-values\n \u002F\u002F assuming that pin2 is above pin1 equals positive value\n \u002F\u002F and negative otherwise\n deltaValue() {\n if (pin1 && pin2) {\n return pin2.v - pin1.v\n }\n return 0\n }\n \n \u002F\u002F Delta time in bars\n bars() {\n let data = $core.hub.mainOv.dataSubset\n if (pin1 && pin2) {\n const layout = $core.layout\n const bars = data.filter(bar =\u003E {\n return bar[0] \u003E= Math.min(pin1.t, pin2.t) && bar[0] \u003C= Math.max(pin1.t, pin2.t)\n });\n let count = bars.length - 1; \u002F\u002F reduce the count by 1\n return pin2.t \u003C pin1.t ? -count : count; \u002F\u002F make it negative if pin2.t \u003C pin1.t\n }\n return 0\n }\n \n \u002F\u002F Delta time in text format\n timeText() {\n let deltaTimeMs = deltaTime(); \u002F\u002F returns delta time in milliseconds\n let timeFrameMs = $core.props.timeFrame; \u002F\u002F returns current chart timeframe in milliseconds\n \n let negative = deltaTimeMs \u003C 0;\n deltaTimeMs = Math.abs(deltaTimeMs);\n \n let minutes = Math.floor((deltaTimeMs \u002F (1000 * 60)) % 60);\n let hours = Math.floor((deltaTimeMs \u002F (1000 * 60 * 60)) % 24);\n let days = Math.floor(deltaTimeMs \u002F (1000 * 60 * 60 * 24));\n \n let result = \"\";\n if (days \u003E 0) {\n result += days + \"d \";\n }\n if ((hours \u003E 0 || days \u003E 0) && hours !== 0) {\n result += hours + \"h \";\n }\n if (minutes \u003E 0 && timeFrameMs \u003C 60 * 60 * 1000 && minutes !== 0) {\n result += minutes + \"m\";\n }\n \n return (negative ? '-' : '') + result.trim();\n }\n \n \n \n keydown(event) {\n if (event.key === 'Shift') {\n shift = true\n }\n }\n \n keyup(event) {\n if (event.key === 'Shift') {\n shift = false\n }\n }\n \n mousedown(event) {\n const layout = $core.layout \n if (state === 'idle' && shift) {\n \u002F\u002F Create the first pin \n pin1 = {\n t: $core.cursor.time,\n v: layout.y2value(event.layerY)\n }\n pin2 = { ...pin1 }\n state = 'drawing'\n } else if (state === 'drawing') {\n state = 'finished'\n } else if (state === 'finished') {\n state = 'idle'\n pin1 = null \n pin2 = null \n }\n $events.emitSpec('chart', 'update-layout')\n }\n \n mousemove(event) {\n if (state === 'drawing') {\n const layout = $core.layout \n \u002F\u002F Create the second pin \n pin2 = {\n t: $core.cursor.time,\n v: layout.y2value(event.layerY)\n }\n }\n }\n \n \u002F\u002F Disable legend by returning null\n legend() =\u003E null\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Ul = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EArnaud Legoux Moving Average\u003C\u002Fds\u003E\n \n [INDICATOR name=ALMA, version=1.0.0]\n \n prop('length', { type: 'integer', def: 10 })\n prop('offset', { type: 'number', def: 0.9 })\n prop('sigma', { type: 'number', def: 5 })\n prop('color', { type: 'color', def: '#559de0' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n let $ = $props\n \n this.specs = {\n name: \\`ALMA \\${$.length} \\${$.offset} \\${$.sigma}\\`,\n props: {\n color: $props.color,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n let offset = $props.offset\n let sigma = $props.sigma\n \n Spline(alma(close, length, offset, sigma), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Dl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EAverage True Range\u003C\u002Fds\u003E\n \n [INDICATOR name=ATR, version=1.0.0]\n \n prop('length', { type: 'integer', def: 15 })\n prop('color', { type: 'color', def: '#e52468' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: 'ATR ' + $props.length,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Spline(atr($props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n jl = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EAverage True Range, percentage\u003C\u002Fds\u003E\n \n [INDICATOR name=ATRp, version=1.0.0]\n \n prop('length', { type: 'integer', def: 15 })\n prop('color', { type: 'color', def: '#f44336' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: 'ATR% ' + $props.length,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let k = 100 \u002F close[0]\n Spline(atr($props.length)[0] * k, this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Ql = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EBollinger Bands\u003C\u002Fds\u003E\n \n [INDICATOR name=BB, version=1.0.0]\n \n prop('length', { type: 'integer', def: 21 })\n prop('stddev', { type: 'number', def: 2 })\n prop('color', { type: 'color', def: '#2cc6c9ab' })\n prop('backColor', { type: 'color', def: '#2cc6c90a' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`BB \\${$props.length} \\${$props.stddev}\\`,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n let stddev = $props.stddev\n let [m, h, l] = bb(close, length, stddev)\n Band([h[0], m[0], l[0]], this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n $l = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EBollinger Bands Width\u003C\u002Fds\u003E\n \n [INDICATOR name=BBW, version=1.0.0]\n \n prop('length', { type: 'integer', def: 21 })\n prop('stddev', { type: 'number', def: 2 })\n prop('color', { type: 'color', def: '#2cc6c9ab' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`BBW \\${$props.length} \\${$props.stddev}\\`,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n let stddev = $props.stddev\n Spline(bbw(close, length, stddev), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ql = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ECommodity Channel Index\u003C\u002Fds\u003E\n \n [INDICATOR name=CCI, version=1.0.0]\n \n prop('length', { type: 'integer', def: 21 })\n prop('upperBand', { type: 'number', def: 100 })\n prop('lowerBand', { type: 'number', def: -100 })\n prop('color', { type: 'color', def: '#e28a3dee' })\n prop('backColor', { type: 'color', def: '#e28a3d11' })\n prop('bandColor', { type: 'color', def: '#999999' })\n prop('prec', { type: 'integer', def: 2 })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: 'CCI ' + $props.length,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n bandColor: $props.bandColor,\n upperBand: $props.upperBand,\n lowerBand: $props.lowerBand,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Range(cci(close, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n es = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EChande Momentum Oscillator\u003C\u002Fds\u003E\n \n [INDICATOR name=CMO, version=1.0.0]\n \n prop('length', { type: 'integer', def: 10 })\n prop('color', { type: 'color', def: '#559de0' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`CMO \\${$props.length}\\`,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n Spline(cmo(close, length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ts = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ECenter of Gravity\u003C\u002Fds\u003E\n \n [INDICATOR name=COG, version=1.0.0]\n \n prop('length', { type: 'integer', def: 10 })\n prop('color', { type: 'color', def: '#559de0' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`COG \\${$props.length}\\`,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n Spline(cog(close, length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ns = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EDirectional Movement Index\u003C\u002Fds\u003E\n \n [INDICATOR name=DMI, version=1.0.0]\n \n prop('length', { type: 'integer', def: 15 })\n prop('smooth', { type: 'integer', def: 15 })\n prop('color1', { type: 'color', def: \"#ef1360\" })\n prop('color2', { type: 'color', def: \"#3782f2\" })\n prop('color3', { type: 'color', def: \"#f48709\" })\n prop('prec', { type: 'integer', def: 2 })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`DMI \\${$props.length} \\${$props.smooth}\\`,\n props: {\n colors: [$props.color1, $props.color2, $props.color3]\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let [adx, dp, dn] = dmi($props.length, $props.smooth)\n Splines([adx[0], dp[0], dn[0]], this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n is = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EExponential Moving Average\u003C\u002Fds\u003E\n \n [INDICATOR name=EMA, version=1.0.0]\n \n prop('length', { type: 'integer', def: 12 })\n prop('color', { type: 'color', def: '#f7890c' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`EMA \\${$props.length}\\`,\n props: {\n color: $props.color,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Spline(ema(close, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n os = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EHull Moving Average\u003C\u002Fds\u003E\n \n [INDICATOR name=HMA, version=1.0.0]\n \n prop('length', { type: 'integer', def: 10 })\n prop('color', { type: 'color', def: '#3af475' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`HMA \\${$props.length}\\`,\n props: {\n color: $props.color,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Spline(hma(close, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ls = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EIchimoku Cloud\u003C\u002Fds\u003E\n \n [INDICATOR name=Ichimoku, version=1.0.0]\n \n prop('convLength', { type: 'integer', def: 9 })\n prop('baseLength', { type: 'integer', def: 26 })\n prop('laggingLength', { type: 'integer', def: 52 })\n prop('displacement', { type: 'integer', def: 26 })\n prop('cloudUpColor', { type: 'color', def: '#79ffde18' })\n prop('cloudDwColor', { type: 'color', def: '#ff246c18' })\n prop('convColor', { type: 'color', def: '#4eb6d8' })\n prop('baseColor', { type: 'color', def: '#d626a1' })\n prop('laggingColor', { type: 'color', def: '#66cc66' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = ({name, props}) =\u003E ({\n name: name,\n props: props,\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n })\n \n [UPDATE]\n \n let $ = $props\n let donchian = (len, id) =\u003E ts(\n avg(lowest(low, len)[0], highest(high, len)[0]), id\n )\n let conversionLine = donchian($.convLength, 1)\n let baseLine = donchian($.baseLength, 2)\n let leadLine1 = ts(avg(conversionLine[0], baseLine[0]))\n let leadLine2 = donchian($.laggingLength, 3)\n let lagging = ts(close[0])\n offset(leadLine1, $.displacement - 1)\n offset(leadLine2, $.displacement - 1)\n offset(lagging, -$.displacement + 1)\n \n Cloud([leadLine1, leadLine2], this.specs({\n name: \\`Cloud\\`,\n props: {\n back1: $props.cloudUpColor,\n back2: $props.cloudDwColor\n }\n }))\n \n Splines([conversionLine, baseLine], this.specs({\n name: \\`Base Lines \\${$.convLength} \\${$.baseLength}\\`,\n props: {\n colors: [\n $props.convColor,\n $props.baseColor\n ]\n }\n }))\n \n Spline(lagging, this.specs({\n name: \\`Lagging Span \\${$.laggingLength}\\`,\n props: {\n color: $props.laggingColor\n }\n }))\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ss = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EKeltner Channels\u003C\u002Fds\u003E\n \n [INDICATOR name=KC, version=1.0.0]\n \n prop('length', { type: 'integer', def: 20 })\n prop('mult', { type: 'number', def: 1 })\n prop('trueRange', { type: 'boolean', def: true })\n prop('color', { type: 'color', def: '#4c8dffab' })\n prop('backColor', { type: 'color', def: '#4c8dff0a' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`KC \\${$props.length} \\${$props.mult}\\`,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n let [m, h, l] = kc(close, $.length, $.mult, $.trueRange)\n Band([h[0], m[0], l[0]], this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n rs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EKeltner Channels Width\u003C\u002Fds\u003E\n \n [INDICATOR name=KCW, version=1.0.0]\n \n prop('length', { type: 'integer', def: 20 })\n prop('mult', { type: 'number', def: 1 })\n prop('trueRange', { type: 'boolean', def: true })\n prop('color', { type: 'color', def: '#4c8dffab' })\n prop('backColor', { type: 'color', def: '#4c8dff0a' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`KCW \\${$props.length} \\${$props.mult}\\`,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n let w = kcw(close, $.length, $.mult, $.trueRange)\n Spline(w, this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n as = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EMoving Average Convergence\u002FDivergence\u003C\u002Fds\u003E\n \n [INDICATOR name=MACD, version=1.0.0]\n \n prop('fast', { type: 'integer', def: 12 })\n prop('slow', { type: 'integer', def: 26 })\n prop('smooth', { type: 'integer', def: 9 })\n prop('colorMacd', { type: 'color', def: '#3782f2' })\n prop('colorSignal', { type: 'color', def: '#f48709' })\n prop('colorUp', { type: 'Color', def: '#35a776' })\n prop('colorDw', { type: 'Color', def: '#e54150' })\n prop('colorSemiUp', { type: 'Color', def: '#79e0b3' })\n prop('colorSemiDw', { type: 'Color', def: '#ea969e' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n let $ = $props\n this.specs = {\n name: \\`MACD \\${$.fast} \\${$.slow} \\${$.smooth}\\`,\n props: {\n colorValue: $.colorMacd,\n colorSignal: $.colorSignal,\n colorUp: $.colorUp,\n colorDw: $.colorDw,\n colorSemiUp: $.colorSemiUp,\n colorSemiDw: $.colorSemiDw\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n let [m, s, h] = macd(close, $.fast, $.slow, $.smooth)\n \n Histogram([h[0], m[0], s[0]], this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n cs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EMoney Flow Index\t\u003C\u002Fds\u003E\n \n [INDICATOR name=MFI, version=1.0.0]\n \n prop('length', { type: 'integer', def: 14 })\n prop('upperBand', { type: 'number', def: 80 })\n prop('lowerBand', { type: 'number', def: 20 })\n prop('color', { type: 'color', def: '#85c427ee' })\n prop('backColor', { type: 'color', def: '#85c42711' })\n prop('bandColor', { type: 'color', def: '#999999' })\n prop('prec', { type: 'integer', def: 2 })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: 'MFI ' + $props.length,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n bandColor: $props.bandColor,\n upperBand: $props.upperBand,\n lowerBand: $props.lowerBand,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let hlc3 = ts((high[0] + low[0] + close[0]) \u002F 3)\n Range(mfi(hlc3, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ds = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EMomentum\u003C\u002Fds\u003E\n \n [INDICATOR name=MOM, version=1.0.0]\n \n prop('length', { type: 'integer', def: 11 })\n prop('color', { type: 'color', def: '#bcc427ee' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`MOM \\${$props.length}\\`,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n Spline(mom(close, length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ps = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ERate of Change\u003C\u002Fds\u003E\n \n [INDICATOR name=ROC, version=1.0.0]\n \n prop('length', { type: 'integer', def: 9 })\n prop('color', { type: 'color', def: '#279fc4' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`ROC \\${$props.length}\\`,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let length = $props.length\n Spline(roc(close, length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n us = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ERelative Strength Index\u003C\u002Fds\u003E\n \n [INDICATOR name=RSI, version=1.0.0]\n \n prop('length', { type: 'integer', def: 14 })\n prop('color', { type: 'color', def: '#3399ff' })\n prop('prec', { type: 'integer', def: 2 })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: 'RSI ' + $props.length,\n props: {\n color: $props.color\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Range(rsi(close, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n hs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EExponential Moving Average Ribbon\u003C\u002Fds\u003E\n \n [INDICATOR name=Ribbon, version=1.0.0]\n \n prop('start', { type: 'integer', def: 10 })\n prop('number', { type: 'integer', def: 5 })\n prop('step', { type: 'integer', def: 10 })\n prop('colors', { type: 'array', def: [\"#3aaaf4ee\"] })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`EMA x \\${$props.number}\\`,\n props: {\n colors: $props.colors,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n let arr = []\n for (var i = 0; i \u003C $.number; i++) {\n let l = $.start + i * $.step\n arr.push(ema(close, l)[0])\n }\n \n Splines(arr, this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n fs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EParabolic SAR\u003C\u002Fds\u003E\n \n [INDICATOR name=SAR, version=1.0.0]\n \n prop('start', { type: 'number', def: 0.02 })\n prop('inc', { type: 'number', def: 0.02 })\n prop('max', { type: 'number', def: 0.2 })\n prop('color', { type: 'color', def: '#35a9c6' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n let $ = $props\n this.specs = {\n name: \\`SAR \\${$.start} \\${$.inc} \\${$.max}\\`,\n props: {\n color: $props.color,\n shape: 'cross'\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n Sparse(sar($.start, $.inc, $.max), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ms = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ESimple Moving Average\u003C\u002Fds\u003E\n \n [INDICATOR name=SMA, version=1.0.0]\n \n prop('length', { type: 'integer', def: 12 })\n prop('color', { type: 'color', def: '#d1385c' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`SMA \\${$props.length}\\`,\n props: {\n color: $props.color,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Spline(sma(close, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n gs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ESymmetrically Weighted Moving Average\u003C\u002Fds\u003E\n \n [INDICATOR name=SWMA, version=1.0.0]\n \n prop('color', { type: 'color', def: '#e57440' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`SWMA\\`,\n props: {\n color: $props.color,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Spline(swma(close), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n ys = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EStochastic\u003C\u002Fds\u003E, format: [\u003Ctimestamp\u003E, \u003CkLine\u003E, \u003CdLine\u003E]\n \n [OVERLAY name=Stoch, version=1.0.0]\n \n prop('kColor', { type: 'color', def: '#3782f2' })\n prop('dColor', { type: 'color', def: '#f48709' })\n prop('bandColor', { type: 'color', def: '#535559' })\n prop('backColor', { type: 'color', def: '#381e9c16' })\n prop('upperBand', { type: 'number', def: 80 })\n prop('lowerBand', { type: 'number', def: 20 })\n \n draw(ctx) {\n const layout = $core.layout\n const upper = layout.value2y($props.upperBand)\n const lower = layout.value2y($props.lowerBand)\n const data = $core.data\n const view = $core.view\n \n \u002F\u002F K\n ctx.lineWidth = 1\n ctx.strokeStyle = $props.kColor\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[1])\n ctx.lineTo(x, y)\n }\n ctx.stroke()\n \n \u002F\u002F D\n ctx.strokeStyle = $props.dColor\n ctx.beginPath()\n for (var i = view.i1, n = view.i2; i \u003C= n; i++) {\n let p = data[i]\n let x = layout.ti2x(p[0], i)\n let y = layout.value2y(p[2])\n ctx.lineTo(x, y)\n }\n ctx.stroke()\n \n ctx.strokeStyle = $props.bandColor\n ctx.setLineDash([5]) \u002F\u002F Will be removed after draw()\n ctx.beginPath()\n \u002F\u002F Fill the area between the bands\n ctx.fillStyle = $props.backColor\n ctx.fillRect(0, upper, layout.width, lower - upper)\n \u002F\u002F Upper band\n ctx.moveTo(0, upper)\n ctx.lineTo(layout.width, upper)\n \u002F\u002F Lower band\n ctx.moveTo(0, lower)\n ctx.lineTo(layout.width, lower)\n ctx.stroke()\n }\n \n yRange(data, hi, lo) =\u003E [\n Math.max(hi, $props.upperBand),\n Math.min(lo, $props.lowerBand)\n ]\n \n \u002F\u002F Legend, defined as pairs [value, color]\n legend(x) =\u003E [[x[1], $props.kColor], [x[1], $props.dColor]]\n \n \n [INDICATOR name=Stoch, version=1.0.0]\n \n prop('paramK', { def: 14 })\n prop('paramD', { def: 3 })\n prop('smooth', { def: 3 })\n prop('kColor', { type: 'color', def: '#3782f2' })\n prop('dColor', { type: 'color', def: '#f48709' })\n prop('prec', { type: 'integer', def: 2 })\n prop('zIndex', { type: 'integer', def: 0 })\n \n let $ = $props\n this.specs = {\n name: \\`Stoch \\${$.paramK} \\${$.paramD} \\${$.smooth}\\`,\n props: {\n kColor: $props.kColor,\n dColor: $props.dColor\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n let k = sma(stoch(close, high, low, $.paramK), $.smooth)\n let d = sma(k, $.paramD)\n Stoch([k[0], d[0]], this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n bs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003ETrue Strength Index\u003C\u002Fds\u003E\n \n [INDICATOR name=TSI, version=1.0.0]\n \n prop('long', { type: 'integer', def: 25 })\n prop('short', { type: 'integer', def: 13 })\n prop('signal', { type: 'integer', def: 13 })\n prop('color1', { type: 'color', def: '#3bb3e4' })\n prop('color2', { type: 'color', def: '#f7046d' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n let $ = $props\n this.specs = {\n name: \\`TSI \\${$.long} \\${$.short} \\${$.signal}\\`,\n props: {\n colors: [$.color1, $.color2]\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n let $ = $props\n let val = tsi(close, $.short, $.long)\n let sig = ema(val, $.signal)\n Splines([val[0] * 100, sig[0] * 100], this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Is = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EVolume Weighted Moving Average\u003C\u002Fds\u003E\n \n [INDICATOR name=VWMA, version=1.0.0]\n \n prop('length', { type: 'integer', def: 20 })\n prop('color', { type: 'color', def: '#db0670' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`VWMA \\${$props.length}\\`,\n props: {\n color: $props.color,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Spline(vwma(close, $props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n ),\n Xs = Object.freeze(\n Object.defineProperty(\n {\n __proto__: null,\n default: `\n \u002F\u002F Navy ~ 0.2-lite\n \u002F\u002F \u003Cds\u003EWilliams %R\u003C\u002Fds\u003E\n \n [INDICATOR name=WilliamsR, version=1.0.0]\n \n prop('length', { type: 'integer', def: 14 })\n prop('upperBand', { type: 'number', def: -20 })\n prop('lowerBand', { type: 'number', def: -80 })\n prop('color', { type: 'color', def: '#0980e8' })\n prop('backColor', { type: 'color', def: '#9b9ba316' })\n prop('bandColor', { type: 'color', def: '#535559' })\n prop('prec', { type: 'integer', def: autoPrec() })\n prop('zIndex', { type: 'integer', def: 0 })\n \n this.specs = {\n name: \\`%R \\${$props.length}\\`,\n props: {\n color: $props.color,\n backColor: $props.backColor,\n bandColor: $props.bandColor,\n upperBand: $props.upperBand,\n lowerBand: $props.lowerBand,\n },\n settings: {\n precision: $props.prec,\n zIndex: $props.zIndex\n }\n }\n \n [UPDATE]\n \n Range(wpr($props.length), this.specs)\n `\n },\n Symbol.toStringTag,\n { value: \"Module\" }\n )\n );\n var si = { exports: {} },\n Gs = (n, e = {}) =\u003E {\n const t = e.safe === !0 || e.keepProtected === !0;\n let o = !1;\n const i = (l) =\u003E {\n let s = \"\",\n a,\n r;\n for (const p of l.nodes)\n switch (p.type) {\n case \"block\":\n if (e.first && o === !0) {\n s += i(p);\n break;\n }\n if (e.preserveNewlines === !0) {\n (a = i(p)),\n (r = a.split(`\n `)),\n (s += `\n `.repeat(r.length - 1));\n break;\n }\n if (t === !0 && p.protected === !0) {\n s += i(p);\n break;\n }\n o = !0;\n break;\n case \"line\":\n if (e.first && o === !0) {\n s += p.value;\n break;\n }\n t === !0 && p.protected === !0 && (s += p.value), (o = !0);\n break;\n case \"open\":\n case \"close\":\n case \"text\":\n case \"newline\":\n default: {\n s += p.value || \"\";\n break;\n }\n }\n return s;\n };\n return i(n);\n };\n let ri = class {\n constructor(e) {\n (this.type = e.type),\n e.value && (this.value = e.value),\n e.match && (this.match = e.match),\n (this.newline = e.newline || \"\");\n }\n get protected() {\n return !!this.match && this.match[1] === \"!\";\n }\n };\n var xs = {\n Node: ri,\n Block: class extends ri {\n constructor(e) {\n super(e), (this.nodes = e.nodes || []);\n }\n push(e) {\n this.nodes.push(e);\n }\n get protected() {\n return this.nodes.length \u003E 0 && this.nodes[0].protected === !0;\n }\n }\n },\n ai = {};\n (function (n) {\n (n.ada = { LINE_REGEX: \u002F^--.*\u002F }),\n (n.apl = { LINE_REGEX: \u002F^⍝.*\u002F }),\n (n.applescript = {\n BLOCK_OPEN_REGEX: \u002F^\\(\\*\u002F,\n BLOCK_CLOSE_REGEX: \u002F^\\*\\)\u002F\n }),\n (n.csharp = { LINE_REGEX: \u002F^\\\u002F\\\u002F.*\u002F }),\n (n.haskell = {\n BLOCK_OPEN_REGEX: \u002F^\\{-\u002F,\n BLOCK_CLOSE_REGEX: \u002F^-\\}\u002F,\n LINE_REGEX: \u002F^--.*\u002F\n }),\n (n.javascript = {\n BLOCK_OPEN_REGEX: \u002F^\\\u002F\\*\\*?(!?)\u002F,\n BLOCK_CLOSE_REGEX: \u002F^\\*\\\u002F(\\n?)\u002F,\n LINE_REGEX: \u002F^\\\u002F\\\u002F(!?).*\u002F\n }),\n (n.lua = {\n BLOCK_OPEN_REGEX: \u002F^--\\[\\[\u002F,\n BLOCK_CLOSE_REGEX: \u002F^\\]\\]\u002F,\n LINE_REGEX: \u002F^--.*\u002F\n }),\n (n.matlab = {\n BLOCK_OPEN_REGEX: \u002F^%{\u002F,\n BLOCK_CLOSE_REGEX: \u002F^%}\u002F,\n LINE_REGEX: \u002F^%.*\u002F\n }),\n (n.perl = { LINE_REGEX: \u002F^#.*\u002F }),\n (n.php = { ...n.javascript, LINE_REGEX: \u002F^(#|\\\u002F\\\u002F).*?(?=\\?\u003E|\\n)\u002F }),\n (n.python = {\n BLOCK_OPEN_REGEX: \u002F^\"\"\"\u002F,\n BLOCK_CLOSE_REGEX: \u002F^\"\"\"\u002F,\n LINE_REGEX: \u002F^#.*\u002F\n }),\n (n.ruby = {\n BLOCK_OPEN_REGEX: \u002F^=begin\u002F,\n BLOCK_CLOSE_REGEX: \u002F^=end\u002F,\n LINE_REGEX: \u002F^#.*\u002F\n }),\n (n.shebang = n.hashbang = { LINE_REGEX: \u002F^#!.*\u002F }),\n (n.c = n.javascript),\n (n.csharp = n.javascript),\n (n.css = n.javascript),\n (n.java = n.javascript),\n (n.js = n.javascript),\n (n.less = n.javascript),\n (n.pascal = n.applescript),\n (n.ocaml = n.applescript),\n (n.sass = n.javascript),\n (n.sql = n.ada),\n (n.swift = n.javascript),\n (n.ts = n.javascript),\n (n.typscript = n.javascript);\n })(ai);\n const { Node: qe, Block: ci } = xs,\n vs = ai,\n bn = {\n ESCAPED_CHAR_REGEX: \u002F^\\\\.\u002F,\n QUOTED_STRING_REGEX: \u002F^(['\"`])((?:\\\\\\1|[^\\1])*?)(\\1)\u002F,\n NEWLINE_REGEX: \u002F^\\r*\\n\u002F\n };\n var Zs = (n, e = {}) =\u003E {\n if (typeof n != \"string\")\n throw new TypeError(\"Expected input to be a string\");\n const t = new ci({ type: \"root\", nodes: [] }),\n o = [t],\n i = (e.language || \"javascript\").toLowerCase(),\n l = vs[i];\n if (typeof l == \"undefined\")\n throw new Error(`Language \"${i}\" is not supported by strip-comments`);\n const { LINE_REGEX: s, BLOCK_OPEN_REGEX: a, BLOCK_CLOSE_REGEX: r } = l;\n let p = t,\n d = n,\n m,\n g;\n const I = [a, r].filter(Boolean);\n let X = !1;\n I.every((S) =\u003E S.source === '^\"\"\"') && (X = !0);\n const G = (S = d[0] || \"\") =\u003E ((d = d.slice(S.length)), S),\n b = (S, k = \"text\") =\u003E {\n const J = S.exec(d);\n if (J) return G(J[0]), { type: k, value: J[0], match: J };\n },\n h = (S) =\u003E {\n if (g && g.type === \"text\" && S.type === \"text\") {\n g.value += S.value;\n return;\n }\n p.push(S), S.nodes && (o.push(S), (p = S)), (g = S);\n },\n Z = () =\u003E {\n if (p.type === \"root\") throw new SyntaxError(\"Unclosed block comment\");\n o.pop(), (p = o[o.length - 1]);\n };\n for (; d !== \"\"; ) {\n if ((m = b(bn.ESCAPED_CHAR_REGEX, \"text\"))) {\n h(new qe(m));\n continue;\n }\n if (\n p.type !== \"block\" &&\n (!g || !\u002F\\w$\u002F.test(g.value)) &&\n !(X && d.startsWith('\"\"\"')) &&\n (m = b(bn.QUOTED_STRING_REGEX, \"text\"))\n ) {\n h(new qe(m));\n continue;\n }\n if ((m = b(bn.NEWLINE_REGEX, \"newline\"))) {\n h(new qe(m));\n continue;\n }\n if (a && e.block && !(X && p.type === \"block\") && (m = b(a, \"open\"))) {\n h(new ci({ type: \"block\" })), h(new qe(m));\n continue;\n }\n if (r && p.type === \"block\" && e.block && (m = b(r, \"close\"))) {\n (m.newline = m.match[1] || \"\"), h(new qe(m)), Z();\n continue;\n }\n if (s && p.type !== \"block\" && e.line && (m = b(s, \"line\"))) {\n h(new qe(m));\n continue;\n }\n if ((m = b(\u002F^[a-zABD-Z0-9\\t ]+\u002F, \"text\"))) {\n h(new qe(m));\n continue;\n }\n h(new qe({ type: \"text\", value: G(d[0]) }));\n }\n return t;\n };\n \u002F*!\n * strip-comments \u003Chttps:\u002F\u002Fgithub.com\u002Fjonschlinkert\u002Fstrip-comments\u003E\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Released under the MIT License.\n *\u002F const zt = Gs,\n vt = Zs,\n Vt = (si.exports = (n, e) =\u003E {\n const t = { ...e, block: !0, line: !0 };\n return zt(vt(n, t), t);\n });\n (Vt.block = (n, e) =\u003E {\n const t = { ...e, block: !0 };\n return zt(vt(n, t), t);\n }),\n (Vt.line = (n, e) =\u003E {\n const t = { ...e, line: !0 };\n return zt(vt(n, t), t);\n }),\n (Vt.first = (n, e) =\u003E {\n const t = { ...e, block: !0, line: !0, first: !0 };\n return zt(vt(n, t), t);\n }),\n (Vt.parse = vt);\n var Ls = si.exports;\n const Ss = Mt(Ls);\n function Cs(n, e) {\n return Ss(n);\n }\n function Rs(n, e) {\n let t = di(n, e);\n for (var o of t) {\n let i = n.slice(0, o[0] + 1);\n (i += n\n .slice(o[0] + 1, o[1])\n .replaceAll(\"\u002F*\", \"[!C~1!]\")\n .replaceAll(\"\u002F\u002F\", \"[!C~2!]\")),\n (i += n.slice(o[1])),\n (n = i);\n }\n return n;\n }\n function ws(n, e) {\n return n.replaceAll(\"[!C~1!]\", \"\u002F*\").replaceAll(\"[!C~2!]\", \"\u002F\u002F\");\n }\n function di(n, e) {\n let t = { \"'\": 0, '\"': 0, \"`\": 0 },\n o = [],\n i = null;\n for (var l = 0; l \u003C n.length; l++)\n for (var s in t)\n if (\n (n[l] === s && n[l - 1] !== \"\\\\\" && (t[s]++, i || (i = [l, void 0])),\n n[l] === s &&\n n[l - 1] !== \"\\\\\" &&\n l \u003E i[0] &&\n ((t[s] = 0),\n i &&\n Object.values(t).every((a) =\u003E !a) &&\n ((i[1] = l), o.push(i), (i = null))),\n t[s] \u003C 0)\n )\n throw `Missing quote ${s} in ${e}`;\n if (i !== null) throw `Missing quote in ${e}: ${JSON.stringify(t)}`;\n return o;\n }\n function Ys(n, e = btoa) {\n let t = \u002F\\\u002F([^*\\\u002F]?.+)\\\u002F\u002Fg;\n do {\n var o = t.exec(n);\n if (o) {\n let i = o[0].length;\n o[1].slice(-1) === \"*\" && (i--, (o[1] = o[1].slice(0, -1)));\n let l = n.slice(0, o.index + 1),\n s = e(o[1]);\n (l += s + n.slice(o.index + i - 1)),\n (n = l),\n (t.lastIndex = o.index + s.length);\n }\n } while (o);\n return n;\n }\n function pi(n, e, t, o = \"{}\") {\n let i = o[0],\n l = o[1],\n s = { \"'\": 0, '\"': 0, \"`\": 0 },\n a = 0,\n r = null;\n for (var p = e; p \u003C n.length; p++) {\n for (var d in s)\n if (\n (n[p] === d && n[p - 1] !== \"\\\\\" && (s[d]++, r || (r = [p, void 0])),\n n[p] === d &&\n n[p - 1] !== \"\\\\\" &&\n p \u003E r[0] &&\n ((s[d] = 0),\n r && Object.values(s).every((g) =\u003E !g) && ((r[1] = p), (r = null))),\n s[d] \u003C 0)\n )\n throw `Missing quote ${d} in ${t}`;\n if (\n s[\"'\"] + s['\"'] + s[\"`\"] === 0 &&\n (n[p] === i && a++, n[p] === l && a--, a === 0)\n )\n break;\n }\n if (a !== 0) throw `Missing bracket in ${t}: ${o}`;\n if (r !== null) throw `Missing quote in ${t}: ${JSON.stringify(s)}`;\n return p;\n }\n function Ts(n) {\n let e = [],\n t = 0;\n for (; t \u003C n.length; ) {\n let o = n.indexOf(\"static\", t);\n if (o === -1) break;\n let i = n.indexOf(\"=\u003E\", o);\n if (i === -1) break;\n for (\n t = i + 2;\n [\n \" \",\n \"\t\",\n `\n `,\n \"\\r\"\n ].includes(n[t]);\n\n )\n t++;\n let l = n[t];\n if ([\"{\", \"[\", \"(\"].includes(l)) {\n let s;\n try {\n s = pi(n, t, \"script\", l + { \"{\": \"}\", \"[\": \"]\", \"(\": \")\" }[l]);\n } catch (a) {\n console.error(a);\n continue;\n }\n e.push(n.slice(o, s + 1).trim()), (t = s + 1);\n } else {\n let s = n.indexOf(\n `\n `,\n t\n );\n e.push(n.slice(o, s !== -1 ? s : void 0).trim());\n }\n }\n return e.join(`\n `);\n }\n const Zt = {\n maskStrings: Rs,\n unmaskStrings: ws,\n findStrings: di,\n maskRegex: Ys,\n decomment: Cs,\n findClosingBracket: pi,\n extractStaticBlocks: Ts\n },\n Ht = \u002F(function[\\s]+|)([$A-Z_][0-9A-Z_$\\.]*)[\\s]*?\\(([^()]*?)\\)[\\s]*?{\u002Fgim,\n At = \u002F(function[\\s]+|)([$A-Z_][0-9A-Z_$\\.]*)[\\s]*?\\(([^()]*?)\\)[\\s]*?=\u003E[\\s]*?{\u002Fgim,\n In = \u002F(function[\\s]+|)([$A-Z_][0-9A-Z_$\\.]*)[\\s]*?\\(([^()]*?)\\)[\\s]*?=\u003E\u002Fgim,\n ui = \u002Fstatic\\s+var\\s+([a-zA-Z0-9_]+)\\s*=\u002Fg,\n hi = [\"if\", \"for\", \"while\", \"switch\", \"catch\", \"with\"];\n class Ms {\n constructor(e, t) {\n (this.tagProps = this.parseTagProps(e)),\n (this.src = t),\n (this.flags = \"\"),\n this.parseBody();\n }\n parseTagProps(e) {\n let t = {},\n o = e.split(\",\");\n for (var i of o) {\n let [l, s] = i.split(\"=\");\n t[l.trim()] = s.trim();\n }\n return t;\n }\n parseBody() {\n let e = Zt.decomment(this.src);\n (e = this.prepFuncions1(e)),\n (e = this.prepFuncions2(e)),\n (e = this.prepFuncions3(e));\n let t = Zt.extractStaticBlocks(e);\n (this.static = this.wrapStatic(t)),\n (e = this.renameStatic(e)),\n (this.prefab = this.wrapTheCode(e, this.flags));\n }\n prepFuncions1(e) {\n let t = \"\",\n o = 0;\n Ht.lastIndex = 0;\n do {\n var i = Ht.exec(e);\n if (i) {\n i[1].trim();\n let l = i[2],\n s = i[3],\n a = Ht.lastIndex - 1,\n r = Zt.findClosingBracket(e, a);\n if (hi.includes(l)) t += e.slice(o, r + 1);\n else {\n let p = e.slice(a, r + 1);\n (t += e.slice(o, i.index)),\n (t += `var ${l} = (${s}) =\u003E ${p}`),\n this.parseFlags(l, s, p);\n }\n (Ht.lastIndex = r), (o = r + 1);\n }\n } while (i);\n return t + e.slice(o);\n }\n prepFuncions2(e) {\n let t = \"\",\n o = 0;\n At.lastIndex = 0;\n do {\n var i = At.exec(e);\n if (i) {\n i[1].trim();\n let l = i[2],\n s = i[3],\n a = At.lastIndex - 1,\n r = Zt.findClosingBracket(e, a);\n if (hi.includes(l)) t += e.slice(o, r + 1);\n else {\n let p = e.slice(a, r + 1);\n (t += e.slice(o, i.index)),\n (t += `var ${l} = (${s}) =\u003E (${p})`),\n this.parseFlags(l, s, p);\n }\n (At.lastIndex = r), (o = r + 1);\n }\n } while (i);\n return t + e.slice(o);\n }\n prepFuncions3(e) {\n let t = \"\",\n o = 0;\n In.lastIndex = 0;\n do {\n var i = In.exec(e);\n if (i) {\n i[1].trim();\n let l = i[2],\n s = i[3],\n a = In.lastIndex;\n (t += e.slice(o, i.index)), (t += `var ${l} = (${s}) =\u003E `);\n let r = e\n .slice(a)\n .split(\n `\n `\n )[0]\n .trim();\n this.parseFlags(l, s, r), (o = a + 1);\n }\n } while (i);\n return t + e.slice(o);\n }\n parseFlags(e, t, o) {\n if (e === \"yRange\") {\n let i = t.trim().split(\",\").length \u003E 1;\n this.flags += `yRangePreCalc: ${i},\n `;\n } else\n e === \"legend\" &&\n (o === \"null\" || o === \"undefined\") &&\n (this.flags += `noLegend: true,\n `);\n }\n wrapStatic(e) {\n const o = `\n var $static = {}\n ${e.replace(ui, \"$static.$1 =\")}\n return $static\n `;\n try {\n return new Function(o)();\n } catch (i) {\n console.error(\"Error parsing static functions\", i);\n }\n return {};\n }\n renameStatic(e) {\n return e.replace(ui, \"$static.$1 =\");\n }\n wrapTheCode(e, t) {\n return new Function(\n \"env\",\n `\n \n \u002F\u002F Setup the environment\n let { $core, $props, $events } = env\n let prop = (...args) =\u003E env.prop(...args)\n let watchProp = (...args) =\u003E env.watchProp(...args)\n let $static = {} \n \n \u002F\u002F Add primitives\n let $lib = env.lib\n \n \u002F\u002F Function stubs\n var init = () =\u003E {}\n var destroy = () =\u003E {}\n var meta = () =\u003E null\n var dataFormat = () =\u003E null\n var draw = () =\u003E {}\n var drawSidebar = null\n var drawBotbar = null\n var yRange = null\n var preSampler = null\n var legend = null\n var legendHtml = null\n var valueTracker = null\n var ohlc = null\n \n \u002F\u002F Event handler stubs\n var mousemove = null\n var mouseout = null\n var mouseup = null\n var mousedown = null\n var click = null\n var keyup = null\n var keydown = null\n var keypress = null\n \n \u002F\u002F Overlay code\n ${e}\n \n \u002F\u002F Output overlay object\n return {\n gridId: () =\u003E $core.layout.id,\n id: () =\u003E $core.id,\n init, destroy, meta, dataFormat,\n draw, drawSidebar, drawBotbar,\n yRange, preSampler,\n legend, legendHtml,\n valueTracker, ohlc,\n mousemove, mouseout, mouseup,\n mousedown, click, keyup, keydown,\n keypress,\n \u002F\u002F Generated flags\n ${t}\n }\n `\n );\n }\n }\n const fi = \u002F\\[[\\s]*?UPDATE[\\s]*?\\]|\\[[\\s]*?POST[\\s]*?\\]\u002Fgm,\n mi = \u002F\\[[\\s]*?UPDATE[\\s]*?\\]([\\s\\S]*?)(\\[POST|\\[UPDATE|\\[EOF)\u002Fgm,\n gi = \u002F\\[[\\s]*?POST[\\s]*?\\]([\\s\\S]*?)(\\[POST|\\[UPDATE|\\[EOF)\u002Fgm;\n class Ws {\n constructor(e, t) {\n (this.tagProps = this.parseTagProps(e)), (this.src = t), this.parseBody();\n }\n parseTagProps(e) {\n let t = {},\n o = e.split(\",\");\n for (var i of o) {\n let [l, s] = i.split(\"=\");\n t[l.trim()] = s.trim();\n }\n return t;\n }\n parseBody() {\n (fi.lastIndex = 0), (mi.lastIndex = 0), (gi.lastIndex = 0);\n let e = Zt.decomment(this.src);\n (this.init = e.split(fi)[0]),\n (e += `\n [EOF]`),\n (this.update = (mi.exec(e) || [])[1]),\n (this.post = (gi.exec(e) || [])[1]);\n }\n }\n const yi = 0.2,\n ks = \"lite\",\n zs = \u002F\\\u002F\\*[\\s\\S]*?\\*\\\u002F|([^\\\\:]|^)\\\u002F\\\u002F.*$\u002Fgm,\n Xn = \u002F\\[OVERLAY[\\s]+([\\s\\S]*?)]([\\s\\S]*?)(\\[OVERLAY|\\[INDICATOR|\\[EOF)\u002Fgm,\n Gn = \u002F\\[INDICATOR[\\s]+([\\s\\S]*?)]([\\s\\S]*?)(\\[OVERLAY|\\[INDICATOR|\\[EOF)\u002Fgm;\n class Vs {\n constructor(e, t = \"Unknown Script\") {\n (t = this.extractName(e) || t),\n (this.version = yi),\n (this.src =\n e +\n `\n [EOF]`),\n (this.scriptName = t),\n (this.scriptVers = this.navyVers()[0]),\n (this.scriptTag = this.navyVers()[1]),\n (this.overlays = []),\n (this.indicators = []),\n this.scriptVers === 0 &&\n console.warn(`${t}: There is no script version string`),\n this.scriptVers \u003E this.version &&\n console.warn(`${t}: Script version \u003E parser version`),\n this.scriptVers \u003C 0.2 &&\n e.includes(\"OVERLAY\") &&\n e.includes(\"yRange\") &&\n console.warn(`${t}: Update yRange() function (see docs)`),\n this.scriptTag !== ks &&\n console.warn(`${t}: Script version should have 'lite' tag\n Most likely are using the community version of NavyJS\n with a script written for the PRO version.\n If not the case just use 'lite' tag: ${yi}-lite`),\n this.overlayTags(),\n this.indicatorTags();\n }\n navyVers() {\n let e = (this.src.match(zs) || [])[0];\n if (e) {\n let t = e.split(\"~\");\n if (t.length \u003C 2) return [0];\n let o = parseFloat(t[1]),\n i = t[1].split(\"-\")[1];\n return [o === o ? o : 0, i];\n }\n return [0];\n }\n extractName(e) {\n const t = \u002F\\[.*?name=([^\\s,]+)\u002F,\n o = e.match(t);\n return o && o[1] ? o[1].trim() : null;\n }\n overlayTags() {\n Xn.lastIndex = 0;\n for (var e; (e = Xn.exec(this.src)); )\n this.overlays.push(new Ms(e[1], e[2])), (Xn.lastIndex -= 10);\n }\n indicatorTags() {\n Gn.lastIndex = 0;\n for (var e; (e = Gn.exec(this.src)); )\n this.indicators.push(new Ws(e[1], e[2])), (Gn.lastIndex -= 12);\n }\n }\n const bi =\n \"KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIG90KGEsdCxlKXthPWEuc2xpY2UoMCx0KS5yZXZlcnNlKCkubWFwKChkLGMpPT5bYyxkXSk7Zm9yKHZhciBzPTAsaT0wLHI9MCxuPTAsaD0wLGwsbyxmPTAsdD1hLmxlbmd0aDtmPHQ7ZisrKXtpZighYVtmXSlyZXR1cm4gTmFOO3ZhciB1PWFbZl07cys9dVswXSxpKz11WzFdLG4rPXVbMF0qdVswXSxyKz11WzBdKnVbMV0saCsrfXJldHVybiBsPShoKnItcyppKS8oaCpuLXMqcy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Ghpcy5zdGQpLHM9IiI7Zm9yKHZhciBpIG9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKGUpKWkhPT0iY29uc3RydWN0b3IiJiYocys9YGNvbnN0IHN0ZF8ke2l9ID0gc2VsZi5zdGQuJHtpfS5iaW5kKHNlbGYuc3RkKQpgKTtsZXQgcj0iIjtmb3IodmFyIGkgaW4gdGhpcy5zaGFyZWQpdGhpcy5zaGFyZWRbaV0mJnRoaXMuc2hhcmVkW2ldLl9faWRfXyYmKHIrPWBjb25zdCAke2l9ID0gc2hhcmVkLiR7aX0KYCk7bGV0IG49IiI7dHJ5e3JldHVybiBGdW5jdGlvbigic2VsZixzaGFyZWQsc2UiLGAKICAgICAgICAgICAgICAgICd1c2Ugc3RyaWN0JzsKCiAgICAgICAgICAgICAgICAvLyBCdWlsdC1pbiBmdW5jdGlvbnMgKGFsaWFzZXMpCiAgICAgICAgICAgICAgICAke3N9CgogICAgICAgICAgICAgICAgLy8gTW9kdWxlcyAoQVBJIC8gaW50ZXJmYWNlcykKICAgICAgICAgICAgICAgICR7dGhpcy5tYWtlX21vZHVsZXMoKX0KCiAgICAgICAgICAgICAgICAvLyBUaW1lc2VyaWVzCiAgICAgICAgICAgICAgICAke3J9CgogICAgICAgICAgICAgICAgLy8gRGlyZWN0IGRhdGEgdHMKICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBzZWxmLmRhdGEKICAgICAgICAgICAgICAgIGNvbnN0IG9obGN2ID0gc2hhcmVkLmRzcy5vaGxjdi5kYXRhCiAgICAgICAgICAgICAgICAke259CgogICAgICAgICAgICAgICAgLy8gU2NyaXB0J3MgcHJvcGVydGllcyAoaW5pdCkKICAgICAgICAgICAgICAgIGNvbnN0ICRwcm9wcyA9IHNlbGYuc3JjLnByb3BzCgogICAgICAgICAgICAgICAgLy8gR2xvYmFscwogICAgICAgICAgICAgICAgY29uc3Qgc2V0dGluZ3MgPSBzZWxmLnNyYy5zZXR0aW5ncwogICAgICAgICAgICAgICAgY29uc3QgdGYgPSBzaGFyZWQudGYKICAgICAgICAgICAgICAgIGNvbnN0IHJhbmdlID0gc2hhcmVkLnJhbmdlCiAgICAgICAgICAgICAgICBjb25zdCBwYW5lID0gc2VsZi5wYW5lCgogICAgICAgICAgICAgICAgdGhpcy5pbml0ID0gKF9pZCA9ICdyb290JykgPT4gewogICAgICAgICAgICAgICAgICAgICR7dGhpcy5wcmVwKHQuaW5pdCl9CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgdGhpcy51cGRhdGUgPSAoX2lkID0gJ3Jvb3QnKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IHNoYXJlZC50KCkKICAgICAgICAgICAgICAgICAgICBjb25zdCBpdGVyID0gc2hhcmVkLml0ZXIoKQogICAgICAgICAgICAgICAgICAgICR7dGhpcy5wcmVwKHQudXBkYXRlKX0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB0aGlzLnBvc3QgPSAoX2lkID0gJ3Jvb3QnKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgJHt0aGlzLnByZXAodC5wb3N0KX0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgYCl9Y2F0Y2goaCl7cmV0dXJuIGNvbnNvbGUubG9nKGgpLEZ1bmN0aW9uKCJzZWxmLHNoYXJlZCIsYAogICAgICAgICAgICAgICAgJ3VzZSBzdHJpY3QnOwogICAgICAgICAgICAgICAgdGhpcy5pbml0ID0gKCkgPT4ge30KICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlID0gKCkgPT4ge30KICAgICAgICAgICAgICAgIHRoaXMucG9zdCA9ICgpID0+IHt9CiAgICAgICAgICAgIGApfX1tYWtlX21vZHVsZXMoKXtsZXQgdD0iIjtmb3IodmFyIGUgaW4gXy5tb2RzKV8ubW9kc1tlXS5hcGkmJih0Kz1gY29uc3QgJHtlfSA9IHNlLm1vZHNbJyR7ZX0nXS5hcGlbc2VsZi5pZF1gLHQrPW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Cg==\",\n Ii =\n typeof window != \"undefined\" &&\n window.Blob &&\n new Blob([atob(bi)], { type: \"text\u002Fjavascript;charset=utf-8\" });\n function Hs() {\n let n;\n try {\n if (\n ((n = Ii && (window.URL || window.webkitURL).createObjectURL(Ii)), !n)\n )\n throw \"\";\n return new Worker(n);\n } catch (e) {\n return new Worker(\"data:application\u002Fjavascript;base64,\" + bi);\n } finally {\n n && (window.URL || window.webkitURL).revokeObjectURL(n);\n }\n }\n class As {\n constructor(e, t) {\n (this.chart = t),\n (this.tasks = {}),\n (this.onevent = () =\u003E {}),\n this.start();\n }\n start() {\n this.worker && this.worker.terminate(),\n (this.worker = new Hs()),\n (this.worker.onmessage = (e) =\u003E this.onmessage(e));\n }\n startSocket() {}\n send(e, t) {\n if (t) {\n let o = t.map((i) =\u003E e.data[i]);\n this.worker.postMessage(e, o);\n } else this.worker.postMessage(e);\n }\n sendToNode(e, t) {}\n onmessage(e) {\n e.data.id in this.tasks\n ? (this.tasks[e.data.id](e.data.data), delete this.tasks[e.data.id])\n : this.onevent(e);\n }\n async exec(e, t, o) {\n return new Promise((i, l) =\u003E {\n let s = w.uuid();\n this.send({ type: e, id: s, data: t }, o),\n (this.tasks[s] = (a) =\u003E {\n i(a);\n });\n });\n }\n just(e, t, o) {\n let i = w.uuid();\n this.send({ type: e, id: i, data: t }, o);\n }\n async relay(e, t = !1) {\n return new Promise((o, i) =\u003E {\n this.send(e, e.txKeys),\n t ||\n (this.tasks[e.id] = (l) =\u003E {\n o(l);\n });\n });\n }\n stop() {\n this.worker && this.worker.terminate();\n }\n }\n let xn = {};\n function Ks(n, e) {\n return xn[n] || (xn[n] = new As(n, e)), xn[n];\n }\n const Xi = { instance: Ks },\n Js = Object.assign({\n \"..\u002Fscripts\u002FAppleArea.navy\": Yl,\n \"..\u002Fscripts\u002FArrowTrades.navy\": Tl,\n \"..\u002Fscripts\u002FBand.navy\": Ml,\n \"..\u002Fscripts\u002FCandlesPlus.navy\": Wl,\n \"..\u002Fscripts\u002FCloud.navy\": kl,\n \"..\u002Fscripts\u002FHistogram.navy\": zl,\n \"..\u002Fscripts\u002FPriceLabels.navy\": Vl,\n \"..\u002Fscripts\u002FRange.navy\": Hl,\n \"..\u002Fscripts\u002FSparse.navy\": Al,\n \"..\u002Fscripts\u002FSplines.navy\": Kl,\n \"..\u002Fscripts\u002FSuperBands.navy\": Jl,\n \"..\u002Fscripts\u002FTrades.navy\": Fl,\n \"..\u002Fscripts\u002FVolume.navy\": Pl,\n \"..\u002Fscripts\u002FVolumeDelta.navy\": Nl,\n \"..\u002Fscripts\u002Farea.navy\": Bl,\n \"..\u002Fscripts\u002Fcandles.navy\": El,\n \"..\u002Fscripts\u002Fspline.navy\": _l\n }),\n Fs = Object.assign({ \"..\u002Fscripts\u002Ftools\u002FRangeTool.navy\": Ol }),\n Ps = Object.assign({\n \"..\u002Fscripts\u002Findicators\u002FALMA.navy\": Ul,\n \"..\u002Fscripts\u002Findicators\u002FATR.navy\": Dl,\n \"..\u002Fscripts\u002Findicators\u002FATRp.navy\": jl,\n \"..\u002Fscripts\u002Findicators\u002FBB.navy\": Ql,\n \"..\u002Fscripts\u002Findicators\u002FBBW.navy\": $l,\n \"..\u002Fscripts\u002Findicators\u002FCCI.navy\": ql,\n \"..\u002Fscripts\u002Findicators\u002FCMO.navy\": es,\n \"..\u002Fscripts\u002Findicators\u002FCOG.navy\": ts,\n \"..\u002Fscripts\u002Findicators\u002FDMI.navy\": ns,\n \"..\u002Fscripts\u002Findicators\u002FEMA.navy\": is,\n \"..\u002Fscripts\u002Findicators\u002FHMA.navy\": os,\n \"..\u002Fscripts\u002Findicators\u002FIchimoku.navy\": ls,\n \"..\u002Fscripts\u002Findicators\u002FKC.navy\": ss,\n \"..\u002Fscripts\u002Findicators\u002FKCW.navy\": rs,\n \"..\u002Fscripts\u002Findicators\u002FMACD.navy\": as,\n \"..\u002Fscripts\u002Findicators\u002FMFI.navy\": cs,\n \"..\u002Fscripts\u002Findicators\u002FMOM.navy\": ds,\n \"..\u002Fscripts\u002Findicators\u002FROC.navy\": ps,\n \"..\u002Fscripts\u002Findicators\u002FRSI.navy\": us,\n \"..\u002Fscripts\u002Findicators\u002FRibbon.navy\": hs,\n \"..\u002Fscripts\u002Findicators\u002FSAR.navy\": fs,\n \"..\u002Fscripts\u002Findicators\u002FSMA.navy\": ms,\n \"..\u002Fscripts\u002Findicators\u002FSWMA.navy\": gs,\n \"..\u002Fscripts\u002Findicators\u002FStoch.navy\": ys,\n \"..\u002Fscripts\u002Findicators\u002FTSI.navy\": bs,\n \"..\u002Fscripts\u002Findicators\u002FVWMA.navy\": Is,\n \"..\u002Fscripts\u002Findicators\u002FWilliamsR.navy\": Xs\n });\n class Ns {\n constructor(e) {\n this.ww = Xi.instance(e);\n }\n async init(e) {\n (this.srcLib = Object.values(Js).map((t) =\u003E t.default)),\n this.srcLib.push(...Object.values(Fs).map((t) =\u003E t.default)),\n this.srcLib.push(...Object.values(Ps).map((t) =\u003E t.default)),\n this.srcLib.push(...e),\n (this.prefabs = {}),\n (this.iScripts = {}),\n this.parse(),\n this.ww.exec(\"upload-scripts\", {\n prefabs: Object.keys(this.prefabs).reduce(\n (t, o) =\u003E (\n (t[o] = {\n name: this.prefabs[o].name,\n author: this.prefabs[o].author,\n version: this.prefabs[o].version\n }),\n t\n ),\n {}\n ),\n iScripts: this.iScripts\n });\n }\n parse() {\n this.prefabs = {};\n for (var e of this.srcLib) {\n let i = new Vs(e);\n for (var t of i.overlays)\n this.prefabs[t.tagProps.name] = {\n name: t.tagProps.name,\n author: t.tagProps.author,\n version: t.tagProps.version,\n ctx: t.tagProps.ctx || \"Canvas\",\n make: t.prefab,\n static: t.static\n };\n for (var o of i.indicators)\n this.iScripts[o.tagProps.name] = {\n name: o.tagProps.name,\n author: o.tagProps.author,\n version: o.tagProps.version,\n code: { init: o.init, update: o.update, post: o.post }\n };\n }\n }\n }\n let vn = {};\n function Bs(n) {\n return vn[n] || (vn[n] = new Ns(n)), vn[n];\n }\n const Kt = { instance: Bs },\n { $SCALES: Es } = se,\n _s = Number.MAX_SAFE_INTEGER;\n function Os(n, e, t) {\n let { hub: o, props: i, settings: l, height: s } = t,\n { ctx: a } = i,\n r = Je.instance(i.id),\n p = Kt.instance(i.id).prefabs,\n d = {},\n m = (r.yTransforms[e.gridId] || [])[n],\n g = e.gridId,\n I = e.ovs,\n X = e.log;\n const G = i.config.AUTO_PRE_SAMPLE;\n function b() {\n if (Math.max(...I.map((Y) =\u003E Y.dataSubset.length)) \u003C 2) {\n (d.prec = 0), (d.sb = i.config.SBMIN);\n return;\n }\n if (e.precision !== void 0) d.prec = e.precision;\n else {\n d.prec = 0;\n for (var W of I) {\n if (W.settings.precision !== void 0) var T = W.settings.precision;\n else var T = Z(W);\n T \u003E d.prec && (d.prec = T);\n }\n }\n if (!isFinite(d.$hi) || !isFinite(d.$lo)) {\n d.sb = i.config.SBMIN;\n return;\n }\n let V = [];\n V.push(d.$hi.toFixed(d.prec).length),\n V.push(d.$lo.toFixed(d.prec).length);\n let x = \"0\".repeat(Math.max(...V)) + \" \";\n (d.sb = a.measureText(x).width),\n (d.sb = Math.max(Math.floor(d.sb), i.config.SBMIN)),\n (d.sb = Math.min(d.sb, i.config.SBMAX));\n }\n function h() {\n var L = -1 \u002F 0,\n W = 1 \u002F 0;\n for (var T of I) {\n if (T.settings.display === !1) continue;\n let ee = (r.yRangeFns[g] || [])[T.id],\n Re = p[T.type].static.yRange;\n Re && (ee = { exec: Re, preCalc: Re.length \u003E 1 });\n let ue = T.dataSubset;\n var V = -1 \u002F 0,\n x = 1 \u002F 0;\n if (!ee || (ee && ee.preCalc))\n for (var Y = 0; Y \u003C ue.length; Y++)\n for (var R = 1; R \u003C ue[Y].length; R++) {\n let B = ue[Y][R];\n B \u003E V && (V = B), B \u003C x && (x = B);\n }\n if (ee) {\n var E = ee.exec(ue, V, x);\n if (E) var [V, x, ie] = E;\n else var [V, x] = [L, W];\n }\n V \u003E L && (L = V), x \u003C W && (W = x);\n }\n m && !m.auto && m.range\n ? ((d.$hi = m.range[0]), (d.$lo = m.range[1]))\n : (X\n ? ((d.$hi = L), (d.$lo = W), li.expand(d, s))\n : ((ie = ie === !1 ? 0 : 1),\n (d.$hi = L + (L - W) * i.config.EXPAND * ie),\n (d.$lo = W - (L - W) * i.config.EXPAND * ie)),\n d.$hi === d.$lo &&\n (X ? li.expand(d, s) : ((d.$hi *= 1.05), (d.$lo *= 0.95))));\n }\n function Z(L) {\n let W = 0,\n T = [],\n V = r.getPreSampler(g, L.id);\n (V = V || p[L.type].static.preSampler), (V = V || w.defaultPreSampler);\n for (var x = 0; x \u003C G; x++) {\n let R = Math.floor(Math.random() * L.dataSubset.length),\n E = V(L.dataSubset[R]);\n typeof E == \"number\" ? T.push(E) : (T = T.concat(E));\n }\n T.forEach((R) =\u003E {\n let E = w.numberLR(R)[1];\n E \u003E W && (W = E);\n });\n let Y = r.getAutoPrec(g, L.id);\n return Y === void 0 || W \u003E Y ? (r.setAutoPrec(g, L.id, W), W) : Y;\n }\n function S() {\n X\n ? ((d.A = -s \u002F (ne.log(d.$hi) - ne.log(d.$lo))),\n (d.B = -ne.log(d.$hi) * d.A))\n : ((d.A = -s \u002F (d.$hi - d.$lo)), (d.B = -d.$hi * d.A));\n }\n function k() {\n let L = d.$hi - d.$lo,\n W = L * (i.config.GRIDY \u002F s),\n T = parseInt(L.toExponential().split(\"e\")[1]),\n V = Math.pow(10, T),\n x = Es.map((Y) =\u003E Y * V);\n return w.strip(w.nearestA(W, x)[1]);\n }\n function J() {\n let L = P(),\n W = K();\n return Math.max(L, W);\n }\n function P() {\n let L = Math.min(d.B, s);\n if (L \u003C i.config.GRIDY) return 1;\n let W = L \u002F i.config.GRIDY,\n T = d.$hi;\n if (d.$lo \u003E 0) var V = d.$hi \u002F d.$lo;\n else V = d.$hi \u002F 1;\n return (\n T * (i.config.GRIDY \u002F L),\n parseInt(T.toExponential().split(\"e\")[1]),\n Math.pow(V, 1 \u002F W)\n );\n }\n function K() {\n let L = Math.min(s - d.B, s);\n if (L \u003C i.config.GRIDY) return 1;\n let W = L \u002F i.config.GRIDY,\n T = Math.abs(d.$lo);\n if (d.$hi \u003C 0 && d.$lo \u003C 0) var V = Math.abs(d.$lo \u002F d.$hi);\n else V = Math.abs(d.$lo) \u002F 1;\n return (\n T * (i.config.GRIDY \u002F L),\n parseInt(T.toExponential().split(\"e\")[1]),\n Math.pow(V, 1 \u002F W)\n );\n }\n function U() {\n let L = Math.pow(10, -d.prec);\n (d.$step = Math.max(L, k())), (d.ys = []);\n let W = d.$lo - (d.$lo % d.$step);\n for (var T = W; T \u003C= d.$hi; T += d.$step) {\n let V = Math.floor(T * d.A + d.B);\n V \u003E s || d.ys.push([V, w.strip(T)]);\n }\n }\n function N() {\n (d.$_mult = J()), (d.ys = []);\n let L = (d.$hi + d.$lo) \u002F 2,\n W = C(L),\n T = A(-L),\n V = -1 \u002F 0,\n x = s \u002F i.config.GRIDY,\n Y = 1 + (d.$_mult - 1) \u002F 2;\n for (var R = W; R \u003E 0; R \u002F= d.$_mult) {\n R = M(R, Y);\n let E = Math.floor(ne.log(R) * d.A + d.B);\n if (\n (d.ys.push([E, w.strip(R)]),\n E \u003E s || E - V \u003C i.config.GRIDY * 0.7 || d.ys.length \u003E x + 1)\n )\n break;\n V = E;\n }\n V = 1 \u002F 0;\n for (var R = T; R \u003C 0; R \u002F= d.$_mult) {\n R = M(R, Y);\n let ie = Math.floor(ne.log(R) * d.A + d.B);\n if (\n V - ie \u003C i.config.GRIDY * 0.7 ||\n (d.ys.push([ie, w.strip(R)]), ie \u003C 0) ||\n d.ys.length \u003E x * 3 + 1\n )\n break;\n V = ie;\n }\n }\n function C(L) {\n let W = s \u002F i.config.GRIDY;\n for (var T = 1 \u002F 0, V = L, x = 0; T \u003E 0; )\n if (\n ((T = Math.floor(ne.log(V) * d.A + d.B)),\n (V *= d.$_mult),\n x++ \u003E W * 3)\n )\n return 0;\n return V;\n }\n function A(L) {\n let W = s \u002F i.config.GRIDY;\n for (\n var T = -1 \u002F 0, V = L, x = 0;\n T \u003C s &&\n ((T = Math.floor(ne.log(V) * d.A + d.B)),\n (V *= d.$_mult),\n !(x++ \u003E W * 3));\n\n );\n return V;\n }\n function M(L, W) {\n let T = Math.sign(L);\n if (((L = Math.abs(L)), L \u003E 10)) {\n for (var V = 10; V \u003C _s; V *= 10) {\n let Y = Math.floor(L \u002F V) * V;\n if (L \u002F Y \u003E W) break;\n }\n return (V \u002F= 10), T * Math.floor(L \u002F V) * V;\n } else if (L \u003C 1) {\n for (var x = 10; x \u003E= 1; x--) {\n let Y = w.round(L, x);\n if (L \u002F Y \u003E W) break;\n }\n return T * w.round(L, x + 1);\n } else return T * Math.floor(L);\n }\n return (\n h(),\n b(),\n S(),\n X ? N() : U(),\n (d.scaleSpecs = { id: n, log: e.log, ovIdxs: e.ovIdxs }),\n (d.height = s),\n d\n );\n }\n const {\n TIMESCALES: Us,\n $SCALES: pd,\n WEEK: Ds,\n MONTH: Gi,\n YEAR: xi,\n HOUR: vi,\n DAY: Zn\n } = se;\n function Zi(n, e, t = null) {\n let { hub: o, meta: i, props: l, settings: s, height: a } = e,\n { interval: r, timeFrame: p, range: d, ctx: m, timezone: g } = l,\n I = !!s.logScale,\n X = o.panes()[n].overlays,\n G = o.mainOv.dataSubset,\n b = o.mainOv.dataView,\n h = { indexBased: o.indexBased };\n function Z() {\n let x = S();\n for (var Y = 0; Y \u003C X.length; Y++) {\n let R = X[Y],\n E = R.settings.scale || \"A\";\n x[E] || (x[E] = k(E)), x[E].ovs.push(R), x[E].ovIdxs.push(Y);\n }\n return Object.values(x);\n }\n function S() {\n let x = { A: k(\"A\") };\n for (var Y in s.scales || {}) {\n let R = s.scales[Y];\n x[Y] = k(Y, R);\n }\n return x;\n }\n function k(x, Y = {}) {\n var R;\n return {\n id: x,\n gridId: n,\n ovs: [],\n ovIdxs: [],\n log: (R = Y.log) != null ? R : I,\n precision: Y.precision\n };\n }\n function J() {\n if (G.length \u003C 2) return;\n let x = d[1] - d[0];\n h.spacex = l.width - h.sbMax[0] - h.sbMax[1];\n let Y = x \u002F r;\n h.pxStep = h.spacex \u002F Y;\n let R = h.spacex \u002F x;\n h.startx = (G[0][0] - d[0]) * R;\n }\n function P() {\n let x = h.indexBased ? p : 1,\n R = (d[1] - d[0]) * x * (l.config.GRIDX \u002F l.width),\n E = Us;\n return w.nearestA(R, E)[1];\n }\n function K() {\n if (t)\n (h.tStep = t.tStep),\n (h.pxStep = t.pxStep),\n (h.startx = t.startx),\n (h.spacex = t.spacex),\n (h.xs = t.xs);\n else {\n J(), (h.tStep = P()), (h.xs = []);\n const R = d[1] - d[0],\n E = h.spacex \u002F R;\n let ie = w.realTimeRange(G);\n if (\n (h.indexBased || (ie = R), h.indexBased && d[1] - b.src.length \u003E 0)\n ) {\n let B = 1 - (d[1] - b.src.length) \u002F R;\n ie \u002F= B;\n }\n let ee = ie \u002F Zn \u003E 10,\n Re = ie \u002F Gi \u003E 10,\n ue = b.i1;\n Re ? (ue = N(b.i1)) : ee && (ue = U(b.i1));\n for (var x = ue, Y = b.i2; x \u003C= Y; x++) {\n let B = b.src[x],\n ce = b.src[x - 1] || [],\n $ = h.xs[h.xs.length - 1] || [0, []],\n fe = h.indexBased ? x : B[0],\n q = Math.floor((fe - d[0]) * E);\n C(ce, B, q);\n let oe = h.xs[h.xs.length - 1] || [0, []];\n $ !== oe &&\n oe[1] - $[1] \u003C h.tStep * 0.8 &&\n (oe[2] * oe[3] \u003C= $[2] * $[3]\n ? h.xs.pop()\n : h.xs.splice(h.xs.length - 2, 1));\n }\n !h.indexBased && p \u003C Ds && E \u003E 0 && (A(R, E), M(R, E));\n }\n }\n function U(x) {\n let Y = w.getMonth(b.src[x][0]);\n for (var R = x - 1; R \u003E= 0; R--)\n if (w.getMonth(b.src[R][0]) !== Y) return R;\n return 0;\n }\n function N(x) {\n let Y = w.getYear(b.src[x][0]);\n for (var R = x - 1; R \u003E= 0; R--)\n if (w.getYear(b.src[R][0]) !== Y) return R;\n return 0;\n }\n function C(x, Y, R, E) {\n let ie = x[0],\n ee = Y[0];\n if (\n (p \u003C Zn && ((ie += g * vi), (ee += g * vi)),\n (x[0] || p === xi) && w.getYear(ee) !== w.getYear(ie))\n )\n h.xs.push([R, ee, xi, 1]);\n else if (x[0] && w.getMonth(ee) !== w.getMonth(ie))\n h.xs.push([R, ee, Gi, 1]);\n else if (w.dayStart(ee) === ee) {\n let Re = w.getDay(ee) === 13 ? 0 : 0.9;\n h.xs.push([R, ee, Zn, Re]);\n } else ee % h.tStep === 0 && h.xs.push([R, ee, p, 1]);\n }\n function A(x, Y) {\n if (!h.xs.length || !isFinite(Y)) return;\n let R = h.xs[0][1];\n for (;;) {\n R -= h.tStep;\n let E = Math.floor((R - d[0]) * Y);\n if (E \u003C 0) break;\n R % p === 0 && h.xs.unshift([E, R, p, 1]);\n }\n }\n function M(x, Y) {\n if (!h.xs.length || !isFinite(Y)) return;\n let R = h.xs[h.xs.length - 1][1];\n for (;;) {\n R += h.tStep;\n let E = Math.floor((R - d[0]) * Y);\n if (E \u003E h.spacex) break;\n R % r === 0 && h.xs.push([E, R, r, 1]);\n }\n }\n function L() {\n (h.width = l.width - h.sbMax[0] - h.sbMax[1]), (h.height = a);\n }\n function W() {\n let x = {};\n for (var Y of Z()) {\n let R = new Os(Y.id, Y, e);\n x[Y.id] = R;\n }\n h.scales = x;\n }\n function T() {\n h.scales[s.scaleIndex] || (s.scaleIndex = \"A\"),\n (h.scaleIndex = s.scaleIndex),\n s.scaleTemplate || (s.scaleTemplate = [[], Object.keys(h.scales)]);\n let x = s.scaleTemplate;\n (!x[0] || !x[1]) && console.error(\"Define scaleTemplate as [[],[]]\"),\n s.scaleSideIdxs || (s.scaleSideIdxs = []);\n let Y = s.scaleSideIdxs;\n w.autoScaleSideId(0, x, Y), w.autoScaleSideId(1, x, Y), (h.sb = []);\n let R = x[0].includes(Y[0]) ? Y[0] : null;\n h.sb.push(h.scales[R] ? h.scales[R].sb : 0);\n let E = x[1].includes(Y[1]) ? Y[1] : null;\n h.sb.push(h.scales[E] ? h.scales[E].sb : 0);\n }\n function V() {\n let x = h.sb;\n Object.assign(h, h.scales[h.scaleIndex]), (h.sb = x), (h.ys = h.ys || []);\n }\n return (\n W(),\n T(),\n {\n create: () =\u003E (\n K(),\n L(),\n t && (h.mainGrid = t),\n (h.settings = s),\n (h.main = !t),\n (h.id = n),\n V(),\n (h.ohlc = i.ohlc.bind(i)),\n oi(h, d)\n ),\n getLayout: () =\u003E h,\n setMaxSidebar: (x) =\u003E (h.sbMax = x),\n getSidebar: () =\u003E h.sb,\n id: () =\u003E n\n }\n );\n }\n function Li(n, e, t) {\n let o = e.chart,\n i = e.offchart,\n l = e.panes().filter((h) =\u003E h.settings);\n if (!o) return {};\n function s() {\n const h = n.height - n.config.BOTBAR;\n if (l.find((K) =\u003E K.settings.height)) return a(h);\n const Z = i.length,\n S = (2 * Math.sqrt(Z)) \u002F 7 \u002F (Z || 1),\n k = Math.floor(h * S),\n J = h - k * Z;\n let P = Array(Z + 1).fill(k);\n return (P[e.mainPaneId] = J), P;\n }\n function a(h) {\n let Z = e.panes().map((J) =\u003E {\n var P;\n return (P = J.settings.height) != null ? P : 1;\n }),\n S = Z.reduce((J, P) =\u003E J + P, 0);\n (Z = Z.map((J) =\u003E Math.floor((J \u002F S) * h))),\n (S = Z.reduce((J, P) =\u003E J + P, 0));\n for (var k = 0; k \u003C h - S; k++) Z[k % Z.length]++;\n return Z;\n }\n const r = s();\n let p = (h) =\u003E ({\n hub: e,\n meta: t,\n props: n,\n settings: l[h].settings,\n height: r[h]\n }),\n d = new Zi(e.mainPaneId, p(e.mainPaneId)),\n m = [d];\n for (var [g, I] of l.entries())\n g !== e.mainPaneId && m.push(new Zi(g, p(g), d.getLayout()));\n let X = [\n Math.max(...m.map((h) =\u003E h.getSidebar()[0])),\n Math.max(...m.map((h) =\u003E h.getSidebar()[1]))\n ],\n G = [],\n b = 0;\n for (var g = 0; g \u003C m.length; g++) {\n let Z = m[g].id();\n m[g].setMaxSidebar(X), (G[Z] = m[g].create());\n }\n for (var g = 0; g \u003C G.length; g++) (G[g].offset = b), (b += G[g].height);\n return {\n grids: G,\n main: G.find((h) =\u003E h.main),\n indexBased: e.indexBased,\n botbar: {\n width: n.width,\n height: n.config.BOTBAR,\n offset: b,\n xs: G[0] ? G[0].xs : []\n }\n };\n }\n function js(n) {\n let t = document.createElement(\"canvas\").getContext(\"2d\");\n return (t.font = n.config.FONT), t;\n }\n se.HPX;\n class Qs {\n constructor(e, t, o, i) {\n (this.ctx = o),\n (this.core = e),\n (this.style = i.src[6] || t),\n this.draw(i);\n }\n draw(e) {\n const t = e.src[4] \u003E= e.src[1],\n o = t ? this.style.colorCandleUp : this.style.colorCandleDw,\n i = t ? this.style.colorWickUp : this.style.colorWickDw;\n let l = Math.max(e.w, 1),\n s = e.x - 1;\n (this.ctx.lineWidth = 1),\n (this.ctx.strokeStyle = i),\n this.ctx.beginPath(),\n this.ctx.moveTo(s, Math.floor(e.h)),\n this.ctx.lineTo(s, Math.floor(e.l)),\n this.ctx.stroke(),\n (this.ctx.lineWidth = l),\n (this.ctx.strokeStyle = o),\n this.ctx.beginPath(),\n this.ctx.moveTo(s, Math.floor(Math.min(e.o, e.c))),\n this.ctx.lineTo(\n s,\n Math.floor(Math.max(e.o, e.c)) + (e.o === e.c ? 1 : 0)\n ),\n this.ctx.stroke();\n }\n }\n function $s(n, e) {\n let t = e.x - 1;\n n.moveTo(t, Math.floor(Math.min(e.o - 1, e.c - 1))),\n n.lineTo(t, Math.floor(Math.max(e.o, e.c)));\n }\n function qs(n, e) {\n let t = e.x - 1;\n n.moveTo(t, Math.floor(e.h)), n.lineTo(t, Math.floor(e.l));\n }\n const er = se.HPX;\n function tr(n, e, t) {\n let o = t.height,\n i = Math.max(1, e.x2 - e.x1 + er),\n l = e.h,\n s = (e.x2 + e.x1) * 0.5;\n (n.lineWidth = i), n.moveTo(s, o - l), n.lineTo(s, o);\n }\n const nr = se.HPX;\n class ir {\n constructor(e, t, o, i) {\n (this.ctx = o),\n (this.style = i.src[6] || t),\n (this.layout = e.layout),\n this.draw(i);\n }\n draw(e) {\n let t = this.layout.height,\n o = e.x2 - e.x1,\n i = Math.floor(e.h);\n (this.ctx.fillStyle = e.green\n ? this.style.colorVolUp\n : this.style.colorVolDw),\n this.ctx.fillRect(\n Math.floor(e.x1),\n Math.floor(t - i + nr),\n Math.floor(o),\n Math.floor(i + 1)\n );\n }\n }\n const or = se.HPX;\n function lr(n, e = !0, t = !0, o = 5, i, l) {\n let s = n.props.config,\n a = n.props.interval,\n r = n.data,\n p = n.layout.ti2x,\n d = n.layout,\n m = n.view,\n g = d.scaleSpecs.log,\n I = [],\n X = [],\n G = [],\n b = [],\n h = [],\n Z = [];\n if (t)\n var S = l != null ? l : s.VOLSCALE,\n k = sr(n.dataSubset, o),\n J = (S * d.height) \u002F k;\n var P,\n K,\n U,\n N = void 0;\n let { A: C, B: A, pxStep: M } = d,\n L = M * s.CANDLEW,\n W = M \u003E 5 ? 1 : 0;\n for (var T = m.i1, V = m.i2; T \u003C= V; T++) {\n let x = r[T],\n Y = i ? x[i] \u003E 0 : x[4] \u003E= x[1];\n if (\n ((U = p(x[0], T) + 1),\n r[T - 1] && x[0] - r[T - 1][0] \u003E a && (N = null),\n e)\n ) {\n let R = g\n ? {\n x: U,\n w: L,\n o: Math.floor(ne.log(x[1]) * C + A),\n h: Math.floor(ne.log(x[2]) * C + A),\n l: Math.floor(ne.log(x[3]) * C + A),\n c: Math.floor(ne.log(x[4]) * C + A),\n green: Y,\n src: x\n }\n : {\n x: U,\n w: L,\n o: Math.floor(x[1] * C + A),\n h: Math.floor(x[2] * C + A),\n l: Math.floor(x[3] * C + A),\n c: Math.floor(x[4] * C + A),\n green: Y,\n src: x\n };\n Y ? (I.push(R), G.push(R)) : (X.push(R), b.push(R));\n }\n if (t) {\n (P = N || Math.floor(U - M * 0.5)), (K = Math.floor(U + M * 0.5) + or);\n let R = { x1: P, x2: K, h: x[o] * J, green: Y, src: x };\n Y ? h.push(R) : Z.push(R);\n }\n N = K + W;\n }\n return {\n upBodies: I,\n upWicks: G,\n dwBodies: X,\n dwWicks: b,\n upVolbars: h,\n dwVolbars: Z,\n maxVolume: k,\n volScale: J\n };\n }\n function sr(n, e) {\n let t = 0;\n for (var o = 0; o \u003C n.length; o++) {\n let i = n[o][e];\n i \u003E t && (t = i);\n }\n return t;\n }\n function Si(n, e, t, o, i) {\n let l = 0,\n s = [],\n a = 0,\n r = 1 \u002F i,\n p = Math.max(t - i, 0);\n for (var d = p; d \u003C= o; d++)\n (l += n[d][e]),\n a++,\n a \u003E i && ((l -= n[d - i][e]), a--),\n a === i && s.push([n[d][0], l * r]);\n return s;\n }\n function rr(n, e = []) {\n return e[4] \u003E= e[1] ? n.colorBodyUp : n.colorBodyDw;\n }\n function ar(n, e) {\n let t = n.split(\"px\");\n return e + \"px\" + t[1];\n }\n function cr(n, e, t, o, i = 5) {\n let l = e.view.i1,\n s = e.view.i2,\n a = t.avgVolumeSMA,\n r = Si(e.data, i, l, s, a),\n p = e.layout;\n o.maxVolume;\n let d = o.volScale,\n m = p.height;\n if (\n (e.props.config.VOLSCALE * 0.5 * m,\n (n.lineJoin = \"round\"),\n (n.lineWidth = 0.75),\n (n.strokeStyle = t.colorAvgVol),\n n.beginPath(),\n e.layout.indexBased)\n )\n return;\n let g = e.data.length - r.length;\n for (var I = 0, X = r.length; I \u003C X; I++) {\n let G = p.ti2x(r[I][0], I + g),\n b = m - r[I][1] * d;\n n.lineTo(G, b);\n }\n n.stroke();\n }\n function dr(n, e, t, o, i, l, s = !0, a) {\n if ((typeof l == \"undefined\" && (l = 5), typeof l == \"number\"))\n l = { tl: l, tr: l, br: l, bl: l };\n else {\n var r = { tl: 0, tr: 0, br: 0, bl: 0 };\n for (var p in r) l[p] = l[p] || r[p];\n }\n n.beginPath(),\n n.moveTo(e + l.tl, t),\n n.lineTo(e + o - l.tr, t),\n n.quadraticCurveTo(e + o, t, e + o, t + l.tr),\n n.lineTo(e + o, t + i - l.br),\n n.quadraticCurveTo(e + o, t + i, e + o - l.br, t + i),\n n.lineTo(e + l.bl, t + i),\n n.quadraticCurveTo(e, t + i, e, t + i - l.bl),\n n.lineTo(e, t + l.tl),\n n.quadraticCurveTo(e, t, e + l.tl, t),\n n.closePath(),\n s && n.fill(),\n a && n.stroke();\n }\n function pr(n, e, t, o, i, l, s = !0) {\n const r = o - e,\n p = i - t,\n d = Math.atan2(p, r);\n n.beginPath(),\n n.moveTo(e, t),\n n.lineTo(o, i),\n s &&\n (n.moveTo(o, i),\n n.lineTo(\n o - 7 * Math.cos(d - Math.PI \u002F 5),\n i - 7 * Math.sin(d - Math.PI \u002F 5)\n ),\n n.moveTo(o, i),\n n.lineTo(\n o - 7 * Math.cos(d + Math.PI \u002F 5),\n i - 7 * Math.sin(d + Math.PI \u002F 5)\n )),\n (n.strokeStyle = l),\n (n.lineWidth = 1),\n n.stroke();\n }\n const ur = w.formatCash;\n class hr {\n constructor(e, t, o, i) {\n let l = Ke.instance(i.id),\n s = Je.instance(i.id),\n a = de.instance(i.id),\n r = kt.instance(i.id);\n (this.ovSrc = t),\n (this.overlay = null),\n (this.id = e),\n (this.handlers = {}),\n (this.$core = { hub: l, meta: s, scan: r }),\n this.update(t, o, i),\n (this.$props = t.props),\n (this.$events = a),\n (this.lib = {\n Candle: Qs,\n Volbar: ir,\n layoutCnv: lr,\n formatCash: ur,\n candleBody: $s,\n candleWick: qs,\n volumeBar: tr,\n fastSma: Si,\n avgVolume: cr,\n candleColor: rr,\n roundRect: dr,\n rescaleFont: ar,\n drawArrow: pr,\n Utils: w\n });\n }\n prop(e, t = {}) {\n e in this.$props || (this.$props[e] = t.def);\n }\n update(e, t, o) {\n if (!t) return;\n let i = this.$core;\n (i.layout = this.buildLayout(t, o.range, e)),\n (i.dataSubset = e.dataSubset),\n (i.data = e.data),\n (i.view = e.dataView),\n (i.id = e.id),\n (i.paneId = i.layout.id),\n (i.uuid = e.uuid),\n (i.range = o.range),\n (i.colors = o.colors),\n (i.cursor = o.cursor),\n (i.src = e),\n (i.props = o),\n (i.indexOffset = e.indexOffset);\n }\n buildLayout(e, t, o) {\n let i = {};\n this.scaleId = this.getScaleId(e);\n let l = e.scales[this.scaleId];\n return oi(Object.assign(i, e, l), t, o);\n }\n getScaleId(e) {\n let t = e.scales;\n for (var o in t) if (t[o].scaleSpecs.ovIdxs.includes(this.id)) return o;\n }\n watchProp(e, t) {\n (this.handlers[e] = this.handlers[e] || []), this.handlers[e].push(t);\n let o = this.$props[e];\n delete this.$props[e],\n Object.defineProperty(this.$props, e, {\n get: () =\u003E o,\n set: (i) =\u003E {\n let l = o;\n o = i;\n for (let s of this.handlers[e]) s(i, l);\n },\n enumerable: !0,\n configurable: !0\n });\n }\n destroy() {\n for (let e in this.handlers) {\n let t = this.$props[e];\n delete this.$props[e], (this.$props[e] = t);\n }\n this.handlers = {};\n }\n }\n class Jt {\n constructor(e, t, o) {\n (this.id = e),\n (this.nvId = o),\n (this.name = t),\n (this.zIndex = 0),\n (this.overlay = null),\n (this.ovSrc = null),\n (this.env = null),\n (this.ctxType = null),\n (this.display = !0),\n (this.opacity = void 0);\n }\n update() {\n var e;\n this.ovSrc &&\n (this.display = (e = this.ovSrc.settings.display) != null ? e : !0);\n }\n }\n class fr {\n constructor(e) {\n (this.t0 = this.t = w.now()),\n (this.id = setInterval(() =\u003E {\n w.now() - this.t \u003E 100 ||\n (w.now() - this.t0 \u003E 1200 && this.stop(),\n this.id && e(this),\n (this.t = w.now()));\n }, 16));\n }\n stop() {\n clearInterval(this.id), (this.id = null);\n }\n }\n class mr {\n async setup(e) {\n (this.MIN_ZOOM = e.props.config.MIN_ZOOM),\n (this.MAX_ZOOM = e.props.config.MAX_ZOOM),\n w.isMobile && (this.MIN_ZOOM *= 0.5),\n (this.canvas = e.canvas),\n (this.ctx = e.ctx),\n (this.props = e.props),\n (this.layout = e.layout),\n (this.rrId = e.rrUpdId),\n (this.gridUpdId = e.gridUpdId),\n (this.gridId = e.id),\n (this.cursor = {}),\n (this.oldMeta = {}),\n (this.range = this.props.range),\n (this.interval = this.props.interval),\n (this.offsetX = 0),\n (this.offsetY = 0),\n (this.deltas = 0),\n (this.wmode = this.props.config.SCROLL_WHEEL),\n (this.hub = Ke.instance(this.props.id)),\n (this.meta = Je.instance(this.props.id)),\n (this.events = de.instance(this.props.id)),\n await this.listeners(),\n this.mouseEvents(\"addEventListener\");\n }\n mouseEvents(e) {\n [\"mousemove\", \"mouseout\", \"mouseup\", \"mousedown\", \"click\"].forEach(\n (t) =\u003E {\n e === \"addEventListener\" && (this[\"_\" + t] = this[t].bind(this)),\n this.canvas[e](t, this[\"_\" + t]);\n }\n );\n }\n async listeners() {\n const e = await Promise.resolve().then(() =\u003E Ja),\n t = await Promise.resolve().then(() =\u003E co);\n (this.hm = e.default(this.canvas)),\n this.hm.wheel((s, a) =\u003E this.mousezoom(-a * 50, s));\n let o = (this.mc = new t.Manager(this.canvas)),\n i = w.isMobile ? 10 : 0;\n o.add(new t.Pan({ threshold: i })),\n o.add(new t.Tap()),\n o.add(new t.Pinch({ threshold: 0 })),\n o.get(\"pinch\").set({ enable: !0 }),\n w.isMobile && o.add(new t.Press()),\n o.on(\"panstart\", (s) =\u003E {\n if (this.cursor.scroll_lock) return;\n if (this.cursor.mode === \"aim\") return this.emitCursorCoord(s);\n let a = this.layout.scaleIndex,\n r = this.meta.getYtransform(this.gridId, a);\n (this.drug = {\n x: s.center.x + this.offsetX,\n y: s.center.y + this.offsetY,\n r: this.range.slice(),\n t: this.range[1] - this.range[0],\n o: (r && r.offset) || 0,\n y_r: r && r.range ? r.range.slice() : void 0,\n B: this.layout.B,\n t0: w.now()\n }),\n this.events.emit(\"cursor-locked\", !0),\n this.events.emit(\"cursor-changed\", {\n gridId: this.gridId,\n x: s.center.x + this.offsetX,\n y: s.center.y + this.offsetY\n });\n }),\n o.on(\"panmove\", (s) =\u003E {\n w.isMobile &&\n (this.calcOffset(),\n this.propagate(\"mousemove\", this.touch2mouse(s))),\n this.drug\n ? this.mousedrag(this.drug.x + s.deltaX, this.drug.y + s.deltaY)\n : this.cursor.mode === \"aim\" && this.emitCursorCoord(s);\n }),\n o.on(\"panend\", (s) =\u003E {\n w.isMobile && this.drug && this.panFade(s),\n (this.drug = null),\n this.events.emit(\"cursor-locked\", !1);\n }),\n o.on(\"tap\", (s) =\u003E {\n w.isMobile &&\n (this.simMousedown(s),\n this.fade && this.fade.stop(),\n this.events.emit(\"cursor-changed\", {}),\n this.events.emit(\"cursor-changed\", { mode: \"explore\" }),\n this.events.emitSpec(this.rrId, \"update-rr\"));\n }),\n o.on(\"pinchstart\", () =\u003E {\n (this.drug = null),\n (this.pinch = {\n t: this.range[1] - this.range[0],\n r: this.range.slice()\n });\n }),\n o.on(\"pinchend\", () =\u003E {\n this.pinch = null;\n }),\n o.on(\"pinch\", (s) =\u003E {\n this.pinch && this.pinchZoom(s.scale);\n }),\n o.on(\"press\", (s) =\u003E {\n w.isMobile &&\n (this.fade && this.fade.stop(),\n this.calcOffset(),\n this.emitCursorCoord(s, { mode: \"aim\" }),\n setTimeout(() =\u003E this.events.emitSpec(this.rrId, \"update-rr\")),\n this.simMousedown(s));\n });\n let l = this.canvas.addEventListener;\n l(\"gesturestart\", this.gesturestart),\n l(\"gesturechange\", this.gesturechange),\n l(\"gestureend\", this.gestureend);\n }\n gesturestart(e) {\n e.preventDefault();\n }\n gesturechange(e) {\n e.preventDefault();\n }\n gestureend(e) {\n e.preventDefault();\n }\n mousemove(e) {\n w.isMobile ||\n (this.events.emit(\"cursor-changed\", {\n visible: !0,\n gridId: this.gridId,\n x: e.layerX,\n y: e.layerY - 1\n }),\n this.calcOffset(),\n this.propagate(\"mousemove\", e));\n }\n mouseout(e) {\n w.isMobile ||\n (this.events.emit(\"cursor-changed\", { visible: !1 }),\n this.propagate(\"mouseout\", e));\n }\n mouseup(e) {\n (this.drug = null),\n this.events.emit(\"cursor-locked\", !1),\n this.propagate(\"mouseup\", e);\n }\n mousedown(e) {\n w.isMobile ||\n (this.events.emit(\"cursor-locked\", !0),\n this.propagate(\"mousedown\", e),\n !e.defaultPrevented &&\n this.events.emit(\"grid-mousedown\", [this.gridId, e]));\n }\n simMousedown(e) {\n e.srcEvent.defaultPrevented ||\n (this.events.emit(\"grid-mousedown\", [this.gridId, e]),\n this.propagate(\"mousemove\", this.touch2mouse(e)),\n this.events.emitSpec(this.rrId, \"update-rr\"),\n this.propagate(\"mousedown\", this.touch2mouse(e)),\n setTimeout(() =\u003E {\n this.propagate(\"click\", this.touch2mouse(e));\n }));\n }\n touch2mouse(e) {\n return (\n this.calcOffset(),\n {\n original: e.srcEvent,\n layerX: e.center.x + this.offsetX,\n layerY: e.center.y + this.offsetY,\n preventDefault: function () {\n this.original.preventDefault();\n }\n }\n );\n }\n click(e) {\n this.propagate(\"click\", e);\n }\n emitCursorCoord(e, t = {}) {\n this.events.emit(\n \"cursor-changed\",\n Object.assign(\n {\n gridId: this.gridId,\n x: e.center.x + this.offsetX,\n y: e.center.y + this.offsetY\n },\n t\n )\n );\n }\n panFade(e) {\n let t = w.now() - this.drug.t0,\n i = (42 * (this.range[1] - this.drug.r[1])) \u002F t,\n l = Math.abs(i * 0.01);\n t \u003E 500 ||\n (this.fade && this.fade.stop(),\n (this.fade = new fr((s) =\u003E {\n (i *= 0.85),\n Math.abs(i) \u003C l && s.stop(),\n (this.range[0] += i),\n (this.range[1] += i),\n this.changeRange();\n })));\n }\n calcOffset() {\n let e = this.canvas.getBoundingClientRect();\n (this.offsetX = -e.x), (this.offsetY = -e.y);\n }\n mousezoom(e, t) {\n var r;\n if (this.meta.scrollLock) return;\n if (this.wmode !== \"pass\") {\n if (this.wmode === \"click\" && !this.oldMeta.activated) return;\n t.originalEvent.preventDefault(), t.preventDefault();\n }\n (t.deltaX = t.deltaX || w.getDeltaX(t)),\n (t.deltaY = t.deltaY || w.getDeltaY(t)),\n Math.abs(t.deltaX) \u003E 0 &&\n ((this.trackpad = !0),\n Math.abs(t.deltaX) \u003E= Math.abs(t.deltaY) && (e *= 0.1),\n this.trackpadScroll(t)),\n this.trackpad && (e *= 0.032),\n (e = w.smartWheel(e));\n const o = (r = window.devicePixelRatio) != null ? r : 1;\n let i = this.hub.mainOv.dataSubset;\n if (\n (e \u003C 0 && i.length \u003C= this.MIN_ZOOM) ||\n (e \u003E 0 && i.length \u003E this.MAX_ZOOM)\n )\n return;\n let l = this.interval \u002F 1e3,\n s = e * l * i.length,\n a = this.props.config.ZOOM_MODE === \"tl\";\n if (t.originalEvent.ctrlKey || a) {\n let d = (t.originalEvent.offsetX \u002F (this.canvas.width \u002F o - 1)) * s,\n m = s - d;\n (this.range[0] -= d), (this.range[1] += m);\n } else this.range[0] -= s;\n if (a) {\n let d = (t.originalEvent.offsetY \u002F (this.canvas.height \u002F o - 1)) * 2,\n m = 2 - d,\n g = s \u002F (this.range[1] - this.range[0]);\n this.events.emit(\"rezoom-range\", {\n gridId: this.gridId,\n z: g,\n diff1: d,\n diff2: m\n });\n }\n this.changeRange();\n }\n mousedrag(e, t) {\n if (this.meta.scrollLock) return;\n let o = (this.drug.t * (this.drug.x - e)) \u002F this.layout.width,\n i = this.layout.$hi - this.layout.$lo;\n i *= (this.drug.y - t) \u002F this.layout.height;\n let l = this.drug.o + i,\n s = this.layout.settings.logScale;\n if (s && this.drug.y_r) {\n let d = this.drug.y - t;\n var a = this.drug.y_r.slice();\n (a[0] = ne.exp((0 - this.drug.B + d) \u002F this.layout.A)),\n (a[1] = ne.exp(\n (this.layout.height - this.drug.B + d) \u002F this.layout.A\n ));\n }\n let r = this.layout.scaleIndex,\n p = this.meta.getYtransform(this.gridId, r);\n this.drug.y_r &&\n p &&\n !p.auto &&\n this.events.emit(\"sidebar-transform\", {\n gridId: this.gridId,\n scaleId: r,\n range: s\n ? a || this.drug.y_r\n : [this.drug.y_r[0] - l, this.drug.y_r[1] - l]\n }),\n (this.range[0] = this.drug.r[0] + o),\n (this.range[1] = this.drug.r[1] + o),\n this.changeRange();\n }\n pinchZoom(e) {\n if (this.meta.scrollLock) return;\n let t = this.hub.mainOv.dataSubset;\n if (\n (e \u003E 1 && t.length \u003C= this.MIN_ZOOM) ||\n (e \u003C 1 && t.length \u003E this.MAX_ZOOM)\n )\n return;\n let o = this.pinch.t,\n i = (o * 1) \u002F e;\n (this.range[0] = this.pinch.r[0] - (i - o) * 0.5),\n (this.range[1] = this.pinch.r[1] + (i - o) * 0.5),\n this.changeRange();\n }\n trackpadScroll(e) {\n if (this.meta.scrollLock) return;\n let t = this.range[1] - this.range[0];\n (this.range[0] += e.deltaX * t * 0.011),\n (this.range[1] += e.deltaX * t * 0.011),\n this.changeRange();\n }\n changeRange() {\n let e = this.hub.mainOv.data;\n if (!this.range.length || e.length \u003C 2) return;\n let t = e.length - 1,\n o = this.range,\n i = this.layout;\n (o[0] = w.clamp(o[0], -1 \u002F 0, i.ti(e[t][0], t) - this.interval * 5.5)),\n (o[1] = w.clamp(o[1], i.ti(e[0][0], 0) + this.interval * 5.5, 1 \u002F 0)),\n this.events.emit(\"range-changed\", o);\n }\n propagate(e, t) {\n this.events.emitSpec(this.gridUpdId, \"propagate\", { name: e, event: t });\n }\n destroy() {\n let e = this.canvas.removeEventListener;\n e(\"gesturestart\", this.gesturestart),\n e(\"gesturechange\", this.gesturechange),\n e(\"gestureend\", this.gestureend),\n this.mc && this.mc.destroy(),\n this.hm && this.hm.unwheel(),\n this.mouseEvents(\"removeEventListener\");\n }\n }\n class gr {\n constructor(e, t) {\n (this._keydown = this.keydown.bind(this)),\n (this._keyup = this.keyup.bind(this)),\n (this._keypress = this.keypress.bind(this)),\n window.addEventListener(\"keydown\", this._keydown),\n window.addEventListener(\"keyup\", this._keyup),\n window.addEventListener(\"keypress\", this._keypress),\n (this.events = t),\n (this.updId = e);\n }\n off() {\n window.removeEventListener(\"keydown\", this._keydown),\n window.removeEventListener(\"keyup\", this._keyup),\n window.removeEventListener(\"keypress\", this._keypress);\n }\n keydown(e) {\n this.events.emitSpec(this.updId, \"propagate\", {\n name: \"keydown\",\n event: e\n });\n }\n keyup(e) {\n this.events.emitSpec(this.updId, \"propagate\", {\n name: \"keyup\",\n event: e\n });\n }\n keypress(e) {\n this.events.emitSpec(this.updId, \"propagate\", {\n name: \"keypress\",\n event: e\n });\n }\n }\n const Ln = se.HPX;\n class yr extends Jt {\n constructor(e, t) {\n super(e, \"__$Crosshair__\", t),\n (this.events = de.instance(this.nvId)),\n this.events.on(\"crosshair:show-crosshair\", this.onShowHide.bind(this)),\n (this.id = e),\n (this.zIndex = 1e6),\n (this.ctxType = \"Canvas\"),\n (this.show = !0),\n (this.overlay = {\n draw: this.draw.bind(this),\n destroy: this.destroy.bind(this)\n }),\n (this.env = { update: this.envEpdate.bind(this), destroy: () =\u003E {} });\n }\n draw(e) {\n if (!this.layout) return;\n const t = this.props.cursor;\n !t.visible ||\n !this.show ||\n (e.save(),\n (e.strokeStyle = this.props.colors.cross),\n e.beginPath(),\n e.setLineDash([5]),\n t.gridId === this.layout.id &&\n (e.moveTo(0, t.y + Ln), e.lineTo(this.layout.width + Ln, t.y + Ln)),\n e.moveTo(t.x, 0),\n e.lineTo(t.x, this.layout.height),\n e.stroke(),\n e.restore());\n }\n envEpdate(e, t, o) {\n (this.ovSrc = e), (this.layout = t), (this.props = o);\n }\n onCursor(e) {\n this.props && (this.props.cursor = e);\n }\n onShowHide(e) {\n this.show = e;\n }\n destroy() {\n this.events.off(\"crosshair\");\n }\n }\n const Ft = se.HPX;\n class br extends Jt {\n constructor(e, t) {\n super(e, \"__$Grid__\", t),\n (this.events = de.instance(this.nvId)),\n this.events.on(\"grid-layer:show-grid\", this.onShowHide.bind(this)),\n (this.id = e),\n (this.zIndex = -1e6),\n (this.ctxType = \"Canvas\"),\n (this.show = !0),\n (this.overlay = {\n draw: this.draw.bind(this),\n destroy: this.destroy.bind(this)\n }),\n (this.env = { update: this.envEpdate.bind(this), destroy: () =\u003E {} });\n }\n draw(e) {\n let t = this.layout;\n if (!t || !this.show) return;\n (e.strokeStyle = this.props.colors.grid), e.beginPath();\n const o = t.height;\n for (var [i, l] of t.xs) e.moveTo(i + Ft, 0), e.lineTo(i + Ft, o);\n for (var [s, a] of t.ys) e.moveTo(0, s + Ft), e.lineTo(t.width, s + Ft);\n e.stroke();\n }\n envEpdate(e, t, o) {\n (this.ovSrc = e), (this.layout = t), (this.props = o);\n }\n onShowHide(e) {\n this.show = e;\n }\n destroy() {\n this.events.off(\"grid-layer\");\n }\n }\n const ke = se.HPX;\n function Ir(n, e, t, o, i) {\n var l = t.ys;\n i.font = n.config.FONT;\n var { x: s, y: a, w: r, h: p } = Sn(n, e, o, i);\n (i.fillStyle = n.colors.text), i.beginPath();\n for (var d of l) {\n if (d[0] \u003E e.height) continue;\n var m = o === \"left\" ? r + ke : s + ke,\n g = o === \"left\" ? m - 4.5 : m + 4.5;\n i.moveTo(m, d[0] + ke), i.lineTo(g, d[0] + ke);\n var I = o === \"left\" ? -10 : 10;\n i.textAlign = o === \"left\" ? \"end\" : \"start\";\n let X = t.prec;\n i.fillText(d[1].toFixed(X), m + I, d[0] + 4);\n }\n i.stroke();\n }\n function Sn(n, e, t, o) {\n var i = t === \"right\" ? 1 : 0,\n l = e.sbMax[i],\n s,\n a,\n r,\n p;\n switch (t) {\n case \"left\":\n (s = 0),\n (a = 0),\n (r = Math.floor(l)),\n (p = e.height),\n o.clearRect(s, a, r, p),\n (o.strokeStyle = n.colors.scale),\n o.beginPath(),\n o.moveTo(s + ke + r, 0),\n o.lineTo(s + ke + r, p),\n o.stroke();\n break;\n case \"right\":\n (s = 0),\n (a = 0),\n (r = Math.floor(l)),\n (p = e.height),\n o.clearRect(s, a, r, p),\n (o.strokeStyle = n.colors.scale),\n o.beginPath(),\n o.moveTo(s - ke, 0),\n o.lineTo(s - ke, p),\n o.stroke();\n break;\n }\n return { x: s, y: a, w: r, h: p };\n }\n function Xr(n, e, t, o, i) {\n const l = n.config.PANHEIGHT;\n let a = (n.cursor.scales[t.scaleSpecs.id] || 0).toFixed(t.prec);\n i.fillStyle = n.colors.panel;\n var r = o === \"right\" ? 1 : 0;\n let p = e.sbMax[r] - 5,\n d = r ? 1 : 4,\n m = n.cursor.y - l * 0.5 + ke,\n g = r ? 7 : p - 3;\n Ci(i, d, m, p, l, 3, r),\n (i.fillStyle = n.colors.textHL),\n (i.textAlign = r ? \"left\" : \"right\"),\n i.fillText(a, g, m + 15);\n }\n function Gr(n, e, t, o, i, l) {\n const s = Math.floor(n.config.PANHEIGHT * 0.8),\n a = n.config.CANDLE_TIME && n.timeFrame \u003E= se.MINUTE;\n let p = l.value.toFixed(t.prec);\n i.fillStyle = l.color;\n var d = o === \"right\" ? 1 : 0;\n let m = e.sbMax[d] - 5,\n g = d ? 1 : 4,\n I = l.y - s * 0.5 + ke,\n X = d ? 7 : m - 3,\n G = a ? Math.floor(s * 1.75) + 2 + ke : s;\n if (\n (Ci(i, g, I, m, G, 3, d),\n (i.fillStyle = n.colors.back),\n (i.textAlign = d ? \"left\" : \"right\"),\n i.fillText(p, X, I + s - 4),\n a)\n ) {\n let b = w.getCandleTime(n.timeFrame);\n (i.textAlign = d ? \"left\" : \"right\"), i.fillText(b, X, I + s + 9);\n }\n }\n function Ci(n, e, t, o, i, l, s) {\n o \u003C 2 * l && (l = o \u002F 2),\n i \u003C 2 * l && (l = i \u002F 2),\n n.beginPath(),\n n.moveTo(e + l, t),\n n.arcTo(e + o, t, e + o, t + i, l * s),\n n.arcTo(e + o, t + i, e, t + i, l * s),\n n.arcTo(e, t + i, e, t, l * (1 - s)),\n n.arcTo(e, t, e + o, t, l * (1 - s)),\n n.closePath(),\n n.fill();\n }\n function Ri(n, e, t) {\n (t.strokeStyle = n.colors.scale),\n t.beginPath(),\n t.moveTo(0, 0.5),\n t.lineTo(e.width, 0.5),\n t.stroke();\n }\n function xr(n, e, t, o) {\n var i = t === \"right\" ? 1 : 0,\n l = e.sbMax[i];\n (o.font = n.config.FONT), Sn(n, e, t, o), e.id && Ri(n, e, o);\n let s = Math.floor(l * 0.5),\n a = Math.floor(e.height * 0.5);\n (o.fillStyle = n.colors.text),\n (o.textAlign = \"center\"),\n o.fillText(\"Error\", s, a);\n }\n const Lt = {\n body: Ir,\n border: Sn,\n panel: Xr,\n upperBorder: Ri,\n error: xr,\n tracker: Gr\n };\n function vr(n, e, t) {\n (e.strokeStyle = t.color),\n e.setLineDash([1, 2]),\n e.beginPath(),\n e.moveTo(0, t.y),\n e.lineTo(n.width, t.y),\n e.stroke(),\n e.setLineDash([]);\n }\n class Zr extends Jt {\n constructor(e, t, o) {\n super(e, \"__$Trackers__\"),\n (this.id = e),\n (this.zIndex = 5e5),\n (this.ctxType = \"Canvas\"),\n (this.hub = Ke.instance(t.id)),\n (this.meta = Je.instance(t.id)),\n (this.gridId = o),\n (this.props = t),\n (this.overlay = {\n draw: this.draw.bind(this),\n destroy: this.destroy.bind(this),\n drawSidebar: this.drawSidebar.bind(this)\n }),\n (this.env = { update: this.envEpdate.bind(this), destroy: () =\u003E {} });\n }\n draw(e) {\n if (!this.layout) return;\n let t = this.meta.valueTrackers[this.gridId] || [];\n this.trackers = [];\n for (var o = 0; o \u003C t.length; o++) {\n let i = t[o];\n if (!i) continue;\n let l = this.hub.ovData(this.gridId, o) || [],\n s = l[l.length - 1] || [],\n a = i(s);\n (a.ovId = o),\n !(!a.show || a.value === void 0) &&\n ((a.y = this.layout.value2y(a.value)),\n (a.color = a.color || this.props.colors.scale),\n a.line && vr(this.layout, e, a),\n this.trackers.push(a));\n }\n }\n drawSidebar(e, t, o) {\n if (this.layout)\n for (var i of this.trackers || [])\n this.getScaleId(i.ovId) === o.scaleSpecs.id &&\n Lt.tracker(this.props, this.layout, o, t, e, i);\n }\n envEpdate(e, t, o) {\n (this.ovSrc = e),\n (this.layout = t),\n (this.props = o),\n (this.scaleId = this.getScaleId());\n }\n getScaleId(e) {\n let t = this.layout.scales;\n for (var o in t) if (t[o].scaleSpecs.ovIdxs.includes(e)) return o;\n }\n destroy() {}\n }\n function Lr(n, e, t) {\n let o = document.getElementById(n),\n i = window.devicePixelRatio || 1;\n (o.style.width = `${e}px`), (o.style.height = `${t}px`), i \u003C 1 && (i = 1);\n var l = o.getBoundingClientRect();\n (o.width = l.width * i), (o.height = l.height * i);\n let s = o.getContext(\"2d\", {});\n s.scale(i, i), s.measureTextOrg || (s.measureTextOrg = s.measureText);\n let a = n.split(\"-\").shift();\n return (s.measureText = (r) =\u003E w.measureText(s, r, a)), [o, s];\n }\n function Sr(n, e, t, o) {\n let i = window.devicePixelRatio || 1;\n (n.style.width = `${t}px`), (n.style.height = `${o}px`), i \u003C 1 && (i = 1);\n var l = n.getBoundingClientRect();\n (n.width = l.width * i), (n.height = l.height * i), e.scale(i, i);\n }\n const gt = { setup: Lr, resize: Sr };\n function Cr(n) {\n let e, t;\n return {\n c() {\n (e = te(\"div\")),\n (t = te(\"canvas\")),\n z(t, \"id\", n[2]),\n z(e, \"id\", n[1]),\n z(e, \"style\", n[0]),\n z(e, \"class\", \"nvjs-canvas-rendrer svelte-8n0n7w\");\n },\n m(o, i) {\n Q(o, e, i), re(e, t);\n },\n p(o, [i]) {\n i & 1 && z(e, \"style\", o[0]);\n },\n i: le,\n o: le,\n d(o) {\n o && D(e);\n }\n };\n }\n function Rr(n, e, t) {\n let o,\n i,\n l,\n { id: s } = e,\n { props: a = {} } = e,\n { rr: r = {} } = e,\n { layout: p = {} } = e,\n d = de.instance(a.id),\n m = `rr-${s}-${r.id}`,\n g = `grid-${s}`,\n I = `${a.id}-rr-${s}-${r.id}`,\n X = `${a.id}-canvas-${s}-${r.id}`;\n d.on(`${m}:update-rr`, P), d.on(`${m}:run-rr-task`, K);\n let G, b, h;\n it(() =\u003E {\n J();\n }),\n je(() =\u003E {\n d.off(`${m}`), h && h.destroy();\n });\n function Z(C) {\n (h = C),\n h.setup({\n id: s,\n canvas: G,\n ctx: b,\n props: a,\n layout: p,\n rrUpdId: m,\n gridUpdId: g\n });\n }\n function S() {\n h && (h.destroy(), (h = null));\n }\n function k() {\n return h;\n }\n function J() {\n [G, b] = gt.setup(X, p.width, p.height);\n }\n function P(C = p) {\n t(3, (p = C)),\n !(!b || !p) &&\n (b.clearRect(0, 0, G.width, G.height),\n r.layers.forEach((A) =\u003E {\n if (!A.display) return;\n b.save();\n let M = A.overlay;\n A.opacity && (b.globalAlpha = A.opacity);\n try {\n M.draw(b);\n } catch (L) {\n console.log(`Layer ${s}.${A.id}`, L);\n }\n (b.globalAlpha = 1), b.restore();\n }),\n s \u003E 0 && U());\n }\n function K(C) {\n C.handler(G, b, h);\n }\n function U() {\n (b.strokeStyle = a.colors.scale),\n b.beginPath(),\n b.moveTo(0, 0.5),\n b.lineTo(p.width, 0.5),\n b.stroke();\n }\n function N() {\n G && (gt.resize(G, b, p.width, p.height), P());\n }\n return (\n (n.$set = (C) =\u003E {\n \"id\" in C && t(4, (s = C.id)),\n \"props\" in C && t(5, (a = C.props)),\n \"rr\" in C && t(6, (r = C.rr)),\n \"layout\" in C && t(3, (p = C.layout));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 8 &&\n t(\n 0,\n (o = `\n left: ${p.sbMax[0]}px;\n top: ${p.offset || 0}px;\n position: absolute;\n height: ${p.height}px;\n }`)\n ),\n n.$.dirty & 8 && t(11, (i = p.width)),\n n.$.dirty & 8 && t(10, (l = p.height)),\n n.$.dirty & 3072 && N();\n }),\n [o, I, X, p, s, a, r, Z, S, k, l, i]\n );\n }\n class wr extends Ce {\n constructor(e) {\n super(),\n Se(this, e, Rr, Cr, Xe, {\n id: 4,\n props: 5,\n rr: 6,\n layout: 3,\n attach: 7,\n detach: 8,\n getInput: 9\n });\n }\n get attach() {\n return this.$.ctx[7];\n }\n get detach() {\n return this.$.ctx[8];\n }\n get getInput() {\n return this.$.ctx[9];\n }\n }\n function wi(n, e, t) {\n const o = n.slice();\n return (o[23] = e[t]), (o[24] = e), (o[25] = t), o;\n }\n function Yi(n) {\n let e,\n t = n[24],\n o = n[25],\n i;\n const l = () =\u003E n[7](e, t, o),\n s = () =\u003E n[7](null, t, o);\n let a = { id: n[1], layout: n[0], props: n[2], rr: n[23] };\n return (\n (e = new wr({ props: a })),\n l(),\n {\n c() {\n xe(e.$.fragment);\n },\n m(r, p) {\n me(e, r, p), (i = !0);\n },\n p(r, p) {\n (t !== r[24] || o !== r[25]) && (s(), (t = r[24]), (o = r[25]), l());\n const d = {};\n p & 2 && (d.id = r[1]),\n p & 1 && (d.layout = r[0]),\n p & 4 && (d.props = r[2]),\n p & 8 && (d.rr = r[23]),\n e.$set(d);\n },\n i(r) {\n i || (F(e.$.fragment, r), (i = !0));\n },\n o(r) {\n O(e.$.fragment, r), (i = !1);\n },\n d(r) {\n s(), ge(e, r);\n }\n }\n );\n }\n function Ti(n) {\n let e,\n t,\n o = n[23].ctxType === \"Canvas\" && Yi(n);\n return {\n c() {\n o && o.c(), (e = we());\n },\n m(i, l) {\n o && o.m(i, l), Q(i, e, l), (t = !0);\n },\n p(i, l) {\n i[23].ctxType === \"Canvas\"\n ? o\n ? (o.p(i, l), l & 8 && F(o, 1))\n : ((o = Yi(i)), o.c(), F(o, 1), o.m(e.parentNode, e))\n : o &&\n (Ze(),\n O(o, 1, 1, () =\u003E {\n o = null;\n }),\n Le());\n },\n i(i) {\n t || (F(o), (t = !0));\n },\n o(i) {\n O(o), (t = !1);\n },\n d(i) {\n i && D(e), o && o.d(i);\n }\n };\n }\n function Yr(n) {\n let e,\n t,\n o = Ye(n[3]),\n i = [];\n for (let s = 0; s \u003C o.length; s += 1) i[s] = Ti(wi(n, o, s));\n const l = (s) =\u003E\n O(i[s], 1, 1, () =\u003E {\n i[s] = null;\n });\n return {\n c() {\n e = te(\"div\");\n for (let s = 0; s \u003C i.length; s += 1) i[s].c();\n z(e, \"class\", \"nvjs-grid\"), z(e, \"style\", n[4]);\n },\n m(s, a) {\n Q(s, e, a);\n for (let r = 0; r \u003C i.length; r += 1) i[r] && i[r].m(e, null);\n t = !0;\n },\n p(s, [a]) {\n if (a & 15) {\n o = Ye(s[3]);\n let r;\n for (r = 0; r \u003C o.length; r += 1) {\n const p = wi(s, o, r);\n i[r]\n ? (i[r].p(p, a), F(i[r], 1))\n : ((i[r] = Ti(p)), i[r].c(), F(i[r], 1), i[r].m(e, null));\n }\n for (Ze(), r = o.length; r \u003C i.length; r += 1) l(r);\n Le();\n }\n (!t || a & 16) && z(e, \"style\", s[4]);\n },\n i(s) {\n if (!t) {\n for (let a = 0; a \u003C o.length; a += 1) F(i[a]);\n t = !0;\n }\n },\n o(s) {\n i = i.filter(Boolean);\n for (let a = 0; a \u003C i.length; a += 1) O(i[a]);\n t = !1;\n },\n d(s) {\n s && D(e), pt(i, s);\n }\n };\n }\n function Tr(n, e, t) {\n let o,\n { id: i } = e,\n { props: l } = e,\n { main: s } = e,\n { layout: a } = e;\n function r() {\n return I;\n }\n let p = Ke.instance(l.id),\n d = Je.instance(l.id),\n m = de.instance(l.id),\n g = Kt.instance(l.id),\n I = [],\n X = [],\n G = null,\n b = null;\n m.on(`grid-${i}:update-grid`, P),\n m.on(`grid-${i}:remake-grid`, h),\n m.on(`grid-${i}:propagate`, K),\n m.on(`grid-${i}:run-grid-task`, U),\n it(() =\u003E {\n h(), (b = new gr(`grid-${i}`, m));\n }),\n je(() =\u003E {\n m.off(`grid-${i}`), b.off();\n });\n function h(C) {\n if (!p.panes()[i]) return;\n S(), (I = k()), t(3, (X = J()));\n let A = X[X.length - 1];\n A &&\n setTimeout(() =\u003E {\n A.ref && (Z(), A.ref.attach((G = new mr())));\n });\n }\n function Z() {\n for (var C of X) C.ref.detach();\n }\n function S() {\n for (var C of I) C.overlay.destroy(), C.env.destroy();\n }\n function k() {\n let C = p.panes()[i].overlays || [],\n A = [];\n for (var M = 0; M \u003C C.length; M++) {\n let L = C[M],\n W = g.prefabs[L.type];\n if (!W) continue;\n let T = new Jt(M, L.name, l.id),\n V = L.settings.zIndex;\n T.zIndex = V != null ? V : L.main ? 0 : -1;\n let x = new hr(M, L, a, l);\n (T.overlay = W.make(x)),\n (T.env = x),\n (T.ovSrc = L),\n (T.ctxType = W.ctx),\n (x.overlay = T.overlay),\n d.exctractFrom(T.overlay),\n A.push(T),\n T.overlay.init();\n }\n return (\n A.push(new yr(M++, l.id)),\n A.push(new br(M++, l.id)),\n A.push(new Zr(M++, l, i)),\n A.sort((L, W) =\u003E L.zIndex - W.zIndex),\n d.finish(),\n A\n );\n }\n function J() {\n let C = [],\n A = null;\n for (var M of I) {\n if (M.ctxType !== A) {\n var L = { ctxType: M.ctxType, layers: [], id: C.length, ref: null };\n C.push(L), (A = M.ctxType);\n }\n L.layers.push(M);\n }\n return C;\n }\n function P(C = a) {\n t(0, (a = C)), G && (G.layout = a);\n for (var A of I) A.env.update(A.ovSrc, a, l), A.update();\n for (var M of X) m.emitSpec(`rr-${i}-${M.id}`, \"update-rr\", a);\n }\n function K(C) {\n let { name: A, event: M } = C;\n for (var L of I) L.overlay[A] && L.overlay[A](M);\n }\n function U(C) {\n C.handler(I, X, { update: P });\n }\n function N(C, A, M) {\n He[C ? \"unshift\" : \"push\"](() =\u003E {\n (A[M].ref = C), t(3, X);\n });\n }\n return (\n (n.$set = (C) =\u003E {\n \"id\" in C && t(1, (i = C.id)),\n \"props\" in C && t(2, (l = C.props)),\n \"main\" in C && t(5, (s = C.main)),\n \"layout\" in C && t(0, (a = C.layout));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 5 &&\n t(\n 4,\n (o = `\n width: ${a.width}px;\n height: ${a.height}px;\n background: ${l.colors.back};\n margin-left: ${a.sbMax[0]}px;\n `)\n );\n }),\n [a, i, l, X, o, s, r, N]\n );\n }\n class Mr extends Ce {\n constructor(e) {\n super(),\n Se(this, e, Tr, Yr, Xe, {\n id: 1,\n props: 2,\n main: 5,\n layout: 0,\n getLayers: 6\n });\n }\n get getLayers() {\n return this.$.ctx[6];\n }\n }\n function Mi(n, { delay: e = 0, duration: t = 400, easing: o = Fn } = {}) {\n const i = +getComputedStyle(n).opacity;\n return {\n delay: e,\n duration: t,\n easing: o,\n css: (l) =\u003E `opacity: ${l * i}`\n };\n }\n function Wr(n) {\n bt(\n n,\n \"svelte-16w6gr6\",\n \".scale-selector.svelte-16w6gr6{position:absolute;bottom:5px;display:grid;justify-content:center;align-content:center}.scale-button.svelte-16w6gr6{border-radius:3px;text-align:center;user-select:none;margin:auto;margin-top:1px}.scale-button.svelte-16w6gr6:hover{filter:brightness(1.2)}\"\n );\n }\n function Wi(n, e, t) {\n const o = n.slice();\n (o[13] = e[t]), (o[15] = t);\n const i = o[13].scaleSpecs.id;\n return (o[1] = i), o;\n }\n function ki(n) {\n let e,\n t = n[1] + \"\",\n o,\n i,\n l,\n s,\n a;\n function r() {\n return n[10](n[1]);\n }\n return {\n c() {\n (e = te(\"div\")),\n (o = ut(t)),\n (i = ve()),\n z(e, \"class\", \"scale-button svelte-16w6gr6\"),\n z(e, \"style\", (l = n[2](n[1])));\n },\n m(p, d) {\n Q(p, e, d),\n re(e, o),\n re(e, i),\n s || ((a = Be(e, \"click\", On(r))), (s = !0));\n },\n p(p, d) {\n (n = p),\n d & 1 && t !== (t = n[1] + \"\") && en(o, t),\n d & 5 && l !== (l = n[2](n[1])) && z(e, \"style\", l);\n },\n d(p) {\n p && D(e), (s = !1), a();\n }\n };\n }\n function kr(n) {\n let e,\n t,\n o,\n i = Ye(n[0]),\n l = [];\n for (let s = 0; s \u003C i.length; s += 1) l[s] = ki(Wi(n, i, s));\n return {\n c() {\n e = te(\"div\");\n for (let s = 0; s \u003C l.length; s += 1) l[s].c();\n z(e, \"class\", \"scale-selector svelte-16w6gr6\"),\n z(e, \"id\", n[4]),\n z(e, \"style\", n[3]);\n },\n m(s, a) {\n Q(s, e, a);\n for (let r = 0; r \u003C l.length; r += 1) l[r] && l[r].m(e, null);\n o = !0;\n },\n p(s, [a]) {\n if (a & 37) {\n i = Ye(s[0]);\n let r;\n for (r = 0; r \u003C i.length; r += 1) {\n const p = Wi(s, i, r);\n l[r] ? l[r].p(p, a) : ((l[r] = ki(p)), l[r].c(), l[r].m(e, null));\n }\n for (; r \u003C l.length; r += 1) l[r].d(1);\n l.length = i.length;\n }\n (!o || a & 8) && z(e, \"style\", s[3]);\n },\n i(s) {\n o ||\n (s &&\n Gt(() =\u003E {\n o && (t || (t = Qn(e, Mi, { duration: 150 }, !0)), t.run(1));\n }),\n (o = !0));\n },\n o(s) {\n s && (t || (t = Qn(e, Mi, { duration: 150 }, !1)), t.run(0)), (o = !1);\n },\n d(s) {\n s && D(e), pt(l, s), s && t && t.end();\n }\n };\n }\n function zr(n, e, t) {\n let o,\n i,\n l,\n { id: s } = e,\n { props: a } = e,\n { layout: r } = e,\n { scales: p } = e,\n { side: d } = e,\n m = de.instance(a.id),\n g = d === \"right\" ? 1 : 0,\n I = `${a.id}-ss-${s}-${d}`;\n function X(b) {\n p[b];\n let h = r.settings.scaleSideIdxs;\n (h[g] = b),\n m.emitSpec(\"hub\", \"set-scale-index\", {\n paneId: s,\n index: b,\n sideIdxs: h\n });\n }\n const G = (b) =\u003E X(b);\n return (\n (n.$set = (b) =\u003E {\n \"id\" in b && t(1, (s = b.id)),\n \"props\" in b && t(6, (a = b.props)),\n \"layout\" in b && t(7, (r = b.layout)),\n \"scales\" in b && t(0, (p = b.scales)),\n \"side\" in b && t(8, (d = b.side));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 129 &&\n t(\n 9,\n (o = (function () {\n let h = {},\n Z = r.sbMax[g];\n switch (p.length) {\n case 2:\n case 4:\n default:\n (h.ssw = 46),\n (h.ssm = (Z - h.ssw) \u002F 2),\n (h.bw = 18),\n (h.bh = 18),\n (h.tmp = \"50% 50%\");\n break;\n case 3:\n (h.ssw = 54),\n (h.ssm = (Z - h.ssw) \u002F 3),\n (h.bw = 15),\n (h.bh = 15),\n (h.tmp = \"33% 33% 33%\");\n break;\n }\n return h;\n })())\n ),\n n.$.dirty & 576 &&\n t(\n 3,\n (i = `\n grid-template-columns: ${o.tmp};\n font: ${a.config.FONT};\n width: ${o.ssw}px;\n margin-left: ${o.ssm}px;\n `)\n ),\n n.$.dirty & 704 &&\n t(\n 2,\n (l = (b) =\u003E {\n let Z =\n b === r.settings.scaleSideIdxs[g]\n ? a.colors.text\n : a.colors.scale;\n return `\n background: ${a.colors.back};\n line-height: ${o.bh}px;\n width: ${o.bw}px;\n height: ${o.bh}px;\n box-shadow: 0 0 0 1px ${a.colors.back};\n border: 1px solid ${Z};\n color: ${Z};\n `;\n })\n );\n }),\n [p, s, l, i, I, X, a, r, d, o, G]\n );\n }\n class Vr extends Ce {\n constructor(e) {\n super(),\n Se(\n this,\n e,\n zr,\n kr,\n Xe,\n { id: 1, props: 6, layout: 7, scales: 0, side: 8 },\n Wr\n );\n }\n }\n function zi(n) {\n let e, t;\n return (\n (e = new Vr({\n props: { id: n[1], props: n[2], layout: n[0], scales: n[4], side: n[3] }\n })),\n {\n c() {\n xe(e.$.fragment);\n },\n m(o, i) {\n me(e, o, i), (t = !0);\n },\n p(o, i) {\n const l = {};\n i[0] & 2 && (l.id = o[1]),\n i[0] & 4 && (l.props = o[2]),\n i[0] & 1 && (l.layout = o[0]),\n i[0] & 16 && (l.scales = o[4]),\n i[0] & 8 && (l.side = o[3]),\n e.$set(l);\n },\n i(o) {\n t || (F(e.$.fragment, o), (t = !0));\n },\n o(o) {\n O(e.$.fragment, o), (t = !1);\n },\n d(o) {\n ge(e, o);\n }\n }\n );\n }\n function Hr(n) {\n let e,\n t,\n o,\n i,\n l,\n s,\n a = n[4].length \u003E 1 && n[5] && zi(n);\n return {\n c() {\n (e = te(\"div\")),\n (t = te(\"canvas\")),\n (o = ve()),\n a && a.c(),\n z(t, \"id\", n[8]),\n z(e, \"id\", n[7]),\n z(e, \"style\", n[6]),\n z(e, \"class\", \"nvjs-sidebar svelte-gpuvhh\");\n },\n m(r, p) {\n Q(r, e, p),\n re(e, t),\n re(e, o),\n a && a.m(e, null),\n (i = !0),\n l ||\n ((s = [\n Be(e, \"click\", n[9]),\n Be(e, \"mouseover\", n[10]),\n Be(e, \"mouseleave\", n[11])\n ]),\n (l = !0));\n },\n p(r, p) {\n r[4].length \u003E 1 && r[5]\n ? a\n ? (a.p(r, p), p[0] & 48 && F(a, 1))\n : ((a = zi(r)), a.c(), F(a, 1), a.m(e, null))\n : a &&\n (Ze(),\n O(a, 1, 1, () =\u003E {\n a = null;\n }),\n Le()),\n (!i || p[0] & 64) && z(e, \"style\", r[6]);\n },\n i(r) {\n i || (F(a), (i = !0));\n },\n o(r) {\n O(a), (i = !1);\n },\n d(r) {\n r && D(e), a && a.d(), (l = !1), De(s);\n }\n };\n }\n function Ar(n, e, t) {\n let o,\n i,\n l,\n s,\n { id: a } = e,\n { props: r = {} } = e,\n { layout: p = {} } = e,\n { side: d } = e,\n { scales: m = [] } = e,\n g = [];\n function I(B) {\n g = B;\n }\n let X = Je.instance(r.id),\n G = de.instance(r.id),\n b = d === \"right\" ? 1 : 0,\n h = `sb-${a}-${d}`,\n Z = `${r.id}-sb-${a}-${d}`,\n S = `${r.id}-sb-canvas-${a}-${d}`,\n k = !1,\n J = !0;\n G.on(`${h}:update-sb`, T), G.on(`${h}:show-sb-panel`, (B) =\u003E (J = B));\n let P,\n K,\n U,\n N = 1,\n C,\n A,\n M;\n it(async () =\u003E {\n await L();\n }),\n je(() =\u003E {\n G.off(`${h}`), U && U.destroy(), clearInterval(M);\n });\n async function L() {\n if (\n (([P, K] = gt.setup(S, p.sbMax[b], p.height)),\n T(),\n i && (await W()),\n r.config.CANDLE_TIME && r.timeFrame \u003E= se.MINUTE)\n ) {\n let B = se.SECOND \u002F 5;\n M = setInterval(T, B);\n }\n }\n async function W() {\n const B = await Promise.resolve().then(() =\u003E co);\n (U = new B.Manager(P)),\n U.add(new B.Pan({ direction: B.DIRECTION_VERTICAL, threshold: 0 })),\n U.add(new B.Tap({ event: \"doubletap\", taps: 2, posThreshold: 50 })),\n U.on(\"panstart\", (ce) =\u003E {\n if (!i) return;\n let $ = ie();\n $ ? (N = $.zoom) : (N = 1),\n (C = [i.$hi, i.$lo]),\n (A = {\n y: ce.center.y,\n z: N,\n mid: ne.log_mid(C, p.height),\n A: i.A,\n B: i.B\n });\n }),\n U.on(\"panmove\", (ce) =\u003E {\n A &&\n ((N = Y(ce)),\n G.emit(\"sidebar-transform\", {\n gridId: a,\n scaleId: i.scaleSpecs.id,\n zoom: N,\n auto: !1,\n range: R(),\n drugging: !0,\n updateLayout: !0\n }),\n T());\n }),\n U.on(\"panend\", () =\u003E {\n (A = null),\n i &&\n G.emit(\"sidebar-transform\", {\n gridId: a,\n scaleId: i.scaleSpecs.id,\n drugging: !1,\n updateLayout: !0\n });\n }),\n U.on(\"doubletap\", () =\u003E {\n G.emit(\"sidebar-transform\", {\n gridId: a,\n scaleId: i.scaleSpecs.id,\n zoom: 1,\n auto: !0,\n updateLayout: !0\n }),\n (N = 1),\n T();\n });\n }\n function T(B = p) {\n if (B) {\n if ((t(0, (p = B)), (i = E()), !i)) return Lt.error(r, p, d, K);\n Lt.body(r, p, i, d, K),\n V(),\n a && Lt.upperBorder(r, p, K),\n r.cursor.y &&\n r.cursor.scales &&\n J &&\n r.cursor.gridId === p.id &&\n Lt.panel(r, p, i, d, K);\n }\n }\n function V() {\n for (var B of g) {\n let ce = B.overlay;\n ce.drawSidebar && ce.drawSidebar(K, d, i);\n }\n }\n function x() {\n P && (gt.resize(P, K, p.sbMax[b], p.height), T());\n }\n function Y(B) {\n let ce = A.y - B.center.y,\n fe = 1 + ((ce \u003E 0 ? 3 : 1) * ce) \u002F p.height;\n return w.clamp(A.z * fe, 0.005, 100);\n }\n function R(B = 1, ce = 1) {\n let $ = N \u002F A.z,\n fe = (1 \u002F $ - 1) \u002F 2,\n q = C.slice(),\n oe = q[0] - q[1];\n if (!i.log) (q[0] = q[0] + oe * fe * B), (q[1] = q[1] - oe * fe * ce);\n else {\n let _ = p.height \u002F 2,\n ze = _ - _ * (1 \u002F $),\n st = _ + _ * (1 \u002F $),\n et = (rt) =\u003E ne.exp((rt - A.B) \u002F A.A);\n q.slice(), (q[0] = et(ze)), (q[1] = et(st));\n }\n return q;\n }\n function E() {\n let B = p.scales,\n ce = p.settings.scaleTemplate[b],\n $ = B[p.settings.scaleSideIdxs[b]];\n return $ && ce.includes($.scaleSpecs.id) ? $ : null;\n }\n function ie() {\n if (!X.yTransforms[a]) return;\n let B = i.scaleSpecs.id;\n return X.yTransforms[a][B];\n }\n function ee(B) {\n i &&\n G.emitSpec(\"hub\", \"set-scale-index\", {\n paneId: a,\n index: i.scaleSpecs.id,\n sideIdxs: p.settings.scaleSideIdxs\n });\n }\n function Re() {\n t(5, (k = !0));\n }\n function ue() {\n t(5, (k = !1));\n }\n return (\n (n.$set = (B) =\u003E {\n \"id\" in B && t(1, (a = B.id)),\n \"props\" in B && t(2, (r = B.props)),\n \"layout\" in B && t(0, (p = B.layout)),\n \"side\" in B && t(3, (d = B.side)),\n \"scales\" in B && t(4, (m = B.scales));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty[0] & 5 &&\n t(\n 6,\n (o = `\n left: ${b * (p.width + p.sbMax[0])}px;\n top: ${p.offset || 0}px;\n position: absolute;\n background: ${r.colors.back};\n height: ${p.height}px;\n `)\n ),\n n.$.dirty[0] & 1 && (i = E()),\n n.$.dirty[0] & 1 && t(14, (l = p.width)),\n n.$.dirty[0] & 1 && t(13, (s = p.height)),\n n.$.dirty[0] & 24576 && x();\n }),\n [p, a, r, d, m, k, o, Z, S, ee, Re, ue, I, s, l]\n );\n }\n class Vi extends Ce {\n constructor(e) {\n super(),\n Se(\n this,\n e,\n Ar,\n Hr,\n Xe,\n { id: 1, props: 2, layout: 0, side: 3, scales: 4, setLayers: 12 },\n null,\n [-1, -1]\n );\n }\n get setLayers() {\n return this.$.ctx[12];\n }\n }\n function Hi(n) {\n let e;\n return {\n c() {\n (e = te(\"div\")),\n z(e, \"id\", n[3]),\n z(e, \"style\", n[1]),\n z(e, \"class\", \"nvjs-sidebar-stub svelte-yr5ja6\");\n },\n m(t, o) {\n Q(t, e, o);\n },\n p(t, o) {\n o & 2 && z(e, \"style\", t[1]);\n },\n d(t) {\n t && D(e);\n }\n };\n }\n function Kr(n) {\n let e,\n t = n[0].sbMax[n[2]] && Hi(n);\n return {\n c() {\n t && t.c(), (e = we());\n },\n m(o, i) {\n t && t.m(o, i), Q(o, e, i);\n },\n p(o, [i]) {\n o[0].sbMax[o[2]]\n ? t\n ? t.p(o, i)\n : ((t = Hi(o)), t.c(), t.m(e.parentNode, e))\n : t && (t.d(1), (t = null));\n },\n i: le,\n o: le,\n d(o) {\n o && D(e), t && t.d(o);\n }\n };\n }\n function Jr(n, e, t) {\n let o,\n { id: i } = e,\n { props: l = {} } = e,\n { layout: s = {} } = e,\n { side: a } = e,\n r = a === \"right\" ? 1 : 0,\n p = `${l.id}-stub-${i}-${a}`;\n return (\n (n.$set = (d) =\u003E {\n \"id\" in d && t(4, (i = d.id)),\n \"props\" in d && t(5, (l = d.props)),\n \"layout\" in d && t(0, (s = d.layout)),\n \"side\" in d && t(6, (a = d.side));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 113 &&\n t(\n 1,\n (o = `\n left: ${r * (s.width + s.sbMax[0])}px;\n top: ${s.offset || 0}px;\n width: ${s.sbMax[r] - 1}px;\n height: ${s.height - (i ? 1 : 0)}px;\n position: absolute;\n border: 1px solid;\n border-${a}: none;\n border-bottom: none;\n \u002F* TODO: remove to-boder, it's in the pane now *\u002F\n border-top: ${i ? \"auto\" : \"none\"};\n border-color: ${l.colors.scale};\n background: ${l.colors.back}\n `)\n );\n }),\n [s, o, r, p, i, l, a]\n );\n }\n class Ai extends Ce {\n constructor(e) {\n super(), Se(this, e, Jr, Kr, Xe, { id: 4, props: 5, layout: 0, side: 6 });\n }\n }\n const Cn = {\n \"open-eye\":\n \"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAelQTFRFAAAAmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJ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ZSSw0PLoejfSG5tDAwAAOwrCzjMUsXkAAAAASUVORK5CYII=\",\n king3:\n \"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAABVxJREFUeJztmlmoVlUUx\u002F30XjVLnFC0bJTsWlmZQwRlYlE+FIR2jQzRBpSISooGobKi0aLoRlSEUolU0EMDRQ9JUdFgiA9NFA0oDTfLVTaZZdb\u002F39oXD\u002Ftb55x9vnvOPUp7wQ\u002Fu\u002Fc4e1lpnT2et3a9flChRokSJEiVKlChRokSJEiVKxSJdHYPBTeBD8BfYBb4ED4FRdetXqcDAA8BH4J8UtoDpdetZicCwQeD9DON7EDC+bn1LFxh1SYDxPayqW99SBQbtB34wDH0FPOHWgeTvf4OJdetdmsCYqwzjXwQN9\u002FwO4\u002FnDYEDduvdaYMT+YKNn3HYwNVFmJPjaK8P\u002FZ9SpeykCI64Df3rGPWOUu8EYBatBWx16lyJQ\u002FkBj5f8NTDbKDgObvbLd4KS+VroBjgAXgtvBrWAx6Cg6J1F+hTvsJI1am1H+amMUrAHtBfUfD+aLHrjuApdxyuW2gwJDwDLwlaEIT2uXg6GBihwGPvba+JnOzajD3eILr873YHZgn+2gE2xwO0mynW3gXjA6rXJ\u002F8LixJSXh23wU7JujSMN15rfVFWDEIqPf58HAnHpt4Fo3xbLOGOvpaKuBTsNraU7oylqc8OxYsMmr92Oq95sN8dcNjpx5GXUabpj\u002FEqA\u002Fucdq5E2jIA8vW43fd7jp0LQmOGUeMN7+yjzjE23MN+q\u002FDPZJ6W+Oc7CvJ4e9v73+Z5fVqT90PgETwJQU53AvvwD099qZJs1rCB05vIADBojO42Qbv4LzjLIzwXeGflyzTgXjwNP+c6tTv4EViWeTDIV6lOrscYJ7G48Yb695yOU7YanRDo\u002FO7Yky0w1nk2\u002FALNl90jy7FQcs955zG3zDKMf5ebHoIjpRdNVOPv8cHNmCA0aDdcaom+Oez5bmcwP5DJySHJn4+6xeO8CV4eL2nlGW68T5okEN\u002F9n10uKZHvXOleZzxGvgNGeo3xcdcoY0T8vSHMAhPgN8YJTnImStI6n7foADRokufv4C3G303+2GurUwl+MAV45DfaYx1C2uafXtJ\u002Fqb64zO6ud3sEBStuZSHZBwwjzwU4ZSjPlN6I3xrq8R4IWMfv4QPUKnHpRKd4Arz61qoaQfPpb5c7FVcQZsN\u002FrgVybP+4MD6pfrgES9uW4IJuvyuDmuRXutPviNssbrY6foAtsIqF+dA1zdxW4osh737kUFbQzp42TZvcjyyL4ydH2p3AGu\u002FhLwqehWGHzqK9D+QDfX+bV4pxT7RK7eAXuyRAdEB3Sc+X93wKzogOiA6IDogOiA6IBiDritBl0rEdEoUa4D\u002FM9axub3+js7oneSVoc44HVjFDwnGhEu5bu+r0U0R3ifNEeXt1qFGdTcaTiBX3jLwTFgSA12FBLRr0ZGp3klZ71hD7nfqsiA52MpFQhzAMwN3AxOEA1b1z4ynN4Mmx0nehOFofusUN07qS9SNPLylOTnCBmk3OQ6uxuc40bIQWC4VHCpQTQEN9QN66NEv\u002FBuEc0dMPdghcx83gZj8jridTbG87YENOg7hXUYr+eVmJdEM8kcMZeKxvhPByeK5uqPB5MdU9xv01wZOpQBFoa8HhTNDjMfwTB7d6CxSZi8YbZ6WBGP821yAflWslPmrbLLOW1HwIhrFSZs1oKjezP0eM3lIvCqaBKyKmXLciqN5jy\u002FEhwuAUHTUEe0OWfwVHWF6IL5rujNzroMZvqb0+1J0SQMDzyHgkGlGJ3jEF5HGSu6IDFXxztFN4pmh58VTanzXjAztaEXF5Iw1M75znn\u002FlmhyZJXomrLUGcv1g\u002FePM\u002FMCfSqiWSPe9eE2ebDonkxFpxaEuwoz0oeAMaI7wN5\u002FcXJPk38Bz1zMtWby+i0AAAAASUVORK5CYII=\"\n };\n function Fr(n) {\n bt(\n n,\n \"svelte-1cdflqk\",\n \".nvjs-eye.svelte-1cdflqk{width:20px;height:20px;float:right;margin-right:2px;margin-left:7px}.nvjs-eye.svelte-1cdflqk:hover{filter:brightness(1.25)}\"\n );\n }\n function Pr(n) {\n let e, t, o;\n return {\n c() {\n (e = te(\"div\")),\n z(e, \"class\", \"nvjs-eye svelte-1cdflqk\"),\n z(e, \"style\", n[0]);\n },\n m(i, l) {\n Q(i, e, l), t || ((o = Be(e, \"click\", On(n[1]))), (t = !0));\n },\n p(i, [l]) {\n l & 1 && z(e, \"style\", i[0]);\n },\n i: le,\n o: le,\n d(i) {\n i && D(e), (t = !1), o();\n }\n };\n }\n function Nr(n, e, t) {\n let o,\n i,\n l,\n { gridId: s } = e,\n { ov: a } = e,\n { props: r } = e,\n { height: p } = e,\n d = de.instance(r.id);\n function m() {\n t(7, (o = a.settings.display !== !1));\n }\n function g() {\n d.emitSpec(\"hub\", \"display-overlay\", {\n paneId: s,\n ovId: a.id,\n flag: a.settings.display === void 0 ? !1 : !a.settings.display\n });\n }\n return (\n (n.$set = (I) =\u003E {\n \"gridId\" in I && t(2, (s = I.gridId)),\n \"ov\" in I && t(3, (a = I.ov)),\n \"props\" in I && t(4, (r = I.props)),\n \"height\" in I && t(5, (p = I.height));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 8 && t(7, (o = a.settings.display !== !1)),\n n.$.dirty & 128 && t(8, (i = o ? \"open\" : \"closed\")),\n n.$.dirty & 288 &&\n t(\n 0,\n (l = `\n background-image: url(${Cn[i + \"-eye\"]});\n background-size: contain;\n background-repeat: no-repeat;\n margin-top: ${(p - 20) * 0.5 - 3}px;\n \u002F* FIX 'overflow: hidden' changes baseline *\u002F\n margin-bottom: -2px;\n `)\n );\n }),\n [l, g, s, a, r, p, m, o, i]\n );\n }\n class Br extends Ce {\n constructor(e) {\n super(),\n Se(\n this,\n e,\n Nr,\n Pr,\n Xe,\n { gridId: 2, ov: 3, props: 4, height: 5, update: 6 },\n Fr\n );\n }\n get update() {\n return this.$.ctx[6];\n }\n }\n const Er = [\n \"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAAVQAAAC0CAMAAAD8fySxAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAvpQTFRFAAAA\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F+\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002Fv\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F+\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F7\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F+\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F7\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F+\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F+\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F+\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002F7\u002F\u002F\u002F\u002F+\u002F\u002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wTg4\u002FytlZTNI9xZE5Us\u002F85xkacevXibl5pep+TO8+qqcYjzd9ofr37yztWQZLBKyik6baI+BpS7x0midtzxfD9Fh+QlaW8B3L8WzDwwqPc6SVxo3M\u002FUPgi7+Sm6GiiaxpSmXD7zgXbqGdppnrJLsx10aIFVUk6iLwGVBTib3MX5xxxgfUz7OX+PhM13HNUOBAKBQCAQCAQCgUAgEAgEAoFAIBAIBAKBQOD\u002Fkv8BDVonljy6Jq4AAAAASUVORK5CYII=\"\n ];\n function _r(n) {\n bt(\n n,\n \"svelte-ccr182\",\n \".nvjs-legend-line.svelte-ccr182{pointer-events:all;position:relative;user-select:none;border-radius:3px;padding:2px 5px;margin-bottom:2px;width:fit-content}.nvjs-logo.svelte-ccr182{width:35px;height:20px;float:left;margin-left:-5px;margin-right:2px;opacity:0.85}.nvjs-ll-data.svelte-ccr182{font-variant-numeric:tabular-nums}.nvjs-ll-value{margin-left:3px}.nvjs-ll-x{margin-left:3px}.nvjs-eye.svelte-ccr182{width:20px;height:20px;float:right;margin-right:2px;margin-left:7px}.nvjs-eye.svelte-ccr182:hover{filter:brightness(1.25)}.king-icon.svelte-ccr182{padding-left:8px;padding-right:8px;margin-right:4px;filter:grayscale()}\"\n );\n }\n function Ki(n, e, t) {\n const o = n.slice();\n return (o[45] = e[t]), (o[47] = t), o;\n }\n function Ji(n, e, t) {\n const o = n.slice();\n return (o[45] = e[t]), (o[47] = t), o;\n }\n function Fi(n) {\n let e,\n t,\n o,\n i,\n l,\n s,\n a,\n r,\n p,\n d,\n m,\n g = n[1].main && n[2].showLogo && Pi(n),\n I = n[1].main && Ni(n),\n X = n[8] && !n[3] && Bi(n),\n G = !n[8] && !n[3] && Oi(n),\n b = n[3] && Ui(n);\n return {\n c() {\n (e = te(\"div\")),\n g && g.c(),\n (t = ve()),\n (o = te(\"span\")),\n (i = new tn(!1)),\n (l = ve()),\n I && I.c(),\n (s = ve()),\n X && X.c(),\n (a = ve()),\n G && G.c(),\n (r = ve()),\n b && b.c(),\n (i.a = l),\n z(o, \"class\", \"nvjs-ll-name\"),\n z(e, \"class\", \"nvjs-legend-line svelte-ccr182\"),\n z(e, \"style\", n[15]);\n },\n m(h, Z) {\n Q(h, e, Z),\n g && g.m(e, null),\n re(e, t),\n re(e, o),\n i.m(n[20], o),\n re(o, l),\n I && I.m(o, null),\n n[33](o),\n re(e, s),\n X && X.m(e, null),\n re(e, a),\n G && G.m(e, null),\n re(e, r),\n b && b.m(e, null),\n n[35](e),\n (p = !0),\n d ||\n ((m = [\n Be(e, \"mousemove\", n[21]),\n Be(e, \"mouseleave\", n[22]),\n Be(e, \"click\", n[23]),\n Be(e, \"keypress\", null)\n ]),\n (d = !0));\n },\n p(h, Z) {\n h[1].main && h[2].showLogo\n ? g\n ? g.p(h, Z)\n : ((g = Pi(h)), g.c(), g.m(e, t))\n : g && (g.d(1), (g = null)),\n (!p || Z[0] & 1048576) && i.p(h[20]),\n h[1].main\n ? I\n ? I.p(h, Z)\n : ((I = Ni(h)), I.c(), I.m(o, null))\n : I && (I.d(1), (I = null)),\n h[8] && !h[3]\n ? X\n ? X.p(h, Z)\n : ((X = Bi(h)), X.c(), X.m(e, a))\n : X && (X.d(1), (X = null)),\n !h[8] && !h[3]\n ? G\n ? G.p(h, Z)\n : ((G = Oi(h)), G.c(), G.m(e, r))\n : G && (G.d(1), (G = null)),\n h[3]\n ? b\n ? (b.p(h, Z), Z[0] & 8 && F(b, 1))\n : ((b = Ui(h)), b.c(), F(b, 1), b.m(e, null))\n : b &&\n (Ze(),\n O(b, 1, 1, () =\u003E {\n b = null;\n }),\n Le()),\n (!p || Z[0] & 32768) && z(e, \"style\", h[15]);\n },\n i(h) {\n p || (F(b), (p = !0));\n },\n o(h) {\n O(b), (p = !1);\n },\n d(h) {\n h && D(e),\n g && g.d(),\n I && I.d(),\n n[33](null),\n X && X.d(),\n G && G.d(),\n b && b.d(),\n n[35](null),\n (d = !1),\n De(m);\n }\n };\n }\n function Pi(n) {\n let e;\n return {\n c() {\n (e = te(\"div\")),\n z(e, \"class\", \"nvjs-logo svelte-ccr182\"),\n z(e, \"style\", n[18]);\n },\n m(t, o) {\n Q(t, e, o);\n },\n p(t, o) {\n o[0] & 262144 && z(e, \"style\", t[18]);\n },\n d(t) {\n t && D(e);\n }\n };\n }\n function Ni(n) {\n let e;\n return {\n c() {\n (e = te(\"span\")),\n z(e, \"class\", \"king-icon svelte-ccr182\"),\n z(e, \"style\", n[16]);\n },\n m(t, o) {\n Q(t, e, o);\n },\n p(t, o) {\n o[0] & 65536 && z(e, \"style\", t[16]);\n },\n d(t) {\n t && D(e);\n }\n };\n }\n function Bi(n) {\n let e;\n function t(l, s) {\n if (l[1].settings.legendHtml) return jr;\n if (!l[10] && !l[14]) return Dr;\n if (l[14] && l[9].length) return Ur;\n if (l[9].length) return Or;\n }\n let o = t(n),\n i = o && o(n);\n return {\n c() {\n (e = te(\"span\")),\n i && i.c(),\n z(e, \"class\", \"nvjs-ll-data svelte-ccr182\"),\n z(e, \"style\", n[19]);\n },\n m(l, s) {\n Q(l, e, s), i && i.m(e, null);\n },\n p(l, s) {\n o === (o = t(l)) && i\n ? i.p(l, s)\n : (i && i.d(1), (i = o && o(l)), i && (i.c(), i.m(e, null))),\n s[0] & 524288 && z(e, \"style\", l[19]);\n },\n d(l) {\n l && D(e), i && i.d();\n }\n };\n }\n function Or(n) {\n let e,\n t = Ye(n[10](n[9], n[7]) || []),\n o = [];\n for (let i = 0; i \u003C t.length; i += 1) o[i] = Ei(Ki(n, t, i));\n return {\n c() {\n for (let i = 0; i \u003C o.length; i += 1) o[i].c();\n e = we();\n },\n m(i, l) {\n for (let s = 0; s \u003C o.length; s += 1) o[s] && o[s].m(i, l);\n Q(i, e, l);\n },\n p(i, l) {\n if (l[0] & 16778880) {\n t = Ye(i[10](i[9], i[7]) || []);\n let s;\n for (s = 0; s \u003C t.length; s += 1) {\n const a = Ki(i, t, s);\n o[s]\n ? o[s].p(a, l)\n : ((o[s] = Ei(a)), o[s].c(), o[s].m(e.parentNode, e));\n }\n for (; s \u003C o.length; s += 1) o[s].d(1);\n o.length = t.length;\n }\n },\n d(i) {\n i && D(e), pt(o, i);\n }\n };\n }\n function Ur(n) {\n let e,\n t = n[14](n[9], n[7], n[24]) + \"\",\n o;\n return {\n c() {\n (e = new tn(!1)), (o = we()), (e.a = o);\n },\n m(i, l) {\n e.m(t, i, l), Q(i, o, l);\n },\n p(i, l) {\n l[0] & 17024 && t !== (t = i[14](i[9], i[7], i[24]) + \"\") && e.p(t);\n },\n d(i) {\n i && (D(o), e.d());\n }\n };\n }\n function Dr(n) {\n let e,\n t = Ye(n[9]),\n o = [];\n for (let i = 0; i \u003C t.length; i += 1) o[i] = _i(Ji(n, t, i));\n return {\n c() {\n for (let i = 0; i \u003C o.length; i += 1) o[i].c();\n e = we();\n },\n m(i, l) {\n for (let s = 0; s \u003C o.length; s += 1) o[s] && o[s].m(i, l);\n Q(i, e, l);\n },\n p(i, l) {\n if (l[0] & 16777728) {\n t = Ye(i[9]);\n let s;\n for (s = 0; s \u003C t.length; s += 1) {\n const a = Ji(i, t, s);\n o[s]\n ? o[s].p(a, l)\n : ((o[s] = _i(a)), o[s].c(), o[s].m(e.parentNode, e));\n }\n for (; s \u003C o.length; s += 1) o[s].d(1);\n o.length = t.length;\n }\n },\n d(i) {\n i && D(e), pt(o, i);\n }\n };\n }\n function jr(n) {\n let e,\n t = n[1].settings.legendHtml + \"\",\n o;\n return {\n c() {\n (e = new tn(!1)), (o = we()), (e.a = o);\n },\n m(i, l) {\n e.m(t, i, l), Q(i, o, l);\n },\n p(i, l) {\n l[0] & 2 && t !== (t = i[1].settings.legendHtml + \"\") && e.p(t);\n },\n d(i) {\n i && (D(o), e.d());\n }\n };\n }\n function Ei(n) {\n let e,\n t = n[24](n[45][0]) + \"\",\n o,\n i,\n l;\n return {\n c() {\n (e = te(\"span\")),\n (o = ut(t)),\n (i = ve()),\n z(e, \"class\", \"nvjs-ll-value\"),\n z(e, \"style\", (l = `color: ${n[45][1]}`));\n },\n m(s, a) {\n Q(s, e, a), re(e, o), re(e, i);\n },\n p(s, a) {\n a[0] & 1664 && t !== (t = s[24](s[45][0]) + \"\") && en(o, t),\n a[0] & 1664 && l !== (l = `color: ${s[45][1]}`) && z(e, \"style\", l);\n },\n d(s) {\n s && D(e);\n }\n };\n }\n function Qr(n) {\n let e;\n function t(l, s) {\n return l[45] != null ? qr : $r;\n }\n let o = t(n),\n i = o(n);\n return {\n c() {\n i.c(), (e = we());\n },\n m(l, s) {\n i.m(l, s), Q(l, e, s);\n },\n p(l, s) {\n o === (o = t(l)) && i\n ? i.p(l, s)\n : (i.d(1), (i = o(l)), i && (i.c(), i.m(e.parentNode, e)));\n },\n d(l) {\n l && D(e), i.d(l);\n }\n };\n }\n function $r(n) {\n let e;\n return {\n c() {\n (e = te(\"span\")), (e.textContent = \"x\"), z(e, \"class\", \"nvjs-ll-x\");\n },\n m(t, o) {\n Q(t, e, o);\n },\n p: le,\n d(t) {\n t && D(e);\n }\n };\n }\n function qr(n) {\n let e,\n t = n[24](n[45]) + \"\",\n o,\n i;\n return {\n c() {\n (e = te(\"span\")),\n (o = ut(t)),\n (i = ve()),\n z(e, \"class\", \"nvjs-ll-value\");\n },\n m(l, s) {\n Q(l, e, s), re(e, o), re(e, i);\n },\n p(l, s) {\n s[0] & 512 && t !== (t = l[24](l[45]) + \"\") && en(o, t);\n },\n d(l) {\n l && D(e);\n }\n };\n }\n function _i(n) {\n let e,\n t = n[47] \u003E 0 && Qr(n);\n return {\n c() {\n t && t.c(), (e = we());\n },\n m(o, i) {\n t && t.m(o, i), Q(o, e, i);\n },\n p(o, i) {\n o[47] \u003E 0 && t.p(o, i);\n },\n d(o) {\n o && D(e), t && t.d(o);\n }\n };\n }\n function Oi(n) {\n let e;\n return {\n c() {\n (e = te(\"div\")),\n z(e, \"class\", \"nvjs-eye svelte-ccr182\"),\n z(e, \"style\", n[17]);\n },\n m(t, o) {\n Q(t, e, o);\n },\n p(t, o) {\n o[0] & 131072 && z(e, \"style\", t[17]);\n },\n d(t) {\n t && D(e);\n }\n };\n }\n function Ui(n) {\n let e,\n t,\n o = { gridId: n[0], ov: n[1], props: n[2], height: n[6].height };\n return (\n (e = new Br({ props: o })),\n n[34](e),\n {\n c() {\n xe(e.$.fragment);\n },\n m(i, l) {\n me(e, i, l), (t = !0);\n },\n p(i, l) {\n const s = {};\n l[0] & 1 && (s.gridId = i[0]),\n l[0] & 2 && (s.ov = i[1]),\n l[0] & 4 && (s.props = i[2]),\n l[0] & 64 && (s.height = i[6].height),\n e.$set(s);\n },\n i(i) {\n t || (F(e.$.fragment, i), (t = !0));\n },\n o(i) {\n O(e.$.fragment, i), (t = !1);\n },\n d(i) {\n n[34](null), ge(e, i);\n }\n }\n );\n }\n function ea(n) {\n let e,\n t,\n o = !n[11].noLegend && n[1].settings.showLegend !== !1 && n[13] && Fi(n);\n return {\n c() {\n o && o.c(), (e = we());\n },\n m(i, l) {\n o && o.m(i, l), Q(i, e, l), (t = !0);\n },\n p(i, l) {\n !i[11].noLegend && i[1].settings.showLegend !== !1 && i[13]\n ? o\n ? (o.p(i, l), l[0] & 10242 && F(o, 1))\n : ((o = Fi(i)), o.c(), F(o, 1), o.m(e.parentNode, e))\n : o &&\n (Ze(),\n O(o, 1, 1, () =\u003E {\n o = null;\n }),\n Le());\n },\n i(i) {\n t || (F(o), (t = !0));\n },\n o(i) {\n O(o), (t = !1);\n },\n d(i) {\n i && D(e), o && o.d(i);\n }\n };\n }\n function ta(n, e, t) {\n let o,\n i,\n l,\n s,\n a,\n r,\n p,\n d,\n m,\n g,\n I,\n X,\n G,\n b,\n h,\n Z,\n S,\n k,\n J,\n P,\n K,\n { gridId: U } = e,\n { ov: N } = e,\n { props: C } = e,\n { layout: A } = e,\n M = Je.instance(C.id),\n L = de.instance(C.id),\n W = !1,\n T,\n V,\n x,\n Y = !1,\n R = !0;\n it(() =\u003E {\n L.on(`${o}:update-ll`, E),\n L.on(`${o}:grid-mousedown`, ue),\n L.on(`${o}:select-overlay`, ue);\n }),\n je(() =\u003E {\n L.off(o);\n });\n function E() {\n t(8, (P = N.settings.display !== !1)), x && x.update();\n }\n function ie(_) {\n _.clientX \u003C I.x + I.width + 35 &&\n !W &&\n setTimeout(() =\u003E {\n $(), t(3, (W = !0));\n });\n }\n function ee(_) {\n setTimeout(() =\u003E {\n $(), t(3, (W = !1));\n });\n }\n function Re() {\n L.emit(\"select-overlay\", { index: [U, N.id] }), t(26, (Y = !0));\n }\n function ue(_) {\n t(26, (Y = !1));\n }\n function B(_, ze = J) {\n return _ == null ? \"x\" : typeof _ != \"number\" ? _ : _.toFixed(ze);\n }\n function ce(_) {\n return (\n Object.values(_).find((ze) =\u003E ze.scaleSpecs.ovIdxs.includes(N.id)) ||\n _[A.scaleIndex]\n );\n }\n function $() {\n T && t(6, (g = T.getBoundingClientRect()));\n }\n function fe(_) {\n He[_ ? \"unshift\" : \"push\"](() =\u003E {\n (V = _), t(5, V);\n });\n }\n function q(_) {\n He[_ ? \"unshift\" : \"push\"](() =\u003E {\n (x = _), t(12, x);\n });\n }\n function oe(_) {\n He[_ ? \"unshift\" : \"push\"](() =\u003E {\n (T = _), t(4, T);\n });\n }\n return (\n (n.$set = (_) =\u003E {\n \"gridId\" in _ && t(0, (U = _.gridId)),\n \"ov\" in _ && t(1, (N = _.ov)),\n \"props\" in _ && t(2, (C = _.props)),\n \"layout\" in _ && t(25, (A = _.layout));\n }),\n (n.$.update = () =\u003E {\n var _;\n n.$.dirty[0] & 3 && (o = `ll-${U}-${N.id}`),\n n.$.dirty[0] & 2 &&\n t(\n 20,\n (i = (_ = N.name) != null ? _ : `${N.type || \"Overlay\"}-${N.id}`)\n ),\n n.$.dirty[0] & 4 &&\n t(32, (l = parseInt(C.config.FONT.split(\"px\").shift()))),\n (n.$.dirty[0] & 100663302) | (n.$.dirty[1] & 2) &&\n t(\n 31,\n (s = `\n font: ${C.config.FONT};\n font-size: ${l + (N.main ? 5 : 3)}px;\n font-weight: 300;\n color: ${C.colors.textLG};\n background: ${Y ? C.colors.back : C.colors.llBack};\n border: 1px solid transparent;\n margin-right: 30px;\n max-width: ${A.width - 20}px;\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n border-color: ${Y ? C.colors.llSelect : \"auto\"} !important;\n `)\n ),\n n.$.dirty[0] & 4 &&\n t(\n 30,\n (a = `\n background: ${C.colors.back};\n border: 1px solid ${C.colors.grid};\n \n `)\n ),\n (n.$.dirty[0] & 6) | (n.$.dirty[1] & 2) &&\n t(\n 19,\n (r = `\n font-size: ${l + (N.main ? 3 : 2)}px;\n color: ${C.colors.llValue}\n `)\n ),\n n.$.dirty[0] & 2 && t(8, (P = N.settings.display !== !1)),\n n.$.dirty[0] & 256 && t(27, (K = P ? \"open\" : \"closed\")),\n n.$.dirty[0] & 16 && t(6, (g = T ? T.getBoundingClientRect() : {})),\n n.$.dirty[0] & 134217792 &&\n t(\n 17,\n (d = `\n background-image: url(${Cn[K + \"-eye\"]});\n background-size: contain;\n background-repeat: no-repeat;\n margin-top: ${(g.height - 20) * 0.5 - 3}px;\n margin-bottom: -2px;\n `)\n ),\n n.$.dirty[0] & 64 && `${g.width}${g.height}`,\n n.$.dirty[0] & 4 && t(29, (Z = C.cursor.values || [])),\n n.$.dirty[0] & 536870915 && t(9, (S = (Z[U] || [])[N.id] || [])),\n n.$.dirty[0] & 776 &&\n t(\n 16,\n (m = `\n background-image: url(${Cn.king3});\n background-size: contain;\n background-repeat: no-repeat;\n margin-left: ${W || !P || !S.length ? 7 : 3}px;\n `)\n ),\n n.$.dirty[0] & 32 && (I = V ? V.getBoundingClientRect() : {}),\n (n.$.dirty[0] & 1073741832) | (n.$.dirty[1] & 1) &&\n t(15, (X = s + (W ? a : \"\"))),\n n.$.dirty[0] & 3 && t(11, (G = M.getLegendFns(U, N.id) || {})),\n n.$.dirty[0] & 2048 && t(10, (b = G.legend)),\n n.$.dirty[0] & 2048 && t(14, (h = G.legendHtml)),\n n.$.dirty[0] & 33554432 && t(28, (k = ce(A.scales))),\n n.$.dirty[0] & 268435456 && t(7, (J = k.prec)),\n n.$.dirty[0] & 1664 && b && S && !b(S, J) && t(13, (R = !1));\n }),\n t(\n 18,\n (p = `\n background-image: url(${Er[0]});\n background-size: contain;\n background-repeat: no-repeat;\n `)\n ),\n [\n U,\n N,\n C,\n W,\n T,\n V,\n g,\n J,\n P,\n S,\n b,\n G,\n x,\n R,\n h,\n X,\n m,\n d,\n p,\n r,\n i,\n ie,\n ee,\n Re,\n B,\n A,\n Y,\n K,\n k,\n Z,\n a,\n s,\n l,\n fe,\n q,\n oe\n ]\n );\n }\n class na extends Ce {\n constructor(e) {\n super(),\n Se(\n this,\n e,\n ta,\n ea,\n Xe,\n { gridId: 0, ov: 1, props: 2, layout: 25 },\n _r,\n [-1, -1]\n );\n }\n }\n function ia(n) {\n bt(n, \"svelte-16ib1si\", \".nvjs-legend.svelte-16ib1si{pointer-events:none}\");\n }\n function Di(n, e, t) {\n const o = n.slice();\n return (o[9] = e[t]), (o[11] = t), o;\n }\n function ji(n) {\n let e,\n t,\n o = Ye(n[5].panes()[n[0]].overlays),\n i = [];\n for (let s = 0; s \u003C o.length; s += 1) i[s] = Qi(Di(n, o, s));\n const l = (s) =\u003E\n O(i[s], 1, 1, () =\u003E {\n i[s] = null;\n });\n return {\n c() {\n e = te(\"div\");\n for (let s = 0; s \u003C i.length; s += 1) i[s].c();\n z(e, \"class\", \"nvjs-legend svelte-16ib1si\"), z(e, \"style\", n[4]);\n },\n m(s, a) {\n Q(s, e, a);\n for (let r = 0; r \u003C i.length; r += 1) i[r] && i[r].m(e, null);\n t = !0;\n },\n p(s, a) {\n if (a & 39) {\n o = Ye(s[5].panes()[s[0]].overlays);\n let r;\n for (r = 0; r \u003C o.length; r += 1) {\n const p = Di(s, o, r);\n i[r]\n ? (i[r].p(p, a), F(i[r], 1))\n : ((i[r] = Qi(p)), i[r].c(), F(i[r], 1), i[r].m(e, null));\n }\n for (Ze(), r = o.length; r \u003C i.length; r += 1) l(r);\n Le();\n }\n (!t || a & 16) && z(e, \"style\", s[4]);\n },\n i(s) {\n if (!t) {\n for (let a = 0; a \u003C o.length; a += 1) F(i[a]);\n t = !0;\n }\n },\n o(s) {\n i = i.filter(Boolean);\n for (let a = 0; a \u003C i.length; a += 1) O(i[a]);\n t = !1;\n },\n d(s) {\n s && D(e), pt(i, s);\n }\n };\n }\n function Qi(n) {\n let e, t;\n return (\n (e = new na({\n props: { gridId: n[0], props: n[1], layout: n[2], ov: n[9] }\n })),\n {\n c() {\n xe(e.$.fragment);\n },\n m(o, i) {\n me(e, o, i), (t = !0);\n },\n p(o, i) {\n const l = {};\n i & 1 && (l.gridId = o[0]),\n i & 2 && (l.props = o[1]),\n i & 4 && (l.layout = o[2]),\n i & 1 && (l.ov = o[9]),\n e.$set(l);\n },\n i(o) {\n t || (F(e.$.fragment, o), (t = !0));\n },\n o(o) {\n O(e.$.fragment, o), (t = !1);\n },\n d(o) {\n ge(e, o);\n }\n }\n );\n }\n function $i(n) {\n let e = n[5].panes()[n[0]],\n t,\n o,\n i = e && ji(n);\n return {\n c() {\n i && i.c(), (t = we());\n },\n m(l, s) {\n i && i.m(l, s), Q(l, t, s), (o = !0);\n },\n p(l, s) {\n s & 1 && (e = l[5].panes()[l[0]]),\n e\n ? i\n ? (i.p(l, s), s & 1 && F(i, 1))\n : ((i = ji(l)), i.c(), F(i, 1), i.m(t.parentNode, t))\n : i &&\n (Ze(),\n O(i, 1, 1, () =\u003E {\n i = null;\n }),\n Le());\n },\n i(l) {\n o || (F(i), (o = !0));\n },\n o(l) {\n O(i), (o = !1);\n },\n d(l) {\n l && D(t), i && i.d(l);\n }\n };\n }\n function oa(n) {\n let e = n[3],\n t,\n o,\n i = $i(n);\n return {\n c() {\n i.c(), (t = we());\n },\n m(l, s) {\n i.m(l, s), Q(l, t, s), (o = !0);\n },\n p(l, [s]) {\n s & 8 && Xe(e, (e = l[3]))\n ? (Ze(),\n O(i, 1, 1, le),\n Le(),\n (i = $i(l)),\n i.c(),\n F(i, 1),\n i.m(t.parentNode, t))\n : i.p(l, s);\n },\n i(l) {\n o || (F(i), (o = !0));\n },\n o(l) {\n O(i), (o = !1);\n },\n d(l) {\n l && D(t), i.d(l);\n }\n };\n }\n function la(n, e, t) {\n let o,\n { id: i } = e,\n { props: l } = e,\n { main: s } = e,\n { layout: a } = e,\n r = Ke.instance(l.id),\n p = de.instance(l.id),\n d = 0;\n p.on(`legend-${i}:update-legend`, m),\n je(() =\u003E {\n p.off(`legend-${i}`);\n });\n function m() {\n t(3, d++, d);\n }\n return (\n (n.$set = (g) =\u003E {\n \"id\" in g && t(0, (i = g.id)),\n \"props\" in g && t(1, (l = g.props)),\n \"main\" in g && t(6, (s = g.main)),\n \"layout\" in g && t(2, (a = g.layout));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 4 &&\n t(\n 4,\n (o = `\n left: ${a.sbMax[0] + 5}px;\n top: ${(a.offset || 0) + 5}px;\n position: absolute;\n `)\n );\n }),\n [i, l, a, d, o, r, s]\n );\n }\n class sa extends Ce {\n constructor(e) {\n super(),\n Se(this, e, la, oa, Xe, { id: 0, props: 1, main: 6, layout: 2 }, ia);\n }\n }\n function qi(n) {\n let e,\n t,\n o,\n i,\n l,\n s,\n a,\n r,\n p,\n d,\n m,\n g = { id: n[1], props: n[2], layout: n[0], main: n[3] };\n (t = new Mr({ props: g })),\n n[10](t),\n (i = new sa({\n props: { id: n[1], props: n[2], layout: n[0], main: n[3] }\n }));\n const I = [aa, ra],\n X = [];\n function G(S, k) {\n return S[9].length ? 0 : 1;\n }\n (s = G(n)), (a = X[s] = I[s](n));\n const b = [da, ca],\n h = [];\n function Z(S, k) {\n return S[8].length ? 0 : 1;\n }\n return (\n (p = Z(n)),\n (d = h[p] = b[p](n)),\n {\n c() {\n (e = te(\"div\")),\n xe(t.$.fragment),\n (o = ve()),\n xe(i.$.fragment),\n (l = ve()),\n a.c(),\n (r = ve()),\n d.c(),\n z(e, \"class\", \"nvjs-pane\"),\n z(e, \"style\", n[7]);\n },\n m(S, k) {\n Q(S, e, k),\n me(t, e, null),\n re(e, o),\n me(i, e, null),\n re(e, l),\n X[s].m(e, null),\n re(e, r),\n h[p].m(e, null),\n (m = !0);\n },\n p(S, k) {\n const J = {};\n k & 2 && (J.id = S[1]),\n k & 4 && (J.props = S[2]),\n k & 1 && (J.layout = S[0]),\n k & 8 && (J.main = S[3]),\n t.$set(J);\n const P = {};\n k & 2 && (P.id = S[1]),\n k & 4 && (P.props = S[2]),\n k & 1 && (P.layout = S[0]),\n k & 8 && (P.main = S[3]),\n i.$set(P);\n let K = s;\n (s = G(S)),\n s === K\n ? X[s].p(S, k)\n : (Ze(),\n O(X[K], 1, 1, () =\u003E {\n X[K] = null;\n }),\n Le(),\n (a = X[s]),\n a ? a.p(S, k) : ((a = X[s] = I[s](S)), a.c()),\n F(a, 1),\n a.m(e, r));\n let U = p;\n (p = Z(S)),\n p === U\n ? h[p].p(S, k)\n : (Ze(),\n O(h[U], 1, 1, () =\u003E {\n h[U] = null;\n }),\n Le(),\n (d = h[p]),\n d ? d.p(S, k) : ((d = h[p] = b[p](S)), d.c()),\n F(d, 1),\n d.m(e, null)),\n (!m || k & 128) && z(e, \"style\", S[7]);\n },\n i(S) {\n m || (F(t.$.fragment, S), F(i.$.fragment, S), F(a), F(d), (m = !0));\n },\n o(S) {\n O(t.$.fragment, S), O(i.$.fragment, S), O(a), O(d), (m = !1);\n },\n d(S) {\n S && D(e), n[10](null), ge(t), ge(i), X[s].d(), h[p].d();\n }\n }\n );\n }\n function ra(n) {\n let e, t;\n return (\n (e = new Ai({\n props: { id: n[1], props: n[2], layout: n[0], side: \"left\" }\n })),\n {\n c() {\n xe(e.$.fragment);\n },\n m(o, i) {\n me(e, o, i), (t = !0);\n },\n p(o, i) {\n const l = {};\n i & 2 && (l.id = o[1]),\n i & 4 && (l.props = o[2]),\n i & 1 && (l.layout = o[0]),\n e.$set(l);\n },\n i(o) {\n t || (F(e.$.fragment, o), (t = !0));\n },\n o(o) {\n O(e.$.fragment, o), (t = !1);\n },\n d(o) {\n ge(e, o);\n }\n }\n );\n }\n function aa(n) {\n let e,\n t,\n o = { id: n[1], props: n[2], layout: n[0], side: \"left\", scales: n[9] };\n return (\n (e = new Vi({ props: o })),\n n[11](e),\n {\n c() {\n xe(e.$.fragment);\n },\n m(i, l) {\n me(e, i, l), (t = !0);\n },\n p(i, l) {\n const s = {};\n l & 2 && (s.id = i[1]),\n l & 4 && (s.props = i[2]),\n l & 1 && (s.layout = i[0]),\n l & 512 && (s.scales = i[9]),\n e.$set(s);\n },\n i(i) {\n t || (F(e.$.fragment, i), (t = !0));\n },\n o(i) {\n O(e.$.fragment, i), (t = !1);\n },\n d(i) {\n n[11](null), ge(e, i);\n }\n }\n );\n }\n function ca(n) {\n let e, t;\n return (\n (e = new Ai({\n props: { id: n[1], props: n[2], layout: n[0], side: \"right\" }\n })),\n {\n c() {\n xe(e.$.fragment);\n },\n m(o, i) {\n me(e, o, i), (t = !0);\n },\n p(o, i) {\n const l = {};\n i & 2 && (l.id = o[1]),\n i & 4 && (l.props = o[2]),\n i & 1 && (l.layout = o[0]),\n e.$set(l);\n },\n i(o) {\n t || (F(e.$.fragment, o), (t = !0));\n },\n o(o) {\n O(e.$.fragment, o), (t = !1);\n },\n d(o) {\n ge(e, o);\n }\n }\n );\n }\n function da(n) {\n let e,\n t,\n o = { id: n[1], props: n[2], layout: n[0], side: \"right\", scales: n[8] };\n return (\n (e = new Vi({ props: o })),\n n[12](e),\n {\n c() {\n xe(e.$.fragment);\n },\n m(i, l) {\n me(e, i, l), (t = !0);\n },\n p(i, l) {\n const s = {};\n l & 2 && (s.id = i[1]),\n l & 4 && (s.props = i[2]),\n l & 1 && (s.layout = i[0]),\n l & 256 && (s.scales = i[8]),\n e.$set(s);\n },\n i(i) {\n t || (F(e.$.fragment, i), (t = !0));\n },\n o(i) {\n O(e.$.fragment, i), (t = !1);\n },\n d(i) {\n n[12](null), ge(e, i);\n }\n }\n );\n }\n function pa(n) {\n let e,\n t,\n o = n[0] && qi(n);\n return {\n c() {\n o && o.c(), (e = we());\n },\n m(i, l) {\n o && o.m(i, l), Q(i, e, l), (t = !0);\n },\n p(i, [l]) {\n i[0]\n ? o\n ? (o.p(i, l), l & 1 && F(o, 1))\n : ((o = qi(i)), o.c(), F(o, 1), o.m(e.parentNode, e))\n : o &&\n (Ze(),\n O(o, 1, 1, () =\u003E {\n o = null;\n }),\n Le());\n },\n i(i) {\n t || (F(o), (t = !0));\n },\n o(i) {\n O(o), (t = !1);\n },\n d(i) {\n i && D(e), o && o.d(i);\n }\n };\n }\n function ua(n, e, t) {\n let o,\n i,\n l,\n { id: s } = e,\n { props: a } = e,\n { main: r } = e,\n { layout: p } = e,\n d = de.instance(a.id),\n m,\n g,\n I;\n d.on(`pane-${s}:update-pane`, X),\n it(() =\u003E {}),\n je(() =\u003E {\n d.off(`pane-${s}`);\n });\n function X(Z) {\n if (!Z.grids) return;\n t(0, (p = Z.grids[s])), d.emitSpec(`grid-${s}`, \"update-grid\", p);\n let S = I && I.getLayers ? I.getLayers() : [];\n m && m.setLayers(S),\n g && g.setLayers(S),\n d.emitSpec(`sb-${s}-left`, \"update-sb\", p),\n d.emitSpec(`sb-${s}-right`, \"update-sb\", p);\n }\n function G(Z) {\n He[Z ? \"unshift\" : \"push\"](() =\u003E {\n (I = Z), t(6, I);\n });\n }\n function b(Z) {\n He[Z ? \"unshift\" : \"push\"](() =\u003E {\n (m = Z), t(4, m);\n });\n }\n function h(Z) {\n He[Z ? \"unshift\" : \"push\"](() =\u003E {\n (g = Z), t(5, g);\n });\n }\n return (\n (n.$set = (Z) =\u003E {\n \"id\" in Z && t(1, (s = Z.id)),\n \"props\" in Z && t(2, (a = Z.props)),\n \"main\" in Z && t(3, (r = Z.main)),\n \"layout\" in Z && t(0, (p = Z.layout));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 1 && t(9, (o = w.getScalesBySide(0, p))),\n n.$.dirty & 1 && t(8, (i = w.getScalesBySide(1, p))),\n n.$.dirty & 7 &&\n t(\n 7,\n (l = `\n width: ${a.width}px;\n height: ${(p || {}).height}px;\n \u002F* didn't work, coz canvas draws through the border\n border-top: ${s ? \"1px solid\" : \"none\"};\n border-color: ${a.colors.scale};\n box-sizing: border-box;*\u002F\n `)\n );\n }),\n [p, s, a, r, m, g, I, l, i, o, G, b, h]\n );\n }\n class ha extends Ce {\n constructor(e) {\n super(), Se(this, e, ua, pa, Xe, { id: 1, props: 2, main: 3, layout: 0 });\n }\n }\n const {\n MINUTE15: fa,\n MINUTE: md,\n HOUR: Rn,\n DAY: wn,\n WEEK: ma,\n MONTH: ga,\n YEAR: Yn,\n MONTHMAP: eo,\n HPX: to\n } = se;\n function ya(n, e, t) {\n const o = e.botbar.width,\n i = e.botbar.height,\n l = e.main.sbMax[0];\n e.main.sbMax[1],\n (t.font = n.config.FONT),\n t.clearRect(0, 0, o, i),\n (t.strokeStyle = n.colors.scale),\n t.beginPath(),\n t.moveTo(0, 0.5),\n t.lineTo(Math.floor(o + 1), 0.5),\n t.stroke(),\n (t.fillStyle = n.colors.text),\n t.beginPath();\n for (var s of e.botbar.xs) {\n let a = Ia(n, s),\n r = s[0] + l;\n t.moveTo(r + to, 0),\n t.lineTo(r + to, 4.5),\n Ga(n, s[1][0]) || (t.globalAlpha = 0.85),\n (t.textAlign = \"center\"),\n t.fillText(a, r, 18),\n (t.globalAlpha = 1);\n }\n t.stroke();\n }\n function ba(n, e, t) {\n let o = Xa(n);\n t.fillStyle = n.colors.panel;\n let i = t.measureText(o + \" \"),\n l = Math.floor(i.width + 10),\n s = n.cursor.x + e.main.sbMax[0],\n a = Math.floor(s - l * 0.5),\n r = 1,\n p = n.config.PANHEIGHT;\n xa(t, a, r, l, p + 0.5, 3),\n (t.fillStyle = n.colors.textHL),\n (t.textAlign = \"center\"),\n t.fillText(o, s, r + 16);\n }\n function Ia(n, e) {\n let t = e[1],\n i = n.timeFrame \u003C wn ? 1 : 0,\n l = t + i * n.timezone * Rn,\n s = new Date(l);\n if (e[2] === Yn || w.yearStart(t) === t) return s.getUTCFullYear();\n if (e[2] === ga || w.monthStart(t) === t) return eo[s.getUTCMonth()];\n if (w.dayStart(l) === l) return s.getUTCDate();\n let a = w.addZero(s.getUTCHours()),\n r = w.addZero(s.getUTCMinutes());\n return a + \":\" + r;\n }\n function Xa(n) {\n let e = n.cursor.time;\n if (e === void 0) return \"Out of range\";\n let t = n.timeFrame,\n o = t \u003C wn ? 1 : 0,\n i = new Date(e + o * n.timezone * Rn);\n if (t === Yn) return i.getUTCFullYear();\n if (t \u003C Yn)\n var l = \"`\" + `${i.getUTCFullYear()}`.slice(-2),\n s = eo[i.getUTCMonth()],\n a = \"01\";\n t \u003C= ma && (a = i.getUTCDate());\n let r = `${a} ${s} ${l}`,\n p = \"\";\n if (t \u003C wn) {\n let d = w.addZero(i.getUTCHours()),\n m = w.addZero(i.getUTCMinutes());\n p = d + \":\" + m;\n }\n return `${r} ${p}`;\n }\n function Ga(n, e) {\n let t = n.timeFrame;\n return (\n e === 0 ||\n w.monthStart(e) === e ||\n w.dayStart(e) === e ||\n (t \u003C= fa && e % Rn === 0)\n );\n }\n function xa(n, e, t, o, i, l) {\n o \u003C 2 * l && (l = o \u002F 2),\n i \u003C 2 * l && (l = i \u002F 2),\n n.beginPath(),\n n.moveTo(e + l, t),\n n.arcTo(e + o, t, e + o, t + i, 0),\n n.arcTo(e + o, t + i, e, t + i, l),\n n.arcTo(e, t + i, e, t, l),\n n.arcTo(e, t, e + o, t, 0),\n n.closePath(),\n n.fill();\n }\n const no = { body: ya, panel: ba };\n function va(n) {\n let e, t;\n return {\n c() {\n (e = te(\"div\")),\n (t = te(\"canvas\")),\n z(t, \"id\", n[2]),\n z(e, \"class\", \"nvjs-botbar svelte-8gplax\"),\n z(e, \"id\", n[1]),\n z(e, \"style\", n[0]);\n },\n m(o, i) {\n Q(o, e, i), re(e, t);\n },\n p(o, [i]) {\n i & 1 && z(e, \"style\", o[0]);\n },\n i: le,\n o: le,\n d(o) {\n o && D(e);\n }\n };\n }\n function Za(n, e, t) {\n let o,\n i,\n { props: l = {} } = e,\n { layout: s = {} } = e,\n a = \"botbar\",\n r = `${l.id}-botbar`,\n p = `${l.id}-botbar-canvas`,\n d = de.instance(l.id);\n d.on(`${a}:update-bb`, G), d.on(`${a}:show-bb-panel`, (h) =\u003E (I = h));\n let m,\n g,\n I = !0;\n it(() =\u003E {\n X();\n }),\n je(() =\u003E {\n d.off(`${a}`);\n });\n function X() {\n let h = s.botbar;\n ([m, g] = gt.setup(p, h.width, h.height)), G();\n }\n function G(h = s) {\n t(3, (s = h)),\n s.botbar &&\n (no.body(l, s, g),\n l.cursor.x && l.cursor.ti !== void 0 && I && no.panel(l, s, g));\n }\n function b() {\n let h = s.botbar;\n !m || !h || (gt.resize(m, g, h.width, h.height), G());\n }\n return (\n (n.$set = (h) =\u003E {\n \"props\" in h && t(4, (l = h.props)),\n \"layout\" in h && t(3, (s = h.layout));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 24 &&\n t(\n 0,\n (o = `\n background: ${l.colors.back};\n width: ${(s.botbar || {}).width}px;\n height: ${(s.botbar || {}).height}px;\n `)\n ),\n n.$.dirty & 8 && t(5, (i = (s.botbar || {}).width)),\n n.$.dirty & 32 && b();\n }),\n [o, r, p, s, l, i]\n );\n }\n class La extends Ce {\n constructor(e) {\n super(), Se(this, e, Za, va, Xe, { props: 4, layout: 3 });\n }\n }\n function Sa(n) {\n let e, t;\n return {\n c() {\n (e = te(\"div\")),\n (t = ut(\"No data ¯\\\\_( °﹏°)_\u002F¯\")),\n z(e, \"class\", \"nvjs-no-data-stub svelte-172ri4o\"),\n z(e, \"style\", n[0]);\n },\n m(o, i) {\n Q(o, e, i), re(e, t);\n },\n p(o, [i]) {\n i & 1 && z(e, \"style\", o[0]);\n },\n i: le,\n o: le,\n d(o) {\n o && D(e);\n }\n };\n }\n function Ca(n, e, t) {\n let o,\n { props: i } = e;\n return (\n (n.$set = (l) =\u003E {\n \"props\" in l && t(1, (i = l.props));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 2 &&\n t(\n 0,\n (o = `\n display: flex;\n width: ${i.width}px;\n height: ${i.height}px;\n background: ${i.colors.back};\n color: ${i.colors.scale};\n font: ${i.config.FONT};\n font-size: 18px;\n font-style: italic;\n user-select: none;\n align-items:center;\n justify-content:center;\n `)\n );\n }),\n [o, i]\n );\n }\n class Ra extends Ce {\n constructor(e) {\n super(), Se(this, e, Ca, Sa, Xe, { props: 1 });\n }\n }\n function io(n, e, t) {\n const o = n.slice();\n return (o[25] = e[t]), (o[27] = t), o;\n }\n function wa(n) {\n let e, t;\n return (\n (e = new Ra({ props: { props: n[0] } })),\n {\n c() {\n xe(e.$.fragment);\n },\n m(o, i) {\n me(e, o, i), (t = !0);\n },\n p(o, i) {\n const l = {};\n i & 1 && (l.props = o[0]), e.$set(l);\n },\n i(o) {\n t || (F(e.$.fragment, o), (t = !0));\n },\n o(o) {\n O(e.$.fragment, o), (t = !1);\n },\n d(o) {\n ge(e, o);\n }\n }\n );\n }\n function Ya(n) {\n let e,\n t,\n o,\n i = Ye(n[3].panes()),\n l = [];\n for (let a = 0; a \u003C i.length; a += 1) l[a] = oo(io(n, i, a));\n const s = (a) =\u003E\n O(l[a], 1, 1, () =\u003E {\n l[a] = null;\n });\n return (\n (t = new La({ props: { props: n[2], layout: n[1] } })),\n {\n c() {\n for (let a = 0; a \u003C l.length; a += 1) l[a].c();\n (e = ve()), xe(t.$.fragment);\n },\n m(a, r) {\n for (let p = 0; p \u003C l.length; p += 1) l[p] && l[p].m(a, r);\n Q(a, e, r), me(t, a, r), (o = !0);\n },\n p(a, r) {\n if (r & 14) {\n i = Ye(a[3].panes());\n let d;\n for (d = 0; d \u003C i.length; d += 1) {\n const m = io(a, i, d);\n l[d]\n ? (l[d].p(m, r), F(l[d], 1))\n : ((l[d] = oo(m)),\n l[d].c(),\n F(l[d], 1),\n l[d].m(e.parentNode, e));\n }\n for (Ze(), d = i.length; d \u003C l.length; d += 1) s(d);\n Le();\n }\n const p = {};\n r & 4 && (p.props = a[2]), r & 2 && (p.layout = a[1]), t.$set(p);\n },\n i(a) {\n if (!o) {\n for (let r = 0; r \u003C i.length; r += 1) F(l[r]);\n F(t.$.fragment, a), (o = !0);\n }\n },\n o(a) {\n l = l.filter(Boolean);\n for (let r = 0; r \u003C l.length; r += 1) O(l[r]);\n O(t.$.fragment, a), (o = !1);\n },\n d(a) {\n a && D(e), pt(l, a), ge(t, a);\n }\n }\n );\n }\n function oo(n) {\n let e, t;\n return (\n (e = new ha({\n props: {\n id: n[27],\n layout: n[1].grids[n[27]],\n props: n[2],\n main: n[25] === n[3].chart\n }\n })),\n {\n c() {\n xe(e.$.fragment);\n },\n m(o, i) {\n me(e, o, i), (t = !0);\n },\n p(o, i) {\n const l = {};\n i & 2 && (l.layout = o[1].grids[o[27]]),\n i & 4 && (l.props = o[2]),\n e.$set(l);\n },\n i(o) {\n t || (F(e.$.fragment, o), (t = !0));\n },\n o(o) {\n O(e.$.fragment, o), (t = !1);\n },\n d(o) {\n ge(e, o);\n }\n }\n );\n }\n function Ta(n) {\n let e, t, o, i;\n const l = [Ya, wa],\n s = [];\n function a(r, p) {\n return r[1] && r[1].main ? 0 : 1;\n }\n return (\n (t = a(n)),\n (o = s[t] = l[t](n)),\n {\n c() {\n (e = te(\"div\")), o.c(), z(e, \"class\", \"nvjs-chart\");\n },\n m(r, p) {\n Q(r, e, p), s[t].m(e, null), (i = !0);\n },\n p(r, [p]) {\n let d = t;\n (t = a(r)),\n t === d\n ? s[t].p(r, p)\n : (Ze(),\n O(s[d], 1, 1, () =\u003E {\n s[d] = null;\n }),\n Le(),\n (o = s[t]),\n o ? o.p(r, p) : ((o = s[t] = l[t](r)), o.c()),\n F(o, 1),\n o.m(e, null));\n },\n i(r) {\n i || (F(o), (i = !0));\n },\n o(r) {\n O(o), (i = !1);\n },\n d(r) {\n r && D(e), s[t].d();\n }\n }\n );\n }\n function Ma(n, e, t) {\n let o,\n { props: i = {} } = e;\n function l() {\n return k;\n }\n function s() {\n return b;\n }\n function a() {\n return h;\n }\n function r(M) {\n var W;\n let L = !((W = M.preventDefault) == null || W);\n delete M.preventDefault, Object.assign(b, M), K(b, L);\n }\n function p(M) {\n var W;\n let L = !((W = M.preventDefault) == null || W);\n delete M.preventDefault, Object.assign(h, M), J(h, L);\n }\n let d = Ke.instance(i.id),\n m = Je.instance(i.id),\n g = de.instance(i.id),\n I = kt.instance(i.id);\n I.init(i);\n let X = I.detectInterval(),\n G = I.getTimeframe(),\n b = I.defaultRange(),\n h = new bl(m),\n Z = {},\n S = new js(i),\n k = null;\n I.calcIndexOffsets(),\n g.on(\"chart:cursor-changed\", J),\n g.on(\"chart:cursor-locked\", P),\n g.on(\"chart:range-changed\", K),\n g.on(\"chart:update-layout\", N),\n g.on(\"chart:full-update\", C),\n it(() =\u003E {\n d.calcSubset(b),\n d.detectMain(),\n d.loadScripts(b, I.tf, !0),\n m.init(i),\n I.updatePanesHash(),\n t(1, (k = new Li(o, d, m)));\n }),\n je(() =\u003E {\n g.off(\"chart\");\n });\n function J(M, L = !0) {\n M.mode && t(12, (h.mode = M.mode), h),\n h.mode !== \"explore\" &&\n (h.xSync(d, k, o, M), M.visible === !1 && setTimeout(() =\u003E N())),\n L && g.emit(\"$cursor-update\", w.makeCursorEvent(M, h, k)),\n N();\n }\n function P(M) {\n (h.scrollLock && M) || t(12, (h.locked = M), h);\n }\n function K(M, L = !0) {\n if ((L && g.emit(\"$range-update\", M), A(M), d.updateRange(b), h.locked))\n return;\n h.xValues(d, k, o), h.yValues(k), N();\n let W = i.config.QUANTIZE_AFTER;\n W && w.afterAll(Z, U, W);\n }\n function U() {\n h.xSync(d, k, o, h), N();\n }\n function N(M = {}, L = !0) {\n if (\n (L && g.emit(\"$chart-pre-update\"),\n M.updateHash && I.updatePanesHash(),\n I.panesChanged())\n )\n return C(M);\n t(12, h),\n t(1, (k = new Li(o, d, m))),\n g.emit(\"update-pane\", k),\n g.emitSpec(\"botbar\", \"update-bb\", k),\n L && g.emit(\"$chart-update\");\n }\n function C(M = {}) {\n let L = I.ibMode;\n t(9, (X = I.detectInterval())), t(10, (G = I.getTimeframe()));\n let W = I.ibMode !== L;\n (!b.length || M.resetRange || W) && A(I.defaultRange()),\n I.calcIndexOffsets(),\n d.calcSubset(b),\n d.init(d.data),\n d.detectMain(),\n d.loadScripts(),\n m.init(i),\n m.restore(),\n I.updatePanesHash(),\n N(),\n g.emit(\"remake-grid\");\n }\n function A(M) {\n t(11, (b = M)), t(2, (o.range = b), o);\n }\n return (\n (n.$set = (M) =\u003E {\n \"props\" in M && t(0, (i = M.props));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 7681 &&\n t(\n 2,\n (o = Object.assign(\n { interval: X, timeFrame: G, range: b, ctx: S, cursor: h },\n i\n ))\n );\n }),\n [i, k, o, d, l, s, a, r, p, X, G, b, h]\n );\n }\n class Wa extends Ce {\n constructor(e) {\n super(),\n Se(this, e, Ma, Ta, Xe, {\n props: 0,\n getLayout: 4,\n getRange: 5,\n getCursor: 6,\n setRange: 7,\n setCursor: 8\n });\n }\n get getLayout() {\n return this.$.ctx[4];\n }\n get getRange() {\n return this.$.ctx[5];\n }\n get getCursor() {\n return this.$.ctx[6];\n }\n get setRange() {\n return this.$.ctx[7];\n }\n get setCursor() {\n return this.$.ctx[8];\n }\n }\n function ka(n) {\n bt(\n n,\n \"svelte-7z7hqo\",\n \".svelte-7z7hqo::after,.svelte-7z7hqo::before{box-sizing:content-box}.night-vision.svelte-7z7hqo{position:relative;direction:ltr}\"\n );\n }\n function za(n) {\n let e,\n t,\n o,\n i = { props: n[1] };\n return (\n (t = new Wa({ props: i })),\n n[19](t),\n {\n c() {\n (e = te(\"div\")),\n xe(t.$.fragment),\n z(e, \"class\", \"night-vision svelte-7z7hqo\"),\n z(e, \"id\", n[0]),\n z(e, \"style\", n[3]);\n },\n m(l, s) {\n Q(l, e, s), me(t, e, null), (o = !0);\n },\n p(l, [s]) {\n const a = {};\n s & 2 && (a.props = l[1]),\n t.$set(a),\n (!o || s & 1) && z(e, \"id\", l[0]),\n (!o || s & 8) && z(e, \"style\", l[3]);\n },\n i(l) {\n o || (F(t.$.fragment, l), (o = !0));\n },\n o(l) {\n O(t.$.fragment, l), (o = !1);\n },\n d(l) {\n l && D(e), n[19](null), ge(t);\n }\n }\n );\n }\n function Va(n, e, t) {\n let o, i, l, s, a, r;\n function p() {\n return r;\n }\n let { showLogo: d = !1 } = e,\n { id: m = \"nvjs\" } = e,\n { width: g = 750 } = e,\n { height: I = 420 } = e,\n { colors: X = {} } = e,\n { toolbar: G = !1 } = e,\n { scripts: b = [] } = e,\n { config: h = {} } = e,\n { indexBased: Z = !1 } = e,\n { timezone: S = 0 } = e,\n { data: k = {} } = e,\n { autoResize: J = !1 } = e;\n function P(K) {\n He[K ? \"unshift\" : \"push\"](() =\u003E {\n (r = K), t(2, r);\n });\n }\n return (\n (n.$set = (K) =\u003E {\n \"showLogo\" in K && t(5, (d = K.showLogo)),\n \"id\" in K && t(0, (m = K.id)),\n \"width\" in K && t(6, (g = K.width)),\n \"height\" in K && t(7, (I = K.height)),\n \"colors\" in K && t(8, (X = K.colors)),\n \"toolbar\" in K && t(9, (G = K.toolbar)),\n \"scripts\" in K && t(10, (b = K.scripts)),\n \"config\" in K && t(11, (h = K.config)),\n \"indexBased\" in K && t(12, (Z = K.indexBased)),\n \"timezone\" in K && t(13, (S = K.timezone)),\n \"data\" in K && t(14, (k = K.data)),\n \"autoResize\" in K && t(15, (J = K.autoResize));\n }),\n (n.$.update = () =\u003E {\n n.$.dirty & 2048 && t(16, (o = Object.assign(se.ChartConfig, h))),\n n.$.dirty & 2560 && t(18, (i = G ? h.TOOLBAR : 0)),\n n.$.dirty & 256 && t(17, (l = Object.assign(se.COLORS, X))),\n n.$.dirty & 468193 &&\n t(\n 1,\n (s = {\n showLogo: d,\n id: m,\n width: g - i,\n height: I,\n colors: l,\n scripts: b,\n config: o,\n timezone: S\n })\n ),\n n.$.dirty & 2 &&\n t(\n 3,\n (a = `\n width: ${s.width}px;\n height: ${s.height}px;\n `)\n );\n }),\n [m, s, r, a, p, d, g, I, X, G, b, h, Z, S, k, J, o, l, i, P]\n );\n }\n let Ha = class extends Ce {\n constructor(e) {\n super(),\n Se(\n this,\n e,\n Va,\n za,\n Xe,\n {\n getChart: 4,\n showLogo: 5,\n id: 0,\n width: 6,\n height: 7,\n colors: 8,\n toolbar: 9,\n scripts: 10,\n config: 11,\n indexBased: 12,\n timezone: 13,\n data: 14,\n autoResize: 15\n },\n ka\n );\n }\n get getChart() {\n return this.$.ctx[4];\n }\n get showLogo() {\n return this.$.ctx[5];\n }\n set showLogo(e) {\n this.$set({ showLogo: e }), Ge();\n }\n get id() {\n return this.$.ctx[0];\n }\n set id(e) {\n this.$set({ id: e }), Ge();\n }\n get width() {\n return this.$.ctx[6];\n }\n set width(e) {\n this.$set({ width: e }), Ge();\n }\n get height() {\n return this.$.ctx[7];\n }\n set height(e) {\n this.$set({ height: e }), Ge();\n }\n get colors() {\n return this.$.ctx[8];\n }\n set colors(e) {\n this.$set({ colors: e }), Ge();\n }\n get toolbar() {\n return this.$.ctx[9];\n }\n set toolbar(e) {\n this.$set({ toolbar: e }), Ge();\n }\n get scripts() {\n return this.$.ctx[10];\n }\n set scripts(e) {\n this.$set({ scripts: e }), Ge();\n }\n get config() {\n return this.$.ctx[11];\n }\n set config(e) {\n this.$set({ config: e }), Ge();\n }\n get indexBased() {\n return this.$.ctx[12];\n }\n set indexBased(e) {\n this.$set({ indexBased: e }), Ge();\n }\n get timezone() {\n return this.$.ctx[13];\n }\n set timezone(e) {\n this.$set({ timezone: e }), Ge();\n }\n get data() {\n return this.$.ctx[14];\n }\n set data(e) {\n this.$set({ data: e }), Ge();\n }\n get autoResize() {\n return this.$.ctx[15];\n }\n set autoResize(e) {\n this.$set({ autoResize: e }), Ge();\n }\n };\n function Aa(n) {\n new ResizeObserver((t) =\u003E {\n let o = n.root.getBoundingClientRect();\n (n.width = o.width), (n.height = o.height);\n }).observe(n.root);\n }\n class Ka {\n constructor(e, t = {}) {\n (this._data = t.data || {}), (this._scripts = t.scripts || []);\n let o = t.id || \"nvjs\";\n (this.ww = Xi.instance(o, this)),\n (this.se = ii.instance(o, this)),\n (this.hub = Ke.instance(o)),\n (this.meta = Je.instance(o)),\n (this.scan = kt.instance(o)),\n (this.events = de.instance(o)),\n (this.scriptHub = Kt.instance(o)),\n this.hub.init(this._data),\n this.scriptHub.init(this._scripts),\n (this.root = document.getElementById(e)),\n (this.comp = new Ha({ target: this.root, props: t })),\n t.autoResize && Aa(this),\n this.se.setRefs(this.hub, this.scan);\n }\n get id() {\n return this.comp.id;\n }\n set id(e) {\n this.comp.$set({ id: e });\n }\n get width() {\n return this.comp.width;\n }\n set width(e) {\n this.comp.$set({ width: e }), setTimeout(() =\u003E this.update());\n }\n get height() {\n return this.comp.height;\n }\n set height(e) {\n this.comp.$set({ height: e }), setTimeout(() =\u003E this.update());\n }\n get colors() {\n return this.comp.colors;\n }\n set colors(e) {\n this.comp.$set({ colors: e });\n }\n get showLogo() {\n return this.comp.showLogo;\n }\n set showLogo(e) {\n this.comp.$set({ id: e });\n }\n get scripts() {\n return this._scripts;\n }\n set scripts(e) {\n (this._scripts = e),\n this.scriptHub.init(this._scripts),\n this.update(\"full\");\n }\n get data() {\n return this._data;\n }\n set data(e) {\n (this._data = e), this.update(\"full\");\n }\n get config() {\n return this.comp.config;\n }\n set config(e) {\n this.comp.$set({ config: e });\n }\n get indexBased() {\n return this.comp.indexBased;\n }\n set indexBased(e) {\n this.comp.$set({ indexBased: e });\n }\n get timezone() {\n return this.comp.timezone;\n }\n set timezone(e) {\n this.comp.$set({ timezone: e }), setTimeout(() =\u003E this.update());\n }\n get layout() {\n let e = this.comp.getChart();\n return e ? e.getLayout() : null;\n }\n get range() {\n let e = this.comp.getChart();\n return e ? e.getRange() : null;\n }\n set range(e) {\n let t = this.comp.getChart();\n t && t.setRange(e);\n }\n get cursor() {\n let e = this.comp.getChart();\n return e ? e.getCursor() : null;\n }\n set cursor(e) {\n let t = this.comp.getChart();\n t && t.setCursor(e);\n }\n update(o = \"layout\", t = {}) {\n var [o, i] = o.split(\"-\");\n const l = this.events;\n switch (o) {\n case \"layout\":\n l.emitSpec(\"chart\", \"update-layout\", t);\n break;\n case \"data\":\n this.hub.updateRange(this.range),\n this.meta.calcOhlcMap(),\n l.emitSpec(\"chart\", \"update-layout\", t);\n break;\n case \"full\":\n this.hub.init(this._data), l.emitSpec(\"chart\", \"full-update\", t);\n break;\n case \"grid\":\n if (i === void 0) l.emit(\"remake-grid\");\n else {\n let s = `grid-${i}`;\n l.emitSpec(s, \"remake-grid\", t);\n }\n break;\n case \"legend\":\n if (i === void 0) l.emit(\"update-legend\");\n else {\n let s = `legend-${i}`;\n l.emitSpec(s, \"update-legend\", t);\n }\n break;\n }\n }\n fullReset() {\n this.update(\"full\", { resetRange: !0 });\n }\n goto(e) {\n let t = this.range,\n o = t[1] - t[0];\n this.range = [e - o, e];\n }\n scroll() {\n if (this.cursor.locked) return;\n let e = this.hub.mainOv.data,\n t = e[e.length - 1],\n o = this.hub.indexBased;\n if (!t) return;\n let i = o ? e.length - 1 : t[0],\n l = this.range[1] - i,\n s = this.scan.interval;\n l \u003E 0 && this.goto(this.range[1] + s);\n }\n destroy() {\n this.comp.$destroy();\n }\n }\n var lo = { exports: {} };\n (function (n, e) {\n (function (t, o) {\n var i = function (a) {\n return new i.Instance(a);\n };\n (i.SUPPORT = \"wheel\"),\n (i.ADD_EVENT = \"addEventListener\"),\n (i.REMOVE_EVENT = \"removeEventListener\"),\n (i.PREFIX = \"\"),\n (i.READY = !1),\n (i.Instance = function (a) {\n return (\n i.READY || (i.normalise.browser(), (i.READY = !0)),\n (this.element = a),\n (this.handlers = []),\n this\n );\n }),\n (i.Instance.prototype = {\n wheel: function (r, p) {\n return (\n i.event.add(this, i.SUPPORT, r, p),\n i.SUPPORT === \"DOMMouseScroll\" &&\n i.event.add(this, \"MozMousePixelScroll\", r, p),\n this\n );\n },\n unwheel: function (r, p) {\n return (\n r === void 0 &&\n (r = this.handlers.slice(-1)[0]) &&\n (r = r.original),\n i.event.remove(this, i.SUPPORT, r, p),\n i.SUPPORT === \"DOMMouseScroll\" &&\n i.event.remove(this, \"MozMousePixelScroll\", r, p),\n this\n );\n }\n }),\n (i.event = {\n add: function (r, p, d, m) {\n var g = d;\n (d = function (I) {\n I || (I = t.event);\n var X = i.normalise.event(I),\n G = i.normalise.delta(I);\n return g(X, G[0], G[1], G[2]);\n }),\n r.element[i.ADD_EVENT](i.PREFIX + p, d, m || !1),\n r.handlers.push({ original: g, normalised: d });\n },\n remove: function (r, p, d, m) {\n for (var g = d, I = {}, X, G = 0, b = r.handlers.length; G \u003C b; ++G)\n I[r.handlers[G].original] = r.handlers[G];\n (X = I[g]),\n (d = X.normalised),\n r.element[i.REMOVE_EVENT](i.PREFIX + p, d, m || !1);\n for (var h in r.handlers)\n if (r.handlers[h] == X) {\n r.handlers.splice(h, 1);\n break;\n }\n }\n });\n var l, s;\n (i.normalise = {\n browser: function () {\n \"onwheel\" in o ||\n o.documentMode \u003E= 9 ||\n (i.SUPPORT =\n o.onmousewheel !== void 0 ? \"mousewheel\" : \"DOMMouseScroll\"),\n t.addEventListener ||\n ((i.ADD_EVENT = \"attachEvent\"),\n (i.REMOVE_EVENT = \"detachEvent\"),\n (i.PREFIX = \"on\"));\n },\n event: function (r) {\n var p = {\n originalEvent: r,\n target: r.target || r.srcElement,\n type: \"wheel\",\n deltaMode: r.type === \"MozMousePixelScroll\" ? 0 : 1,\n deltaX: 0,\n deltaZ: 0,\n preventDefault: function () {\n r.preventDefault ? r.preventDefault() : (r.returnValue = !1);\n },\n stopPropagation: function () {\n r.stopPropagation ? r.stopPropagation() : (r.cancelBubble = !1);\n }\n };\n return (\n r.wheelDelta && (p.deltaY = (-1 \u002F 40) * r.wheelDelta),\n r.wheelDeltaX && (p.deltaX = (-1 \u002F 40) * r.wheelDeltaX),\n r.detail && (p.deltaY = r.detail),\n p\n );\n },\n delta: function (r) {\n var p = 0,\n d = 0,\n m = 0,\n g = 0,\n I = 0,\n X;\n return (\n r.deltaY && ((m = r.deltaY * -1), (p = m)),\n r.deltaX && ((d = r.deltaX), (p = d * -1)),\n r.wheelDelta && (p = r.wheelDelta),\n r.wheelDeltaY && (m = r.wheelDeltaY),\n r.wheelDeltaX && (d = r.wheelDeltaX * -1),\n r.detail && (p = r.detail * -1),\n p === 0\n ? [0, 0, 0]\n : ((g = Math.abs(p)),\n (!l || g \u003C l) && (l = g),\n (I = Math.max(Math.abs(m), Math.abs(d))),\n (!s || I \u003C s) && (s = I),\n (X = p \u003E 0 ? \"floor\" : \"ceil\"),\n (p = Math[X](p \u002F l)),\n (d = Math[X](d \u002F s)),\n (m = Math[X](m \u002F s)),\n [p, d, m])\n );\n }\n }),\n typeof t.define == \"function\" && t.define.amd\n ? t.define(\"hamster\", [], function () {\n return i;\n })\n : (n.exports = i);\n })(window, window.document);\n })(lo);\n var so = lo.exports;\n const Ja = Ie({ __proto__: null, default: Mt(so) }, [so]);\n var ro = { exports: {} };\n \u002F*! Hammer.JS - v2.0.7 - 2016-04-22\n * http:\u002F\u002Fhammerjs.github.io\u002F\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license *\u002F (function (n) {\n (function (e, t, o, i) {\n var l = [\"\", \"webkit\", \"Moz\", \"MS\", \"ms\", \"o\"],\n s = t.createElement(\"div\"),\n a = \"function\",\n r = Math.round,\n p = Math.abs,\n d = Date.now;\n function m(c, u, f) {\n return setTimeout(S(c, f), u);\n }\n function g(c, u, f) {\n return Array.isArray(c) ? (I(c, f[u], f), !0) : !1;\n }\n function I(c, u, f) {\n var y;\n if (c)\n if (c.forEach) c.forEach(u, f);\n else if (c.length !== i)\n for (y = 0; y \u003C c.length; ) u.call(f, c[y], y, c), y++;\n else for (y in c) c.hasOwnProperty(y) && u.call(f, c[y], y, c);\n }\n function X(c, u, f) {\n var y =\n \"DEPRECATED METHOD: \" +\n u +\n `\n ` +\n f +\n ` AT \n `;\n return function () {\n var v = new Error(\"get-stack-trace\"),\n H =\n v && v.stack\n ? v.stack\n .replace(\u002F^[^\\(]+?[\\n$]\u002Fgm, \"\")\n .replace(\u002F^\\s+at\\s+\u002Fgm, \"\")\n .replace(\u002F^Object.\u003Canonymous\u003E\\s*\\(\u002Fgm, \"{anonymous}()@\")\n : \"Unknown Stack Trace\",\n j = e.console && (e.console.warn || e.console.log);\n return j && j.call(e.console, y, H), c.apply(this, arguments);\n };\n }\n var G;\n typeof Object.assign != \"function\"\n ? (G = function (u) {\n if (u === i || u === null)\n throw new TypeError(\"Cannot convert undefined or null to object\");\n for (var f = Object(u), y = 1; y \u003C arguments.length; y++) {\n var v = arguments[y];\n if (v !== i && v !== null)\n for (var H in v) v.hasOwnProperty(H) && (f[H] = v[H]);\n }\n return f;\n })\n : (G = Object.assign);\n var b = X(\n function (u, f, y) {\n for (var v = Object.keys(f), H = 0; H \u003C v.length; )\n (!y || (y && u[v[H]] === i)) && (u[v[H]] = f[v[H]]), H++;\n return u;\n },\n \"extend\",\n \"Use `assign`.\"\n ),\n h = X(\n function (u, f) {\n return b(u, f, !0);\n },\n \"merge\",\n \"Use `assign`.\"\n );\n function Z(c, u, f) {\n var y = u.prototype,\n v;\n (v = c.prototype = Object.create(y)),\n (v.constructor = c),\n (v._super = y),\n f && G(v, f);\n }\n function S(c, u) {\n return function () {\n return c.apply(u, arguments);\n };\n }\n function k(c, u) {\n return typeof c == a ? c.apply((u && u[0]) || i, u) : c;\n }\n function J(c, u) {\n return c === i ? u : c;\n }\n function P(c, u, f) {\n I(C(u), function (y) {\n c.addEventListener(y, f, !1);\n });\n }\n function K(c, u, f) {\n I(C(u), function (y) {\n c.removeEventListener(y, f, !1);\n });\n }\n function U(c, u) {\n for (; c; ) {\n if (c == u) return !0;\n c = c.parentNode;\n }\n return !1;\n }\n function N(c, u) {\n return c.indexOf(u) \u003E -1;\n }\n function C(c) {\n return c.trim().split(\u002F\\s+\u002Fg);\n }\n function A(c, u, f) {\n if (c.indexOf && !f) return c.indexOf(u);\n for (var y = 0; y \u003C c.length; ) {\n if ((f && c[y][f] == u) || (!f && c[y] === u)) return y;\n y++;\n }\n return -1;\n }\n function M(c) {\n return Array.prototype.slice.call(c, 0);\n }\n function L(c, u, f) {\n for (var y = [], v = [], H = 0; H \u003C c.length; ) {\n var j = u ? c[H][u] : c[H];\n A(v, j) \u003C 0 && y.push(c[H]), (v[H] = j), H++;\n }\n return (\n f &&\n (u\n ? (y = y.sort(function (he, be) {\n return he[u] \u003E be[u];\n }))\n : (y = y.sort())),\n y\n );\n }\n function W(c, u) {\n for (\n var f, y, v = u[0].toUpperCase() + u.slice(1), H = 0;\n H \u003C l.length;\n\n ) {\n if (((f = l[H]), (y = f ? f + v : u), y in c)) return y;\n H++;\n }\n return i;\n }\n var T = 1;\n function V() {\n return T++;\n }\n function x(c) {\n var u = c.ownerDocument || c;\n return u.defaultView || u.parentWindow || e;\n }\n var Y = \u002Fmobile|tablet|ip(ad|hone|od)|android\u002Fi,\n R = \"ontouchstart\" in e,\n E = W(e, \"PointerEvent\") !== i,\n ie = R && Y.test(navigator.userAgent),\n ee = \"touch\",\n Re = \"pen\",\n ue = \"mouse\",\n B = \"kinect\",\n ce = 25,\n $ = 1,\n fe = 2,\n q = 4,\n oe = 8,\n _ = 1,\n ze = 2,\n st = 4,\n et = 8,\n rt = 16,\n Fe = ze | st,\n at = et | rt,\n po = Fe | at,\n uo = [\"x\", \"y\"],\n Pt = [\"clientX\", \"clientY\"];\n function Me(c, u) {\n var f = this;\n (this.manager = c),\n (this.callback = u),\n (this.element = c.element),\n (this.target = c.options.inputTarget),\n (this.domHandler = function (y) {\n k(c.options.enable, [c]) && f.handler(y);\n }),\n this.init();\n }\n Me.prototype = {\n handler: function () {},\n init: function () {\n this.evEl && P(this.element, this.evEl, this.domHandler),\n this.evTarget && P(this.target, this.evTarget, this.domHandler),\n this.evWin && P(x(this.element), this.evWin, this.domHandler);\n },\n destroy: function () {\n this.evEl && K(this.element, this.evEl, this.domHandler),\n this.evTarget && K(this.target, this.evTarget, this.domHandler),\n this.evWin && K(x(this.element), this.evWin, this.domHandler);\n }\n };\n function Fa(c) {\n var u,\n f = c.options.inputClass;\n return (\n f ? (u = f) : E ? (u = Mn) : ie ? (u = Et) : R ? (u = Wn) : (u = Bt),\n new u(c, Pa)\n );\n }\n function Pa(c, u, f) {\n var y = f.pointers.length,\n v = f.changedPointers.length,\n H = u & $ && y - v === 0,\n j = u & (q | oe) && y - v === 0;\n (f.isFirst = !!H),\n (f.isFinal = !!j),\n H && (c.session = {}),\n (f.eventType = u),\n Na(c, f),\n c.emit(\"hammer.input\", f),\n c.recognize(f),\n (c.session.prevInput = f);\n }\n function Na(c, u) {\n var f = c.session,\n y = u.pointers,\n v = y.length;\n f.firstInput || (f.firstInput = ho(u)),\n v \u003E 1 && !f.firstMultiple\n ? (f.firstMultiple = ho(u))\n : v === 1 && (f.firstMultiple = !1);\n var H = f.firstInput,\n j = f.firstMultiple,\n pe = j ? j.center : H.center,\n he = (u.center = fo(y));\n (u.timeStamp = d()),\n (u.deltaTime = u.timeStamp - H.timeStamp),\n (u.angle = Tn(pe, he)),\n (u.distance = Nt(pe, he)),\n Ba(f, u),\n (u.offsetDirection = go(u.deltaX, u.deltaY));\n var be = mo(u.deltaTime, u.deltaX, u.deltaY);\n (u.overallVelocityX = be.x),\n (u.overallVelocityY = be.y),\n (u.overallVelocity = p(be.x) \u003E p(be.y) ? be.x : be.y),\n (u.scale = j ? Oa(j.pointers, y) : 1),\n (u.rotation = j ? _a(j.pointers, y) : 0),\n (u.maxPointers = f.prevInput\n ? u.pointers.length \u003E f.prevInput.maxPointers\n ? u.pointers.length\n : f.prevInput.maxPointers\n : u.pointers.length),\n Ea(f, u);\n var Ne = c.element;\n U(u.srcEvent.target, Ne) && (Ne = u.srcEvent.target), (u.target = Ne);\n }\n function Ba(c, u) {\n var f = u.center,\n y = c.offsetDelta || {},\n v = c.prevDelta || {},\n H = c.prevInput || {};\n (u.eventType === $ || H.eventType === q) &&\n ((v = c.prevDelta = { x: H.deltaX || 0, y: H.deltaY || 0 }),\n (y = c.offsetDelta = { x: f.x, y: f.y })),\n (u.deltaX = v.x + (f.x - y.x)),\n (u.deltaY = v.y + (f.y - y.y));\n }\n function Ea(c, u) {\n var f = c.lastInterval || u,\n y = u.timeStamp - f.timeStamp,\n v,\n H,\n j,\n pe;\n if (u.eventType != oe && (y \u003E ce || f.velocity === i)) {\n var he = u.deltaX - f.deltaX,\n be = u.deltaY - f.deltaY,\n Ne = mo(y, he, be);\n (H = Ne.x),\n (j = Ne.y),\n (v = p(Ne.x) \u003E p(Ne.y) ? Ne.x : Ne.y),\n (pe = go(he, be)),\n (c.lastInterval = u);\n } else (v = f.velocity), (H = f.velocityX), (j = f.velocityY), (pe = f.direction);\n (u.velocity = v),\n (u.velocityX = H),\n (u.velocityY = j),\n (u.direction = pe);\n }\n function ho(c) {\n for (var u = [], f = 0; f \u003C c.pointers.length; )\n (u[f] = {\n clientX: r(c.pointers[f].clientX),\n clientY: r(c.pointers[f].clientY)\n }),\n f++;\n return {\n timeStamp: d(),\n pointers: u,\n center: fo(u),\n deltaX: c.deltaX,\n deltaY: c.deltaY\n };\n }\n function fo(c) {\n var u = c.length;\n if (u === 1) return { x: r(c[0].clientX), y: r(c[0].clientY) };\n for (var f = 0, y = 0, v = 0; v \u003C u; )\n (f += c[v].clientX), (y += c[v].clientY), v++;\n return { x: r(f \u002F u), y: r(y \u002F u) };\n }\n function mo(c, u, f) {\n return { x: u \u002F c || 0, y: f \u002F c || 0 };\n }\n function go(c, u) {\n return c === u ? _ : p(c) \u003E= p(u) ? (c \u003C 0 ? ze : st) : u \u003C 0 ? et : rt;\n }\n function Nt(c, u, f) {\n f || (f = uo);\n var y = u[f[0]] - c[f[0]],\n v = u[f[1]] - c[f[1]];\n return Math.sqrt(y * y + v * v);\n }\n function Tn(c, u, f) {\n f || (f = uo);\n var y = u[f[0]] - c[f[0]],\n v = u[f[1]] - c[f[1]];\n return (Math.atan2(v, y) * 180) \u002F Math.PI;\n }\n function _a(c, u) {\n return Tn(u[1], u[0], Pt) + Tn(c[1], c[0], Pt);\n }\n function Oa(c, u) {\n return Nt(u[0], u[1], Pt) \u002F Nt(c[0], c[1], Pt);\n }\n var Ua = { mousedown: $, mousemove: fe, mouseup: q },\n Da = \"mousedown\",\n ja = \"mousemove mouseup\";\n function Bt() {\n (this.evEl = Da),\n (this.evWin = ja),\n (this.pressed = !1),\n Me.apply(this, arguments);\n }\n Z(Bt, Me, {\n handler: function (u) {\n var f = Ua[u.type];\n f & $ && u.button === 0 && (this.pressed = !0),\n f & fe && u.which !== 1 && (f = q),\n this.pressed &&\n (f & q && (this.pressed = !1),\n this.callback(this.manager, f, {\n pointers: [u],\n changedPointers: [u],\n pointerType: ue,\n srcEvent: u\n }));\n }\n });\n var Qa = {\n pointerdown: $,\n pointermove: fe,\n pointerup: q,\n pointercancel: oe,\n pointerout: oe\n },\n $a = { 2: ee, 3: Re, 4: ue, 5: B },\n yo = \"pointerdown\",\n bo = \"pointermove pointerup pointercancel\";\n e.MSPointerEvent &&\n !e.PointerEvent &&\n ((yo = \"MSPointerDown\"),\n (bo = \"MSPointerMove MSPointerUp MSPointerCancel\"));\n function Mn() {\n (this.evEl = yo),\n (this.evWin = bo),\n Me.apply(this, arguments),\n (this.store = this.manager.session.pointerEvents = []);\n }\n Z(Mn, Me, {\n handler: function (u) {\n var f = this.store,\n y = !1,\n v = u.type.toLowerCase().replace(\"ms\", \"\"),\n H = Qa[v],\n j = $a[u.pointerType] || u.pointerType,\n pe = j == ee,\n he = A(f, u.pointerId, \"pointerId\");\n H & $ && (u.button === 0 || pe)\n ? he \u003C 0 && (f.push(u), (he = f.length - 1))\n : H & (q | oe) && (y = !0),\n !(he \u003C 0) &&\n ((f[he] = u),\n this.callback(this.manager, H, {\n pointers: f,\n changedPointers: [u],\n pointerType: j,\n srcEvent: u\n }),\n y && f.splice(he, 1));\n }\n });\n var qa = { touchstart: $, touchmove: fe, touchend: q, touchcancel: oe },\n ec = \"touchstart\",\n tc = \"touchstart touchmove touchend touchcancel\";\n function Io() {\n (this.evTarget = ec),\n (this.evWin = tc),\n (this.started = !1),\n Me.apply(this, arguments);\n }\n Z(Io, Me, {\n handler: function (u) {\n var f = qa[u.type];\n if ((f === $ && (this.started = !0), !!this.started)) {\n var y = nc.call(this, u, f);\n f & (q | oe) &&\n y[0].length - y[1].length === 0 &&\n (this.started = !1),\n this.callback(this.manager, f, {\n pointers: y[0],\n changedPointers: y[1],\n pointerType: ee,\n srcEvent: u\n });\n }\n }\n });\n function nc(c, u) {\n var f = M(c.touches),\n y = M(c.changedTouches);\n return u & (q | oe) && (f = L(f.concat(y), \"identifier\", !0)), [f, y];\n }\n var ic = { touchstart: $, touchmove: fe, touchend: q, touchcancel: oe },\n oc = \"touchstart touchmove touchend touchcancel\";\n function Et() {\n (this.evTarget = oc), (this.targetIds = {}), Me.apply(this, arguments);\n }\n Z(Et, Me, {\n handler: function (u) {\n var f = ic[u.type],\n y = lc.call(this, u, f);\n y &&\n this.callback(this.manager, f, {\n pointers: y[0],\n changedPointers: y[1],\n pointerType: ee,\n srcEvent: u\n });\n }\n });\n function lc(c, u) {\n var f = M(c.touches),\n y = this.targetIds;\n if (u & ($ | fe) && f.length === 1)\n return (y[f[0].identifier] = !0), [f, f];\n var v,\n H,\n j = M(c.changedTouches),\n pe = [],\n he = this.target;\n if (\n ((H = f.filter(function (be) {\n return U(be.target, he);\n })),\n u === $)\n )\n for (v = 0; v \u003C H.length; ) (y[H[v].identifier] = !0), v++;\n for (v = 0; v \u003C j.length; )\n y[j[v].identifier] && pe.push(j[v]),\n u & (q | oe) && delete y[j[v].identifier],\n v++;\n if (pe.length) return [L(H.concat(pe), \"identifier\", !0), pe];\n }\n var sc = 2500,\n Xo = 25;\n function Wn() {\n Me.apply(this, arguments);\n var c = S(this.handler, this);\n (this.touch = new Et(this.manager, c)),\n (this.mouse = new Bt(this.manager, c)),\n (this.primaryTouch = null),\n (this.lastTouches = []);\n }\n Z(Wn, Me, {\n handler: function (u, f, y) {\n var v = y.pointerType == ee,\n H = y.pointerType == ue;\n if (\n !(\n H &&\n y.sourceCapabilities &&\n y.sourceCapabilities.firesTouchEvents\n )\n ) {\n if (v) rc.call(this, f, y);\n else if (H && ac.call(this, y)) return;\n this.callback(u, f, y);\n }\n },\n destroy: function () {\n this.touch.destroy(), this.mouse.destroy();\n }\n });\n function rc(c, u) {\n c & $\n ? ((this.primaryTouch = u.changedPointers[0].identifier),\n Go.call(this, u))\n : c & (q | oe) && Go.call(this, u);\n }\n function Go(c) {\n var u = c.changedPointers[0];\n if (u.identifier === this.primaryTouch) {\n var f = { x: u.clientX, y: u.clientY };\n this.lastTouches.push(f);\n var y = this.lastTouches,\n v = function () {\n var H = y.indexOf(f);\n H \u003E -1 && y.splice(H, 1);\n };\n setTimeout(v, sc);\n }\n }\n function ac(c) {\n for (\n var u = c.srcEvent.clientX, f = c.srcEvent.clientY, y = 0;\n y \u003C this.lastTouches.length;\n y++\n ) {\n var v = this.lastTouches[y],\n H = Math.abs(u - v.x),\n j = Math.abs(f - v.y);\n if (H \u003C= Xo && j \u003C= Xo) return !0;\n }\n return !1;\n }\n var xo = W(s.style, \"touchAction\"),\n vo = xo !== i,\n Zo = \"compute\",\n Lo = \"auto\",\n kn = \"manipulation\",\n ct = \"none\",\n St = \"pan-x\",\n Ct = \"pan-y\",\n _t = dc();\n function zn(c, u) {\n (this.manager = c), this.set(u);\n }\n zn.prototype = {\n set: function (c) {\n c == Zo && (c = this.compute()),\n vo &&\n this.manager.element.style &&\n _t[c] &&\n (this.manager.element.style[xo] = c),\n (this.actions = c.toLowerCase().trim());\n },\n update: function () {\n this.set(this.manager.options.touchAction);\n },\n compute: function () {\n var c = [];\n return (\n I(this.manager.recognizers, function (u) {\n k(u.options.enable, [u]) && (c = c.concat(u.getTouchAction()));\n }),\n cc(c.join(\" \"))\n );\n },\n preventDefaults: function (c) {\n var u = c.srcEvent,\n f = c.offsetDirection;\n if (this.manager.session.prevented) {\n u.preventDefault();\n return;\n }\n var y = this.actions,\n v = N(y, ct) && !_t[ct],\n H = N(y, Ct) && !_t[Ct],\n j = N(y, St) && !_t[St];\n if (v) {\n var pe = c.pointers.length === 1,\n he = c.distance \u003C 2,\n be = c.deltaTime \u003C 250;\n if (pe && he && be) return;\n }\n if (!(j && H) && (v || (H && f & Fe) || (j && f & at)))\n return this.preventSrc(u);\n },\n preventSrc: function (c) {\n (this.manager.session.prevented = !0), c.preventDefault();\n }\n };\n function cc(c) {\n if (N(c, ct)) return ct;\n var u = N(c, St),\n f = N(c, Ct);\n return u && f ? ct : u || f ? (u ? St : Ct) : N(c, kn) ? kn : Lo;\n }\n function dc() {\n if (!vo) return !1;\n var c = {},\n u = e.CSS && e.CSS.supports;\n return (\n [\n \"auto\",\n \"manipulation\",\n \"pan-y\",\n \"pan-x\",\n \"pan-x pan-y\",\n \"none\"\n ].forEach(function (f) {\n c[f] = u ? e.CSS.supports(\"touch-action\", f) : !0;\n }),\n c\n );\n }\n var Ot = 1,\n We = 2,\n yt = 4,\n tt = 8,\n _e = tt,\n Rt = 16,\n Pe = 32;\n function Oe(c) {\n (this.options = G({}, this.defaults, c || {})),\n (this.id = V()),\n (this.manager = null),\n (this.options.enable = J(this.options.enable, !0)),\n (this.state = Ot),\n (this.simultaneous = {}),\n (this.requireFail = []);\n }\n Oe.prototype = {\n defaults: {},\n set: function (c) {\n return (\n G(this.options, c),\n this.manager && this.manager.touchAction.update(),\n this\n );\n },\n recognizeWith: function (c) {\n if (g(c, \"recognizeWith\", this)) return this;\n var u = this.simultaneous;\n return (\n (c = Ut(c, this)),\n u[c.id] || ((u[c.id] = c), c.recognizeWith(this)),\n this\n );\n },\n dropRecognizeWith: function (c) {\n return g(c, \"dropRecognizeWith\", this)\n ? this\n : ((c = Ut(c, this)), delete this.simultaneous[c.id], this);\n },\n requireFailure: function (c) {\n if (g(c, \"requireFailure\", this)) return this;\n var u = this.requireFail;\n return (\n (c = Ut(c, this)),\n A(u, c) === -1 && (u.push(c), c.requireFailure(this)),\n this\n );\n },\n dropRequireFailure: function (c) {\n if (g(c, \"dropRequireFailure\", this)) return this;\n c = Ut(c, this);\n var u = A(this.requireFail, c);\n return u \u003E -1 && this.requireFail.splice(u, 1), this;\n },\n hasRequireFailures: function () {\n return this.requireFail.length \u003E 0;\n },\n canRecognizeWith: function (c) {\n return !!this.simultaneous[c.id];\n },\n emit: function (c) {\n var u = this,\n f = this.state;\n function y(v) {\n u.manager.emit(v, c);\n }\n f \u003C tt && y(u.options.event + So(f)),\n y(u.options.event),\n c.additionalEvent && y(c.additionalEvent),\n f \u003E= tt && y(u.options.event + So(f));\n },\n tryEmit: function (c) {\n if (this.canEmit()) return this.emit(c);\n this.state = Pe;\n },\n canEmit: function () {\n for (var c = 0; c \u003C this.requireFail.length; ) {\n if (!(this.requireFail[c].state & (Pe | Ot))) return !1;\n c++;\n }\n return !0;\n },\n recognize: function (c) {\n var u = G({}, c);\n if (!k(this.options.enable, [this, u])) {\n this.reset(), (this.state = Pe);\n return;\n }\n this.state & (_e | Rt | Pe) && (this.state = Ot),\n (this.state = this.process(u)),\n this.state & (We | yt | tt | Rt) && this.tryEmit(u);\n },\n process: function (c) {},\n getTouchAction: function () {},\n reset: function () {}\n };\n function So(c) {\n return c & Rt\n ? \"cancel\"\n : c & tt\n ? \"end\"\n : c & yt\n ? \"move\"\n : c & We\n ? \"start\"\n : \"\";\n }\n function Co(c) {\n return c == rt\n ? \"down\"\n : c == et\n ? \"up\"\n : c == ze\n ? \"left\"\n : c == st\n ? \"right\"\n : \"\";\n }\n function Ut(c, u) {\n var f = u.manager;\n return f ? f.get(c) : c;\n }\n function Ve() {\n Oe.apply(this, arguments);\n }\n Z(Ve, Oe, {\n defaults: { pointers: 1 },\n attrTest: function (c) {\n var u = this.options.pointers;\n return u === 0 || c.pointers.length === u;\n },\n process: function (c) {\n var u = this.state,\n f = c.eventType,\n y = u & (We | yt),\n v = this.attrTest(c);\n return y && (f & oe || !v)\n ? u | Rt\n : y || v\n ? f & q\n ? u | tt\n : u & We\n ? u | yt\n : We\n : Pe;\n }\n });\n function Dt() {\n Ve.apply(this, arguments), (this.pX = null), (this.pY = null);\n }\n Z(Dt, Ve, {\n defaults: { event: \"pan\", threshold: 10, pointers: 1, direction: po },\n getTouchAction: function () {\n var c = this.options.direction,\n u = [];\n return c & Fe && u.push(Ct), c & at && u.push(St), u;\n },\n directionTest: function (c) {\n var u = this.options,\n f = !0,\n y = c.distance,\n v = c.direction,\n H = c.deltaX,\n j = c.deltaY;\n return (\n v & u.direction ||\n (u.direction & Fe\n ? ((v = H === 0 ? _ : H \u003C 0 ? ze : st),\n (f = H != this.pX),\n (y = Math.abs(c.deltaX)))\n : ((v = j === 0 ? _ : j \u003C 0 ? et : rt),\n (f = j != this.pY),\n (y = Math.abs(c.deltaY)))),\n (c.direction = v),\n f && y \u003E u.threshold && v & u.direction\n );\n },\n attrTest: function (c) {\n return (\n Ve.prototype.attrTest.call(this, c) &&\n (this.state & We || (!(this.state & We) && this.directionTest(c)))\n );\n },\n emit: function (c) {\n (this.pX = c.deltaX), (this.pY = c.deltaY);\n var u = Co(c.direction);\n u && (c.additionalEvent = this.options.event + u),\n this._super.emit.call(this, c);\n }\n });\n function Vn() {\n Ve.apply(this, arguments);\n }\n Z(Vn, Ve, {\n defaults: { event: \"pinch\", threshold: 0, pointers: 2 },\n getTouchAction: function () {\n return [ct];\n },\n attrTest: function (c) {\n return (\n this._super.attrTest.call(this, c) &&\n (Math.abs(c.scale - 1) \u003E this.options.threshold || this.state & We)\n );\n },\n emit: function (c) {\n if (c.scale !== 1) {\n var u = c.scale \u003C 1 ? \"in\" : \"out\";\n c.additionalEvent = this.options.event + u;\n }\n this._super.emit.call(this, c);\n }\n });\n function Hn() {\n Oe.apply(this, arguments), (this._timer = null), (this._input = null);\n }\n Z(Hn, Oe, {\n defaults: { event: \"press\", pointers: 1, time: 251, threshold: 9 },\n getTouchAction: function () {\n return [Lo];\n },\n process: function (c) {\n var u = this.options,\n f = c.pointers.length === u.pointers,\n y = c.distance \u003C u.threshold,\n v = c.deltaTime \u003E u.time;\n if (((this._input = c), !y || !f || (c.eventType & (q | oe) && !v)))\n this.reset();\n else if (c.eventType & $)\n this.reset(),\n (this._timer = m(\n function () {\n (this.state = _e), this.tryEmit();\n },\n u.time,\n this\n ));\n else if (c.eventType & q) return _e;\n return Pe;\n },\n reset: function () {\n clearTimeout(this._timer);\n },\n emit: function (c) {\n this.state === _e &&\n (c && c.eventType & q\n ? this.manager.emit(this.options.event + \"up\", c)\n : ((this._input.timeStamp = d()),\n this.manager.emit(this.options.event, this._input)));\n }\n });\n function An() {\n Ve.apply(this, arguments);\n }\n Z(An, Ve, {\n defaults: { event: \"rotate\", threshold: 0, pointers: 2 },\n getTouchAction: function () {\n return [ct];\n },\n attrTest: function (c) {\n return (\n this._super.attrTest.call(this, c) &&\n (Math.abs(c.rotation) \u003E this.options.threshold || this.state & We)\n );\n }\n });\n function Kn() {\n Ve.apply(this, arguments);\n }\n Z(Kn, Ve, {\n defaults: {\n event: \"swipe\",\n threshold: 10,\n velocity: 0.3,\n direction: Fe | at,\n pointers: 1\n },\n getTouchAction: function () {\n return Dt.prototype.getTouchAction.call(this);\n },\n attrTest: function (c) {\n var u = this.options.direction,\n f;\n return (\n u & (Fe | at)\n ? (f = c.overallVelocity)\n : u & Fe\n ? (f = c.overallVelocityX)\n : u & at && (f = c.overallVelocityY),\n this._super.attrTest.call(this, c) &&\n u & c.offsetDirection &&\n c.distance \u003E this.options.threshold &&\n c.maxPointers == this.options.pointers &&\n p(f) \u003E this.options.velocity &&\n c.eventType & q\n );\n },\n emit: function (c) {\n var u = Co(c.offsetDirection);\n u && this.manager.emit(this.options.event + u, c),\n this.manager.emit(this.options.event, c);\n }\n });\n function jt() {\n Oe.apply(this, arguments),\n (this.pTime = !1),\n (this.pCenter = !1),\n (this._timer = null),\n (this._input = null),\n (this.count = 0);\n }\n Z(jt, Oe, {\n defaults: {\n event: \"tap\",\n pointers: 1,\n taps: 1,\n interval: 300,\n time: 250,\n threshold: 9,\n posThreshold: 10\n },\n getTouchAction: function () {\n return [kn];\n },\n process: function (c) {\n var u = this.options,\n f = c.pointers.length === u.pointers,\n y = c.distance \u003C u.threshold,\n v = c.deltaTime \u003C u.time;\n if ((this.reset(), c.eventType & $ && this.count === 0))\n return this.failTimeout();\n if (y && v && f) {\n if (c.eventType != q) return this.failTimeout();\n var H = this.pTime ? c.timeStamp - this.pTime \u003C u.interval : !0,\n j = !this.pCenter || Nt(this.pCenter, c.center) \u003C u.posThreshold;\n (this.pTime = c.timeStamp),\n (this.pCenter = c.center),\n !j || !H ? (this.count = 1) : (this.count += 1),\n (this._input = c);\n var pe = this.count % u.taps;\n if (pe === 0)\n return this.hasRequireFailures()\n ? ((this._timer = m(\n function () {\n (this.state = _e), this.tryEmit();\n },\n u.interval,\n this\n )),\n We)\n : _e;\n }\n return Pe;\n },\n failTimeout: function () {\n return (\n (this._timer = m(\n function () {\n this.state = Pe;\n },\n this.options.interval,\n this\n )),\n Pe\n );\n },\n reset: function () {\n clearTimeout(this._timer);\n },\n emit: function () {\n this.state == _e &&\n ((this._input.tapCount = this.count),\n this.manager.emit(this.options.event, this._input));\n }\n });\n function Ue(c, u) {\n return (\n (u = u || {}),\n (u.recognizers = J(u.recognizers, Ue.defaults.preset)),\n new Jn(c, u)\n );\n }\n (Ue.VERSION = \"2.0.7\"),\n (Ue.defaults = {\n domEvents: !1,\n touchAction: Zo,\n enable: !0,\n inputTarget: null,\n inputClass: null,\n preset: [\n [An, { enable: !1 }],\n [Vn, { enable: !1 }, [\"rotate\"]],\n [Kn, { direction: Fe }],\n [Dt, { direction: Fe }, [\"swipe\"]],\n [jt],\n [jt, { event: \"doubletap\", taps: 2 }, [\"tap\"]],\n [Hn]\n ],\n cssProps: {\n userSelect: \"none\",\n touchSelect: \"none\",\n touchCallout: \"none\",\n contentZooming: \"none\",\n userDrag: \"none\",\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n });\n var pc = 1,\n Ro = 2;\n function Jn(c, u) {\n (this.options = G({}, Ue.defaults, u || {})),\n (this.options.inputTarget = this.options.inputTarget || c),\n (this.handlers = {}),\n (this.session = {}),\n (this.recognizers = []),\n (this.oldCssProps = {}),\n (this.element = c),\n (this.input = Fa(this)),\n (this.touchAction = new zn(this, this.options.touchAction)),\n wo(this, !0),\n I(\n this.options.recognizers,\n function (f) {\n var y = this.add(new f[0](f[1]));\n f[2] && y.recognizeWith(f[2]), f[3] && y.requireFailure(f[3]);\n },\n this\n );\n }\n Jn.prototype = {\n set: function (c) {\n return (\n G(this.options, c),\n c.touchAction && this.touchAction.update(),\n c.inputTarget &&\n (this.input.destroy(),\n (this.input.target = c.inputTarget),\n this.input.init()),\n this\n );\n },\n stop: function (c) {\n this.session.stopped = c ? Ro : pc;\n },\n recognize: function (c) {\n var u = this.session;\n if (!u.stopped) {\n this.touchAction.preventDefaults(c);\n var f,\n y = this.recognizers,\n v = u.curRecognizer;\n (!v || (v && v.state & _e)) && (v = u.curRecognizer = null);\n for (var H = 0; H \u003C y.length; )\n (f = y[H]),\n u.stopped !== Ro && (!v || f == v || f.canRecognizeWith(v))\n ? f.recognize(c)\n : f.reset(),\n !v && f.state & (We | yt | tt) && (v = u.curRecognizer = f),\n H++;\n }\n },\n get: function (c) {\n if (c instanceof Oe) return c;\n for (var u = this.recognizers, f = 0; f \u003C u.length; f++)\n if (u[f].options.event == c) return u[f];\n return null;\n },\n add: function (c) {\n if (g(c, \"add\", this)) return this;\n var u = this.get(c.options.event);\n return (\n u && this.remove(u),\n this.recognizers.push(c),\n (c.manager = this),\n this.touchAction.update(),\n c\n );\n },\n remove: function (c) {\n if (g(c, \"remove\", this)) return this;\n if (((c = this.get(c)), c)) {\n var u = this.recognizers,\n f = A(u, c);\n f !== -1 && (u.splice(f, 1), this.touchAction.update());\n }\n return this;\n },\n on: function (c, u) {\n if (c !== i && u !== i) {\n var f = this.handlers;\n return (\n I(C(c), function (y) {\n (f[y] = f[y] || []), f[y].push(u);\n }),\n this\n );\n }\n },\n off: function (c, u) {\n if (c !== i) {\n var f = this.handlers;\n return (\n I(C(c), function (y) {\n u ? f[y] && f[y].splice(A(f[y], u), 1) : delete f[y];\n }),\n this\n );\n }\n },\n emit: function (c, u) {\n this.options.domEvents && uc(c, u);\n var f = this.handlers[c] && this.handlers[c].slice();\n if (!(!f || !f.length)) {\n (u.type = c),\n (u.preventDefault = function () {\n u.srcEvent.preventDefault();\n });\n for (var y = 0; y \u003C f.length; ) f[y](u), y++;\n }\n },\n destroy: function () {\n this.element && wo(this, !1),\n (this.handlers = {}),\n (this.session = {}),\n this.input.destroy(),\n (this.element = null);\n }\n };\n function wo(c, u) {\n var f = c.element;\n if (f.style) {\n var y;\n I(c.options.cssProps, function (v, H) {\n (y = W(f.style, H)),\n u\n ? ((c.oldCssProps[y] = f.style[y]), (f.style[y] = v))\n : (f.style[y] = c.oldCssProps[y] || \"\");\n }),\n u || (c.oldCssProps = {});\n }\n }\n function uc(c, u) {\n var f = t.createEvent(\"Event\");\n f.initEvent(c, !0, !0), (f.gesture = u), u.target.dispatchEvent(f);\n }\n G(Ue, {\n INPUT_START: $,\n INPUT_MOVE: fe,\n INPUT_END: q,\n INPUT_CANCEL: oe,\n STATE_POSSIBLE: Ot,\n STATE_BEGAN: We,\n STATE_CHANGED: yt,\n STATE_ENDED: tt,\n STATE_RECOGNIZED: _e,\n STATE_CANCELLED: Rt,\n STATE_FAILED: Pe,\n DIRECTION_NONE: _,\n DIRECTION_LEFT: ze,\n DIRECTION_RIGHT: st,\n DIRECTION_UP: et,\n DIRECTION_DOWN: rt,\n DIRECTION_HORIZONTAL: Fe,\n DIRECTION_VERTICAL: at,\n DIRECTION_ALL: po,\n Manager: Jn,\n Input: Me,\n TouchAction: zn,\n TouchInput: Et,\n MouseInput: Bt,\n PointerEventInput: Mn,\n TouchMouseInput: Wn,\n SingleTouchInput: Io,\n Recognizer: Oe,\n AttrRecognizer: Ve,\n Tap: jt,\n Pan: Dt,\n Swipe: Kn,\n Pinch: Vn,\n Rotate: An,\n Press: Hn,\n on: P,\n off: K,\n each: I,\n merge: h,\n extend: b,\n assign: G,\n inherit: Z,\n bindFn: S,\n prefixed: W\n });\n var hc =\n typeof e != \"undefined\" ? e : typeof self != \"undefined\" ? self : {};\n (hc.Hammer = Ue),\n typeof i == \"function\" && i.amd\n ? i(function () {\n return Ue;\n })\n : n.exports\n ? (n.exports = Ue)\n : (e[o] = Ue);\n })(window, document, \"Hammer\");\n })(ro);\n var ao = ro.exports;\n const co = Ie({ __proto__: null, default: Mt(ao) }, [ao]);\n (ae.Const = se),\n (ae.DataHub = Ke),\n (ae.DataScan = kt),\n (ae.Events = de),\n (ae.MetaHub = Je),\n (ae.NightVision = Ka),\n (ae.Scripts = Kt),\n (ae.Utils = w),\n Object.defineProperty(ae, Symbol.toStringTag, { value: \"Module\" });\n});\n","id":"6a8245c4-89ca-434d-ad15-3be6a64867f4","is_binary":false,"title":"night-vision.min.js","sha":null,"inserted_at":"2023-11-05T14:18:58","updated_at":"2023-11-05T14:19:24","upload_id":null,"shortid":"mnGg9","source_id":"ede99e29-716d-4673-b440-28be721583a3","directory_shortid":null},{"code":"\u003C!DOCTYPE html\u003E\n\u003Chtml lang=\"en\"\u003E\n \u003Chead\u003E\n \u003Cmeta charset=\"UTF-8\" \u002F\u003E\n \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \u002F\u003E\n \u003Cmeta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" \u002F\u003E\n \u003Ctitle\u003EStatic Template\u003C\u002Ftitle\u003E\n \u003C\u002Fhead\u003E\n \u003Cbody\u003E\n \u003Cdiv id=\"nv_chart\"\u003E\u003C\u002Fdiv\u003E\n \u003Cscript src=\".\u002Fnight-vision.min.js\"\u003E\u003C\u002Fscript\u003E\n \u003Cscript src=\".\u002Fmain.js\"\u003E\u003C\u002Fscript\u003E\n \u003Cscript\u003E\n console.log(\"Run ..\");\n \u003C\u002Fscript\u003E\n \u003C\u002Fbody\u003E\n\u003C\u002Fhtml\u003E\n","id":"2f8d5bed-e635-4e54-8d29-832c3ccfdf1f","is_binary":false,"title":"index.html","sha":null,"inserted_at":"2023-11-05T14:18:57","updated_at":"2023-11-05T14:22:50","upload_id":null,"shortid":"SynEipfsL","source_id":"ede99e29-716d-4673-b440-28be721583a3","directory_shortid":null},{"code":"{\n \"template\": \"static\"\n}\n","id":"e9c864d1-54af-4537-92f0-65838b962838","is_binary":false,"title":"sandbox.config.json","sha":null,"inserted_at":"2023-11-05T14:18:57","updated_at":"2020-05-20T15:22:27","upload_id":null,"shortid":"BJZ3VsaMi8","source_id":"ede99e29-716d-4673-b440-28be721583a3","directory_shortid":null},{"code":"{\n \"name\": \"debug-night-vision\",\n \"version\": \"1.0.0\",\n \"description\": \"\",\n \"main\": \"index.html\",\n \"scripts\": {\n \"start\": \"serve\",\n \"build\": \"echo This is a static template, there is no bundler or bundling involved!\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https:\u002F\u002Fgithub.com\u002Fcodesandbox-app\u002Fstatic-template.git\"\n },\n \"keywords\": [],\n \"author\": \"Ives van Hoorne\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https:\u002F\u002Fgithub.com\u002Fcodesandbox-app\u002Fstatic-template\u002Fissues\"\n },\n \"homepage\": \"https:\u002F\u002Fgithub.com\u002Fcodesandbox-app\u002Fstatic-template#readme\",\n \"devDependencies\": {\n \"serve\": \"^11.2.0\"\n }\n}","id":"093071d1-5058-4cff-b4c9-eeaa8e1ff6c6","is_binary":false,"title":"package.json","sha":null,"inserted_at":"2023-11-05T14:18:57","updated_at":"2023-11-05T14:24:45","upload_id":null,"shortid":"rJe2NopMjU","source_id":"ede99e29-716d-4673-b440-28be721583a3","directory_shortid":null},{"code":"function randomNumber(min, max) {\n return Math.random() * (max - min) + min;\n}\n\nfunction randomBar(date, lastClose) {\n var open = +randomNumber(lastClose * 0.95, lastClose * 1.05).toFixed(2);\n var close = +randomNumber(open * 0.95, open * 1.07).toFixed(2);\n var high = +randomNumber(\n Math.max(open, close),\n Math.max(open, close) * 1.1,\n ).toFixed(2);\n var low = +randomNumber(\n Math.min(open, close) * 0.9,\n Math.min(open, close),\n ).toFixed(2);\n\n return {\n x: date,\n o: open,\n h: high,\n l: low,\n c: close,\n };\n}\n\nfunction randomVol() {\n return randomNumber(1, 10) * 1000;\n}\n\nfunction getNVCandlestickData(count) {\n var data = [];\n const start = 1000;\n\n \u002F\u002F init value\n const date = new Date();\n date.setDate(date.getDate());\n date.setHours(0, 0, 0, 0);\n var candle = randomBar(date, start);\n var vol = randomVol();\n var example = [date.getTime(), candle.o, candle.h, candle.l, candle.c, vol];\n data.push(example);\n\n for (let i = 0; i \u003C count - 1; i++) {\n const date = new Date();\n date.setDate(date.getDate() + i + 1);\n date.setHours(0, 0, 0, 0);\n \u002F\u002F exclude saturday and sunday timestamp\n if (date.getDay() \u003C 6 && date.getDay() \u003E 0) {\n candle = randomBar(date, candle.c);\n vol = randomVol();\n example = [date.getTime(), candle.o, candle.h, candle.l, candle.c, vol];\n data.push(example);\n }\n }\n return data;\n}\n\nconst candleData = getNVCandlestickData(300);\n\nconst data = {\n indexBased: true,\n panes: [\n {\n overlays: [\n {\n name: \"Tether US\",\n type: \"Candles\",\n main: true,\n data: candleData,\n settings: {\n precision: 2,\n },\n props: {\n showAvgVolume: false,\n },\n },\n ],\n },\n ],\n};\nlet chart = new NightVision.NightVision(\"nv_chart\", {\n data,\n autoResize: true,\n colors: {\n back: \"#fff\", \u002F\u002F chart background color\n grid: \"#2e2f3055\",\n candleDw: \"rgba(212, 4, 101,1)\",\n candleUp: \"rgba(52, 196, 114, 1)\",\n volDw: \"rgba(212, 4, 101,1)\",\n volUp: \"rgba(52, 196, 114, 1)\",\n wickDw: \"rgba(212, 4, 101,1)\",\n wickUp: \"rgba(52, 196, 114, 1)\",\n },\n layout: {},\n});\n","id":"4f45c1d3-a3eb-42ec-9701-c96d77c444c6","is_binary":false,"title":"main.js","sha":null,"inserted_at":"2023-11-05T14:20:56","updated_at":"2023-12-01T12:07:29","upload_id":null,"shortid":"RJAwz","source_id":"ede99e29-716d-4673-b440-28be721583a3","directory_shortid":null}],"is_frozen":false,"settings":{"ai_consent":null},"template":"static","draft":true,"external_resources":[]};