"use strict";
(self.webpackChunktradingview = self.webpackChunktradingview || []).push([
    [17990], {
        6826: (t, e, r) => {
            t = r.nmd(t);
            var i = r(201089).getLogger("Common.WatchedValue");

            function n() {}

            function o(t) {
                if (!(this instanceof o)) return new o(t);
                arguments.length > 0 && (this._value = t), this._listeners = []
            }
            o.prototype.value = function() {
                return this._owner ? this._owner._value : this._value
            }, o.prototype.setValue = function(t, e) {
                var r = this._owner ? this._owner : this;
                if ("function" == typeof r.hook && (t = r.hook(t)), r.writeLock) return r._value;
                var n = r._value === t || Number.isNaN(r._value) && Number.isNaN(t);
                if (!e && n && r.hasOwnProperty("_value")) return t;
                r._value = t;
                for (var o = r._listeners.slice(), s = 0, a = 0; a < o.length; a++) {
                    o[a].once && (r._listeners.splice(a - s, 1), s++);
                    try {
                        o[a].cb(t)
                    } catch (t) {
                        i.logError(t.stack || t.message)
                    }
                }
                return t
            }, o.prototype.deleteValue = function() {
                var t = this._owner ? this._owner : this;
                if (t.hasOwnProperty("_value")) {
                    if (t.writeLock) return t._value;
                    delete t._value;
                    for (var e = t._listeners.slice(), r = 0, n = 0; n < e.length; n++) {
                        e[n].once && (t._listeners.splice(n - r, 1), r++);
                        try {
                            e[n].cb()
                        } catch (t) {
                            i.logError(t.stack || t.message)
                        }
                    }
                }
            }, o.prototype.subscribe = function(t, e) {
                if ("function" != typeof t) throw new TypeError("callback must be a function");
                var r = !!e && !!e.once,
                    n = !!e && !!e.callWithLast,
                    o = this._owner ? this._owner : this;
                if (n && o.hasOwnProperty("_value")) {
                    try {
                        t(o._value)
                    } catch (t) {
                        i.logError(t.stack || t.message)
                    }
                    if (r) return
                }
                o._listeners.push({
                    cb: t,
                    owner: this,
                    once: !!e && !!e.once
                })
            }, o.prototype.unsubscribe = function(t) {
                var e = this._owner ? this._owner : this;
                void 0 === t && (t = null);
                for (var r = e._listeners, i = r.length; i--;) r[i].owner !== this && e !== this || r[i].cb !== t && null !== t || r.splice(i, 1)
            }, o.prototype.listeners = function() {
                return (this._owner ? this._owner : this)._listeners
            }, o.prototype.readonly = function() {
                if (this._readonlyInstance) return this._readonlyInstance;
                var t = this._readonlyInstance = new n;
                return t.subscribe = this.subscribe.bind(this), t.unsubscribe = this.unsubscribe.bind(this), t.value = this.value.bind(this), t.when = this.when.bind(this), t.spawn = function() {
                    return this.spawn.apply(this, arguments).readonly()
                }.bind(this), this.destroy && (t.destroy = this.destroy.bind(this)), t
            }, o.prototype.spawn = function(t) {
                var e = new o;
                return delete e._listeners, e._owner = this._owner || this, e.destroy = function() {
                    if ("function" == typeof t) try {
                        t()
                    } catch (t) {
                        i.logError(t.stack || t.message)
                    }
                    this.unsubscribe(), delete this._owner
                }, e
            }, o.prototype.when = function(t) {
                var e = this;
                if (this.value()) try {
                    t()
                } catch (t) {
                    i.logError(t.stack || t.message)
                } else {
                    var r = function(i) {
                        i && (e.unsubscribe(r), t())
                    };
                    e.subscribe(r)
                }
            }, o.prototype.opposite = function() {
                if (!this._opposite) {
                    var t = this,
                        e = new o(!this.value());
                    this.subscribe((function(t) {
                        e.setValue(!t)
                    })), e.subscribe((function(e) {
                        t.setValue(!e)
                    })), this._opposite = e
                }
                return this._opposite
            }, "undefined" != typeof window && (window.WatchedValue = o), t && t.exports && (t.exports = o)
        },
        624444: (t, e, r) => {
            r.d(e, {
                PriceFormatter: () => v,
                formatterOptions: () => u
            });
            var i = r(777754),
                n = r(960521),
                o = r(217504),
                s = r(389137),
                a = r(31341),
                c = r(667353);
            const l = (0, r(201089).getLogger)("Chart.PriceFormatter"),
                h = new RegExp(/^(-?)[0-9]+$/),
                u = {
                    decimalSign: ".",
                    decimalSignFractional: "'"
                },
                f = new Map;
            const _ = new Map;

            function p(t, e, r, i) {
                let n = 0;
                if (t > 0 && e > 0) {
                    let e = t;
                    for (r && i && (e /= i); e > 1;) e /= 10, n++
                }
                return n
            }

            function m(t, e) {
                if (!(0, s.isNumber)(t)) return "n/a";
                if (!(0, s.isInteger)(e)) throw new TypeError("invalid length");
                if (e < 0 || e > 24) throw new TypeError("invalid length");
                if (0 === e) return t.toString();
                return ("0000000000000000" + t.toString()).slice(-e)
            }
            class v {
                constructor(t, e, n, a, c, h) {
                    if (this.type = "price", this._formatterErrors = {
                            custom: i.t(null, void 0, r(332061)),
                            fraction: i.t(null, void 0, r(142015)),
                            secondFraction: i.t(null, void 0, r(643247))
                        }, e && !h || (e = 1), (0, s.isNumber)(t) && (0, s.isInteger)(t) || (t = 100), t < 0) throw new TypeError("invalid base");
                    this._priceScale = t, this._minMove = e, this._minMove2 = a, this._variableMinTick = c, this._variableMinTickData = n || void 0 === c ? void 0 : (0, o.makeVariableMinTickData)(NaN, c), n && void 0 !== a && a > 0 && 2 !== a && 4 !== a && 8 !== a ? l.logDebug("invalid minmove2") : (this._fractional = n, this._fractionalLength = p(this._priceScale, this._minMove, this._fractional, this._minMove2), this._ignoreMinMove = h)
                }
                isFractional() {
                    return !!this._fractional
                }
                state() {
                    return {
                        fractional: this._fractional,
                        fractionalLength: this._fractionalLength,
                        minMove: this._minMove,
                        minMove2: this._minMove2,
                        priceScale: this._priceScale,
                        variableMinTick: this._variableMinTick,
                        ignoreMinMove: this._ignoreMinMove
                    }
                }
                formatChange(t, e, r) {
                    return this._formatImpl(t - e, r, void 0, void 0, void 0, void 0, Math.min(Math.abs(t), Math.abs(e)))
                }
                format(t, e, r, i = !0, n = !0, o = !1) {
                    return this._formatImpl(t, e, r, i, n, o)
                }
                parse(t) {
                    return "+" === (t = (t = (0, a.stripLTRMarks)(t)).replace("−", "-"))[0] && (t = t.substring(1)), this._fractional ? this._minMove2 ? this._parseAsDoubleFractional(t) : this._parseAsSingleFractional(t) : this._parseAsDecimal(t)
                }
                hasForexAdditionalPrecision() {
                    return !this._fractional && 10 === this._minMove2
                }
                static serialize(t) {
                    return t.state()
                }
                static deserialize(t) {
                    return new v(t.priceScale, t.minMove, t.fractional, t.minMove2, t.variableMinTick, t.ignoreMinMove)
                }
                _formatImpl(t, e, r, i = !0, s = !0, l = !1, h) {
                    const u = {
                        price: t,
                        priceScale: this._priceScale,
                        minMove: this._minMove,
                        fractionalLength: this._fractionalLength,
                        tailSize: r,
                        cutFractionalByPrecision: l
                    };
                    let f, _ = "";
                    return t < 0 ? (_ = !1 === i ? "" : "−", u.price = -t) : t && !0 === e && (_ = "+"), void 0 !== this._variableMinTickData && (Object.assign(u, function(t, e) {
                        const r = (0, o.getMinTick)({
                                price: e,
                                minTick: NaN,
                                variableMinTickData: t,
                                shouldCheckForEquality: !0
                            }),
                            i = Math.pow(10, (0, c.numOfDecimalPlaces)(r)),
                            s = (0, n.Big)(r).mul(i).toNumber();
                        return {
                            priceScale: i,
                            minMove: s,
                            fractionalLength: p(i, s)
                        }
                    }(this._variableMinTickData, null != h ? h : u.price)), this._ignoreMinMove && (u.minMove = 1)), f = this._fractional ? _ + this._formatAsFractional(u.price, u.tailSize) : _ + this._formatAsDecimal(u), s ? (0, a.forceLTRStr)(f) : f
                }
                _formatAsExponential(t) {
                    const e = Math.floor(.75 * Math.log10(this._priceScale)),
                        r = t * Math.pow(10, e),
                        i = `e-${e}`,
                        n = Math.log10(this._priceScale) - e;
                    return `${r.toFixed(n).replace(".",u.decimalSign)}${i}`
                }
                _formatAsDecimal(t) {
                    const {
                        price: e,
                        priceScale: r,
                        minMove: i,
                        fractionalLength: o = 0,
                        tailSize: s = 0,
                        cutFractionalByPrecision: a
                    } = t;
                    if (r > 1e15) return this._formatAsExponential(e);
                    let c;
                    c = this._fractional ? Math.pow(10, o) : Math.pow(10, s) * r / (a ? 1 : i);
                    const l = 1 / c;
                    let h;
                    if (c > 1) h = Math.floor(e);
                    else {
                        const t = Math.floor(Math.round(e / l) * l);
                        h = 0 === Math.round((e - t) / l) ? t : t + l
                    }
                    let f = "";
                    if (c > 1) {
                        let t = a ? new n.Big(e).mul(c).round(void 0, 0).minus(new n.Big(h).mul(c)).toNumber() : parseFloat((Math.round(e * c) - h * c).toFixed(o));
                        t >= c && (t -= c, h += 1);
                        const r = a ? new n.Big(t).round(o, 0).toNumber() : parseFloat(t.toFixed(o)) * i;
                        f = u.decimalSign + m(r, o + s), f = this._removeEndingZeros(f, s)
                    }
                    return h.toString() + f
                }
                _getFractPart(t, e, r) {
                    const i = [0, 5],
                        n = [0, 2, 5, 7],
                        o = [0, 1, 2, 3, 5, 6, 7, 8];
                    return 2 === r ? void 0 === i[t] ? -1 : i[t] : 4 === r ? void 0 === n[t] ? -1 : n[t] : 8 === r && 2 === e ? void 0 === o[t] ? -1 : o[t] : t
                }
                _formatAsFractional(t, e) {
                    const r = this._priceScale / this._minMove;
                    let i = Math.floor(t),
                        n = e ? Math.floor(t * r) - i * r : Math.round(t * r) - i * r;
                    n === r && (n = 0, i += 1);
                    let o = "";
                    if (e) {
                        let s = (t - i - n / r) * r;
                        s = Math.round(s * Math.pow(10, e)), o = m(s, e), o = this._removeEndingZeros(o, e)
                    }
                    if (!this._fractionalLength) throw new Error("_fractionalLength is not calculated");
                    let s = "";
                    if (this._minMove2) {
                        const t = n % this._minMove2;
                        n = (n - t) / this._minMove2;
                        const e = m(n, this._fractionalLength),
                            r = this._getFractPart(t, 2, this._minMove2);
                        s = e + u.decimalSignFractional + r
                    } else n = this._getFractPart(n, 1, this._priceScale), s = m(n * this._minMove, this._fractionalLength);
                    return i.toString() + u.decimalSignFractional + s + o
                }
                _removeEndingZeros(t, e) {
                    for (let r = 0; r < e && "0" === t[t.length - 1]; r++) t = t.substring(0, t.length - 1);
                    return t
                }
                _parseAsDecimal(t) {
                    if (t.includes("e")) {
                        if (function(t) {
                                let e = f.get(t);
                                return e || (e = new RegExp("^(-?)[0-9]+\\" + t + "[0-9]*e(-?)[0-9]+$"), f.set(t, e)), e
                            }(u.decimalSign).exec(t)) {
                            const e = parseFloat(t.replace(u.decimalSign, "."));
                            return {
                                value: e,
                                res: !0,
                                suggest: this.format(e)
                            }
                        }
                        return {
                            error: this._formatterErrors.custom,
                            res: !1
                        }
                    }
                    let e = h.exec(t);
                    if (e) {
                        const e = parseFloat(t);
                        return {
                            value: e,
                            res: !0,
                            suggest: this.format(e)
                        }
                    }
                    if (e = function(t) {
                            let e = _.get(t);
                            return e || (e = new RegExp("^(-?)[0-9]+\\" + u.decimalSign + "[0-9]*$"), _.set(t, e)), e
                        }(u.decimalSign).exec(t), e) {
                        const e = parseFloat(t.replace(u.decimalSign, "."));
                        return {
                            value: e,
                            res: !0,
                            suggest: this.format(e)
                        }
                    }
                    return {
                        error: this._formatterErrors.custom,
                        res: !1
                    }
                }
                _patchFractPart(t, e, r) {
                    const i = {
                            0: 0,
                            5: 1
                        },
                        n = {
                            0: 0,
                            2: 1,
                            5: 2,
                            7: 3
                        },
                        o = {
                            0: 0,
                            1: 1,
                            2: 2,
                            3: 3,
                            5: 4,
                            6: 5,
                            7: 6,
                            8: 7
                        };
                    return 2 === r ? void 0 === i[t] ? -1 : i[t] : 4 === r ? void 0 === n[t] ? -1 : n[t] : 8 === r && 2 === e ? void 0 === o[t] ? -1 : o[t] : t
                }
                _parseAsSingleFractional(t) {
                    let e = h.exec(t);
                    if (e) {
                        const e = parseFloat(t);
                        return {
                            value: e,
                            res: !0,
                            suggest: this.format(e)
                        }
                    }
                    if (e = new RegExp("^(-?)([0-9]+)\\" + u.decimalSignFractional + "([0-9]+)$").exec(t), e) {
                        const t = !!e[1],
                            r = parseInt(e[2]),
                            i = this._priceScale,
                            n = this._patchFractPart(parseInt(e[3]), 1, i);
                        if (n >= i || n < 0) return {
                            error: this._formatterErrors.fraction,
                            res: !1
                        };
                        let o = r + n / i;
                        return t && (o = -o), {
                            value: o,
                            res: !0,
                            suggest: this.format(o)
                        }
                    }
                    return {
                        error: this._formatterErrors.custom,
                        res: !1
                    }
                }
                _parseAsDoubleFractional(t) {
                    let e = h.exec(t);
                    if (e) {
                        const e = parseFloat(t);
                        return {
                            value: e,
                            res: !0,
                            suggest: this.format(e)
                        }
                    }
                    if (e = new RegExp("^(-?)([0-9]+)\\" + u.decimalSignFractional + "([0-9]+)\\" + u.decimalSignFractional + "([0-9]+)$").exec(t), e) {
                        const t = !!e[1],
                            r = parseInt(e[2]),
                            i = void 0 !== this._minMove2 ? this._minMove2 : NaN,
                            n = this._priceScale / i,
                            o = this._minMove2,
                            s = this._patchFractPart(parseInt(e[3]), 1, n),
                            a = this._patchFractPart(parseInt(e[4]), 2, o);
                        if (s >= n || s < 0) return {
                            error: this._formatterErrors.fraction,
                            res: !1
                        };
                        if (void 0 !== o && a >= o || a < 0) return {
                            error: this._formatterErrors.secondFraction,
                            res: !1
                        };
                        let c = void 0 !== o ? r + s / n + a / (n * o) : NaN;
                        return t && (c = -c), {
                            value: c,
                            res: !0,
                            suggest: this.format(c)
                        }
                    }
                    return {
                        error: this._formatterErrors.custom,
                        res: !1
                    }
                }
            }
        },
        337779: (t, e, r) => {
            function i(t) {
                return t.reduce((function(t, e, r) {
                    return ~t.indexOf(e) || t.push(e), t
                }), [])
            }
            r.r(e), r.d(e, {
                uniq: () => i
            })
        }
    }
]);