public/be-assets/node_modules/@yaireo/tagify/dist/tagify.esm.js
/**
   * Adds a mix-content tag
   * @param {String/Array} tagData    A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings
   */
Adds a mix-content tag
@param {String/Array} tagData    A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings
Adds a mix - content tag @param { String / Array } tagData A string ( single or multiple values with a delimiter ) or an Array of Objects or just Array of Strings
addMixTags(tagsData) {
    tagsData = this.normalizeTags(tagsData);
    if (tagsData[0].prefix || this.state.tag) {
      return this.prefixedTextToTag(tagsData[0]);
    }
    if (typeof tagsData == 'string') tagsData = [{
      value: tagsData
    }];
    var selection = !!this.state.selection,
    frag = document.createDocumentFragment();
    tagsData.forEach(tagData => {
      var tagElm = this.createTagElem(tagData);
      frag.appendChild(tagElm);
      this.insertAfterTag(tagElm);
    }); 
    if (selection) {
      this.injectAtCaret(frag);
    } 
    else {
      this.DOM.input.focus();
      selection = this.setStateSelection();
      selection.range.setStart(this.DOM.input, selection.range.endOffset);
      selection.range.setEnd(this.DOM.input, selection.range.endOffset);
      this.DOM.input.appendChild(frag);
      this.updateValueByDOMTags(); 
      this.update(); 
    }
    return frag;
  }
addMixTags ( tagsData ) { tagsData = this . normalizeTags ( tagsData ) ; if ( tagsData [ 0 ] . prefix || this . state . tag ) { return this . prefixedTextToTag ( tagsData [ 0 ] ) ; } if ( typeof tagsData == 'string' ) tagsData = [ { value : tagsData } ] ; var selection = ! ! this . state . selection , frag = document . createDocumentFragment ( ) ; tagsData . forEach ( tagData => { var tagElm = this . createTagElem ( tagData ) ; frag . appendChild ( tagElm ) ; this . insertAfterTag ( tagElm ) ; } ) ; if ( selection ) { this . injectAtCaret ( frag ) ; } else { this . DOM . input . focus ( ) ; selection = this . setStateSelection ( ) ; selection . range . setStart ( this . DOM . input , selection . range . endOffset ) ; selection . range . setEnd ( this . DOM . input , selection . range . endOffset ) ; this . DOM . input . appendChild ( frag ) ; this . updateValueByDOMTags ( ) ; this . update ( ) ; } return frag ; }
Adds a mix-content tag
 @param {String/Array} tagData    A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings
Adds a mix - content tag @param { String / Array } tagData A string ( single or multiple values with a delimiter ) or an Array of Objects or just Array of Strings
// must be cast, not to use the reference which is changing // if "selection" exists, assumes intention of inecting the new tag at the last // saved location of the caret inside "this.DOM.input" // else, create a range and inject the new tag as the last child of "this.DOM.input" // updates internal "this.value" // updates original input/textarea