public/be-assets/node_modules/@yaireo/tagify/dist/tagify.esm.js
/**
   * if the original input had any values, add them as tags
   */
if the original input had any values, add them as tags
if the original input had any values add them as tags
loadOriginalValues(value) {
    var lastChild,
        _s = this.settings;
    if (value === undefined) {
      const persistedOriginalValue = this.getPersistedData('value'); 
      if (persistedOriginalValue && !this.DOM.originalInput.value) value = persistedOriginalValue;else value = _s.mixMode.integrated ? this.DOM.input.textContent : this.DOM.originalInput.value;
    }
    this.removeAllTags({
      withoutChangeEvent: true
    });
    if (value) {
      if (_s.mode == 'mix') {
        this.parseMixTags(value.trim());
        lastChild = this.DOM.input.lastChild;
        if (!lastChild || lastChild.tagName != 'BR') this.DOM.input.insertAdjacentHTML('beforeend', '<br>');
      } else {
        try {
          if (JSON.parse(value) instanceof Array) value = JSON.parse(value);
        } catch (err) {}
        this.addTags(value).forEach(tag => tag && tag.classList.add(_s.classNames.tagNoAnimation));
      }
    } else this.postUpdate();
    this.state.lastOriginalValueReported = _s.mixMode.integrated ? '' : this.DOM.originalInput.value;
    this.state.loadedOriginalValues = true;
  }
loadOriginalValues ( value ) { var lastChild , _s = this . settings ; if ( value === undefined ) { const persistedOriginalValue = this . getPersistedData ( 'value' ) ; if ( persistedOriginalValue && ! this . DOM . originalInput . value ) value = persistedOriginalValue ; else value = _s . mixMode . integrated ? this . DOM . input . textContent : this . DOM . originalInput . value ; } this . removeAllTags ( { withoutChangeEvent : true } ) ; if ( value ) { if ( _s . mode == 'mix' ) { this . parseMixTags ( value . trim ( ) ) ; lastChild = this . DOM . input . lastChild ; if ( ! lastChild || lastChild . tagName != 'BR' ) this . DOM . input . insertAdjacentHTML ( 'beforeend' , '<br>' ) ; } else { try { if ( JSON . parse ( value ) instanceof Array ) value = JSON . parse ( value ) ; } catch ( err ) { } this . addTags ( value ) . forEach ( tag => tag && tag . classList . add ( _s . classNames . tagNoAnimation ) ) ; } } else this . postUpdate ( ) ; this . state . lastOriginalValueReported = _s . mixMode . integrated ? '' : this . DOM . originalInput . value ; this . state . loadedOriginalValues = true ; }
if the original input had any values, add them as tags
if the original input had any values add them as tags
// if the field already has a field, trust its the desired // one to be rendered and do not use the persisted one