/** Copyright (C) 2020-2026 Kedron Holdings LLC, All Rights Reserved. This file is part of Reactor.
 *  For info and license terms please see https://reactor.toggledbits.com/
 *  ------------------------------------------------------------------------------
*/
const a13_0x394122 = a13_0xdf5c;
function a13_0xdf5c(_0x2d953e, _0x35ce06) {
    _0x2d953e = _0x2d953e - 0x66;
    const _0x21eb7a = a13_0x21eb();
    let _0xdf5ced = _0x21eb7a[_0x2d953e];
    return _0xdf5ced;
}
(function (_0x2077fa, _0x10c94b) {
    const _0x3adff0 = a13_0xdf5c, _0x1c334b = _0x2077fa();
    while (!![]) {
        try {
            const _0x19aad3 = -parseInt(_0x3adff0(0x6c)) / 0x1 + -parseInt(_0x3adff0(0x67)) / 0x2 * (parseInt(_0x3adff0(0x69)) / 0x3) + -parseInt(_0x3adff0(0x75)) / 0x4 + -parseInt(_0x3adff0(0x66)) / 0x5 * (parseInt(_0x3adff0(0x6e)) / 0x6) + parseInt(_0x3adff0(0x78)) / 0x7 + parseInt(_0x3adff0(0x74)) / 0x8 * (-parseInt(_0x3adff0(0x68)) / 0x9) + parseInt(_0x3adff0(0x7b)) / 0xa;
            if (_0x19aad3 === _0x10c94b)
                break;
            else
                _0x1c334b['push'](_0x1c334b['shift']());
        } catch (_0x143c9d) {
            _0x1c334b['push'](_0x1c334b['shift']());
        }
    }
}(a13_0x21eb, 0x80c26));
const version = 0x6235, Logger = require(a13_0x394122(0x7c)), Observable = require(a13_0x394122(0x7e)), Observer = require(a13_0x394122(0x6a)), util = require('./util');
function a13_0x21eb() {
    const _0xa7b205 = [
        'Expression\x20name\x20\x22',
        '\x22\x20is\x20invalid',
        'setValue',
        'add',
        '245645PBAWOy',
        '1172nDZUAE',
        '261cZDIaj',
        '4449AtehdC',
        './Observer.js',
        'mixin',
        '523070DNSlxh',
        '__deleted',
        '18rhQdOc',
        '_destroy',
        'unsubscribe',
        'Expression\x20named\x20\x22',
        'getID',
        'toString',
        '223856QLZPdM',
        '3200108oeYZGx',
        '%1:\x20Expression._destroy',
        '\x22\x20already\x20exists.',
        '1402331YiRRsD',
        'isValidName',
        'Needs\x20subclass\x20implementation',
        '34780650fBJlSz',
        './Logger.js',
        'constructor',
        './Observable.js',
        'has',
        'log',
        'getLogger',
        'name'
    ];
    a13_0x21eb = function () {
        return _0xa7b205;
    };
    return a13_0x21eb();
}
var expressions = {};
const validName = /^\p{Alphabetic}[\p{Alphabetic}0-9_$]*$/iu;
class Expression {
    constructor(_0x5bb212) {
        const _0x3862fb = a13_0x394122;
        this['id'] = _0x5bb212, this[_0x3862fb(0x80)] = Logger[_0x3862fb(0x81)](this);
    }
    static ['isValidName'](_0x49931a) {
        return validName['test'](_0x49931a);
    }
    static [a13_0x394122(0x7f)](_0x50bc1d) {
        return !!expressions[_0x50bc1d];
    }
    static [a13_0x394122(0x86)](_0x48d244) {
        const _0x12346b = a13_0x394122;
        let _0x14d97b = _0x48d244[_0x12346b(0x72)]();
        if (!Expression[_0x12346b(0x79)](_0x14d97b))
            throw new Error(_0x12346b(0x83) + _0x14d97b + _0x12346b(0x84));
        if (expressions[_0x14d97b])
            throw new Error(_0x12346b(0x71) + _0x14d97b + _0x12346b(0x77));
        return expressions[_0x14d97b] = _0x48d244, _0x48d244;
    }
    static ['get'](_0x5bff7b) {
        return expressions[_0x5bff7b];
    }
    [a13_0x394122(0x73)]() {
        const _0x41af62 = a13_0x394122;
        return this[_0x41af62(0x7d)][_0x41af62(0x82)] + '#' + String(this['id']);
    }
    [a13_0x394122(0x6f)]() {
        const _0x2d9ec4 = a13_0x394122;
        this[_0x2d9ec4(0x80)]['debug'](0x5, _0x2d9ec4(0x76), this), this['id'] && (this[_0x2d9ec4(0x70)](), this['disconnect'](), delete expressions[this['id']], this[_0x2d9ec4(0x6d)] = this['id'], this['id'] = null);
    }
    ['getID']() {
        return this['id'];
    }
    ['getValue']() {
        throw new ReferenceError('Needs\x20subclass\x20implementation');
    }
    [a13_0x394122(0x85)]() {
        const _0x864764 = a13_0x394122;
        throw new ReferenceError(_0x864764(0x7a));
    }
}
util['mixin'](Expression, Observer), util[a13_0x394122(0x6b)](Expression, Observable), module['exports'] = Expression;