$(cssSelector, output, context) {
    if (!context) context = _a.doc;
    if (!output) output = "el";
    if (!context || !context.nodeType) {
      _a.log(1, "Uib:$", `Invalid context element. Must be a valid HTML element.`, context)();
      return null;
    }
    let el = context.querySelector(cssSelector);
    if (!el || !el.nodeType) {
      _a.log(1, "Uib:$", `No element found or element is not an HTML element for CSS selector ${cssSelector}`)();
      return null;
    }
    if (el.nodeName === "TEMPLATE") {
      el = el.content.firstElementChild;
      if (!el) {
        _a.log(0, "Uib:$", `Template selected for CSS selector ${cssSelector} but it is empty`)();
        return null;
      }
    }
    let out;
    try {
      switch (output.toLowerCase()) {
        case "text": {
          out = el.innerText;
          break;
        }
        case "html": {
          out = el.innerHTML;
          break;
        }
        case "attr":
        case "attributes": {
          out = {};
          for (const attr of el.attributes) {
            out[attr.name] = attr.value;
          }
          break;
        }
        default: {
          out = el;
          break;
        }
      }
    } catch (e) {
      out = el;
      _a.log(1, "Uib:$", `Could not process output type "${output}" for CSS selector ${cssSelector}, returned the DOM element. ${e.message}`, e)();
    }
    return out;
  }
Simplistic jQuery-like document CSS query selector, returns an HTML Element
NOTE that this fn returns the element itself. Use $$ to get the properties of 1 or more elements.
If the selected element is a <template>, returns the first child element.
type {HTMLElement}
@param {string} cssSelector A CSS Selector that identifies the element to return
@param {"el"|"text"|"html"|"attributes"|"attr"} [output] Optional. What type of output to return. Defaults to "el", the DOM element reference
@param {HTMLElement} [context] Optional. The context to search within. Defaults to the document. Must be a DOM element.
@returns {HTMLElement|string|Array|null} Selected HTML DOM element, innerText, innerHTML, attribute list or null