var t = require; var e = module; var i = exports; Object.defineProperty(i, "__esModule", {value: !0}); const a = t("B3Functions"), s = t("constants"); i.default = class { constructor({category: t, name: e, title: i, description: s, properties: o} = {}) { (this.id = a.createUUID()), (this.category = t || ""), (this.name = e || ""), (this.title = i || this.name), (this.description = s || ""), (this.properties = o || {}); } _execute(t) { this._enter(t), t.blackboard.get("isOpen", t.tree.id, this.id) || this._open(t); var e = this._tick(t); return e !== s.RUNNING && this._close(t), this._exit(t), e; } _enter(t) { t._enterNode(this), this.enter(t); } _open(t) { t._openNode(this), t.blackboard.set("isOpen", !0, t.tree.id, this.id), this.open(t); } _tick(t) { return t._tickNode(this), this.tick(t); } _close(t) { t._closeNode(this), t.blackboard.set("isOpen", !1, t.tree.id, this.id), this.close(t); } _exit(t) { t._exitNode(this), this.exit(t); } enter(t) {} open(t) {} interrupt(t) {} close(t) {} exit(t) {} };