"use strict";
var INVOXMDComponent_Bar = (() => {
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, { get: all[name], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // libs/integrations/invox-bar/src/public.ts
  var public_exports = {};
  __export(public_exports, {
    author: () => author,
    commit: () => commit,
    create: () => create,
    license: () => license,
    productName: () => productName,
    version: () => version
  });

  // libs/integrations/common/product.ts
  var productName = "Invox Dictation";
  var version = "1.0.0.0";
  var commit = "dev";
  var license = "Commercial Software";
  var author = "Vócali Sistemas Inteligentes";

  // libs/integrations/common/util/domUtility.ts
  var DOMUtility = class {
    static getElement(id) {
      return document.getElementById(id);
    }
    static existsElement(id) {
      const element = DOMUtility.getElement(id);
      return element !== null;
    }
    static removeElement(id) {
      var _a;
      DOMUtility.existsElement(id) && ((_a = DOMUtility.getElement(id)) == null ? void 0 : _a.remove());
    }
  };

  // libs/integrations/common/i18n/i18n.ts
  var i18n = class {
    static getLangResources() {
      const i18n2 = new INVOX.I18nService();
      const lang = INVOX.GetCurrentLang();
      return i18n2.getResources(lang);
    }
  };

  // libs/integrations/common/components/baseComponent.ts
  var BaseComponent = class extends DOMUtility {
    constructor(langResources = void 0) {
      super();
      this._langResources = langResources;
    }
    initComponent() {
    }
    create(containerId) {
    }
    destroy() {
      this.componentWillUnmount();
    }
    componentDidMount() {
    }
    componentWillUnmount() {
    }
    setBehaviour(element) {
    }
    addEvent(element, eventName, callback, useCapure = false) {
      if (element.addEventListener) {
        element.addEventListener(eventName, callback, useCapure);
      } else if (element.attachEvent) {
        element.attachEvent("on" + eventName, callback);
      } else {
        element["on" + eventName] = callback;
      }
    }
    removeEvent(element, eventName, callback) {
      if (element.removeEventListener) {
        element.removeEventListener(eventName, callback);
      }
    }
  };

  // libs/integrations/invox-bar/src/components/layers/baseLayerComponent.ts
  var BaseLayerComponent = class extends BaseComponent {
    setClass(_class) {
      this._class = _class;
    }
    setNextView(nextView) {
      this._nextView = nextView;
    }
    next() {
      this._nextView();
    }
    create(containerId) {
      var _a;
      const viewElement = document.createElement("div");
      viewElement.setAttribute("class", `${this._class} invox-bar__layer`);
      const contentElements = this.createContent();
      contentElements.forEach((element) => viewElement.appendChild(element));
      (_a = DOMUtility.getElement(containerId)) == null ? void 0 : _a.appendChild(viewElement);
    }
    createContent() {
      return [];
    }
  };

  // libs/integrations/invox-bar/src/components/status/statusbar.ts
  var Statusbar = class extends BaseComponent {
    constructor() {
      super(...arguments);
      this._isReadyState = false;
      this._pendingStatus = null;
      this.RESTORE_DELAY = 2500;
    }
    setOnErrorCallback(callback) {
      this._onErrorCallback = callback;
      return this;
    }
    setOnMicrophoneConnectedCallback(callback) {
      this._onMicrophoneConnectedCallback = callback;
      return this;
    }
    setOnMicrophoneDisconnectedCallback(callback) {
      this._onMicrophoneDisconnectedCallback = callback;
      return this;
    }
    create() {
      this._statusMessageElement = document.createElement("label");
      this._statusMessageElement.setAttribute("class", "invox-bar__statusbar-message invox-bar__hypothesis-follower");
      this._statusMessageElement.setAttribute("id", "label-StatusBar-hypothesis-follower");
      const statusbarElement = document.createElement("div");
      statusbarElement.setAttribute("class", "invox-bar__statusbar-container");
      statusbarElement.appendChild(this._statusMessageElement);
      this.customizeStatusbar();
      return statusbarElement;
    }
    customizeStatusbar() {
      INVOX.OnChangeStatusBar((message, type) => this.printStatus(message, type));
      INVOX.OnChangeVisorHypothesis((message, dictationEventType) => !this.isSessionDisconnected() && this.printHypothesis(message));
      INVOX.DeviceActionManager[INVOX.deviceActionId.DEVICE_ADDED] = () => !this.isSessionDisconnected() && this.printMicrophoneConnected();
      INVOX.DeviceActionManager[INVOX.deviceActionId.DEVICE_REMOVED] = () => !this.isSessionDisconnected() && this.printMicrophoneDisconnected();
    }
    isSessionDisconnected() {
      const session = INVOX.GetCurrentSession();
      if (!session) {
        return true;
      }
      return session.isDisconnected();
    }
    // @ts-ignore
    printStatus(message, type = INVOX.StatusMessageTypeEnum.INFO) {
      const tooltip = message;
      if (type === INVOX.StatusMessageTypeEnum.ERROR) {
        INVOX.LogError(`Status error: ${message}`);
        this._isReadyState = false;
        this._pendingStatus = null;
        this._onErrorCallback();
        message = this.removeBreakLines(message);
      } else if (this._isReadyState) {
        this._pendingStatus = { message, tooltip };
        return;
      }
      this._statusMessageElement.innerText = message;
      this._statusMessageElement.title = tooltip;
      this._statusMessageElement.style.fontStyle = "normal";
    }
    printHypothesis(message) {
      const statusMessage = this.keepBreakLines(message);
      this._isHypothesisInStatusbar = true;
      this._statusMessageElement.innerText = statusMessage;
      this._statusMessageElement.title = message;
      this._statusMessageElement.style.fontStyle = "italic";
      this.isTextOverflown(this._statusMessageElement) ? this.enableHypothesisFollower(this._statusMessageElement) : this.disableHypothesisFollower(this._statusMessageElement);
      this.restoreStatusbarMessage();
    }
    printMicrophoneConnected() {
      const message = `Microphone ${INVOX.GetMicrophoneName()} connected`;
      this._statusMessageElement.innerText = message;
      this._statusMessageElement.title = message;
      this._onMicrophoneConnectedCallback();
      this.restoreStatusbarMessage();
    }
    printReadyMessage(message) {
      if (!this._statusMessageElement)
        return;
      this._isReadyState = true;
      this._statusMessageElement.innerText = message;
      this._statusMessageElement.title = message;
      this._statusMessageElement.style.fontStyle = "normal";
    }
    clearReadyState() {
      this._isReadyState = false;
      if (this._pendingStatus) {
        this._statusMessageElement.innerText = this._pendingStatus.message;
        this._statusMessageElement.title = this._pendingStatus.tooltip;
        this._statusMessageElement.style.fontStyle = "normal";
        this._pendingStatus = null;
      }
    }
    printMicrophoneDisconnected() {
      let message = "Microphone disconnected";
      this._statusMessageElement.innerText = message;
      this._statusMessageElement.title = message;
      this._onMicrophoneDisconnectedCallback();
      setTimeout(() => {
        message = `Microphone ${INVOX.GetMicrophoneName()} connected`;
        this._statusMessageElement.innerText = message;
        this._statusMessageElement.title = message;
        this._onMicrophoneConnectedCallback();
        this.restoreStatusbarMessage();
      }, 1500);
    }
    async restoreStatusbarMessage(timeout = this.RESTORE_DELAY) {
      clearTimeout(this.delayTimeout);
      this.delayTimeout = setTimeout(() => {
        INVOX.UpdateStatusBarToCurrentScope();
        this._statusMessageElement.style.fontStyle = "normal";
        this.disableHypothesisFollower(this._statusMessageElement);
        this._isHypothesisInStatusbar = false;
      }, timeout);
    }
    isTextOverflown(element) {
      return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
    }
    enableHypothesisFollower(element) {
      !element.classList.contains("active") && element.classList.add("active");
    }
    disableHypothesisFollower(element) {
      element.classList.contains("active") && element.classList.remove("active");
    }
    handleStartedAdaptation(message) {
      this.printAdaptationMessage(message);
    }
    handleRejectedAdaptation(message) {
    }
    handleFinishedAdaptation(message) {
      this.printAdaptationMessage(message);
    }
    handleErrorAdaptation(message) {
      this.printAdaptationMessage(message, INVOX.StatusMessageTypeEnum.ERROR);
    }
    // @ts-ignore
    printAdaptationMessage(message, type = INVOX.StatusMessageTypeEnum.INFO) {
      if (this._isHypothesisInStatusbar) {
        return;
      }
      this.printStatus(message, type);
      this.restoreStatusbarMessage();
    }
    removeBreakLines(text) {
      return this.replaceBreakLines(text, "");
    }
    keepBreakLines(text) {
      return this.replaceBreakLines(text, "↲ ");
    }
    replaceBreakLines(text, sustitute) {
      return text.replace(/(\r\n|\n)/g, sustitute);
    }
  };

  // libs/integrations/invox-bar/src/assets/icons/invox.svg
  var invox_default = '<svg width="23" height="16" viewBox="0 0 23 16" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M0 3.13881V0H3.01015V3.13881H0ZM0 15.9918V5.03819H3.01015V15.9999L0 15.9918Z" fill="#212121"/>\r\n<path d="M7.79921 8.74825V15.9917H4.78906V5.03802H7.79921V6.88911C8.6411 5.59335 10.0707 4.74023 11.6036 4.74023C13.335 4.74023 14.574 5.60944 15.1221 7.05812C15.5465 6.35597 16.1403 5.7748 16.8475 5.36931C17.5548 4.96381 18.3522 4.74733 19.1647 4.74023C21.5157 4.74023 22.9771 6.38207 22.9771 8.89312V15.9997H19.9828V9.73013C19.9828 8.42632 19.3077 7.46858 17.8781 7.46858C16.8297 7.46858 15.964 8.04001 15.4398 8.61948V15.9917H12.4296V9.73013C12.4296 8.42632 11.7545 7.46858 10.3249 7.46858C9.20501 7.46858 8.30752 8.10439 7.79921 8.74825Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/invox-white.svg
  var invox_white_default = '<svg width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M0 2.74645V0H2.62011V2.74645H0ZM0 13.9928V4.4084H2.62011V13.9998L0 13.9928Z" fill="white"/>\r\n<path d="M6.78882 7.65495V13.9929H4.1687V4.40851H6.78882V6.02821C7.52162 4.89442 8.766 4.14795 10.1003 4.14795C11.6073 4.14795 12.6858 4.9085 13.1628 6.1761C13.5323 5.56171 14.0491 5.05319 14.6647 4.69839C15.2803 4.34358 15.9744 4.15416 16.6816 4.14795C18.728 4.14795 20 5.58455 20 7.78171V14H17.3937V8.5141C17.3937 7.37327 16.8061 6.53525 15.5617 6.53525C14.6492 6.53525 13.8956 7.03524 13.4393 7.54228V13.9929H10.8192V8.5141C10.8192 7.37327 10.2316 6.53525 8.98723 6.53525C8.01246 6.53525 7.23126 7.09158 6.78882 7.65495Z" fill="white"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/invox-medical.svg
  var invox_medical_default = '<svg viewBox="0 0 228 105" fill="currentColor"  class="invox-bar-icon__invox-medical-logo" xmlns="http://www.w3.org/2000/svg">\r\n<g clip-path="url(#clip0_5392_1298)">\r\n<path d="M0.202076 9.28828V0H9.23796V9.28828H0.202076ZM0.202076 47.451V14.8915H9.23796V47.451H0.202076Z" fill="#1E1F21"/>\r\n<path d="M22.4636 25.9466V47.451H13.3773V14.8915H22.4636V20.4443C23.6996 18.5162 25.3918 16.9225 27.3905 15.8043C29.3892 14.6861 31.6327 14.0778 33.9225 14.0333C41.1412 14.0333 45.4824 18.8794 45.4824 26.3504V47.451H36.4465V28.8239C36.4465 24.9875 34.4778 22.1101 30.0861 22.1101C26.7039 22.1101 23.978 24.0788 22.4636 25.9466Z" fill="#1E1F21"/>\r\n<path d="M54.1143 47.451L46.088 14.8915H55.1744L60.3233 39.98H62.7968L67.8953 14.8915H77.0826L69.0563 47.451H54.1143Z" fill="#1E1F21"/>\r\n<path d="M94.3972 48.4101C83.8974 48.4101 76.4769 40.9391 76.4769 31.146C76.4769 21.3529 83.8974 14.0333 94.3972 14.0333C104.897 14.0333 112.318 21.5043 112.318 31.146C112.318 40.7876 104.897 48.4101 94.3972 48.4101ZM94.3972 40.3333C99.8491 40.3333 103.786 36.3454 103.786 31.0955C103.786 25.8456 99.8491 22.0596 94.3972 22.0596C88.9454 22.0596 85.0585 26.0475 85.0585 31.0955C85.0585 36.1435 88.9454 40.3333 94.3972 40.3333Z" fill="#1E1F21"/>\r\n<path d="M129.026 33.9729H126.452L121 47.451H111.51L119.233 30.5402L111.914 14.8915H121.353L126.401 27.1581H128.925L134.125 14.8915H143.565L136.195 30.3383L144.372 47.451H134.933L129.026 33.9729Z" fill="#1E1F21"/>\r\n<path d="M9.03588 82.4336V103.988H0V71.429H9.03588V76.9313C10.2744 75.0094 11.9684 73.4233 13.9675 72.3137C15.9665 71.2041 18.2087 70.6054 20.4948 70.5708C25.6942 70.5708 29.4297 73.1453 31.0956 77.4361C32.3652 75.3566 34.1438 73.6349 36.2636 72.4337C38.3834 71.2325 40.7743 70.5914 43.2107 70.5708C50.3284 70.5708 54.6696 75.4169 54.6696 82.8879V103.988H45.6842V85.3614C45.6842 81.525 43.665 78.6476 39.3743 78.6476C36.194 78.6476 33.6196 80.3639 32.0042 82.0802V103.988H22.9683V85.3614C22.9683 81.525 20.9491 78.6476 16.6583 78.6476C15.1901 78.6924 13.7488 79.0539 12.4332 79.7073C11.1176 80.3607 9.95874 81.2907 9.03588 82.4336Z" fill="#4B27E4"/>\r\n<path d="M74.5083 104.948C64.6142 104.948 57.3451 97.527 57.3451 87.532C57.3252 85.3245 57.7402 83.1347 58.5666 81.0876C59.3929 79.0405 60.6144 77.1762 62.1613 75.6012C63.7082 74.0262 65.5502 72.7713 67.5821 71.9082C69.614 71.0451 71.796 70.5906 74.0035 70.5708H74.3568C85.311 70.5708 91.1161 79.6067 91.1161 88.9455H65.2705C65.8762 94.1954 69.5108 97.3251 74.5083 97.3251C77.9914 97.3251 81.3231 95.5583 82.686 92.58H90.7123C88.996 100.152 82.2822 104.948 74.5083 104.948ZM65.7753 83.8975H82.4841C81.4745 80.162 78.5971 77.8399 74.4578 77.8399C70.3185 77.8399 66.9868 80.1115 65.7753 83.847V83.8975Z" fill="#4B27E4"/>\r\n<path d="M118.526 98.5367C116.053 102.575 112.166 104.948 107.673 104.948C99.2432 104.948 92.5799 97.5775 92.5799 87.633C92.5799 77.6885 99.2432 70.5708 107.673 70.5708C112.166 70.5708 116.053 72.8929 118.526 76.8808V56.487H127.31V103.938H118.526V98.5367ZM109.793 96.7699C111.599 96.733 113.362 96.2124 114.898 95.2624C116.434 94.3123 117.687 92.9677 118.526 91.3685V84.049C117.687 82.4498 116.434 81.1051 114.898 80.1551C113.362 79.2051 111.599 78.6845 109.793 78.6476C105.2 78.6476 101.464 82.3831 101.464 87.633C101.464 92.8829 105.2 96.7699 109.793 96.7699Z" fill="#4B27E4"/>\r\n<path d="M131.651 65.8257V56.487H140.687V65.7753L131.651 65.8257ZM131.651 103.988V71.429H140.687V103.988H131.651Z" fill="#4B27E4"/>\r\n<path d="M161.384 104.948C150.935 104.948 143.565 97.4766 143.565 87.6835C143.565 77.8904 150.935 70.5708 161.384 70.5708C169.764 70.5708 176.477 75.5683 178.042 83.5946H169.562C168.819 82.067 167.654 80.7844 166.204 79.8987C164.755 79.0129 163.082 78.5612 161.384 78.5971C155.932 78.5971 152.096 82.585 152.096 87.6835C152.096 92.7819 155.932 96.9213 161.384 96.9213C165.17 96.9213 168.098 94.9526 169.461 92.0752H178.042C176.528 100.051 169.713 104.948 161.384 104.948Z" fill="#4B27E4"/>\r\n<path d="M205.049 98.5366C202.576 102.575 198.638 104.948 194.145 104.948C185.715 104.948 179.102 97.5775 179.102 87.633C179.102 77.6885 185.715 70.5708 194.145 70.5708C198.638 70.5708 202.576 72.8929 205.049 76.8808V71.429H213.833V103.988H205.049V98.5366ZM196.316 96.7698C198.121 96.7277 199.881 96.2049 201.416 95.2555C202.951 94.306 204.205 92.9642 205.049 91.3685V84.0489C203.434 81.1211 200.203 78.6476 196.316 78.6476C192.429 78.6476 187.936 82.3831 187.936 87.633C187.936 92.8829 191.672 96.7698 196.316 96.7698Z" fill="#4B27E4"/>\r\n<path d="M218.123 103.988V56.487H227.159V103.938L218.123 103.988Z" fill="#4B27E4"/>\r\n</g>\r\n<defs>\r\n<clipPath id="clip0_5392_1298">\r\n<rect width="227.159" height="104.948" fill="white"/>\r\n</clipPath>\r\n</defs>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/dictionary.svg
  var dictionary_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M16 14.2H6C5.63181 14.2 5.33333 14.5134 5.33333 14.9C5.33333 15.2866 5.63181 15.6 6 15.6H16V17H6C4.89543 17 4 16.0598 4 14.9V4.4C4 3.6268 4.59695 3 5.33333 3H16V14.2ZM5.33333 12.835C5.44104 12.812 5.55251 12.8 5.66667 12.8H14.6667V4.4H5.33333V12.835ZM12.6667 7.9H7.33333V6.5H12.6667V7.9Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/templates.svg
  var templates_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M9.33333 10.6667V16H4.66667C4.29848 16 4 15.7015 4 15.3333V10.6667H9.33333ZM10.6667 4H15.3333C15.7015 4 16 4.29848 16 4.66667V15.3333C16 15.7015 15.7015 16 15.3333 16H10.6667V4ZM4 4.66667C4 4.29848 4.29848 4 4.66667 4H9.33333V9.33333H4V4.66667Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/transformations.svg
  var transformations_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M5.34021 12V13.3333C5.34021 14.0363 5.9768 14.6667 6.68041 14.6667H8.69072V16H6.68041C5.20006 16 4 14.8061 4 13.3333V12H5.34021ZM14.0515 8.66667L17 16H15.5559L14.7511 14H12.0104L11.207 16H9.76356L12.7113 8.66667H14.0515ZM13.3814 10.5901L12.5458 12.6667H14.2157L13.3814 10.5901ZM4 4H8.02062C9.13091 4 10.0309 4.89543 10.0309 6C10.0309 6.51252 9.83713 6.98001 9.5185 7.33392C9.8374 7.68723 10.0309 8.15446 10.0309 8.66667C10.0309 9.77127 9.13091 10.6667 8.02062 10.6667H4V4ZM8.02062 8H5.34021V9.33333H8.02062C8.3907 9.33333 8.69072 9.03487 8.69072 8.66667C8.69072 8.3 8.38918 8 8.02062 8ZM13.3814 4C14.8618 4 16.0619 5.19391 16.0619 6.66667V8H14.7217V6.66667C14.7217 5.93029 14.1216 5.33333 13.3814 5.33333H11.3711V4H13.3814ZM8.02062 5.33333H5.34021V6.66667H8.02062C8.3907 6.66667 8.69072 6.36819 8.69072 6C8.69072 5.63333 8.38918 5.33333 8.02062 5.33333Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/ai-services.svg
  var ai_services_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M9.61368 14.1848L10.1753 12.9044C10.6751 11.765 11.5747 10.858 12.6969 10.3622L14.2427 9.67924C14.7342 9.46211 14.7342 8.75044 14.2427 8.5333L12.7451 7.87162C11.5941 7.36307 10.6784 6.42249 10.1871 5.24423L9.61822 3.87976C9.40711 3.37341 8.70422 3.37341 8.49312 3.87976L7.92421 5.24421C7.43295 6.42249 6.5172 7.36307 5.36619 7.87162L3.86861 8.5333C3.37713 8.75044 3.37713 9.46211 3.86861 9.67924L5.41447 10.3622C6.53663 10.858 7.43624 11.765 7.93604 12.9044L8.49766 14.1848C8.71354 14.6769 9.39777 14.6769 9.61368 14.1848ZM15.2366 17.3022L15.3946 16.9419C15.6761 16.2994 16.1833 15.7879 16.816 15.5081L17.3026 15.2929C17.5658 15.1765 17.5658 14.7958 17.3026 14.6794L16.8433 14.4763C16.1942 14.1892 15.678 13.6588 15.4012 12.9945L15.2391 12.6052C15.126 12.3338 14.7491 12.3338 14.636 12.6052L14.4738 12.9945C14.1971 13.6588 13.6809 14.1892 13.0319 14.4763L12.5725 14.6794C12.3093 14.7958 12.3093 15.1765 12.5725 15.2929L13.0591 15.5081C13.6919 15.7879 14.1989 16.2994 14.4805 16.9419L14.6385 17.3022C14.7541 17.5659 15.121 17.5659 15.2366 17.3022Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/intelligent-formatting.svg
  var intelligent_formatting_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M15.0466 8.85977L15.2004 8.50232C15.4707 7.86997 15.9657 7.36297 16.5878 7.08135L17.0622 6.86726C17.1198 6.84051 17.1685 6.79764 17.2027 6.74374C17.2369 6.68985 17.255 6.62718 17.255 6.56317C17.255 6.49916 17.2369 6.43649 17.2027 6.38259C17.1685 6.3287 17.1198 6.28583 17.0622 6.25908L16.6141 6.05762C15.9764 5.76798 15.4728 5.24222 15.2072 4.58865L15.0491 4.20278C15.0259 4.143 14.9854 4.09169 14.9329 4.05552C14.8804 4.01935 14.8183 4 14.7548 4C14.6912 4 14.6291 4.01935 14.5766 4.05552C14.5241 4.09169 14.4836 4.143 14.4604 4.20278L14.3023 4.58802C14.037 5.24171 13.5337 5.7677 12.896 6.05762L12.4473 6.25971C12.3899 6.28654 12.3414 6.3294 12.3073 6.38323C12.2733 6.43705 12.2552 6.4996 12.2552 6.56348C12.2552 6.62737 12.2733 6.68992 12.3073 6.74374C12.3414 6.79757 12.3899 6.84043 12.4473 6.86726L12.9223 7.08072C13.5443 7.36262 14.0391 7.86985 14.3091 8.50232L14.4629 8.85977C14.5754 9.12123 14.9335 9.12123 15.0466 8.85977ZM5.85121 12.8423H9.90862L11.1586 16H12.5048L8.5049 5.89531H7.25493L3.25502 16H4.60124L5.85121 12.8423ZM7.87991 7.71731L9.40863 11.5792H6.3512L7.87991 7.71731ZM16.0047 10.9477V11.2855C15.6247 11.064 15.1936 10.9475 14.7549 10.9477C14.3161 10.9478 13.8852 11.0646 13.5053 11.2864C13.1254 11.5081 12.8099 11.827 12.5906 12.211C12.3712 12.595 12.2558 13.0305 12.2558 13.4738C12.2558 13.9172 12.3712 14.3527 12.5906 14.7367C12.8099 15.1206 13.1254 15.4395 13.5053 15.6613C13.8852 15.883 14.3161 15.9999 14.7549 16C15.1936 16.0001 15.6247 15.8836 16.0047 15.6621V16H17.2547V10.9477H16.0047ZM16.0047 13.4738C16.0047 13.8088 15.873 14.1301 15.6386 14.367C15.4042 14.6038 15.0863 14.7369 14.7548 14.7369C14.4232 14.7369 14.1053 14.6038 13.8709 14.367C13.6365 14.1301 13.5048 13.8088 13.5048 13.4738C13.5048 13.1388 13.6365 12.8176 13.8709 12.5807C14.1053 12.3438 14.4232 12.2107 14.7548 12.2107C15.0863 12.2107 15.4042 12.3438 15.6386 12.5807C15.873 12.8176 16.0047 13.1388 16.0047 13.4738Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/quality-review.svg
  var quality_review_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M16.255 16.0712L15.35 17L13.5401 15.1423L14.4451 14.2135L16.255 16.0712ZM9.01473 3.65698C9.18362 3.65698 9.35072 3.66607 9.51596 3.68072C9.29786 4.07388 9.14401 4.50922 9.06849 4.97198C9.05057 4.97177 9.03265 4.9707 9.01473 4.9707C6.53969 4.9707 4.53502 7.02836 4.53495 9.56872C4.53495 12.1091 6.53965 14.1667 9.01473 14.1667C11.4898 14.1667 13.4945 12.1091 13.4945 9.56872C13.4945 9.55007 13.4928 9.53141 13.4927 9.51289C13.9436 9.43545 14.3676 9.27747 14.7507 9.05362C14.765 9.22335 14.7744 9.39512 14.7744 9.56872C14.7744 12.832 12.1941 15.4804 9.01473 15.4804C5.83537 15.4804 3.25502 12.832 3.25502 9.56872C3.25509 6.30549 5.83541 3.65698 9.01473 3.65698ZM12.5533 3.20989C12.6663 2.93004 13.0429 2.93004 13.1558 3.20989L13.3176 3.61144C13.5941 4.29642 14.1098 4.84339 14.7582 5.1394L15.2176 5.34916C15.4801 5.4693 15.4801 5.86158 15.2176 5.98164L14.7313 6.20358C14.0992 6.49215 13.5927 7.01964 13.3114 7.68215L13.1533 8.05356C13.0378 8.32558 12.6713 8.32558 12.5558 8.05356L12.3983 7.68215C12.117 7.01962 11.6099 6.49216 10.9778 6.20358L10.4915 5.98164C10.229 5.86158 10.2291 5.4693 10.4915 5.34916L10.9509 5.1394C11.5992 4.84339 12.1151 4.29644 12.3915 3.61144L12.5533 3.20989Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/auto-fill-templates.svg
  var auto_fill_templates_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M12.5238 8.43193C12.2071 8.13196 12.0034 7.7321 11.9469 7.29959L11.6526 5.04863L9.65864 6.13367C9.27548 6.34216 8.83222 6.41237 8.40341 6.33248L6.1717 5.91673L6.58745 8.14843C6.66734 8.57727 6.59714 9.02053 6.38865 9.40361L5.30361 11.3976L7.55456 11.6918C7.98708 11.7484 8.38694 11.9522 8.68691 12.2688L10.248 13.917L11.2234 11.8671C11.4109 11.4732 11.7282 11.1559 12.122 10.9685L14.1719 9.99307L12.5238 8.43193ZM12.5422 12.4946L10.9264 15.8904C10.8224 16.1089 10.561 16.2017 10.3425 16.0977C10.2938 16.0746 10.2498 16.0426 10.2127 16.0034L7.62658 13.2732C7.55735 13.2001 7.46508 13.1531 7.36527 13.1401L3.63642 12.6526C3.39648 12.6213 3.2274 12.4013 3.25876 12.1614C3.26575 12.1079 3.28257 12.0562 3.30835 12.0088L5.10579 8.70557C5.1539 8.61714 5.17011 8.51483 5.15167 8.41591L4.46294 4.71895C4.41862 4.48106 4.57555 4.25228 4.81344 4.20797C4.86648 4.19809 4.92089 4.19809 4.97393 4.20797L8.67089 4.89669C8.76986 4.91512 8.87217 4.89892 8.96052 4.85081L12.2637 3.05337C12.4763 2.93771 12.7424 3.01626 12.858 3.22881C12.8838 3.2762 12.9006 3.32795 12.9076 3.38144L13.395 7.11029C13.4081 7.2101 13.4551 7.30238 13.5281 7.3716L16.2584 9.95765C16.4341 10.1241 16.4416 10.4014 16.2752 10.5771C16.2381 10.6163 16.194 10.6482 16.1453 10.6714L12.7496 12.2873C12.6587 12.3305 12.5855 12.4038 12.5422 12.4946ZM13.1241 13.9019L14.1568 12.8691L17.255 15.9673L16.2223 17L13.1241 13.9019Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/profile.svg
  var profile_default = '<svg viewBox="0 0 16 16" fill="currentColor"  class="invox-bar-icon__profile" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M7.99992 1.3335C11.6799 1.3335 14.6666 4.32016 14.6666 8.00016C14.6666 11.6802 11.6799 14.6668 7.99992 14.6668C4.31992 14.6668 1.33325 11.6802 1.33325 8.00016C1.33325 4.32016 4.31992 1.3335 7.99992 1.3335ZM4.01547 10.2777C4.99381 11.7381 6.46333 12.6668 8.10639 12.6668C9.74945 12.6668 11.219 11.7381 12.1973 10.2777C11.1256 9.2783 9.68738 8.66683 8.10639 8.66683C6.52539 8.66683 5.08722 9.2783 4.01547 10.2777ZM7.99992 7.3335C9.10452 7.3335 9.99992 6.43806 9.99992 5.3335C9.99992 4.22893 9.10452 3.3335 7.99992 3.3335C6.89532 3.3335 5.99992 4.22893 5.99992 5.3335C5.99992 6.43806 6.89532 7.3335 7.99992 7.3335Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/help.svg
  var help_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M9.7034 18.2663C4.97431 18.2663 1.14062 14.4326 1.14062 9.70352C1.14062 4.97443 4.97431 1.14075 9.7034 1.14075C14.4325 1.14075 18.2662 4.97443 18.2662 9.70352C18.2662 14.4326 14.4325 18.2663 9.7034 18.2663ZM9.7034 16.5537C13.4867 16.5537 16.5536 13.4868 16.5536 9.70352C16.5536 5.92025 13.4867 2.8533 9.7034 2.8533C5.92013 2.8533 2.85318 5.92025 2.85318 9.70352C2.85318 13.4868 5.92013 16.5537 9.7034 16.5537ZM8.84712 12.2724H10.5597V13.9849H8.84712V12.2724ZM10.5597 10.8639V11.4161H8.84712V10.1317C8.84712 9.65874 9.23048 9.27538 9.7034 9.27538C10.4127 9.27538 10.9878 8.70031 10.9878 7.99097C10.9878 7.2816 10.4127 6.70655 9.7034 6.70655C9.08029 6.70655 8.56078 7.1503 8.44365 7.73903L6.76407 7.4031C7.03727 6.0294 8.24944 4.994 9.7034 4.994C11.3586 4.994 12.7004 6.33578 12.7004 7.99097C12.7004 9.3486 11.7976 10.4954 10.5597 10.8639Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/support.svg
  var support_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M16 13.3487C15.9994 15.1377 14.789 16.633 13.1723 17L12.7895 15.8073C13.5119 15.6848 14.1259 15.2274 14.4789 14.5936H13C12.3372 14.5936 11.8 14.0357 11.8 13.3473V10.8547C11.8 10.1664 12.3372 9.60839 13 9.60839H14.7629C14.4676 7.14923 12.4478 5.24631 10 5.24631C7.55223 5.24631 5.53239 7.14923 5.23713 9.60839H7C7.66274 9.60839 8.2 10.1664 8.2 10.8547V13.3473C8.2 14.0357 7.66274 14.5936 7 14.5936H5.2C4.53726 14.5936 4 14.0357 4 13.3473V10.2315C4 6.78996 6.68629 4 10 4C13.3137 4 16 6.78996 16 10.2315V10.8539V10.8547V13.3473V13.3487ZM14.8 13.3473V10.8547H13V13.3473H14.8ZM5.2 10.8547V13.3473H7V10.8547H5.2Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/about.svg
  var about_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M10 16.9999C6.134 16.9999 3 13.8658 3 9.99988C3 6.13388 6.134 2.99988 10 2.99988C13.866 2.99988 17 6.13388 17 9.99988C17 13.8658 13.866 16.9999 10 16.9999ZM10 15.5999C13.0928 15.5999 15.6 13.0927 15.6 9.99988C15.6 6.90708 13.0928 4.39988 10 4.39988C6.9072 4.39988 4.4 6.90708 4.4 9.99988C4.4 13.0927 6.9072 15.5999 10 15.5999ZM9.3 6.49988H10.7V7.89988H9.3V6.49988ZM9.3 9.29988H10.7V13.4999H9.3V9.29988Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/microphone.svg
  var microphone_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M10.5 3C12.3301 3 13.8137 4.49239 13.8137 6.33333V10.3333C13.8137 12.1743 12.3301 13.6667 10.5 13.6667C8.66987 13.6667 7.18627 12.1743 7.18627 10.3333V6.33333C7.18627 4.49239 8.66987 3 10.5 3ZM4 11.641L5.3 11.3795C5.78333 13.8241 7.92775 15.6667 10.5 15.6667C13.0722 15.6667 15.2166 13.8241 15.7 11.3795L17 11.641C16.3958 14.6968 13.7153 17 10.5 17C7.28469 17 4.60417 14.6968 4 11.641Z" fill="currentColor"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/icons/error-filled.svg
  var error_filled_default = '<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="invox-bar-icon__error" viewBox="0 0 16 16">\r\n    <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/assets/invoxbarIconCollection.enum.ts
  var InvoxBarIconCollection = {
    INVOX: invox_default,
    INVOX_WHITE: invox_white_default,
    INVOX_MEDICAL: invox_medical_default,
    DICTIONARY: dictionary_default,
    TEMPLATES: templates_default,
    TRANSFORMATIONS: transformations_default,
    AI_SERVICES: ai_services_default,
    INTELLIGENT_FORMATTING: intelligent_formatting_default,
    QUALITY_REVIEW: quality_review_default,
    AUTO_FILL_TEMPLATES: auto_fill_templates_default,
    PROFILE: profile_default,
    HELP: help_default,
    SUPPORT: support_default,
    ABOUT: about_default,
    MICROPHONE: microphone_default,
    ERROR_FILLED: error_filled_default
  };

  // libs/integrations/invox-bar/src/components/buttons/button.ts
  var Button = class extends BaseComponent {
    constructor() {
      super();
      this._tooltip = "";
      this._icon = "";
      this._classList = [];
      this._callback = () => {
      };
      this._classList = ["invox-bar__button"];
    }
    setTooltip(tooltip) {
      this._tooltip = tooltip;
      return this;
    }
    setIcon(icon) {
      this._icon = icon;
      return this;
    }
    addClass(newClass) {
      this._classList.push(newClass);
    }
    setCallback(callback) {
      this._callback = callback;
      return this;
    }
    create() {
      const element = this.createElement();
      this.addEvent(element, "click", () => this.setBehaviour(element));
      return element;
    }
    createElement() {
      const buttonElement = document.createElement("button");
      if (this._classList && this._classList.length > 0) {
        this._classList.forEach((classElement) => buttonElement.classList.add(classElement));
      }
      this._tooltip && (buttonElement.title = this._tooltip);
      this._icon && (buttonElement.innerHTML = this._icon);
      return buttonElement;
    }
    setBehaviour(element) {
      this._callback();
    }
  };

  // libs/integrations/invox-bar/src/components/recognizer/microphoneButton.ts
  var MicrophoneButton = class extends Button {
    constructor() {
      super();
      this.initComponent();
    }
    initComponent() {
      this.addClass("invox-bar__microphone-button");
      this.setCallback(() => this.switchDictation());
    }
    create() {
      this._buttonElement = this.createElement();
      this.addEvent(this._buttonElement, "click", () => this.setBehaviour(this._buttonElement));
      this.changeMicrophoneDisabled();
      return this._buttonElement;
    }
    switchDictation() {
      if (this.hasMicrophoneAccess()) {
        if (this._buttonElement.classList.contains("recording")) {
          this._buttonElement.classList.add("stopping");
        }
        INVOX.SwitchDictation();
      }
    }
    hasMicrophoneAccess() {
      const session = INVOX.GetCurrentSession();
      const audioStatus = session.getAudioSource().Status;
      return audioStatus !== INVOX.audioStatus.NOT_ACCESS;
    }
    isSessionDisconnected() {
      return INVOX.GetCurrentSession().isDisconnected();
    }
    changeMicrophoneRunning() {
      if (!this.hasMicrophoneAccess()) {
        this.changeMicrophoneDisabled();
        return;
      }
      this._buttonElement.title = `${i18n.getLangResources().MICROPHONE_ACTIONS.LISTENING}: ${INVOX.GetMicrophoneName()}`;
      this._buttonElement.innerHTML = `
            ${InvoxBarIconCollection.MICROPHONE}
            <span class="invox-bar__microphone-running-effect"></span>
        `;
      this._buttonElement.classList.remove("disabled");
      this._buttonElement.classList.add("recording");
      this._buttonElement.disabled = false;
    }
    changeMicrophonePaused() {
      const micOk = this.hasMicrophoneAccess();
      const disconnected = this.isSessionDisconnected();
      if (!micOk || disconnected) {
        this.changeMicrophoneDisabled();
        return;
      }
      this._buttonElement.title = `${i18n.getLangResources().MICROPHONE_ACTIONS.PAUSED}: ${INVOX.GetMicrophoneName()}`;
      this._buttonElement.innerHTML = InvoxBarIconCollection.MICROPHONE;
      this._buttonElement.classList.remove("disabled");
      this._buttonElement.classList.remove("recording");
      this._buttonElement.classList.remove("stopping");
      this._buttonElement.disabled = false;
    }
    changeMicrophoneReady() {
      const micOk = this.hasMicrophoneAccess();
      const disconnected = this.isSessionDisconnected();
      if (!micOk || disconnected) {
        this.changeMicrophoneDisabled();
        return;
      }
      this._buttonElement.title = `${i18n.getLangResources().MICROPHONE_ACTIONS.READY}: ${INVOX.GetMicrophoneName()}`;
      this._buttonElement.innerHTML = InvoxBarIconCollection.MICROPHONE;
      this._buttonElement.classList.remove("disabled");
      this._buttonElement.classList.remove("recording");
      this._buttonElement.classList.remove("stopping");
      this._buttonElement.disabled = false;
    }
    changeMicrophoneDisabled() {
      this._buttonElement.title = i18n.getLangResources().MICROPHONE_ACTIONS.NOT_ACCESS;
      this._buttonElement.innerHTML = InvoxBarIconCollection.MICROPHONE;
      this._buttonElement.classList.add("disabled");
      this._buttonElement.classList.remove("recording");
      this._buttonElement.classList.remove("stopping");
      this._buttonElement.disabled = true;
    }
  };

  // libs/integrations/invox-bar/src/components/recognizer/vumeter.ts
  var Vumeter = class extends BaseComponent {
    create() {
      this._innerBarsElement = document.createElement("label");
      this._innerBarsElement.setAttribute("class", "invox-bar__vumeter-bars");
      this._innerBarsElement.innerText = "||||||||||||||||||||||||||||||||";
      const innerBarsCover = document.createElement("div");
      innerBarsCover.setAttribute("class", "invox-bar__vumeter-bars-cover");
      const vumeterElement = document.createElement("div");
      vumeterElement.setAttribute("class", "invox-bar__vumeter-container");
      vumeterElement.appendChild(this._innerBarsElement);
      vumeterElement.appendChild(innerBarsCover);
      this.customizeVumeter(innerBarsCover, vumeterElement);
      return vumeterElement;
    }
    customizeVumeter(barsCoverElement, vumeterElement) {
      INVOX.OnUpdateVumeterMicActivity(function(activity) {
        const percent = `${100 - activity}%`;
        barsCoverElement.style.width = percent;
      });
    }
    setActive() {
      this._innerBarsElement.classList.add("active");
    }
    setInactive() {
      this._innerBarsElement.classList.remove("active");
    }
  };

  // libs/integrations/invox-bar/src/components/recognizer/recognizer.ts
  var Recognizer = class extends BaseComponent {
    create() {
      const recognizerContainerElement = document.createElement("div");
      recognizerContainerElement.setAttribute("class", "invox-bar__recognizer-container");
      this._microphoneButtonElement = new MicrophoneButton();
      this._vumeterElement = new Vumeter();
      recognizerContainerElement.appendChild(this._microphoneButtonElement.create());
      recognizerContainerElement.appendChild(this._vumeterElement.create());
      this.customizeRecognizer();
      return recognizerContainerElement;
    }
    setPaused() {
      this._microphoneButtonElement.changeMicrophonePaused();
      this._vumeterElement.setInactive();
    }
    setReady() {
      this._microphoneButtonElement.changeMicrophoneReady();
      this._vumeterElement.setInactive();
      this._onReadyCallback && this._onReadyCallback();
    }
    setOnReadyCallback(callback) {
      this._onReadyCallback = callback;
      return this;
    }
    setOnRunningCallback(callback) {
      this._onRunningCallback = callback;
      return this;
    }
    setRunning() {
      this._microphoneButtonElement.changeMicrophoneRunning();
      this._vumeterElement.setActive();
      this._onRunningCallback && this._onRunningCallback();
    }
    setDisabled() {
      this._vumeterElement.setInactive();
      this._microphoneButtonElement.changeMicrophoneDisabled();
    }
    customizeRecognizer() {
      INVOX.OnGrantedAudioSource(() => {
        INVOX.LogInfo("Audio permissions granted");
        this.setReady();
      });
      INVOX.OnDeniedAudioSource(() => {
        INVOX.LogWarn("Audio permissions denied");
        this.setDisabled();
      });
      INVOX.OnPausedRecognizer(() => {
        INVOX.LogInfo("Dictation paused");
        this.setPaused();
      });
      INVOX.OnRunningRecognizer(() => {
        INVOX.LogInfo("Dictation running...");
        this.setRunning();
      });
      INVOX.OnErrorRecognizer(() => {
        INVOX.LogFatal("An error occurred in the recognizer engine. Dictation is not available");
        this.setDisabled();
      });
    }
  };

  // libs/integrations/invox-bar/src/components/menu/dropdownMenu.ts
  var DropdownMenu = class extends BaseComponent {
    constructor(icon) {
      super();
      this._menuOptionList = [];
      this._icon = icon || InvoxBarIconCollection.INVOX;
    }
    create() {
      const menuElement = this.createMenu();
      const buttonElement = new Button().setIcon(this._icon).setCallback(() => this.triggerHoverEffect(buttonElement)).create();
      if (!this._icon || this._icon === InvoxBarIconCollection.INVOX) {
        const hoverIcon = document.createElement("span");
        hoverIcon.className = "invox-bar__icon-hover";
        hoverIcon.innerHTML = InvoxBarIconCollection.INVOX_WHITE;
        const normalIcon = document.createElement("span");
        normalIcon.className = "invox-bar__icon-normal";
        normalIcon.innerHTML = this._icon || InvoxBarIconCollection.INVOX;
        buttonElement.innerHTML = "";
        buttonElement.appendChild(normalIcon);
        buttonElement.appendChild(hoverIcon);
      }
      const dropdownElement = document.createElement("div");
      dropdownElement.setAttribute("class", "invox-bar__dropdown-menu");
      dropdownElement.appendChild(buttonElement);
      dropdownElement.appendChild(menuElement);
      return dropdownElement;
    }
    triggerHoverEffect(menuButtonElement) {
      const mouseoverEvent = new Event("mouseover");
      menuButtonElement.dispatchEvent(mouseoverEvent);
    }
    createMenu() {
      const footerElement = this.createFooter();
      const menuElement = document.createElement("div");
      menuElement.setAttribute("class", "invox-bar__dropdown-menu-content");
      this._menuOptionList.forEach(
        (optionElement) => menuElement.appendChild(optionElement)
      );
      menuElement.appendChild(footerElement);
      return menuElement;
    }
    createFooter() {
      const footerElement = document.createElement("div");
      footerElement.setAttribute(
        "class",
        "invox-bar__dropdown-menu-content-footer"
      );
      return footerElement;
    }
    createMenuOptionButton(icon, name, callback) {
      const optionElement = document.createElement("button");
      optionElement.setAttribute("class", "invox-bar__dropdown-menu-option");
      optionElement.innerHTML = `${icon}<span>${name}</span>`;
      this.addEvent(optionElement, "click", callback);
      return optionElement;
    }
    addOption(icon, optionName, callback) {
      const helpButton = this.createMenuOptionButton(
        icon,
        optionName,
        () => callback()
      );
      this._menuOptionList.push(helpButton);
      return this;
    }
  };

  // libs/integrations/invox-bar/src/components/buttons/baseButtonGroup.ts
  var BaseButtonGroup = class extends BaseComponent {
    constructor() {
      super();
      this._buttons = [];
      this.initComponent();
    }
    create() {
      const buttonGroupElement = document.createElement("div");
      buttonGroupElement.setAttribute("class", "invox-bar__button-group");
      this._buttons && this._buttons.forEach((button) => buttonGroupElement.appendChild(button));
      return buttonGroupElement;
    }
    addChild(button) {
      this._buttons.push(button);
    }
    hasAnyButton() {
      return this._buttons && this._buttons.length > 0;
    }
  };

  // libs/integrations/invox-bar/src/components/dialogs/aiServicesDropdown.ts
  var AiServicesDropdown = class extends BaseComponent {
    constructor() {
      super(...arguments);
      this._onIntelligentFormatting = null;
      this._onQualityReview = null;
      this._onAutoFillTemplates = null;
    }
    setOnIntelligentFormatting(callback) {
      this._onIntelligentFormatting = callback;
      return this;
    }
    setOnQualityReview(callback) {
      this._onQualityReview = callback;
      return this;
    }
    setOnAutoFillTemplates(callback) {
      this._onAutoFillTemplates = callback;
      return this;
    }
    create() {
      const langResources = i18n.getLangResources().AI_SERVICES_ACTIONS;
      const buttonElement = new Button().setIcon(InvoxBarIconCollection.AI_SERVICES).setTooltip(langResources.TITLE).create();
      const dropdownContentElement = this.createDropdownContent(langResources);
      const dropdownElement = document.createElement("div");
      dropdownElement.setAttribute("class", "invox-bar__dropdown-menu");
      dropdownElement.appendChild(buttonElement);
      dropdownElement.appendChild(dropdownContentElement);
      return dropdownElement;
    }
    createDropdownContent(langResources) {
      const contentElement = document.createElement("div");
      contentElement.setAttribute("class", "invox-bar__dropdown-menu-content");
      if (this._onIntelligentFormatting) {
        contentElement.appendChild(
          this.createOption(
            InvoxBarIconCollection.INTELLIGENT_FORMATTING,
            langResources.INTELLIGENT_FORMATTING,
            this._onIntelligentFormatting
          )
        );
      }
      if (this._onQualityReview) {
        contentElement.appendChild(
          this.createOption(
            InvoxBarIconCollection.QUALITY_REVIEW,
            langResources.QUALITY_REVIEW,
            this._onQualityReview
          )
        );
      }
      if (this._onAutoFillTemplates) {
        contentElement.appendChild(
          this.createOption(
            InvoxBarIconCollection.AUTO_FILL_TEMPLATES,
            langResources.AUTO_FILL_TEMPLATES,
            this._onAutoFillTemplates
          )
        );
      }
      return contentElement;
    }
    createOption(icon, label, callback) {
      const optionElement = document.createElement("button");
      optionElement.setAttribute("class", "invox-bar__dropdown-menu-option");
      optionElement.innerHTML = `${icon}<span>${label}</span>`;
      this.addEvent(optionElement, "click", callback);
      return optionElement;
    }
  };

  // libs/integrations/invox-bar/src/components/dialogs/dialogsButtonGroup.ts
  var DialogsButtonGroup = class extends BaseButtonGroup {
    setDictionaryButton(callback) {
      const tooltip = i18n.getLangResources().DICTIONARY_ACTIONS.TITLE;
      const dictionaryButton = this.createButton(InvoxBarIconCollection.DICTIONARY, tooltip, () => callback());
      this.addChild(dictionaryButton);
    }
    setTemplatesButton(callback) {
      const tooltip = i18n.getLangResources().TEMPLATES_ACTIONS.TITLE;
      const templatesButton = this.createButton(InvoxBarIconCollection.TEMPLATES, tooltip, () => callback());
      this.addChild(templatesButton);
    }
    setTransformationsButton(callback) {
      const tooltip = i18n.getLangResources().TRANSFORMATIONS_ACTIONS.TITLE;
      const transformationsButton = this.createButton(InvoxBarIconCollection.TRANSFORMATIONS, tooltip, () => callback());
      this.addChild(transformationsButton);
    }
    setAiServicesButton(onIntelligentFormatting, onQualityReview, onAutoFillTemplates) {
      if (!onIntelligentFormatting && !onQualityReview && !onAutoFillTemplates)
        return;
      const dropdown = new AiServicesDropdown();
      onIntelligentFormatting && dropdown.setOnIntelligentFormatting(onIntelligentFormatting);
      onQualityReview && dropdown.setOnQualityReview(onQualityReview);
      onAutoFillTemplates && dropdown.setOnAutoFillTemplates(onAutoFillTemplates);
      this.addChild(dropdown.create());
    }
    createButton(icon, tooltip, callback) {
      return new Button().setIcon(icon).setTooltip(tooltip).setCallback(() => callback()).create();
    }
  };

  // libs/integrations/invox-bar/src/components/adaptation-status/adaptationSpinner.ts
  var INVOXAdaptationSpinner = class extends HTMLElement {
    constructor() {
      super();
      this._isAdaptationInProcess = false;
      this._listeners = [];
    }
    static get observedAttributes() {
      return ["on-started-tooltip", "on-finished-tooltip", "on-error-tooltip", "on-rejected-tooltip"];
    }
    setListeners(listeners) {
      this._listeners = listeners;
    }
    connectedCallback() {
      this.render();
    }
    render() {
      this.hidden = true;
      this.innerHTML = `
            <div class="invox-bar__button invox-bar__adaptation-status">
                <span class="invox-loader__spinner">
                    <span class="invox-loader__inner-icon"></span>
                </span>
            </div>
        `;
      INVOX.OnRejectAdaptation((message) => {
        if (this._isAdaptationInProcess) {
          return;
        }
        const feedbackMessage = this.getAttribute("on-rejected-tooltip") || "";
        this._listeners.forEach((element) => {
          element.handleRejectedAdaptation && element.handleRejectedAdaptation(feedbackMessage);
        });
      });
      INVOX.OnStartAdaptation((message) => {
        if (this._isAdaptationInProcess) {
          return;
        }
        const feedbackMessage = this.getAttribute("on-started-tooltip") || "";
        this._listeners.forEach((element) => {
          element.handleStartedAdaptation && element.handleStartedAdaptation(feedbackMessage);
        });
        this._isAdaptationInProcess = true;
        this.setShowAnimation();
        this.title = feedbackMessage;
      });
      INVOX.OnFinishAdaptation((message, adaptationInfo) => {
        const { duration } = adaptationInfo;
        if (duration <= 0) {
          clearTimeout(this._showTimeout);
          this.hideElement();
          this.restartStyles();
          return;
        }
        const feedbackMessage = this.getAttribute("on-finished-tooltip") || "";
        this._listeners.forEach((element) => {
          element.handleFinishedAdaptation && element.handleFinishedAdaptation(feedbackMessage);
        });
        this.title = feedbackMessage;
        this.setFinishedAnimation().then(() => {
          this._isAdaptationInProcess = false;
          this.setHideAnimation();
        });
      });
      INVOX.OnErrorAdaptation((message) => {
        const feedbackMessage = this.getAttribute("on-error-tooltip") || "";
        this._listeners.forEach((element) => {
          element.handleErrorAdaptation && element.handleErrorAdaptation(feedbackMessage);
        });
        this.title = feedbackMessage;
        this.setErrorAnimation().then(() => {
          this._isAdaptationInProcess = false;
          this.setHideAnimation();
        });
      });
    }
    restartStyles() {
      this.title = "";
      const loader = document.querySelector(".invox-loader__spinner");
      loader == null ? void 0 : loader.classList.remove("finished");
      const checkmark = document.querySelector(".invox-loader__inner-icon");
      checkmark == null ? void 0 : checkmark.classList.remove("draw-checkmark");
      const adaptationStatus = document.querySelector(".invox-bar__adaptation-status");
      adaptationStatus == null ? void 0 : adaptationStatus.classList.remove("invox-bar__animation--fadeout");
      adaptationStatus == null ? void 0 : adaptationStatus.classList.remove("finished");
    }
    showElement() {
      this.hidden = false;
    }
    hideElement() {
      this.hidden = true;
    }
    setHideAnimation() {
      this.startHideAnimation().then(() => {
        this.hideElement();
      });
    }
    setShowAnimation() {
      const SECONDS_TO_AVOID_BLINK = 1;
      this._showTimeout = setTimeout(() => {
        this.showElement();
        this.startShowAnimation();
      }, SECONDS_TO_AVOID_BLINK * 1e3);
    }
    startHideAnimation() {
      return new Promise((resolve) => {
        const SECONDS_BEFORE_HIDE_ELEMENT = 2.3;
        const adaptationStatus = document.querySelector(".invox-bar__adaptation-status");
        adaptationStatus == null ? void 0 : adaptationStatus.classList.remove("invox-bar__animation--fadein");
        adaptationStatus == null ? void 0 : adaptationStatus.classList.add("invox-bar__animation--fadeout");
        setTimeout(() => {
          this.restartStyles();
          resolve();
        }, SECONDS_BEFORE_HIDE_ELEMENT * 1e3);
      });
    }
    startShowAnimation() {
      this.classList.add("invox-bar__animation--fadein");
    }
    setFinishedAnimation() {
      return new Promise((resolve) => {
        const SECONDS_TO_KEEP_ANIMATION = 8;
        const adaptationStatus = document.querySelector(".invox-bar__adaptation-status");
        adaptationStatus == null ? void 0 : adaptationStatus.classList.add("finished");
        const loader = document.querySelector(".invox-loader__spinner");
        loader == null ? void 0 : loader.classList.add("finished");
        const checkmark = document.querySelector(".invox-loader__inner-icon");
        checkmark == null ? void 0 : checkmark.classList.add("draw-checkmark");
        setTimeout(() => {
          resolve();
        }, SECONDS_TO_KEEP_ANIMATION * 1e3);
      });
    }
    setErrorAnimation() {
      return new Promise((resolve) => {
        const SECONDS_TO_KEEP_ANIMATION = 8;
        const adaptationStatus = document.querySelector(".invox-bar__adaptation-status");
        adaptationStatus == null ? void 0 : adaptationStatus.classList.add("error");
        const loader = document.querySelector(".invox-loader__spinner");
        loader == null ? void 0 : loader.classList.add("finished");
        const checkmark = document.querySelector(".invox-loader__inner-icon");
        checkmark == null ? void 0 : checkmark.classList.add("draw-exclamation");
        setTimeout(() => {
          resolve();
        }, SECONDS_TO_KEEP_ANIMATION * 1e3);
      });
    }
  };

  // libs/integrations/invox-bar/src/view/views/home.view.ts
  var HomeView = class extends BaseLayerComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      this._viewManager = viewManager;
      this.initComponent();
    }
    initComponent() {
      this.setClass("invox-bar__home-view");
      this.setNextView(() => this._viewManager.printSplashScreenView());
    }
    setDictionaryBuilder(builderCallback) {
      this._dictionaryViewBuilder = builderCallback;
    }
    setTemplatesBuilder(builderCallback) {
      this._templatesViewBuilder = builderCallback;
    }
    setTransformationsBuilder(builderCallback) {
      this._transformationsViewBuilder = builderCallback;
    }
    setAboutViewBuilder(builderCallback) {
      this._aboutViewBuilder = builderCallback;
    }
    setProfileViewBuilder(builderCallback) {
      this._profileViewBuilder = builderCallback;
    }
    setIntelligentFormattingBuilder(builderCallback) {
      this._intelligentFormattingBuilder = builderCallback;
    }
    setQualityReviewBuilder(builderCallback) {
      this._qualityReviewBuilder = builderCallback;
    }
    setAutoFillTemplatesBuilder(builderCallback) {
      this._autoFillTemplatesBuilder = builderCallback;
    }
    createContent() {
      const componentsList = [];
      const recognizer = new Recognizer();
      const statusbar = new Statusbar().setOnErrorCallback(() => {
        var _a;
        if ((_a = INVOX.GetCurrentSession()) == null ? void 0 : _a.isReconnecting)
          return;
        recognizer.setDisabled();
      }).setOnMicrophoneConnectedCallback(() => recognizer.setPaused()).setOnMicrophoneDisconnectedCallback(() => recognizer.setDisabled());
      recognizer.setOnReadyCallback(() => {
        statusbar.printReadyMessage(i18n.getLangResources().MICROPHONE_ACTIONS.READY);
      });
      recognizer.setOnRunningCallback(() => {
        statusbar.clearReadyState();
      });
      this.buildDictionaryView();
      this.buildTemplatesView();
      this.buildTransformationsView();
      this.buildProfileView();
      this.buildAboutView();
      this.buildIntelligentFormattingView();
      this.buildQualityReviewView();
      this.buildAutoFillTemplatesView();
      const dialogButtonsElement = this.createDialogsButtons();
      const adaptationStatusElement = this.createAdaptationStatus([statusbar]);
      const dropdownMenuElement = this.createDropdownMenu();
      const helpDropdownMenuElement = this.createHelpDropdownMenu();
      const profileElement = this.createProfileButton();
      componentsList.push(dropdownMenuElement);
      dialogButtonsElement.hasAnyButton() && componentsList.push(dialogButtonsElement.create());
      componentsList.push(recognizer.create());
      componentsList.push(statusbar.create());
      componentsList.push(adaptationStatusElement);
      componentsList.push(profileElement);
      componentsList.push(helpDropdownMenuElement);
      return componentsList;
    }
    buildDictionaryView() {
      this._dictionaryViewBuilder && (this._dictionaryView = this._dictionaryViewBuilder(this._viewManager.getContainerId()));
    }
    buildTemplatesView() {
      this._templatesViewBuilder && (this._templatesView = this._templatesViewBuilder(this._viewManager.getContainerId()));
    }
    buildTransformationsView() {
      this._transformationsViewBuilder && (this._transformationsView = this._transformationsViewBuilder(this._viewManager.getContainerId()));
    }
    buildProfileView() {
      this._profileViewBuilder && (this._profileView = this._profileViewBuilder(this._viewManager.getContainerId()));
    }
    buildAboutView() {
      this._aboutViewBuilder && (this._aboutView = this._aboutViewBuilder(this._viewManager.getContainerId()));
    }
    buildIntelligentFormattingView() {
      this._intelligentFormattingBuilder && (this._intelligentFormattingView = this._intelligentFormattingBuilder(this._viewManager.getContainerId()));
    }
    buildQualityReviewView() {
      this._qualityReviewBuilder && (this._qualityReviewView = this._qualityReviewBuilder(this._viewManager.getContainerId()));
    }
    buildAutoFillTemplatesView() {
      this._autoFillTemplatesBuilder && (this._autoFillTemplatesView = this._autoFillTemplatesBuilder(this._viewManager.getContainerId()));
    }
    createAdaptationStatus(listeners) {
      const langResources = i18n.getLangResources();
      const adaptationStatusElement = document.createElement("invox-adaptation-spinner");
      adaptationStatusElement.setAttribute("on-started-tooltip", langResources.ADAPTATION.STARTED);
      adaptationStatusElement.setAttribute("on-finished-tooltip", langResources.ADAPTATION.FINISHED);
      adaptationStatusElement.setAttribute("on-error-tooltip", langResources.ADAPTATION.ERROR);
      adaptationStatusElement.setAttribute("on-rejected-tooltip", langResources.ADAPTATION.REJECTED);
      adaptationStatusElement.setListeners(listeners);
      return adaptationStatusElement;
    }
    createDialogsButtons() {
      const buttonsGroup = new DialogsButtonGroup();
      buttonsGroup.setAiServicesButton(
        this._intelligentFormattingBuilder ? () => {
          var _a;
          return (_a = this._intelligentFormattingView) == null ? void 0 : _a.show();
        } : void 0,
        this._qualityReviewBuilder ? () => {
          var _a;
          return (_a = this._qualityReviewView) == null ? void 0 : _a.show();
        } : void 0,
        this._autoFillTemplatesBuilder ? () => {
          var _a;
          return (_a = this._autoFillTemplatesView) == null ? void 0 : _a.show();
        } : void 0
      );
      return buttonsGroup;
    }
    createDropdownMenu() {
      const langResources = i18n.getLangResources();
      const dropdownMenu = new DropdownMenu();
      if (this._dictionaryView) {
        dropdownMenu.addOption(InvoxBarIconCollection.DICTIONARY, langResources.DICTIONARY_ACTIONS.TITLE, () => this._dictionaryView.show());
      }
      if (this._templatesView) {
        dropdownMenu.addOption(InvoxBarIconCollection.TEMPLATES, langResources.TEMPLATES_ACTIONS.TITLE, () => this._templatesView.show());
      }
      if (this._transformationsView) {
        dropdownMenu.addOption(InvoxBarIconCollection.TRANSFORMATIONS, langResources.TRANSFORMATIONS_ACTIONS.TITLE, () => this._transformationsView.show());
      }
      return dropdownMenu.create();
    }
    tryGetUserGuideHelpUrl() {
      try {
        return INVOX.GetUserGuideHelpUrl();
      } catch (error) {
        return "";
      }
    }
    redirectHelpGuide() {
      try {
        INVOX.ShowHelp();
      } catch (error) {
        INVOX.LogError(`Unable to show help. Error: ${error}`);
        INVOX.LogWarn("You can define this behaviour using INVOX.OnShowHelp from the INVOX Medical SDK.");
      }
    }
    redirectSupport() {
      const supportUrl = INVOX.GetSupportUrl();
      window.open(supportUrl, "_blank");
    }
    createProfileButton() {
      const profileElement = document.createElement("div");
      profileElement.setAttribute("class", "invox-bar__profile-info");
      const userInfo = INVOX.GetUserInfo();
      const username = (userInfo == null ? void 0 : userInfo.Name) || (userInfo == null ? void 0 : userInfo.Login) || "";
      profileElement.innerHTML = `${InvoxBarIconCollection.PROFILE}<span class="invox-bar__profile-username">${username}</span>`;
      profileElement.title = username;
      if (this._profileView) {
        profileElement.style.cursor = "pointer";
        profileElement.addEventListener("click", () => this._profileView.show());
      }
      return profileElement;
    }
    createHelpDropdownMenu() {
      const langResources = i18n.getLangResources();
      const helpDropdownMenu = new DropdownMenu(InvoxBarIconCollection.HELP);
      if (this.tryGetUserGuideHelpUrl() !== "") {
        helpDropdownMenu.addOption(InvoxBarIconCollection.HELP, langResources.HELP_ACTIONS.TITLE, () => this.redirectHelpGuide());
      }
      if (INVOX.GetSupportUrl() !== "") {
        helpDropdownMenu.addOption(InvoxBarIconCollection.SUPPORT, langResources.SUPPORT_ACTIONS.TITLE, () => this.redirectSupport());
      }
      if (this._aboutView) {
        helpDropdownMenu.addOption(InvoxBarIconCollection.ABOUT, langResources.ABOUT_ACTIONS.TITLE, () => this._aboutView.show());
      }
      return helpDropdownMenu.create();
    }
    componentWillUnmount() {
      var _a, _b, _c;
      this._aboutView.remove();
      this._profileView.remove();
      this._dictionaryView.remove();
      this._templatesView.remove();
      this._transformationsView.remove();
      (_a = this._intelligentFormattingView) == null ? void 0 : _a.remove();
      (_b = this._qualityReviewView) == null ? void 0 : _b.remove();
      (_c = this._autoFillTemplatesView) == null ? void 0 : _c.remove();
    }
  };
  customElements.define("invox-adaptation-spinner", INVOXAdaptationSpinner);

  // libs/integrations/invox-bar/src/view/views/viewContainer.ts
  var ViewContainer = class extends BaseComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      this._viewManager = viewManager;
      this._invoxBarId = "invox-bar-content";
      this._currentView = void 0;
      this._previewsView = void 0;
    }
    getId() {
      return this._invoxBarId;
    }
    create(containerDestinationId) {
      INVOX.LogDebug("Creating INVOX Bar...");
      this.invoxBarElement = document.createElement("div");
      this.invoxBarElement.id = this._invoxBarId;
      this.invoxBarElement.setAttribute("class", "invox-bar__container");
      const containerDestinationElement = DOMUtility.getElement(containerDestinationId);
      containerDestinationElement == null ? void 0 : containerDestinationElement.appendChild(this.invoxBarElement);
      this.componentDidMount();
    }
    remove() {
      DOMUtility.removeElement(this._invoxBarId);
    }
    show() {
      if (!this.invoxBarElement.classList.contains("active")) {
        this.invoxBarElement.classList.add("active");
      }
    }
    hide() {
      if (this.invoxBarElement.classList.contains("active")) {
        this.invoxBarElement.classList.remove("active");
      }
    }
    refresh() {
      if (!this._currentView) {
        return;
      }
      try {
        this.removeContent();
        this._currentView.create(this._invoxBarId);
      } catch (error) {
        INVOX.LogFatal(`An error occurred during view creation. Error: ${error}`);
      }
    }
    nextView() {
      var _a;
      (_a = this._currentView) == null ? void 0 : _a.next();
    }
    setCurrentView(currentView) {
      var _a;
      (_a = this._currentView) == null ? void 0 : _a.destroy();
      this._previewsView = this._currentView;
      this._currentView = currentView;
    }
    componentDidMount() {
    }
    componentWillUnmount() {
    }
    removeContent() {
      DOMUtility.getElement(this._invoxBarId).innerHTML = "";
    }
  };

  // libs/integrations/invox-bar/src/view/views/loading.view.ts
  var LoadingView = class extends BaseLayerComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      this._viewManager = viewManager;
      this.initComponent();
    }
    initComponent() {
      this.setClass("invox-bar__loading-view");
      this.setNextView(() => this._viewManager.printHomeView());
    }
    createContent() {
      this._percentElement = document.createElement("label");
      this._percentElement.setAttribute("class", "invox-bar__progressbar-percent");
      this._percentElement.innerText = "0%";
      this._statusMessageElement = document.createElement("label");
      this._statusMessageElement.setAttribute("class", "invox-bar__progressbar-message");
      this._messageContainerElement = document.createElement("div");
      this._messageContainerElement.setAttribute("class", "invox-bar__progressbar-error");
      this._messageContainerElement.innerHTML = InvoxBarIconCollection.ERROR_FILLED;
      this._messageContainerElement.appendChild(this._statusMessageElement);
      const overlayContentElement = document.createElement("div");
      overlayContentElement.appendChild(this._percentElement);
      overlayContentElement.appendChild(this._messageContainerElement);
      this._progressBarElement = document.createElement("span");
      this._progressBarElement.setAttribute("class", "invox-bar__progressbar-width");
      this.customizeLoading();
      return [overlayContentElement, this._progressBarElement];
    }
    customizeLoading() {
      INVOX.CustomizeComponents(() => {
        INVOX.OnChangeProgressBar((message) => this.updateProgressBar(message));
        INVOX.OnChangeStatusBar((message, type) => this.printStatus(message, type));
        INVOX.OnFinishProgressBar(() => this._viewManager.printNextView());
        INVOX.OnStartedRecognizer(() => INVOX.SetDictationPaused());
      });
    }
    updateProgressBar(message) {
      const percent = +message.Percent <= 100 ? `${+message.Percent}%` : "100%";
      this._percentElement.innerText = percent;
      this._progressBarElement.style.width = percent;
    }
    printStatus(message, type) {
      const tooltip = message;
      if (type === INVOX.StatusMessageTypeEnum.ERROR) {
        INVOX.LogError(`Loading error: ${message}`);
        this.changeStyleToError();
        message = removeBreakLines(message);
      }
      this._statusMessageElement.innerText = message;
      this._statusMessageElement.title = tooltip;
      function removeBreakLines(message2) {
        return message2.replace(/(\r\n|\n)/g, "");
      }
    }
    changeStyleToError() {
      if (!this._messageContainerElement.classList.contains("active")) {
        this._messageContainerElement.classList.add("active");
      }
    }
  };

  // libs/integrations/invox-bar/src/assets/icons/invox-medical-horizontal.svg
  var invox_medical_horizontal_default = '<svg width="90" height="12" viewBox="0 0 90 12" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M-0.000244141 2.17127V2.53342e-05H2.12601V2.17127H-0.000244141ZM-0.000244141 11.1263V3.49878H2.12601V11.1263H-0.000244141Z" fill="#1E1F21"/>\r\n<path d="M5.21976 6.075V11.1263H3.09351V3.49875H5.21976V4.78125C5.81601 3.88125 6.83976 3.285 7.90851 3.285C9.59601 3.285 10.6198 4.4325 10.6198 6.17625V11.1263H8.49351V6.76125C8.49351 5.86125 8.04351 5.18625 7.01976 5.18625C6.20976 5.18625 5.57976 5.6475 5.21976 6.075Z" fill="#1E1F21"/>\r\n<path d="M12.6447 11.1263L10.7547 3.49877H12.8922L14.096 9.37127H14.681L15.8847 3.49877H18.0335L16.1435 11.1263H12.6447Z" fill="#1E1F21"/>\r\n<path d="M22.0835 11.3513C19.6197 11.3513 17.8872 9.59625 17.8872 7.30125C17.8872 5.00625 19.6197 3.285 22.0835 3.285C24.5472 3.285 26.2797 5.04 26.2797 7.30125C26.2797 9.5625 24.5472 11.3513 22.0835 11.3513ZM22.0835 9.46125C23.3547 9.46125 24.2772 8.5275 24.2772 7.29C24.2772 6.0525 23.3547 5.175 22.0835 5.175C20.8122 5.175 19.8897 6.10875 19.8897 7.29C19.8897 8.47125 20.8122 9.46125 22.0835 9.46125Z" fill="#1E1F21"/>\r\n<path d="M30.206 7.96502H29.5985L28.316 11.1263H26.0885L27.8997 7.16627L26.1897 3.49877H28.406L29.5872 6.37877H30.1835L31.3985 3.49877H33.6147L31.8935 7.12127L33.806 11.1263H31.5785L30.206 7.96502Z" fill="#1E1F21"/>\r\n<path d="M38.8685 6.075V11.1263H36.7422V3.49875H38.8685V4.78125C39.1597 4.33061 39.5572 3.95845 40.0261 3.69754C40.4949 3.43663 41.0207 3.29496 41.5572 3.285C42.7722 3.285 43.6497 3.8925 44.0322 4.905C44.3301 4.41558 44.7477 4.01005 45.2457 3.72663C45.7436 3.44321 46.3055 3.29123 46.8785 3.285C48.5435 3.285 49.556 4.4325 49.556 6.17625V11.1263H47.4522V6.76125C47.4522 5.86125 46.9797 5.18625 45.9785 5.18625C45.236 5.18625 44.6285 5.59125 44.2572 5.985V11.1263H42.131V6.76125C42.131 5.86125 41.6585 5.18625 40.646 5.18625C40.3025 5.19409 39.965 5.27784 39.6576 5.4315C39.3503 5.58515 39.0808 5.80491 38.8685 6.075Z" fill="#4B27E4"/>\r\n<path d="M54.2135 11.3513C51.896 11.3513 50.1973 9.6075 50.1973 7.2675C50.1913 6.75041 50.2873 6.23722 50.4797 5.75722C50.6721 5.27722 50.9572 4.83983 51.3186 4.47001C51.6801 4.1002 52.1109 3.8052 52.5863 3.60188C53.0618 3.39855 53.5727 3.29088 54.0898 3.285H54.1798C56.7448 3.285 58.1173 5.41125 58.1173 7.59375H52.0423C52.1998 8.82 53.0435 9.5625 54.2135 9.5625C55.0235 9.5625 55.811 9.14625 56.126 8.44875H58.0048C57.611 10.2375 56.036 11.3513 54.2135 11.3513ZM52.166 6.40125H56.081C55.8448 5.535 55.181 4.995 54.2023 4.995C53.2235 4.995 52.4473 5.535 52.166 6.40125Z" fill="#4B27E4"/>\r\n<path d="M64.5297 9.84375C63.956 10.8 63.0335 11.3512 61.9872 11.3512C60.0072 11.3512 58.4547 9.63 58.4547 7.30125C58.4547 4.9725 60.0072 3.285 61.9872 3.285C63.0335 3.285 63.956 3.83625 64.5297 4.77V0H66.5997V11.1262H64.5297V9.84375ZM62.4822 9.4275C62.9058 9.42357 63.3203 9.30417 63.6811 9.08215C64.0419 8.86012 64.3353 8.54389 64.5297 8.1675V6.44625C64.1585 5.77125 63.4047 5.18625 62.4822 5.18625C61.5597 5.18625 60.5247 6.06375 60.5247 7.29C60.5247 8.51625 61.4022 9.4275 62.4822 9.4275Z" fill="#4B27E4"/>\r\n<path d="M67.601 2.17125V0H69.7272V2.17125H67.601ZM67.601 11.1262V3.49875H69.7272V11.1262H67.601Z" fill="#4B27E4"/>\r\n<path d="M74.5872 11.3513C72.1347 11.3513 70.4022 9.59625 70.4022 7.30125C70.4022 5.00625 72.1347 3.285 74.5872 3.285C76.5447 3.285 78.1197 4.46625 78.491 6.345H76.4997C76.1847 5.65875 75.476 5.175 74.5872 5.175C73.316 5.175 72.4047 6.10875 72.4047 7.30125C72.4047 8.49375 73.3047 9.46125 74.5872 9.46125C75.476 9.46125 76.1622 9 76.4885 8.33625H78.491C78.131 10.2038 76.5222 11.3513 74.5872 11.3513Z" fill="#4B27E4"/>\r\n<path d="M84.8134 9.84375C84.2397 10.8 83.3172 11.3513 82.2597 11.3513C80.2909 11.3513 78.7272 9.63 78.7272 7.30125C78.7272 4.9725 80.2909 3.285 82.2597 3.285C83.3172 3.285 84.2397 3.83625 84.8134 4.77V3.49875H86.8722V11.1263H84.8134V9.84375ZM82.7659 9.4275C83.1888 9.41995 83.6018 9.29905 83.962 9.07742C84.3221 8.85579 84.6162 8.54155 84.8134 8.1675V6.44625C84.4422 5.77125 83.6884 5.18625 82.7659 5.18625C81.8434 5.18625 80.8084 6.06375 80.8084 7.29C80.8084 8.51625 81.6859 9.4275 82.7659 9.4275Z" fill="#4B27E4"/>\r\n<path d="M87.8734 11.1262V0H89.9997V11.1262H87.8734Z" fill="#4B27E4"/>\r\n</svg>\r\n';

  // libs/integrations/invox-bar/src/components/product/productLogo.ts
  var ProductLogo = class extends BaseComponent {
    create() {
      const brandLogoElement = document.createElement("span");
      brandLogoElement.setAttribute("class", "invox-bar__product-brand");
      brandLogoElement.innerHTML = invox_medical_horizontal_default;
      return brandLogoElement;
    }
  };

  // libs/integrations/invox-bar/src/view/views/splashScreen.view.ts
  var SplashScreenView = class extends BaseLayerComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      this._viewManager = viewManager;
      this.initComponent();
    }
    initComponent() {
      this.setClass("invox-bar__splash-screen-view");
      this.setNextView(() => this._viewManager.printLoadingView());
    }
    createContent() {
      return [new ProductLogo().create()];
    }
  };

  // libs/integrations/common/util/moduleUtility.ts
  var ModuleUtility = class {
    static isAnyModuleLoaded() {
      INVOX.LogDebug("Checking dialog modules...");
      return ModuleUtility.isDictionaryModuleLoaded() || ModuleUtility.isTemplateModuleLoaded() || ModuleUtility.isTransformationsModuleLoaded();
    }
    static createDictionaryDialog(containerId) {
      const dictionaryDialogModule = ModuleUtility.getDictionaryModule();
      return dictionaryDialogModule.create(containerId);
    }
    static createTransformationsDialog(containerId) {
      const transformationsDialogModule = ModuleUtility.getTransformationsModule();
      return transformationsDialogModule.create(containerId);
    }
    static createTemplatesDialog(containerId) {
      const templatesDialogModule = ModuleUtility.getTemplatesModule();
      return templatesDialogModule.create(containerId);
    }
    static createIntelligentFormattingDialog(containerId) {
      const intelligentFormattingModule = ModuleUtility.getIntelligentFormattingModule();
      return intelligentFormattingModule.create(containerId);
    }
    static createQualityReviewDialog(containerId) {
      const qualityReviewModule = ModuleUtility.getQualityReviewModule();
      return qualityReviewModule.create(containerId);
    }
    static createAutoFillTemplatesDialog(containerId) {
      const autoFillTemplatesModule = ModuleUtility.getAutoFillTemplatesModule();
      return autoFillTemplatesModule.create(containerId);
    }
    static isDictionaryModuleLoaded() {
      const module = ModuleUtility.getDictionaryModule();
      return ModuleUtility.checkModule(module);
    }
    static isTemplateModuleLoaded() {
      const module = ModuleUtility.getTemplatesModule();
      return ModuleUtility.checkModule(module);
    }
    static isTransformationsModuleLoaded() {
      const module = ModuleUtility.getTransformationsModule();
      return ModuleUtility.checkModule(module);
    }
    static isIntelligentFormattingModuleLoaded() {
      const module = ModuleUtility.getIntelligentFormattingModule();
      return ModuleUtility.checkModule(module);
    }
    static isQualityReviewModuleLoaded() {
      const module = ModuleUtility.getQualityReviewModule();
      return ModuleUtility.checkModule(module);
    }
    static isAutoFillTemplatesModuleLoaded() {
      const module = ModuleUtility.getAutoFillTemplatesModule();
      return ModuleUtility.checkModule(module);
    }
    static getDictionaryModule() {
      try {
        if (typeof INVOXMDComponent_Dictionary === "undefined" || !INVOXMDComponent_Dictionary) {
          return void 0;
        }
        INVOX.LogDebug("Dictionary module is loaded");
        return INVOXMDComponent_Dictionary;
      } catch (error) {
        INVOX.LogDebug("Dictionary module is not loaded");
        return void 0;
      }
    }
    static getTemplatesModule() {
      try {
        if (typeof INVOXMDComponent_Templates === "undefined" || !INVOXMDComponent_Templates) {
          return void 0;
        }
        INVOX.LogDebug("Templates module is loaded");
        return INVOXMDComponent_Templates;
      } catch (error) {
        INVOX.LogDebug("Templates module is not loaded");
        return void 0;
      }
    }
    static getTransformationsModule() {
      try {
        if (typeof INVOXMDComponent_Transformations === "undefined" || !INVOXMDComponent_Transformations) {
          return void 0;
        }
        INVOX.LogDebug("Transformations module is loaded");
        return INVOXMDComponent_Transformations;
      } catch (error) {
        INVOX.LogDebug("Transformations module is not loaded");
        return void 0;
      }
    }
    static getIntelligentFormattingModule() {
      try {
        if (typeof INVOXMDComponent_IntelligentFormatting === "undefined" || !INVOXMDComponent_IntelligentFormatting) {
          return void 0;
        }
        INVOX.LogDebug("Intelligent Formatting module is loaded");
        return INVOXMDComponent_IntelligentFormatting;
      } catch (error) {
        INVOX.LogDebug("Intelligent Formatting module is not loaded");
        return void 0;
      }
    }
    static getQualityReviewModule() {
      try {
        if (typeof INVOXMDComponent_QualityReview === "undefined" || !INVOXMDComponent_QualityReview) {
          return void 0;
        }
        INVOX.LogDebug("Quality Review module is loaded");
        return INVOXMDComponent_QualityReview;
      } catch (error) {
        INVOX.LogDebug("Quality Review module is not loaded");
        return void 0;
      }
    }
    static getAutoFillTemplatesModule() {
      try {
        if (typeof INVOXMDComponent_AutoFillTemplates === "undefined" || !INVOXMDComponent_AutoFillTemplates) {
          return void 0;
        }
        INVOX.LogDebug("Auto Fill Templates module is loaded");
        return INVOXMDComponent_AutoFillTemplates;
      } catch (error) {
        INVOX.LogDebug("Auto Fill Templates module is not loaded");
        return void 0;
      }
    }
    static checkModule(module) {
      if (!module) {
        return false;
      }
      if (!(module == null ? void 0 : module.productName) || typeof (module == null ? void 0 : module.productName) !== "string" || !(module == null ? void 0 : module.productName.includes(INVOX.productName))) {
        return false;
      }
      if (!(module == null ? void 0 : module.commit) || typeof (module == null ? void 0 : module.commit) !== "string") {
        return false;
      }
      if (!(module == null ? void 0 : module.version) || typeof (module == null ? void 0 : module.version) !== "string") {
        return false;
      }
      return true;
    }
  };

  // libs/integrations/common/components/baseDialog.ts
  var BaseDialog = class {
    constructor(idCollection, containerId) {
      if (!INVOX || typeof INVOX != "object" || !("version" in INVOX)) {
        throw new Error("The INVOX SDK is undefined. Load INVOX from your index.html.");
      }
      if (!containerId) {
        throw new Error("Container id cannot be null or undefined");
      }
      if (!DOMUtility.existsElement(containerId)) {
        throw new Error(`Container element with id ${containerId} not found`);
      }
      this._idCollection = idCollection;
    }
    show() {
      this._viewManager.show();
    }
    hide() {
      this._viewManager.hide();
    }
  };

  // libs/integrations/invox-bar/src/components/menu/about/view/aboutIdCollection.enum.ts
  var AboutIdCollection = /* @__PURE__ */ ((AboutIdCollection2) => {
    AboutIdCollection2["Dialog"] = "invox-about-dialog";
    AboutIdCollection2["ViewContent"] = "invox-about-view-content";
    return AboutIdCollection2;
  })(AboutIdCollection || {});

  // libs/integrations/common/components/baseViewComponent.ts
  var BaseViewComponent = class extends BaseComponent {
    constructor(langResources) {
      super(langResources);
    }
    create(containerId) {
      const dialogDestinationElement = DOMUtility.getElement(containerId);
      dialogDestinationElement.innerHTML = "";
      const headerElement = this.printHeader();
      const bodyElement = this.printBody();
      const footerElement = this.printFooter();
      dialogDestinationElement && headerElement && dialogDestinationElement.appendChild(headerElement);
      dialogDestinationElement && bodyElement && dialogDestinationElement.appendChild(bodyElement);
      dialogDestinationElement && footerElement && dialogDestinationElement.appendChild(footerElement);
      this.componentDidMount();
    }
    printHeader() {
      return void 0;
    }
    printBody() {
      return void 0;
    }
    printFooter() {
      return void 0;
    }
    componentDidMount() {
    }
  };

  // libs/integrations/invox-bar/src/components/menu/about/view/views/aboutContent.view.ts
  var AboutContentView = class extends BaseViewComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      this._companyName = "Vócali Sistemas Inteligentes SL";
      this._companyPageLink = "https://vocali.net/";
      this._productPageLink = "https://www.invoxmedical.com";
    }
    _CurrentYear() {
      return (/* @__PURE__ */ new Date()).getFullYear();
    }
    createProductLink() {
      const productLinkElement = document.createElement("a");
      productLinkElement.style.alignSelf = "center";
      productLinkElement.href = this._productPageLink;
      productLinkElement.title = this._productPageLink;
      productLinkElement.target = "_blank";
      productLinkElement.innerHTML = InvoxBarIconCollection.INVOX_MEDICAL;
      productLinkElement.classList.add("invox-bar__about-product-link");
      return productLinkElement;
    }
    printBody() {
      const bodyElement = document.createElement("div");
      bodyElement.setAttribute("class", "invox-bar__about-view-body");
      bodyElement.appendChild(this.createProductLink());
      bodyElement.appendChild(this.createProductVersion());
      bodyElement.appendChild(this.createCopyright());
      return bodyElement;
    }
    createProductVersion() {
      const sdkName = "SDK";
      const sdkVersion = INVOX.version;
      const serviceName = this.getServiceName();
      const serviceVersion = this.getServiceVersion();
      const sdkCommit = INVOX.commit;
      const versionsContainerElement = document.createElement("section");
      versionsContainerElement.innerHTML = `
            <small class="invox-bar__about-content-line">
                ${sdkName}
                <strong>${sdkVersion}</strong>
            </small>
            <small class="invox-bar__about-content-line">
                ${serviceName}
                <strong>${serviceVersion}</strong>
            </small>
            <small>${sdkCommit}</small>
        `;
      return versionsContainerElement;
    }
    createCopyright() {
      const copyrightElement = document.createElement("small");
      copyrightElement.setAttribute("class", "invox-bar__about-copyright");
      copyrightElement.innerHTML = `
            <a href="${this._companyPageLink}" title="${this._companyPageLink}" target="_blank">
                ${this._companyName}
            </a>
            &copy; ${this._CurrentYear()}
        `;
      return copyrightElement;
    }
    getServiceVersion() {
      const currentSession = INVOX.GetCurrentSession();
      return currentSession.UseAgent ? currentSession.AgentVersion : currentSession.SWSVersion;
    }
    getServiceName() {
      const currentSession = INVOX.GetCurrentSession();
      return currentSession.UseAgent ? "Local Dictation Service" : "Remote Dictation Service";
    }
  };

  // libs/integrations/common/components/buttons/baseButton.ts
  var BaseButton = class extends BaseComponent {
    constructor() {
      super();
      this._classList = [];
      this.initComponent();
    }
    setTooltip(tooltip) {
      this._tooltip = tooltip;
      return this;
    }
    setIcon(icon) {
      this._icon = icon;
    }
    setClassList(...classlist) {
      this._classList = this._classList.concat(classlist);
    }
    setLabel(label) {
      this._label = label;
      return this;
    }
    setCallback(callback) {
      this._callback = callback;
      return this;
    }
    create() {
      const element = this.createElement();
      this.addEvent(element, "click", () => this.setBehaviour(element));
      return element;
    }
    createElement() {
      const buttonElement = document.createElement("button");
      if (this._classList && this._classList.length > 0) {
        this._classList.forEach((classElement) => buttonElement.classList.add(classElement));
      }
      this._tooltip && (buttonElement.title = this._tooltip);
      buttonElement.innerHTML = this.createLabel();
      return buttonElement;
    }
    createLabel() {
      let label = "";
      this._icon && (label = this._icon);
      this._label && (label += `<label>${this._label}</label>`);
      return label;
    }
    setBehaviour(element) {
      this._callback();
    }
  };

  // libs/integrations/common/components/buttons/closeIconButton.ts
  var CloseIconButton = class extends BaseButton {
    initComponent() {
      this.setIcon('\n        <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-x-lg invox-dialog-icon__close" viewBox="0 0 16 16" stroke="currentColor" stroke-width="1">\n            <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>\n        </svg>\n    ' /* CLOSE */);
      this.setClassList("invox-base-no-background-button");
    }
  };

  // libs/integrations/common/view/views/basicDialog.view.ts
  var BasicDialogView = class extends BaseViewComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      this._headerIcon = '\n        <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 84.7 84.9" class="invox-dialog-icon__brand" stroke="currentColor" stroke-width="1">\n            <g>\n                <path d="M49.9,1.8H34.7C16.3,1.8,1.3,16.7,1.3,35.1v15.3c0,18.4,14.9,33.3,33.4,33.3h15.2c18.4,0,33.3-14.9,33.3-33.3V35.1C83.3,16.7,68.3,1.8,49.9,1.8z M68.9,47.7c0,12-9.7,21.7-21.7,21.7h-9.9c-0.9,0-1.8-0.1-2.7-0.2c-3.3,3.3-7.2,5.6-10.6,6.4c2.5-2.2,4.7-4.8,5.9-7.5c-8.4-3-14.4-11-14.4-20.4v-9.9c0-12,9.7-21.7,21.7-21.7h9.9c12,0,21.7,9.7,21.7,21.7V47.7z"/>\n                <path d="M29,45.2v-4.9c0-6,4.8-10.8,10.8-10.8h5c6,0,10.8,4.8,10.8,10.8v4.9c0,6-4.8,10.8-10.8,10.8h-5C33.8,56,29,51.2,29,45.2"/>\n            </g>\n        </svg>\n    ' /* INVOX */;
      this._viewManager = viewManager;
      this._dialogId = viewManager.getDialogId();
      this._dialogViewId = viewManager.getDialogViewId();
      this._currentView = void 0;
      this._previousView = void 0;
      this._isResizableDialog = false;
      this.initComponent();
    }
    get _DialogLayerElement() {
      return DOMUtility.getElement(this._dialogId);
    }
    get _DialogElement() {
      const element = this._DialogLayerElement;
      return element == null ? void 0 : element.children["dialog"];
    }
    setCustomClass(extraClass) {
      this._extraClass = extraClass;
    }
    setHeaderIcon(icon) {
      this._headerIcon = icon;
      return this;
    }
    setResizableDialog() {
      this._isResizableDialog = true;
    }
    create(containerId) {
      const dialogElement = document.createElement("aside");
      dialogElement.setAttribute("name", "dialog");
      dialogElement.classList.add("invox-dialog__dialog-container");
      this._extraClass && dialogElement.classList.add(this._extraClass);
      this._isResizableDialog && dialogElement.classList.add("invox-dialog__dialog-container--resizable");
      dialogElement.appendChild(this.printHeader());
      dialogElement.appendChild(this.printBody());
      const dialogLayerElement = document.createElement("div");
      dialogLayerElement.setAttribute("id", this._dialogId);
      dialogLayerElement.setAttribute("class", "invox-dialog__root-layer");
      dialogLayerElement.appendChild(dialogElement);
      const dialogDestinationElement = DOMUtility.getElement(containerId);
      dialogDestinationElement == null ? void 0 : dialogDestinationElement.appendChild(dialogLayerElement);
      this.componentDidMount();
    }
    refresh() {
      if (!this._currentView) {
        return;
      }
      try {
        this._currentView.create(this._dialogViewId);
      } catch (error) {
        INVOX.LogFatal(`An error occurred during view creation. Error: ${error}`);
      }
    }
    setCurrentView(currentView) {
      this._previousView = this._currentView;
      this._currentView = currentView;
    }
    getPreviousView() {
      return this._previousView;
    }
    printHeader() {
      const headerElement = document.createElement("header");
      headerElement.classList.add("invox-dialog__dialog-header");
      headerElement.innerHTML = `
            <div class="invox-dialog__dialog-header-title">
                ${this._headerIcon}
                <label> ${this._langResources.TITLE} </label>
            </div>
        `;
      const dialogButtons = this.createExtraHeaderButtons();
      dialogButtons.forEach((buttonElement) => headerElement.appendChild(buttonElement));
      const closeDialogButton = new CloseIconButton().setTooltip(this._langResources.CLOSE.TOOLTIP).setCallback(() => this.closeDialog()).create();
      headerElement.appendChild(closeDialogButton);
      return headerElement;
    }
    createExtraHeaderButtons() {
      return [];
    }
    printBody() {
      const mainElement = document.createElement("main");
      mainElement.id = this._dialogViewId;
      mainElement.classList.add("invox-dialog-body-container");
      return mainElement;
    }
    componentDidMount() {
      this._DialogLayerElement.tabIndex = "-1";
      this._DialogLayerElement.focus();
      this.addEvent(this._DialogLayerElement, "keyup", (event) => this.closeDialogByESC(event));
    }
    closeDialogByESC(event) {
      const key = event.key;
      if (key === "Escape") {
        INVOX.LogInfo("Closing dialog by clicking ESC");
        this._viewManager && this._viewManager.hide();
      }
    }
    closeDialog() {
      INVOX.LogInfo("Closing dialog by header button");
      this._viewManager && this._viewManager.hide();
    }
  };

  // libs/integrations/invox-bar/src/components/menu/about/view/aboutViewCreator.ts
  var AboutViewCreator = class {
    get _LangResources() {
      return i18n.getLangResources().ABOUT_ACTIONS;
    }
    createDialog(viewManager) {
      INVOX.LogDebug("Creating About dialog...");
      const dialogElement = new BasicDialogView(this._LangResources, viewManager);
      dialogElement.setCustomClass("invox-bar__about-layer");
      dialogElement.setHeaderIcon(about_default);
      return dialogElement;
    }
    createContent(viewManager) {
      INVOX.LogDebug("Creating About view...");
      return new AboutContentView(this._LangResources, viewManager);
    }
  };

  // libs/integrations/common/view/baseViewManager.ts
  var BaseViewManager = class {
    get _ExistsDialogElement() {
      return DOMUtility.existsElement(this._dialogId);
    }
    get _DialogElement() {
      return DOMUtility.getElement(this._dialogId);
    }
    getDialogId() {
      return this._dialogId;
    }
    getDialogViewId() {
      return this._dialogViewId;
    }
    create() {
      this.printDefaultView();
    }
    show() {
      if (!this._DialogElement.classList.contains("active")) {
        this.refreshCurrentView();
        this._DialogElement.classList.add("active");
        (function lockScroll() {
          document.body.style.position = "sticky";
          document.body.style.overflow = "hidden";
        })();
      }
    }
    hide() {
      if (!this._ExistsDialogElement) {
        INVOX.LogWarning("The dialogue cannot be closed because it does not exist or is already hidden");
        return;
      }
      if (this._DialogElement.classList.contains("active")) {
        this._DialogElement.classList.remove("active");
      }
      (function unlockScroll() {
        document.body.style.position = "";
        document.body.style.overflow = "";
      })();
      this._onCloseDialog && this._onCloseDialog();
    }
    remove() {
      if (!this._ExistsDialogElement) {
        throw new Error("Element cannot be null or undefined");
      }
      this._DialogElement.remove();
    }
    refreshCurrentView() {
      this._dialogElement && this._dialogElement.refresh();
    }
    printDefaultView() {
      throw new Error("Not implemented exception");
    }
    setOnCloseDialog(callback) {
      this._onCloseDialog = callback;
    }
    setView(view) {
      if (!this._ExistsDialogElement) {
        this._dialogElement = this._viewCreator.createDialog(this);
        this._dialogElement.create(this._containerElementId);
      }
      this._dialogElement.setCurrentView(view);
      this._dialogElement.refresh();
    }
  };

  // libs/integrations/invox-bar/src/components/menu/about/view/aboutViewManager.ts
  var AboutViewManager = class extends BaseViewManager {
    constructor(containerElementId) {
      super();
      this._containerElementId = containerElementId;
      this._dialogId = "invox-about-dialog" /* Dialog */;
      this._dialogViewId = "invox-about-view-content" /* ViewContent */;
      this._viewCreator = new AboutViewCreator();
    }
    printDefaultView() {
      this.printContent();
    }
    printContent() {
      const view = this._viewCreator.createContent(this);
      this.setView(view);
    }
  };

  // libs/integrations/invox-bar/src/components/menu/about/main.ts
  var AboutDialog = class extends BaseDialog {
    constructor(containerId) {
      super(AboutIdCollection, containerId);
      this._viewManager = new AboutViewManager(containerId);
      this._viewManager.create();
    }
    static create(containerId) {
      return AboutDialog._instance || (AboutDialog._instance = new AboutDialog(containerId));
    }
    remove() {
      this._viewManager.remove();
      AboutDialog._instance = void 0;
    }
  };

  // libs/integrations/invox-bar/src/components/menu/profile/view/profileIdCollection.enum.ts
  var ProfileIdCollection = /* @__PURE__ */ ((ProfileIdCollection2) => {
    ProfileIdCollection2["Dialog"] = "invox-profile-dialog";
    ProfileIdCollection2["ViewContent"] = "invox-profile-view-content";
    return ProfileIdCollection2;
  })(ProfileIdCollection || {});

  // libs/integrations/invox-bar/src/components/menu/profile/view/views/profileContent.view.ts
  var ProfileContentView = class extends BaseViewComponent {
    constructor(langResources, viewManager) {
      super(langResources);
      const userinfo = INVOX.GetUserInfo();
      this._login = (userinfo == null ? void 0 : userinfo.Login) || "-";
      this._email = (userinfo == null ? void 0 : userinfo.Email) || "-";
      this._fullname = (userinfo == null ? void 0 : userinfo.Name) || "-";
      this._specialty = (userinfo == null ? void 0 : userinfo.Specialty) || "-";
      this._organization = (userinfo == null ? void 0 : userinfo.Organization) || "-";
      this._lastLogin = (userinfo == null ? void 0 : userinfo.LastLogin) || "";
    }
    printBody() {
      const bodyElement = document.createElement("div");
      bodyElement.setAttribute("class", "invox-bar__profile-view-body");
      bodyElement.appendChild(this.createField(this._langResources.LOGIN, this._login));
      bodyElement.appendChild(this.createField(this._langResources.EMAIL, this._email));
      bodyElement.appendChild(this.createField(this._langResources.NAME, this._fullname));
      bodyElement.appendChild(this.createField(this._langResources.SPECIALTY, this._specialty));
      bodyElement.appendChild(this.createField(this._langResources.ORGANIZATION, this._organization));
      bodyElement.appendChild(this.createField(this._langResources.LAST_LOGIN, this.formatLastLogin(this._lastLogin)));
      return bodyElement;
    }
    createField(fieldName, value) {
      const informationContainerElement = document.createElement("div");
      informationContainerElement.setAttribute("class", "invox-bar__profile-field");
      informationContainerElement.innerHTML = `
            <label>
                <small>
                    ${fieldName}
                </small>
            </label>
            <p>${value}</p>
        `;
      return informationContainerElement;
    }
    formatLastLogin(lastLogin) {
      if (lastLogin === "") {
        return "-";
      }
      const options = { year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric", timeZoneName: "short" };
      return new Date(lastLogin).toLocaleDateString(INVOX.GetCurrentLang(), options);
    }
  };

  // libs/integrations/invox-bar/src/components/menu/profile/view/profileViewCreator.ts
  var ProfileViewCreator = class {
    get _LangResources() {
      return i18n.getLangResources().PROFILE_ACTIONS;
    }
    createDialog(viewManager) {
      INVOX.LogDebug("Creating Profile dialog...");
      const dialogElement = new BasicDialogView(this._LangResources, viewManager);
      dialogElement.setCustomClass("invox-bar__profile-layer");
      dialogElement.setHeaderIcon(profile_default);
      return dialogElement;
    }
    createContent(viewManager) {
      INVOX.LogDebug("Creating Profile view...");
      return new ProfileContentView(this._LangResources, viewManager);
    }
  };

  // libs/integrations/invox-bar/src/components/menu/profile/view/profileViewManager.ts
  var ProfileViewManager = class extends BaseViewManager {
    constructor(containerElementId) {
      super();
      this._containerElementId = containerElementId;
      this._dialogId = "invox-profile-dialog" /* Dialog */;
      this._dialogViewId = "invox-profile-view-content" /* ViewContent */;
      this._viewCreator = new ProfileViewCreator();
    }
    printDefaultView() {
      this.printContent();
    }
    printContent() {
      const view = this._viewCreator.createContent(this);
      this.setView(view);
    }
  };

  // libs/integrations/invox-bar/src/components/menu/profile/main.ts
  var ProfileDialog = class extends BaseDialog {
    constructor(containerId) {
      super(ProfileIdCollection, containerId);
      this._viewManager = new ProfileViewManager(containerId);
      this._viewManager.create();
    }
    static create(containerId) {
      return ProfileDialog._instance || (ProfileDialog._instance = new ProfileDialog(containerId));
    }
    remove() {
      this._viewManager.remove();
      ProfileDialog._instance = void 0;
    }
  };

  // libs/integrations/invox-bar/src/view/viewCreator.ts
  var ViewCreator = class {
    get _LangResources() {
      return i18n.getLangResources().INVOXBAR_ACTIONS;
    }
    createContainer(viewManager) {
      return new ViewContainer(this._LangResources, viewManager);
    }
    createSplashScreenView(viewManager) {
      return new SplashScreenView(this._LangResources, viewManager);
    }
    createLoadingView(viewManager) {
      return new LoadingView(this._LangResources, viewManager);
    }
    createHomeView(viewManager) {
      const homeViewElement = new HomeView(this._LangResources, viewManager);
      if (ModuleUtility.isDictionaryModuleLoaded()) {
        homeViewElement.setDictionaryBuilder(ModuleUtility.createDictionaryDialog);
      }
      if (ModuleUtility.isTemplateModuleLoaded()) {
        homeViewElement.setTemplatesBuilder(ModuleUtility.createTemplatesDialog);
      }
      if (ModuleUtility.isTransformationsModuleLoaded()) {
        homeViewElement.setTransformationsBuilder(ModuleUtility.createTransformationsDialog);
      }
      homeViewElement.setProfileViewBuilder(this.createProfileDialog);
      homeViewElement.setAboutViewBuilder(this.createAboutDialog);
      if (ModuleUtility.isIntelligentFormattingModuleLoaded()) {
        homeViewElement.setIntelligentFormattingBuilder(ModuleUtility.createIntelligentFormattingDialog);
      }
      if (ModuleUtility.isQualityReviewModuleLoaded()) {
        homeViewElement.setQualityReviewBuilder(ModuleUtility.createQualityReviewDialog);
      }
      if (ModuleUtility.isAutoFillTemplatesModuleLoaded()) {
        homeViewElement.setAutoFillTemplatesBuilder(ModuleUtility.createAutoFillTemplatesDialog);
      }
      return homeViewElement;
    }
    createAboutDialog(containerId) {
      try {
        return AboutDialog.create(containerId);
      } catch (error) {
        INVOX.LogError(`Unable to create About dialog. Error: ${error}`);
      }
    }
    createProfileDialog(containerId) {
      try {
        return ProfileDialog.create(containerId);
      } catch (error) {
        INVOX.LogError(`Unable to create Profile dialog. Error: ${error}`);
      }
    }
  };

  // libs/integrations/invox-bar/src/view/viewManager.ts
  var ViewManager = class {
    constructor(containerDestinationId) {
      this._containerDestinationId = containerDestinationId;
      this._viewCreator = new ViewCreator();
    }
    get _ExistsINVOXBarElement() {
      return this._invoxBarElement && DOMUtility.existsElement(this._invoxBarElement.getId());
    }
    getContainerId() {
      return this._invoxBarElement.getId();
    }
    create() {
      this.printSplashScreenView();
    }
    show() {
      this._invoxBarElement.show();
    }
    hide() {
      this._invoxBarElement.hide();
    }
    remove() {
      if (!this._ExistsINVOXBarElement) {
        throw new Error("Element cannot be null or undefined");
      }
      this._invoxBarElement.remove();
    }
    printNextView() {
      this._invoxBarElement.nextView();
    }
    printSplashScreenView() {
      const view = this._viewCreator.createSplashScreenView(this);
      this.setView(view);
      INVOX.LogDebug("Splash Screen view created successfully");
    }
    printLoadingView() {
      const view = this._viewCreator.createLoadingView(this);
      this.setView(view);
      INVOX.LogDebug("Loading view created successfully");
    }
    printHomeView() {
      const view = this._viewCreator.createHomeView(this);
      this.setView(view);
      INVOX.LogDebug("Home view created successfully");
    }
    setView(view) {
      if (!this._ExistsINVOXBarElement) {
        this._invoxBarElement = this._viewCreator.createContainer(this);
        this._invoxBarElement.create(this._containerDestinationId);
      }
      this._invoxBarElement.setCurrentView(view);
      this._invoxBarElement.refresh();
    }
  };

  // libs/integrations/invox-bar/src/main.ts
  var INVOXBarComponent = class {
    constructor(containerId) {
      if (!INVOX || typeof INVOX != "object" || !("version" in INVOX)) {
        throw new Error("The INVOX SDK is undefined. Load INVOX from your index.html.");
      }
      if (!containerId) {
        throw new Error("Destination element id cannot be null or undefined");
      }
      if (!DOMUtility.existsElement(containerId)) {
        throw new Error(`Destination element with id ${containerId} not found`);
      }
      this._viewManager = new ViewManager(containerId);
      this._viewManager.create();
    }
    static create(containerId) {
      return INVOXBarComponent._instance || (INVOXBarComponent._instance = new INVOXBarComponent(containerId));
    }
    show() {
      this._viewManager.show();
    }
    hide() {
      this._viewManager.hide();
    }
    remove() {
      this._viewManager.remove();
      INVOXBarComponent._instance = void 0;
    }
    login(credentials, connectionConfig) {
      this._viewManager.printLoadingView();
      return INVOX.Login(credentials, connectionConfig);
    }
    logout() {
      return new Promise((resolve, reject) => {
        INVOX.Logout().then(() => {
          this._viewManager.printSplashScreenView();
          resolve(true);
        }).catch((error) => {
          reject(error);
        });
      });
    }
  };
  var create = INVOXBarComponent.create;
  return __toCommonJS(public_exports);
})();
