function ProfileSwitcher(element, options) {
      var _this;

      _classCallCheck(this, ProfileSwitcher);

      _this = _possibleConstructorReturn(this, _getPrototypeOf(ProfileSwitcher).call(this, element, options));

      _this.manage(on(_this.element.ownerDocument, 'click', function (evt) {
        _this.handleDocumentClick(evt);
      }));

      _this.manage(on(_this.element, 'dropdown-beingselected', function (event) {
        if (event.target.querySelector(_this.options.selectorAccountDropdown) !== null) {
          var linkedIconNode = event.detail.item.querySelector(_this.options.classLinkedIcon);
          _this.element.isLinked = !!linkedIconNode;
          _this.element.linkedIcon = linkedIconNode && linkedIconNode.cloneNode(true);
          var linkedAccountNode = event.detail.item.querySelector(_this.options.selectorAccountSlLinked);
          _this.element.linkedAccount = linkedAccountNode && linkedAccountNode.cloneNode(true);
        }
      }));

      var toggleNode = _this.element.querySelector(_this.options.selectorToggle);

      if (toggleNode) {
        _this.manage(on(toggleNode, 'keydown', function (event) {
          _this.toggle(event);
        }));

        _this.manage(on(toggleNode, 'mouseenter', function (event) {
          _this.getLinkedData(event);

          _this.determineSwitcherValues(true);
        }));

        _this.manage(on(toggleNode, 'mouseleave', function (event) {
          _this.getLinkedData(event);

          _this.determineSwitcherValues(false);
        }));
      }

      _this.manage(on(_this.element.ownerDocument, 'keyup', function () {
        return _this.handleBlur();
      }));

      return _this;
    }
/**
     * Profile Switcher.
     * @extends CreateComponent
     * @extends InitComponentBySearch
     * @extends Handles
     * @param {HTMLElement} element The element working as a profile switcher.
     * @param {Object} [options] The component options
     * @param {string} [options.selectorProfileSwitcher] The data attribute selector for the profile switcher.
     * @param {string} [options.selectorAccount]
     *   The data attribute selector for the element containing the account name in the profile switcher.
     * @param {string} [options.selectorOrg]
     *   The data attribute selector for the element containing the organization name in the profile switcher.
     * @param {string} [options.selectorSpace]
     *   The data attribute selector for the element containing the space name in the profile switcher.
     * @param {string} [options.selectorAccountDropdown]
     *   The data attribute selector for the dropdown item containing the current account name.
     * @param {string} [options.selectorOrgDropdown]
     *   The data attribute selector for the dropdown item containing the current organization name.
     * @param {string} [options.selectorSpaceDropdown]
     *   The data attribute selector for the dropdown item containing the current space name.
     */
Profile Switcher.
@extends CreateComponent
@extends InitComponentBySearch
@extends Handles
@param {HTMLElement} element The element working as a profile switcher.
@param {Object} [options] The component options
@param {string} [options.selectorProfileSwitcher] The data attribute selector for the profile switcher.
@param {string} [options.selectorAccount]
The data attribute selector for the element containing the account name in the profile switcher.
@param {string} [options.selectorOrg]
The data attribute selector for the element containing the organization name in the profile switcher.
@param {string} [options.selectorSpace]
The data attribute selector for the element containing the space name in the profile switcher.
@param {string} [options.selectorAccountDropdown]
The data attribute selector for the dropdown item containing the current account name.
@param {string} [options.selectorOrgDropdown]
The data attribute selector for the dropdown item containing the current organization name.
@param {string} [options.selectorSpaceDropdown]
The data attribute selector for the dropdown item containing the current space name.
Profile Switcher . @extends CreateComponent @extends InitComponentBySearch @extends Handles @param { HTMLElement } element The element working as a profile switcher . @param { Object } [ options ] The component options @param { string } [ options . selectorProfileSwitcher ] The data attribute selector for the profile switcher . @param { string } [ options . selectorAccount ] The data attribute selector for the element containing the account name in the profile switcher . @param { string } [ options . selectorOrg ] The data attribute selector for the element containing the organization name in the profile switcher . @param { string } [ options . selectorSpace ] The data attribute selector for the element containing the space name in the profile switcher . @param { string } [ options . selectorAccountDropdown ] The data attribute selector for the dropdown item containing the current account name . @param { string } [ options . selectorOrgDropdown ] The data attribute selector for the dropdown item containing the current organization name . @param { string } [ options . selectorSpaceDropdown ] The data attribute selector for the dropdown item containing the current space name .
function ProfileSwitcher(element, options) {
      var _this;
      _classCallCheck(this, ProfileSwitcher);
      _this = _possibleConstructorReturn(this, _getPrototypeOf(ProfileSwitcher).call(this, element, options));
      _this.manage(on(_this.element.ownerDocument, 'click', function (evt) {
        _this.handleDocumentClick(evt);
      }));
      _this.manage(on(_this.element, 'dropdown-beingselected', function (event) {
        if (event.target.querySelector(_this.options.selectorAccountDropdown) !== null) {
          var linkedIconNode = event.detail.item.querySelector(_this.options.classLinkedIcon);
          _this.element.isLinked = !!linkedIconNode;
          _this.element.linkedIcon = linkedIconNode && linkedIconNode.cloneNode(true);
          var linkedAccountNode = event.detail.item.querySelector(_this.options.selectorAccountSlLinked);
          _this.element.linkedAccount = linkedAccountNode && linkedAccountNode.cloneNode(true);
        }
      }));
      var toggleNode = _this.element.querySelector(_this.options.selectorToggle);
      if (toggleNode) {
        _this.manage(on(toggleNode, 'keydown', function (event) {
          _this.toggle(event);
        }));
        _this.manage(on(toggleNode, 'mouseenter', function (event) {
          _this.getLinkedData(event);
          _this.determineSwitcherValues(true);
        }));
        _this.manage(on(toggleNode, 'mouseleave', function (event) {
          _this.getLinkedData(event);
          _this.determineSwitcherValues(false);
        }));
      }
      _this.manage(on(_this.element.ownerDocument, 'keyup', function () {
        return _this.handleBlur();
      }));
      return _this;
    }
function ProfileSwitcher ( element , options ) { var _this ; _classCallCheck ( this , ProfileSwitcher ) ; _this = _possibleConstructorReturn ( this , _getPrototypeOf ( ProfileSwitcher ) . call ( this , element , options ) ) ; _this . manage ( on ( _this . element . ownerDocument , 'click' , function ( evt ) { _this . handleDocumentClick ( evt ) ; } ) ) ; _this . manage ( on ( _this . element , 'dropdown-beingselected' , function ( event ) { if ( event . target . querySelector ( _this . options . selectorAccountDropdown ) !== null ) { var linkedIconNode = event . detail . item . querySelector ( _this . options . classLinkedIcon ) ; _this . element . isLinked = ! ! linkedIconNode ; _this . element . linkedIcon = linkedIconNode && linkedIconNode . cloneNode ( true ) ; var linkedAccountNode = event . detail . item . querySelector ( _this . options . selectorAccountSlLinked ) ; _this . element . linkedAccount = linkedAccountNode && linkedAccountNode . cloneNode ( true ) ; } } ) ) ; var toggleNode = _this . element . querySelector ( _this . options . selectorToggle ) ; if ( toggleNode ) { _this . manage ( on ( toggleNode , 'keydown' , function ( event ) { _this . toggle ( event ) ; } ) ) ; _this . manage ( on ( toggleNode , 'mouseenter' , function ( event ) { _this . getLinkedData ( event ) ; _this . determineSwitcherValues ( true ) ; } ) ) ; _this . manage ( on ( toggleNode , 'mouseleave' , function ( event ) { _this . getLinkedData ( event ) ; _this . determineSwitcherValues ( false ) ; } ) ) ; } _this . manage ( on ( _this . element . ownerDocument , 'keyup' , function ( ) { return _this . handleBlur ( ) ; } ) ) ; return _this ; }
Profile Switcher.
Profile Switcher .