function _assert_this_initialized(self) {
    if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    }
    return self;
}
function _call_super(_this, derived, args) {
    derived = _get_prototype_of(derived);
    return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
}
function _class_call_check(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}
function _defineProperties(target, props) {
    for(var i = 0; i < props.length; i++){
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
    }
}
function _create_class(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    return Constructor;
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _get_prototype_of(o) {
    _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
    };
    return _get_prototype_of(o);
}
function _inherits(subClass, superClass) {
    if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
    }
    subClass.prototype = Object.create(superClass && superClass.prototype, {
        constructor: {
            value: subClass,
            writable: true,
            configurable: true
        }
    });
    if (superClass) _set_prototype_of(subClass, superClass);
}
function _possible_constructor_return(self, call) {
    if (call && (_type_of(call) === "object" || typeof call === "function")) {
        return call;
    }
    return _assert_this_initialized(self);
}
function _set_prototype_of(o, p) {
    _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
        o.__proto__ = p;
        return o;
    };
    return _set_prototype_of(o, p);
}
function _type_of(obj) {
    "@swc/helpers - typeof";
    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
function _is_native_reflect_construct() {
    try {
        var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
    } catch (_) {}
    return (_is_native_reflect_construct = function() {
        return !!result;
    })();
}
import { max, min, sum } from "d3-array";
import { select } from "d3-selection";
// side-effect import: registers .transition() on d3 selections
import "d3-transition";
import { fontExists, parseSides, rtl as detectRTL, textWidth } from "@d3plus/dom";
import { fontFamily, strip, textSplit, textWrap } from "@d3plus/text";
import { accessor, BaseClass, constant } from "../utils/index.js";
var defaultHtmlLookup = {
    i: "font-style: italic;",
    em: "font-style: italic;",
    b: "font-weight: bold;",
    strong: "font-weight: bold;"
};
var TextBox = /*#__PURE__*/ function(BaseClass) {
    "use strict";
    _inherits(TextBox, BaseClass);
    function TextBox() {
        _class_call_check(this, TextBox);
        var _this;
        _this = _call_super(this, TextBox), _define_property(_this, "_select", void 0), _define_property(_this, "_data", void 0), _define_property(_this, "_ariaHidden", void 0), _define_property(_this, "_delay", void 0), _define_property(_this, "_duration", void 0), _define_property(_this, "_ellipsis", void 0), _define_property(_this, "_fontColor", void 0), _define_property(_this, "_fontFamily", void 0), _define_property(_this, "_fontMax", void 0), _define_property(_this, "_fontMin", void 0), _define_property(_this, "_fontOpacity", void 0), _define_property(_this, "_fontResize", void 0), _define_property(_this, "_fontSize", void 0), _define_property(_this, "_fontStroke", void 0), _define_property(_this, "_fontStrokeWidth", void 0), _define_property(_this, "_fontWeight", void 0), _define_property(_this, "_height", void 0), _define_property(_this, "_html", void 0), _define_property(_this, "_id", void 0), _define_property(_this, "_lineHeight", void 0), _define_property(_this, "_maxLines", void 0), _define_property(_this, "_on", void 0), _define_property(_this, "_overflow", void 0), _define_property(_this, "_padding", void 0), _define_property(_this, "_pointerEvents", void 0), _define_property(_this, "_rotate", void 0), _define_property(_this, "_rotateAnchor", void 0), _define_property(_this, "_split", void 0), _define_property(_this, "_text", void 0), _define_property(_this, "_textAnchor", void 0), _define_property(_this, "_verticalAlign", void 0), _define_property(_this, "_width", void 0), _define_property(_this, "_x", void 0), _define_property(_this, "_y", void 0);
        _this._ariaHidden = constant("false");
        _this._delay = 0;
        _this._duration = 0;
        _this._ellipsis = function(text, line) {
            return line ? "".concat(text.replace(/\.|,$/g, ""), "...") : "";
        };
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontColor = constant("black");
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontFamily = constant(fontFamily);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontMax = constant(50);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontMin = constant(8);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontOpacity = constant(1);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontResize = constant(false);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontSize = constant(10);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontStroke = constant("transparent");
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontStrokeWidth = constant(0);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._fontWeight = constant(400);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._height = accessor("height", 200);
        _this._html = defaultHtmlLookup;
        _this._id = function(d, i) {
            return d.id || "".concat(i);
        };
        _this._lineHeight = function(d, i) {
            return _this._fontSize(d, i) * 1.2;
        };
        _this._maxLines = constant(null);
        _this._on = {};
        _this._overflow = constant(false);
        _this._padding = constant(0);
        _this._pointerEvents = constant("auto");
        _this._rotate = constant(0);
        _this._rotateAnchor = function(d) {
            return [
                d.w / 2,
                d.h / 2
            ];
        };
        _this._split = textSplit;
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._text = accessor("text");
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._textAnchor = constant("start");
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._verticalAlign = constant("top");
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._width = accessor("width", 200);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._x = accessor("x", 0);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        _this._y = accessor("y", 0);
        return _this;
    }
    _create_class(TextBox, [
        {
            /**
      Renders the text boxes. If a *callback* is specified, it will be called once the shapes are done drawing.
    @param callback Optional callback invoked after rendering completes.
*/ key: "render",
            value: function render(callback) {
                var _this = this;
                if (this._select === void 0) this.select(select("body").append("svg").style("width", "".concat(window.innerWidth, "px")).style("height", "".concat(window.innerHeight, "px")).node());
                var that = this;
                var boxes = this._select.selectAll(".d3plus-textBox").data(this._data.reduce(function(arr, d, i) {
                    var t = _this._text(d, i);
                    if (t === void 0) return arr;
                    t = "".concat(t).trim();
                    var resize = _this._fontResize(d, i);
                    var lHRatio = _this._lineHeight(d, i) / _this._fontSize(d, i);
                    var fS = resize ? _this._fontMax(d, i) : _this._fontSize(d, i), lH = resize ? fS * lHRatio : _this._lineHeight(d, i), line = 1, lineData = [], sizes, wrapResults = {
                        lines: [],
                        truncated: false,
                        widths: []
                    };
                    // eslint-disable-next-line @typescript-eslint/no-explicit-any
                    var style = {
                        "font-family": fontExists(_this._fontFamily(d, i)),
                        "font-size": fS,
                        "font-weight": _this._fontWeight(d, i),
                        "line-height": lH
                    };
                    var padding = parseSides(_this._padding(d, i));
                    var h = _this._height(d, i) - (padding.top + padding.bottom), w = _this._width(d, i) - (padding.left + padding.right);
                    var wrapper = textWrap().fontFamily(style["font-family"]).fontSize(fS).fontWeight(style["font-weight"]).lineHeight(lH).maxLines(_this._maxLines(d, i)).height(h).overflow(_this._overflow(d, i)).width(w).split(_this._split);
                    var fMax = _this._fontMax(d, i), fMin = _this._fontMin(d, i), vA = _this._verticalAlign(d, i), words = _this._split(t, i);
                    /**
          Figures out the lineData to be used for wrapping.
          @private
*/ function checkSize() {
                        var truncate = function truncate() {
                            if (line < 1) lineData = [
                                that._ellipsis("", line)
                            ];
                            else lineData[line - 1] = that._ellipsis(lineData[line - 1], line);
                        };
                        // Constraint the font size
                        fS = max([
                            fS,
                            fMin
                        ]);
                        fS = min([
                            fS,
                            fMax
                        ]);
                        if (resize) {
                            lH = fS * lHRatio;
                            wrapper.fontSize(fS).lineHeight(lH);
                            style["font-size"] = fS;
                            style["line-height"] = lH;
                        }
                        wrapResults = wrapper(t);
                        lineData = wrapResults.lines.filter(function(l) {
                            return l !== "";
                        });
                        line = lineData.length;
                        if (wrapResults.truncated) {
                            if (resize) {
                                fS--;
                                if (fS < fMin) {
                                    fS = fMin;
                                    truncate();
                                    return;
                                } else checkSize();
                            } else truncate();
                        }
                    }
                    if (w > fMin && (h > lH || resize && h > fMin * lHRatio)) {
                        if (resize) {
                            sizes = textWidth(words, style);
                            var areaMod = 1.165 + w / h * 0.1, boxArea = w * h, maxWidth = max(sizes), textArea = sum(sizes, function(d) {
                                return d * lH;
                            }) * areaMod;
                            if (maxWidth > w || textArea > boxArea) {
                                var areaRatio = Math.sqrt(boxArea / textArea), widthRatio = w / maxWidth;
                                var sizeRatio = min([
                                    areaRatio,
                                    widthRatio
                                ]);
                                fS = Math.floor(fS * sizeRatio);
                            }
                            var heightMax = Math.floor(h * 0.8);
                            if (fS > heightMax) fS = heightMax;
                        }
                        checkSize();
                    }
                    if (lineData.length) {
                        var tH = line * lH;
                        var r = _this._rotate(d, i);
                        var yP = r === 0 ? vA === "top" ? 0 : vA === "middle" ? h / 2 - tH / 2 : h - tH : 0;
                        yP -= lH * 0.1;
                        arr.push({
                            aH: _this._ariaHidden(d, i),
                            data: d,
                            i: i,
                            lines: lineData,
                            fC: _this._fontColor(d, i),
                            fStroke: _this._fontStroke(d, i),
                            fSW: _this._fontStrokeWidth(d, i),
                            fF: style["font-family"],
                            fO: _this._fontOpacity(d, i),
                            fW: style["font-weight"],
                            id: _this._id(d, i),
                            tA: _this._textAnchor(d, i),
                            vA: _this._verticalAlign(d, i),
                            widths: wrapResults.widths,
                            fS: fS,
                            lH: lH,
                            w: w,
                            h: h,
                            r: r,
                            x: _this._x(d, i) + padding.left,
                            y: _this._y(d, i) + yP + padding.top
                        });
                    }
                    return arr;
                }, []), // eslint-disable-next-line @typescript-eslint/no-explicit-any
                function(d) {
                    return _this._id(d.data, d.i);
                });
                var t = this._select.transition().duration(this._duration);
                if (this._duration === 0) {
                    boxes.exit().remove();
                } else {
                    boxes.exit().transition().delay(this._duration).remove();
                    boxes.exit().selectAll("text").transition(t).attr("opacity", 0).style("opacity", 0);
                }
                /**
     * Applies translate and rotate to a text element.
     * @param {D3Selection} text
     * @private
*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any
                function rotate(text) {
                    text.attr("transform", function(d, i) {
                        var rotateAnchor = that._rotateAnchor(d, i);
                        return "translate(".concat(d.x, ", ").concat(d.y, ") rotate(").concat(d.r, ", ").concat(rotateAnchor[0], ", ").concat(rotateAnchor[1], ")");
                    });
                }
                var update = boxes.enter().append("g").attr("class", "d3plus-textBox").attr("id", function(d) {
                    return "d3plus-textBox-".concat(strip(d.id));
                }).call(rotate).merge(boxes);
                var rtl = detectRTL();
                update.order().style("pointer-events", function(d) {
                    return _this._pointerEvents(d.data, d.i);
                }).each(function(d) {
                    /**
            Sets the inner text content of each <text> element.
            @private
*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any
                    function textContent(text) {
                        var tag = false;
                        text[that._html ? "html" : "text"](function(t) {
                            var cleaned = t.trimEnd().replace(/&([^;&]*)/g, function(str, a) {
                                return a === "amp" ? str : "&amp;".concat(a);
                            }) // replaces all non-HTML ampersands with escaped entity
                            .replace(/<([^A-z^/]+)/g, function(_str, a) {
                                return "&lt;".concat(a);
                            }).replace(/<$/g, "&lt;") // replaces all non-HTML left angle brackets with escaped entity
                            .replace(/(<[^>^/]+>)([^<^>]+)$/g, function(_str, a, b) {
                                return "".concat(a).concat(b).concat(a.replace("<", "</"));
                            }) // ands end tag to lines before mid-HTML break
                            .replace(/^([^<^>]+)(<\/[^>]+>)/g, function(_str, a, b) {
                                return "".concat(b.replace("</", "<")).concat(a).concat(b);
                            }); // ands start tag to lines after mid-HTML break
                            var tagRegex = new RegExp(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g);
                            if (cleaned.match(tagRegex)) {
                                var htmlLookup = that._html;
                                cleaned = cleaned.replace(tagRegex, function(_str, a, b) {
                                    tag = htmlLookup[a] ? a : false;
                                    if (tag) {
                                        var style = htmlLookup[tag];
                                        if (t.includes("</".concat(tag, ">"))) tag = false;
                                        return '<tspan style="'.concat(style, '">').concat(b, "</tspan>");
                                    }
                                    return b;
                                });
                            } else if (tag && tag.length) {
                                var htmlLookup1 = that._html;
                                cleaned = '<tspan style="'.concat(htmlLookup1[tag], '">').concat(cleaned, "</tspan>");
                            }
                            return cleaned;
                        });
                    }
                    /**
            Styles to apply to each <text> element.
            @private
*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any
                    function textStyle(text) {
                        text.attr("aria-hidden", d.aH).attr("dir", rtl ? "rtl" : "ltr").attr("fill", d.fC).attr("stroke", d.fStroke).attr("stroke-width", d.fSW).attr("text-anchor", d.tA).attr("font-family", d.fF).style("font-family", d.fF).attr("font-size", "".concat(d.fS, "px")).style("font-size", "".concat(d.fS, "px")).attr("font-weight", d.fW).style("font-weight", d.fW).attr("x", "".concat(d.tA === "middle" ? d.w / 2 : rtl ? d.tA === "start" ? d.w : 0 : d.tA === "end" ? d.w : 2 * Math.sin(Math.PI * d.r / 180), "px")).attr("y", function(_t, i) {
                            return d.r === 0 || d.vA === "top" ? "".concat((i + 1) * d.lH - (d.lH - d.fS), "px") : d.vA === "middle" ? "".concat((d.h + d.fS) / 2 - (d.lH - d.fS) + (i - d.lines.length / 2 + 0.5) * d.lH, "px") : "".concat(d.h - 2 * (d.lH - d.fS) - (d.lines.length - (i + 1)) * d.lH + 2 * Math.cos(Math.PI * d.r / 180), "px");
                        });
                    }
                    var texts = select(this).selectAll("text").data(d.lines);
                    if (that._duration === 0) {
                        texts.call(textContent).call(textStyle);
                        texts.exit().remove();
                        texts.enter().append("text").attr("dominant-baseline", "alphabetic").style("baseline-shift", "0%").attr("unicode-bidi", "bidi-override").call(textContent).call(textStyle).attr("opacity", d.fO).style("opacity", d.fO);
                    } else {
                        texts.call(textContent).transition(t).call(textStyle);
                        texts.exit().transition(t).attr("opacity", 0).remove();
                        texts.enter().append("text").attr("dominant-baseline", "alphabetic").style("baseline-shift", "0%").attr("opacity", 0).style("opacity", 0).call(textContent).call(textStyle).merge(texts).transition(t).delay(that._delay).call(textStyle).attr("opacity", d.fO).style("opacity", d.fO);
                    }
                }).transition(t).call(rotate);
                var events = Object.keys(this._on), on = events.reduce(function(obj, e) {
                    var _this1 = _this;
                    obj[e] = function() {
                        for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                            args[_key] = arguments[_key];
                        }
                        return _this1._on[e](args[0].data, args[1]);
                    };
                    return obj;
                }, {});
                for(var e = 0; e < events.length; e++)update.on(events[e], on[events[e]]);
                if (callback) setTimeout(callback, this._duration + 100);
                return this;
            }
        },
        {
            key: "ariaHidden",
            value: function ariaHidden(_) {
                return _ !== undefined ? (this._ariaHidden = typeof _ === "function" ? _ : constant(_), this) : this._ariaHidden;
            }
        },
        {
            key: "data",
            value: function data(_) {
                return arguments.length ? (this._data = _, this) : this._data;
            }
        },
        {
            key: "delay",
            value: function delay(_) {
                return arguments.length ? (this._delay = _, this) : this._delay;
            }
        },
        {
            key: "duration",
            value: function duration(_) {
                return arguments.length ? (this._duration = _, this) : this._duration;
            }
        },
        {
            key: "ellipsis",
            value: function ellipsis(_) {
                return arguments.length ? (this._ellipsis = typeof _ === "function" ? _ : constant(_), this) : this._ellipsis;
            }
        },
        {
            key: "fontColor",
            value: function fontColor(_) {
                return arguments.length ? (this._fontColor = typeof _ === "function" ? _ : constant(_), this) : this._fontColor;
            }
        },
        {
            key: "fontFamily",
            value: function fontFamily(_) {
                return arguments.length ? (this._fontFamily = typeof _ === "function" ? _ : constant(_), this) : this._fontFamily;
            }
        },
        {
            key: "fontMax",
            value: function fontMax(_) {
                return arguments.length ? (this._fontMax = typeof _ === "function" ? _ : constant(_), this) : this._fontMax;
            }
        },
        {
            key: "fontMin",
            value: function fontMin(_) {
                return arguments.length ? (this._fontMin = typeof _ === "function" ? _ : constant(_), this) : this._fontMin;
            }
        },
        {
            key: "fontOpacity",
            value: function fontOpacity(_) {
                return arguments.length ? (this._fontOpacity = typeof _ === "function" ? _ : constant(_), this) : this._fontOpacity;
            }
        },
        {
            key: "fontResize",
            value: function fontResize(_) {
                return arguments.length ? (this._fontResize = typeof _ === "function" ? _ : constant(_), this) : this._fontResize;
            }
        },
        {
            key: "fontSize",
            value: function fontSize(_) {
                return arguments.length ? (this._fontSize = typeof _ === "function" ? _ : constant(_), this) : this._fontSize;
            }
        },
        {
            key: "fontStroke",
            value: function fontStroke(_) {
                return arguments.length ? (this._fontStroke = typeof _ === "function" ? _ : constant(_), this) : this._fontStroke;
            }
        },
        {
            key: "fontStrokeWidth",
            value: function fontStrokeWidth(_) {
                return arguments.length ? (this._fontStrokeWidth = typeof _ === "function" ? _ : constant(_), this) : this._fontStrokeWidth;
            }
        },
        {
            key: "fontWeight",
            value: function fontWeight(_) {
                return arguments.length ? (this._fontWeight = typeof _ === "function" ? _ : constant(_), this) : this._fontWeight;
            }
        },
        {
            key: "height",
            value: function height(_) {
                return arguments.length ? (this._height = typeof _ === "function" ? _ : constant(_), this) : this._height;
            }
        },
        {
            key: "html",
            value: function html(_) {
                return arguments.length ? (this._html = typeof _ === "boolean" ? _ ? defaultHtmlLookup : false : _, this) : this._html;
            }
        },
        {
            key: "id",
            value: function id(_) {
                return arguments.length ? (this._id = typeof _ === "function" ? _ : constant(_), this) : this._id;
            }
        },
        {
            key: "lineHeight",
            value: function lineHeight(_) {
                return arguments.length ? (this._lineHeight = typeof _ === "function" ? _ : constant(_), this) : this._lineHeight;
            }
        },
        {
            key: "maxLines",
            value: function maxLines(_) {
                return arguments.length ? (this._maxLines = typeof _ === "function" ? _ : constant(_), this) : this._maxLines;
            }
        },
        {
            key: "overflow",
            value: function overflow(_) {
                return arguments.length ? (this._overflow = typeof _ === "function" ? _ : constant(_), this) : this._overflow;
            }
        },
        {
            key: "padding",
            value: function padding(_) {
                return arguments.length ? (this._padding = typeof _ === "function" ? _ : constant(_), this) : this._padding;
            }
        },
        {
            key: "pointerEvents",
            value: function pointerEvents(_) {
                return arguments.length ? (this._pointerEvents = typeof _ === "function" ? _ : constant(_), this) : this._pointerEvents;
            }
        },
        {
            key: "rotate",
            value: function rotate(_) {
                return arguments.length ? (this._rotate = typeof _ === "function" ? _ : constant(_), this) : this._rotate;
            }
        },
        {
            key: "rotateAnchor",
            value: function rotateAnchor(_) {
                return arguments.length ? (this._rotateAnchor = typeof _ === "function" ? _ : constant(_), this) : this._rotateAnchor;
            }
        },
        {
            key: "select",
            value: function select1(_) {
                return arguments.length ? (this._select = select(_), this) : this._select;
            }
        },
        {
            key: "split",
            value: function split(_) {
                return arguments.length ? (this._split = _, this) : this._split;
            }
        },
        {
            key: "text",
            value: function text(_) {
                return arguments.length ? (this._text = typeof _ === "function" ? _ : constant(_), this) : this._text;
            }
        },
        {
            key: "textAnchor",
            value: function textAnchor(_) {
                return arguments.length ? (this._textAnchor = typeof _ === "function" ? _ : constant(_), this) : this._textAnchor;
            }
        },
        {
            key: "verticalAlign",
            value: function verticalAlign(_) {
                return arguments.length ? (this._verticalAlign = typeof _ === "function" ? _ : constant(_), this) : this._verticalAlign;
            }
        },
        {
            key: "width",
            value: function width(_) {
                return arguments.length ? (this._width = typeof _ === "function" ? _ : constant(_), this) : this._width;
            }
        },
        {
            key: "x",
            value: function x(_) {
                return arguments.length ? (this._x = typeof _ === "function" ? _ : constant(_), this) : this._x;
            }
        },
        {
            key: "y",
            value: function y(_) {
                return arguments.length ? (this._y = typeof _ === "function" ? _ : constant(_), this) : this._y;
            }
        }
    ]);
    return TextBox;
}(BaseClass);
/**
    Creates a wrapped text box for each point in an array of data. See [this example](https://d3plus.org/examples/d3plus-text/getting-started/) for help getting started using the TextBox class.
*/ export { TextBox as default };
