text: /**
   * @file
   * JavaScript behaviors for CodeMirror integration.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    // @see http://codemirror.net/doc/manual.html#config
    Drupal.webform = Drupal.webform || {};
    Drupal.webform.codeMirror = Drupal.webform.codeMirror || {};
    Drupal.webform.codeMirror.options = Drupal.webform.codeMirror.options || {};
  
    /**
     * Initialize CodeMirror editor.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformCodeMirror = {
      attach: function (context) {
        if (!window.CodeMirror) {
          return;
        }
  
        // Webform CodeMirror editor.
        $(context).find('textarea.js-webform-codemirror').once('webform-codemirror').each(function () {
          var $input = $(this);
  
          // Open all closed details, so that editor height is correctly calculated.
          var $details = $(this).parents('details:not([open])');
          $details.attr('open', 'open');
  
          // #59 HTML5 required attribute breaks hack for webform submission.
          // https://github.com/marijnh/CodeMirror-old/issues/59
          $(this).removeAttr('required');
  
          var options = $.extend({
            mode: $(this).attr('data-webform-codemirror-mode'),
            lineNumbers: true,
            c: ($(this).attr('wrap') === 'off') ? false : true,
            viewportMargin: Infinity,
            readOnly: ($(this).prop('readonly') || $(this).prop('disabled')) ? true : false,
            extraKeys: {
              // Setting for using spaces instead of tabs - https://github.com/codemirror/CodeMirror/issues/988
              Tab: function (cm) {
                var spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
                cm.replaceSelection(spaces, 'end', '+element');
              },
              // On 'Escape' move to the next tabbable input.
              // @see http://bgrins.github.io/codemirror-accessible/
              Esc: function (cm) {
                // Must show and then textarea so that we can determine
                // its tabindex.
                var textarea = $(cm.getTextArea());
                $(textarea).show().addClass('visually-hidden');
                var $tabbable = $(':tabbable');
                var tabindex = $tabbable.index(textarea);
                $(textarea).hide().removeClass('visually-hidden');
  
                // Tabindex + 2 accounts for the CodeMirror's iframe.
                $tabbable.eq(tabindex + 2).focus();
              }
  
            }
          }, Drupal.webform.codeMirror.options);
  
          var editor = CodeMirror.fromTextArea(this, options);
  
          // Now, close details.
          $details.removeAttr('open');
  
          // Issue #2764443: CodeMirror is not setting submitted value when
          // rendered within a webform UI dialog.
          editor.on('blur', function (event) {
            editor.save();
          });
  
          // Update CodeMirror when the textarea's value has changed.
          // @see webform.states.js
          $input.on('change', function () {
            editor.getDoc().setValue($input.val());
          });
  
          // Set CodeMirror to be readonly when the textarea is disabled.
          // @see webform.states.js
          $input.on('webform:disabled', function () {
            editor.setOption('readOnly', $input.is(':disabled'));
          });
  
          // Delay refreshing CodeMirror for 10 millisecond while the dialog is
          // still being rendered.
          // @see http://stackoverflow.com/questions/8349571/codemirror-editor-is-not-loading-content-until-clicked
          setTimeout(function () {
            // Show tab panel and open details.
            var $tabPanel = $input.parents('.ui-tabs-panel:hidden');
            var $details = $input.parents('details:not([open])');
  
            if (!$tabPanel.length && $details.length) {
              return;
            }
  
            $tabPanel.show();
            $details.attr('open', 'open');
  
            editor.refresh();
  
            // Hide tab panel and close details.
            $tabPanel.hide();
            $details.removeAttr('open');
          }, 10);
        });
  
        // Webform CodeMirror syntax coloring.
        $(context).find('.js-webform-codemirror-runmode').once('webform-codemirror-runmode').each(function () {
          // Mode Runner - http://codemirror.net/demo/runmode.html
          CodeMirror.runMode($(this).addClass('cm-s-default').text(), $(this).attr('data-webform-codemirror-mode'), this);
        });
      }
    };
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  
  (function ($, Drupal, drupalSettings) {
    var showWeight = JSON.parse(localStorage.getItem('Drupal.tableDrag.showWeight'));
  
    Drupal.behaviors.tableDrag = {
      attach: function attach(context, settings) {
        function initTableDrag(table, base) {
          if (table.length) {
            Drupal.tableDrag[base] = new Drupal.tableDrag(table[0], settings.tableDrag[base]);
          }
        }
  
        Object.keys(settings.tableDrag || {}).forEach(function (base) {
          initTableDrag($(context).find('#' + base).once('tabledrag'), base);
        });
      }
    };
  
    Drupal.tableDrag = function (table, tableSettings) {
      var _this = this;
  
      var self = this;
      var $table = $(table);
  
      this.$table = $(table);
  
      this.table = table;
  
      this.tableSettings = tableSettings;
  
      this.dragObject = null;
  
      this.rowObject = null;
  
      this.oldRowElement = null;
  
      this.oldY = 0;
  
      this.changed = false;
  
      this.maxDepth = 0;
  
      this.rtl = $(this.table).css('direction') === 'rtl' ? -1 : 1;
  
      this.striping = $(this.table).data('striping') === 1;
  
      this.scrollSettings = { amount: 4, interval: 50, trigger: 70 };
  
      this.scrollInterval = null;
  
      this.scrollY = 0;
  
      this.windowHeight = 0;
  
      this.indentEnabled = false;
      Object.keys(tableSettings || {}).forEach(function (group) {
        Object.keys(tableSettings[group] || {}).forEach(function (n) {
          if (tableSettings[group][n].relationship === 'parent') {
            _this.indentEnabled = true;
          }
          if (tableSettings[group][n].limit > 0) {
            _this.maxDepth = tableSettings[group][n].limit;
          }
        });
      });
      if (this.indentEnabled) {
        this.indentCount = 1;
  
        var indent = Drupal.theme('tableDragIndentation');
        var testRow = $('<tr/>').addClass('draggable').appendTo(table);
        var testCell = $('<td/>').appendTo(testRow).prepend(indent).prepend(indent);
        var $indentation = testCell.find('.js-indentation');
  
        this.indentAmount = $indentation.get(1).offsetLeft - $indentation.get(0).offsetLeft;
        testRow.remove();
      }
  
      $table.find('> tr.draggable, > tbody > tr.draggable').each(function () {
        self.makeDraggable(this);
      });
  
      $table.before($('<button type="button" class="link tabledrag-toggle-weight"></button>').attr('title', Drupal.t('Re-order rows by numerical weight instead of dragging.')).on('click', $.proxy(function (e) {
        e.preventDefault();
        this.toggleColumns();
      }, this)).wrap('<div class="tabledrag-toggle-weight-wrapper"></div>').parent());
  
      self.initColumns();
  
      $(document).on('touchmove', function (event) {
        return self.dragRow(event.originalEvent.touches[0], self);
      });
      $(document).on('touchend', function (event) {
        return self.dropRow(event.originalEvent.touches[0], self);
      });
      $(document).on('mousemove pointermove', function (event) {
        return self.dragRow(event, self);
      });
      $(document).on('mouseup pointerup', function (event) {
        return self.dropRow(event, self);
      });
  
      $(window).on('storage', $.proxy(function (e) {
        if (e.originalEvent.key === 'Drupal.tableDrag.showWeight') {
          showWeight = JSON.parse(e.originalEvent.newValue);
          this.displayColumns(showWeight);
        }
      }, this));
    };
  
    Drupal.tableDrag.prototype.initColumns = function () {
      var _this2 = this;
  
      var $table = this.$table;
      var hidden = void 0;
      var cell = void 0;
      var columnIndex = void 0;
      Object.keys(this.tableSettings || {}).forEach(function (group) {
        Object.keys(_this2.tableSettings[group]).some(function (tableSetting) {
          var field = $table.find('.' + _this2.tableSettings[group][tableSetting].target).eq(0);
          if (field.length && _this2.tableSettings[group][tableSetting].hidden) {
            hidden = _this2.tableSettings[group][tableSetting].hidden;
            cell = field.closest('td');
            return true;
          }
          return false;
        });
  
        if (hidden && cell[0]) {
          columnIndex = cell.parent().find('> td').index(cell.get(0)) + 1;
          $table.find('> thead > tr, > tbody > tr, > tr').each(_this2.addColspanClass(columnIndex));
        }
      });
      this.displayColumns(showWeight);
    };
  
    Drupal.tableDrag.prototype.addColspanClass = function (columnIndex) {
      return function () {
        var $row = $(this);
        var index = columnIndex;
        var cells = $row.children();
        var cell = void 0;
        cells.each(function (n) {
          if (n < index && this.colSpan && this.colSpan > 1) {
            index -= this.colSpan - 1;
          }
        });
        if (index > 0) {
          cell = cells.filter(':nth-child(' + index + ')');
          if (cell[0].colSpan && cell[0].colSpan > 1) {
            cell.addClass('tabledrag-has-colspan');
          } else {
            cell.addClass('tabledrag-hide');
          }
        }
      };
    };
  
    Drupal.tableDrag.prototype.displayColumns = function (displayWeight) {
      if (displayWeight) {
        this.showColumns();
      } else {
          this.hideColumns();
        }
  
      $('table').findOnce('tabledrag').trigger('columnschange', !!displayWeight);
    };
  
    Drupal.tableDrag.prototype.toggleColumns = function () {
      showWeight = !showWeight;
      this.displayColumns(showWeight);
      if (showWeight) {
        localStorage.setItem('Drupal.tableDrag.showWeight', showWeight);
      } else {
        localStorage.removeItem('Drupal.tableDrag.showWeight');
      }
    };
  
    Drupal.tableDrag.prototype.hideColumns = function () {
      var $tables = $('table').findOnce('tabledrag');
  
      $tables.find('.tabledrag-hide').css('display', 'none');
  
      $tables.find('.tabledrag-handle').css('display', '');
  
      $tables.find('.tabledrag-has-colspan').each(function () {
        this.colSpan = this.colSpan - 1;
      });
  
      $('.tabledrag-toggle-weight').text(Drupal.t('Show row weights'));
    };
  
    Drupal.tableDrag.prototype.showColumns = function () {
      var $tables = $('table').findOnce('tabledrag');
  
      $tables.find('.tabledrag-hide').css('display', '');
  
      $tables.find('.tabledrag-handle').css('display', 'none');
  
      $tables.find('.tabledrag-has-colspan').each(function () {
        this.colSpan = this.colSpan + 1;
      });
  
      $('.tabledrag-toggle-weight').text(Drupal.t('Hide row weights'));
    };
  
    Drupal.tableDrag.prototype.rowSettings = function (group, row) {
      var field = $(row).find('.' + group);
      var tableSettingsGroup = this.tableSettings[group];
      return Object.keys(tableSettingsGroup).map(function (delta) {
        var targetClass = tableSettingsGroup[delta].target;
        var rowSettings = void 0;
        if (field.is('.' + targetClass)) {
          rowSettings = {};
          Object.keys(tableSettingsGroup[delta]).forEach(function (n) {
            rowSettings[n] = tableSettingsGroup[delta][n];
          });
        }
        return rowSettings;
      }).filter(function (rowSetting) {
        return rowSetting;
      })[0];
    };
  
    Drupal.tableDrag.prototype.makeDraggable = function (item) {
      var self = this;
      var $item = $(item);
  
      $item.find('td:first-of-type').find('a').addClass('menu-item__link');
  
      var handle = $('<a href="#" class="tabledrag-handle"><div class="handle">&nbsp;</div></a>').attr('title', Drupal.t('Drag to re-order'));
  
      var $indentationLast = $item.find('td:first-of-type').find('.js-indentation').eq(-1);
      if ($indentationLast.length) {
        $indentationLast.after(handle);
  
        self.indentCount = Math.max($item.find('.js-indentation').length, self.indentCount);
      } else {
        $item.find('td').eq(0).prepend(handle);
      }
  
      handle.on('mousedown touchstart pointerdown', function (event) {
        event.preventDefault();
        if (event.originalEvent.type === 'touchstart') {
          event = event.originalEvent.touches[0];
        }
        self.dragStart(event, self, item);
      });
  
      handle.on('click', function (e) {
        e.preventDefault();
      });
  
      handle.on('focus', function () {
        self.safeBlur = true;
      });
  
      handle.on('blur', function (event) {
        if (self.rowObject && self.safeBlur) {
          self.dropRow(event, self);
        }
      });
  
      handle.on('keydown', function (event) {
        if (event.keyCode !== 9 && !self.rowObject) {
          self.rowObject = new self.row(item, 'keyboard', self.indentEnabled, self.maxDepth, true);
        }
  
        var keyChange = false;
        var groupHeight = void 0;
  
        switch (event.keyCode) {
          case 37:
          case 63234:
            keyChange = true;
            self.rowObject.indent(-1 * self.rtl);
            break;
  
          case 38:
          case 63232:
            {
              var $previousRow = $(self.rowObject.element).prev('tr').eq(0);
              var previousRow = $previousRow.get(0);
              while (previousRow && $previousRow.is(':hidden')) {
                $previousRow = $(previousRow).prev('tr').eq(0);
                previousRow = $previousRow.get(0);
              }
              if (previousRow) {
                self.safeBlur = false;
                self.rowObject.direction = 'up';
                keyChange = true;
  
                if ($(item).is('.tabledrag-root')) {
                  groupHeight = 0;
                  while (previousRow && $previousRow.find('.js-indentation').length) {
                    $previousRow = $(previousRow).prev('tr').eq(0);
                    previousRow = $previousRow.get(0);
                    groupHeight += $previousRow.is(':hidden') ? 0 : previousRow.offsetHeight;
                  }
                  if (previousRow) {
                    self.rowObject.swap('before', previousRow);
  
                    window.scrollBy(0, -groupHeight);
                  }
                } else if (self.table.tBodies[0].rows[0] !== previousRow || $previousRow.is('.draggable')) {
                  self.rowObject.swap('before', previousRow);
                  self.rowObject.interval = null;
                  self.rowObject.indent(0);
                  window.scrollBy(0, -parseInt(item.offsetHeight, 10));
                }
  
                handle.trigger('focus');
              }
              break;
            }
  
          case 39:
          case 63235:
            keyChange = true;
            self.rowObject.indent(self.rtl);
            break;
  
          case 40:
          case 63233:
            {
              var $nextRow = $(self.rowObject.group).eq(-1).next('tr').eq(0);
              var nextRow = $nextRow.get(0);
              while (nextRow && $nextRow.is(':hidden')) {
                $nextRow = $(nextRow).next('tr').eq(0);
                nextRow = $nextRow.get(0);
              }
              if (nextRow) {
                self.safeBlur = false;
                self.rowObject.direction = 'down';
                keyChange = true;
  
                if ($(item).is('.tabledrag-root')) {
                  groupHeight = 0;
                  var nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false);
                  if (nextGroup) {
                    $(nextGroup.group).each(function () {
                      groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight;
                    });
                    var nextGroupRow = $(nextGroup.group).eq(-1).get(0);
                    self.rowObject.swap('after', nextGroupRow);
  
                    window.scrollBy(0, parseInt(groupHeight, 10));
                  }
                } else {
                  self.rowObject.swap('after', nextRow);
                  self.rowObject.interval = null;
                  self.rowObject.indent(0);
                  window.scrollBy(0, parseInt(item.offsetHeight, 10));
                }
  
                handle.trigger('focus');
              }
              break;
            }
        }
  
        if (self.rowObject && self.rowObject.changed === true) {
          $(item).addClass('drag');
          if (self.oldRowElement) {
            $(self.oldRowElement).removeClass('drag-previous');
          }
          self.oldRowElement = item;
          if (self.striping === true) {
            self.restripeTable();
          }
          self.onDrag();
        }
  
        if (keyChange) {
          return false;
        }
      });
  
      handle.on('keypress', function (event) {
  
        switch (event.keyCode) {
          case 37:
          case 38:
          case 39:
          case 40:
            return false;
        }
      });
    };
  
    Drupal.tableDrag.prototype.dragStart = function (event, self, item) {
      self.dragObject = {};
      self.dragObject.initOffset = self.getPointerOffset(item, event);
      self.dragObject.initPointerCoords = self.pointerCoords(event);
      if (self.indentEnabled) {
        self.dragObject.indentPointerPos = self.dragObject.initPointerCoords;
      }
  
      if (self.rowObject) {
        $(self.rowObject.element).find('a.tabledrag-handle').trigger('blur');
      }
  
      self.rowObject = new self.row(item, 'pointer', self.indentEnabled, self.maxDepth, true);
  
      self.table.topY = $(self.table).offset().top;
      self.table.bottomY = self.table.topY + self.table.offsetHeight;
  
      $(item).addClass('drag');
  
      $('body').addClass('drag');
      if (self.oldRowElement) {
        $(self.oldRowElement).removeClass('drag-previous');
      }
    };
  
    Drupal.tableDrag.prototype.dragRow = function (event, self) {
      if (self.dragObject) {
        self.currentPointerCoords = self.pointerCoords(event);
        var y = self.currentPointerCoords.y - self.dragObject.initOffset.y;
        var x = self.currentPointerCoords.x - self.dragObject.initOffset.x;
  
        if (y !== self.oldY) {
          self.rowObject.direction = y > self.oldY ? 'down' : 'up';
  
          self.oldY = y;
  
          var scrollAmount = self.checkScroll(self.currentPointerCoords.y);
  
          clearInterval(self.scrollInterval);
  
          if (scrollAmount > 0 && self.rowObject.direction === 'down' || scrollAmount < 0 && self.rowObject.direction === 'up') {
            self.setScroll(scrollAmount);
          }
  
          var currentRow = self.findDropTargetRow(x, y);
          if (currentRow) {
            if (self.rowObject.direction === 'down') {
              self.rowObject.swap('after', currentRow, self);
            } else {
              self.rowObject.swap('before', currentRow, self);
            }
            if (self.striping === true) {
              self.restripeTable();
            }
          }
        }
  
        if (self.indentEnabled) {
          var xDiff = self.currentPointerCoords.x - self.dragObject.indentPointerPos.x;
  
          var indentDiff = Math.round(xDiff / self.indentAmount);
  
          var indentChange = self.rowObject.indent(indentDiff);
  
          self.dragObject.indentPointerPos.x += self.indentAmount * indentChange * self.rtl;
          self.indentCount = Math.max(self.indentCount, self.rowObject.indents);
        }
  
        return false;
      }
    };
  
    Drupal.tableDrag.prototype.dropRow = function (event, self) {
      var droppedRow = void 0;
      var $droppedRow = void 0;
  
      if (self.rowObject !== null) {
        droppedRow = self.rowObject.element;
        $droppedRow = $(droppedRow);
  
        if (self.rowObject.changed === true) {
          self.updateFields(droppedRow);
  
          Object.keys(self.tableSettings || {}).forEach(function (group) {
            var rowSettings = self.rowSettings(group, droppedRow);
            if (rowSettings.relationship === 'group') {
              Object.keys(self.rowObject.children || {}).forEach(function (n) {
                self.updateField(self.rowObject.children[n], group);
              });
            }
          });
  
          self.rowObject.markChanged();
          if (self.changed === false) {
            $(Drupal.theme('tableDragChangedWarning')).insertBefore(self.table).hide().fadeIn('slow');
            self.changed = true;
          }
        }
  
        if (self.indentEnabled) {
          self.rowObject.removeIndentClasses();
        }
        if (self.oldRowElement) {
          $(self.oldRowElement).removeClass('drag-previous');
        }
        $droppedRow.removeClass('drag').addClass('drag-previous');
        self.oldRowElement = droppedRow;
        self.onDrop();
        self.rowObject = null;
      }
  
      if (self.dragObject !== null) {
        self.dragObject = null;
        $('body').removeClass('drag');
        clearInterval(self.scrollInterval);
      }
    };
  
    Drupal.tableDrag.prototype.pointerCoords = function (event) {
      if (event.pageX || event.pageY) {
        return { x: event.pageX, y: event.pageY };
      }
      return {
        x: event.clientX + document.body.scrollLeft - document.body.clientLeft,
        y: event.clientY + document.body.scrollTop - document.body.clientTop
      };
    };
  
    Drupal.tableDrag.prototype.getPointerOffset = function (target, event) {
      var docPos = $(target).offset();
      var pointerPos = this.pointerCoords(event);
      return { x: pointerPos.x - docPos.left, y: pointerPos.y - docPos.top };
    };
  
    Drupal.tableDrag.prototype.findDropTargetRow = function (x, y) {
      var _this3 = this;
  
      var rows = $(this.table.tBodies[0].rows).not(':hidden');
  
      var _loop = function _loop(n) {
        var row = rows[n];
        var $row = $(row);
        var rowY = $row.offset().top;
        var rowHeight = void 0;
  
        if (row.offsetHeight === 0) {
          rowHeight = parseInt(row.firstChild.offsetHeight, 10) / 2;
        } else {
            rowHeight = parseInt(row.offsetHeight, 10) / 2;
          }
  
        if (y > rowY - rowHeight && y < rowY + rowHeight) {
          if (_this3.indentEnabled) {
            if (Object.keys(_this3.rowObject.group).some(function (o) {
              return _this3.rowObject.group[o] === row;
            })) {
              return {
                v: null
              };
            }
          } else if (row === _this3.rowObject.element) {
              return {
                v: null
              };
            }
  
          if (!_this3.rowObject.isValidSwap(row)) {
            return {
              v: null
            };
          }
  
          while ($row.is(':hidden') && $row.prev('tr').is(':hidden')) {
            $row = $row.prev('tr:first-of-type');
            row = $row.get(0);
          }
          return {
            v: row
          };
        }
      };
  
      for (var n = 0; n < rows.length; n++) {
        var _ret = _loop(n);
  
        if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
      }
      return null;
    };
  
    Drupal.tableDrag.prototype.updateFields = function (changedRow) {
      var _this4 = this;
  
      Object.keys(this.tableSettings || {}).forEach(function (group) {
        _this4.updateField(changedRow, group);
      });
    };
  
    Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
      var rowSettings = this.rowSettings(group, changedRow);
      var $changedRow = $(changedRow);
      var sourceRow = void 0;
      var $previousRow = void 0;
      var previousRow = void 0;
      var useSibling = void 0;
  
      if (rowSettings.relationship === 'self' || rowSettings.relationship === 'group') {
        sourceRow = changedRow;
      } else if (rowSettings.relationship === 'sibling') {
          $previousRow = $changedRow.prev('tr:first-of-type');
          previousRow = $previousRow.get(0);
          var $nextRow = $changedRow.next('tr:first-of-type');
          var nextRow = $nextRow.get(0);
          sourceRow = changedRow;
          if ($previousRow.is('.draggable') && $previousRow.find('.' + group).length) {
            if (this.indentEnabled) {
              if ($previousRow.find('.js-indentations').length === $changedRow.find('.js-indentations').length) {
                sourceRow = previousRow;
              }
            } else {
              sourceRow = previousRow;
            }
          } else if ($nextRow.is('.draggable') && $nextRow.find('.' + group).length) {
            if (this.indentEnabled) {
              if ($nextRow.find('.js-indentations').length === $changedRow.find('.js-indentations').length) {
                sourceRow = nextRow;
              }
            } else {
              sourceRow = nextRow;
            }
          }
        } else if (rowSettings.relationship === 'parent') {
            $previousRow = $changedRow.prev('tr');
            previousRow = $previousRow;
            while ($previousRow.length && $previousRow.find('.js-indentation').length >= this.rowObject.indents) {
              $previousRow = $previousRow.prev('tr');
              previousRow = $previousRow;
            }
  
            if ($previousRow.length) {
              sourceRow = $previousRow.get(0);
            } else {
                sourceRow = $(this.table).find('tr.draggable:first-of-type').get(0);
                if (sourceRow === this.rowObject.element) {
                  sourceRow = $(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
                }
                useSibling = true;
              }
          }
  
      this.copyDragClasses(sourceRow, changedRow, group);
      rowSettings = this.rowSettings(group, changedRow);
  
      if (useSibling) {
        rowSettings.relationship = 'sibling';
        rowSettings.source = rowSettings.target;
      }
  
      var targetClass = '.' + rowSettings.target;
      var targetElement = $changedRow.find(targetClass).get(0);
  
      if (targetElement) {
        var sourceClass = '.' + rowSettings.source;
        var sourceElement = $(sourceClass, sourceRow).get(0);
        switch (rowSettings.action) {
          case 'depth':
            targetElement.value = $(sourceElement).closest('tr').find('.js-indentation').length;
            break;
  
          case 'match':
            targetElement.value = sourceElement.value;
            break;
  
          case 'order':
            {
              var siblings = this.rowObject.findSiblings(rowSettings);
              if ($(targetElement).is('select')) {
                var values = [];
                $(targetElement).find('option').each(function () {
                  values.push(this.value);
                });
                var maxVal = values[values.length - 1];
  
                $(siblings).find(targetClass).each(function () {
                  if (values.length > 0) {
                    this.value = values.shift();
                  } else {
                    this.value = maxVal;
                  }
                });
              } else {
                var weight = parseInt($(siblings[0]).find(targetClass).val(), 10) || 0;
                $(siblings).find(targetClass).each(function () {
                  this.value = weight;
                  weight++;
                });
              }
              break;
            }
        }
      }
    };
  
    Drupal.tableDrag.prototype.copyDragClasses = function (sourceRow, targetRow, group) {
      var sourceElement = $(sourceRow).find('.' + group);
      var targetElement = $(targetRow).find('.' + group);
      if (sourceElement.length && targetElement.length) {
        targetElement[0].className = sourceElement[0].className;
      }
    };
  
    Drupal.tableDrag.prototype.checkScroll = function (cursorY) {
      var de = document.documentElement;
      var b = document.body;
  
      var windowHeight = window.innerHeight || (de.clientHeight && de.clientWidth !== 0 ? de.clientHeight : b.offsetHeight);
      this.windowHeight = windowHeight;
      var scrollY = void 0;
      if (document.all) {
        scrollY = !de.scrollTop ? b.scrollTop : de.scrollTop;
      } else {
        scrollY = window.pageYOffset ? window.pageYOffset : window.scrollY;
      }
      this.scrollY = scrollY;
      var trigger = this.scrollSettings.trigger;
      var delta = 0;
  
      if (cursorY - scrollY > windowHeight - trigger) {
        delta = trigger / (windowHeight + scrollY - cursorY);
        delta = delta > 0 && delta < trigger ? delta : trigger;
        return delta * this.scrollSettings.amount;
      }
      if (cursorY - scrollY < trigger) {
        delta = trigger / (cursorY - scrollY);
        delta = delta > 0 && delta < trigger ? delta : trigger;
        return -delta * this.scrollSettings.amount;
      }
    };
  
    Drupal.tableDrag.prototype.setScroll = function (scrollAmount) {
      var self = this;
  
      this.scrollInterval = setInterval(function () {
        self.checkScroll(self.currentPointerCoords.y);
        var aboveTable = self.scrollY > self.table.topY;
        var belowTable = self.scrollY + self.windowHeight < self.table.bottomY;
        if (scrollAmount > 0 && belowTable || scrollAmount < 0 && aboveTable) {
          window.scrollBy(0, scrollAmount);
        }
      }, this.scrollSettings.interval);
    };
  
    Drupal.tableDrag.prototype.restripeTable = function () {
      $(this.table).find('> tbody > tr.draggable, > tr.draggable').filter(':visible').filter(':odd').removeClass('odd').addClass('even').end().filter(':even').removeClass('even').addClass('odd');
    };
  
    Drupal.tableDrag.prototype.onDrag = function () {
      return null;
    };
  
    Drupal.tableDrag.prototype.onDrop = function () {
      return null;
    };
  
    Drupal.tableDrag.prototype.row = function (tableRow, method, indentEnabled, maxDepth, addClasses) {
      var $tableRow = $(tableRow);
  
      this.element = tableRow;
      this.method = method;
      this.group = [tableRow];
      this.groupDepth = $tableRow.find('.js-indentation').length;
      this.changed = false;
      this.table = $tableRow.closest('table')[0];
      this.indentEnabled = indentEnabled;
      this.maxDepth = maxDepth;
  
      this.direction = '';
      if (this.indentEnabled) {
        this.indents = $tableRow.find('.js-indentation').length;
        this.children = this.findChildren(addClasses);
        this.group = $.merge(this.group, this.children);
  
        for (var n = 0; n < this.group.length; n++) {
          this.groupDepth = Math.max($(this.group[n]).find('.js-indentation').length, this.groupDepth);
        }
      }
    };
  
    Drupal.tableDrag.prototype.row.prototype.findChildren = function (addClasses) {
      var parentIndentation = this.indents;
      var currentRow = $(this.element, this.table).next('tr.draggable');
      var rows = [];
      var child = 0;
  
      function rowIndentation(indentNum, el) {
        var self = $(el);
        if (child === 1 && indentNum === parentIndentation) {
          self.addClass('tree-child-first');
        }
        if (indentNum === parentIndentation) {
          self.addClass('tree-child');
        } else if (indentNum > parentIndentation) {
          self.addClass('tree-child-horizontal');
        }
      }
  
      while (currentRow.length) {
        if (currentRow.find('.js-indentation').length > parentIndentation) {
          child++;
          rows.push(currentRow[0]);
          if (addClasses) {
            currentRow.find('.js-indentation').each(rowIndentation);
          }
        } else {
          break;
        }
        currentRow = currentRow.next('tr.draggable');
      }
      if (addClasses && rows.length) {
        $(rows[rows.length - 1]).find('.js-indentation:nth-child(' + (parentIndentation + 1) + ')').addClass('tree-child-last');
      }
      return rows;
    };
  
    Drupal.tableDrag.prototype.row.prototype.isValidSwap = function (row) {
      var $row = $(row);
      if (this.indentEnabled) {
        var prevRow = void 0;
        var nextRow = void 0;
        if (this.direction === 'down') {
          prevRow = row;
          nextRow = $row.next('tr').get(0);
        } else {
          prevRow = $row.prev('tr').get(0);
          nextRow = row;
        }
        this.interval = this.validIndentInterval(prevRow, nextRow);
  
        if (this.interval.min > this.interval.max) {
          return false;
        }
      }
  
      if (this.table.tBodies[0].rows[0] === row && $row.is(':not(.draggable)')) {
        return false;
      }
  
      return true;
    };
  
    Drupal.tableDrag.prototype.row.prototype.swap = function (position, row) {
      this.group.forEach(function (row) {
        Drupal.detachBehaviors(row, drupalSettings, 'move');
      });
      $(row)[position](this.group);
  
      this.group.forEach(function (row) {
        Drupal.attachBehaviors(row, drupalSettings);
      });
      this.changed = true;
      this.onSwap(row);
    };
  
    Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow, nextRow) {
      var $prevRow = $(prevRow);
      var maxIndent = void 0;
  
      var minIndent = nextRow ? $(nextRow).find('.js-indentation').length : 0;
  
      if (!prevRow || $prevRow.is(':not(.draggable)') || $(this.element).is('.tabledrag-root')) {
        maxIndent = 0;
      } else {
        maxIndent = $prevRow.find('.js-indentation').length + ($prevRow.is('.tabledrag-leaf') ? 0 : 1);
  
        if (this.maxDepth) {
          maxIndent = Math.min(maxIndent, this.maxDepth - (this.groupDepth - this.indents));
        }
      }
  
      return { min: minIndent, max: maxIndent };
    };
  
    Drupal.tableDrag.prototype.row.prototype.indent = function (indentDiff) {
      var $group = $(this.group);
  
      if (!this.interval) {
        var prevRow = $(this.element).prev('tr').get(0);
        var nextRow = $group.eq(-1).next('tr').get(0);
        this.interval = this.validIndentInterval(prevRow, nextRow);
      }
  
      var indent = this.indents + indentDiff;
      indent = Math.max(indent, this.interval.min);
      indent = Math.min(indent, this.interval.max);
      indentDiff = indent - this.indents;
  
      for (var n = 1; n <= Math.abs(indentDiff); n++) {
        if (indentDiff < 0) {
          $group.find('.js-indentation:first-of-type').remove();
          this.indents--;
        } else {
          $group.find('td:first-of-type').prepend(Drupal.theme('tableDragIndentation'));
          this.indents++;
        }
      }
      if (indentDiff) {
        this.changed = true;
        this.groupDepth += indentDiff;
        this.onIndent();
      }
  
      return indentDiff;
    };
  
    Drupal.tableDrag.prototype.row.prototype.findSiblings = function (rowSettings) {
      var siblings = [];
      var directions = ['prev', 'next'];
      var rowIndentation = this.indents;
      var checkRowIndentation = void 0;
      for (var d = 0; d < directions.length; d++) {
        var checkRow = $(this.element)[directions[d]]();
        while (checkRow.length) {
          if (checkRow.find('.' + rowSettings.target)) {
            if (this.indentEnabled) {
              checkRowIndentation = checkRow.find('.js-indentation').length;
            }
  
            if (!this.indentEnabled || checkRowIndentation === rowIndentation) {
              siblings.push(checkRow[0]);
            } else if (checkRowIndentation < rowIndentation) {
              break;
            }
          } else {
            break;
          }
          checkRow = checkRow[directions[d]]();
        }
  
        if (directions[d] === 'prev') {
          siblings.reverse();
          siblings.push(this.element);
        }
      }
      return siblings;
    };
  
    Drupal.tableDrag.prototype.row.prototype.removeIndentClasses = function () {
      var _this5 = this;
  
      Object.keys(this.children || {}).forEach(function (n) {
        $(_this5.children[n]).find('.js-indentation').removeClass('tree-child').removeClass('tree-child-first').removeClass('tree-child-last').removeClass('tree-child-horizontal');
      });
    };
  
    Drupal.tableDrag.prototype.row.prototype.markChanged = function () {
      var marker = Drupal.theme('tableDragChangedMarker');
      var cell = $(this.element).find('td:first-of-type');
      if (cell.find('abbr.tabledrag-changed').length === 0) {
        cell.append(marker);
      }
    };
  
    Drupal.tableDrag.prototype.row.prototype.onIndent = function () {
      return null;
    };
  
    Drupal.tableDrag.prototype.row.prototype.onSwap = function (swappedRow) {
      return null;
    };
  
    $.extend(Drupal.theme, {
      tableDragChangedMarker: function tableDragChangedMarker() {
        return '<abbr class="warning tabledrag-changed" title="' + Drupal.t('Changed') + '">*</abbr>';
      },
      tableDragIndentation: function tableDragIndentation() {
        return '<div class="js-indentation indentation">&nbsp;</div>';
      },
      tableDragChangedWarning: function tableDragChangedWarning() {
        return '<div class="tabledrag-changed-warning messages messages--warning" role="alert">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('You have unsaved changes.') + '</div>';
      }
    });
  })(jQuery, Drupal, drupalSettings);;
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=n(1),a=(o(r),n(6)),u=o(a),c=n(7),s=o(c),f=n(8),d=o(f),l=n(9),p=o(l),m=n(10),b=o(m),v=n(11),y=o(v),g=n(14),h=o(g),w=[],k=!1,x={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},M=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},_=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?M():(x.disableMutationObserver||d.default.isSupported()||(console.info('\n      aos: MutationObserver is not supported on this browser,\n      code mutations observing has been disabled.\n      You may have to call "refreshHard()" by yourself.\n    '),x.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||d.default.ready("[data-aos]",O),w)};e.exports={init:_,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(f,t),M?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=O();return c(e)?d(e):void(h=setTimeout(f,a(e)))}function d(e){return h=void 0,_&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),o(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,k=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(s);return t=u(t)||0,i(n)&&(M=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(s);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return f;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?f:+e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s="Expected a function",f=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(f,t),M?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function s(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=j();return s(e)?d(e):void(h=setTimeout(f,u(e)))}function d(e){return h=void 0,_&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=s(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),i(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,O=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(M=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==f}function a(e){if("number"==typeof e)return e;if(r(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?s:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",s=NaN,f="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){var t=void 0,o=void 0,i=void 0;for(t=0;t<e.length;t+=1){if(o=e[t],o.dataset&&o.dataset.aos)return!0;if(i=o.children&&n(o.children))return!0}return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function i(){return!!o()}function r(e,t){var n=window.document,i=o(),r=new i(a);u=t,r.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function a(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),o=Array.prototype.slice.call(e.removedNodes),i=t.concat(o);if(n(i))return u()})}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){};t.default={isSupported:i,ready:r}},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,a=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,c=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,s=function(){function e(){n(this,e)}return i(e,[{key:"phone",value:function(){var e=o();return!(!r.test(e)&&!a.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=o();return!(!u.test(e)&&!c.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();t.default=new s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){var o=e.node.getAttribute("data-aos-once");t>e.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])});;
  /**
   * @file
   * JavaScript file for the AOS module.
   */
  
  (function ($, Drupal, drupalSettings) {
  
    Drupal.behaviors.aos = {
      attach: function attach(context, settings) {
        AOS.init();
      }
    };
  
  })(jQuery, Drupal, drupalSettings);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.theme.progressBar = function (id) {
      return '<div id="' + id + '" class="progress" aria-live="polite">' + '<div class="progress__label">&nbsp;</div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description">&nbsp;</div>' + '</div>';
    };
  
    Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
      this.id = id;
      this.method = method || 'GET';
      this.updateCallback = updateCallback;
      this.errorCallback = errorCallback;
  
      this.element = $(Drupal.theme('progressBar', id));
    };
  
    $.extend(Drupal.ProgressBar.prototype, {
      setProgress: function setProgress(percentage, message, label) {
        if (percentage >= 0 && percentage <= 100) {
          $(this.element).find('div.progress__bar').css('width', percentage + '%');
          $(this.element).find('div.progress__percentage').html(percentage + '%');
        }
        $('div.progress__description', this.element).html(message);
        $('div.progress__label', this.element).html(label);
        if (this.updateCallback) {
          this.updateCallback(percentage, message, this);
        }
      },
      startMonitoring: function startMonitoring(uri, delay) {
        this.delay = delay;
        this.uri = uri;
        this.sendPing();
      },
      stopMonitoring: function stopMonitoring() {
        clearTimeout(this.timer);
  
        this.uri = null;
      },
      sendPing: function sendPing() {
        if (this.timer) {
          clearTimeout(this.timer);
        }
        if (this.uri) {
          var pb = this;
  
          var uri = this.uri;
          if (uri.indexOf('?') === -1) {
            uri += '?';
          } else {
            uri += '&';
          }
          uri += '_format=json';
          $.ajax({
            type: this.method,
            url: uri,
            data: '',
            dataType: 'json',
            success: function success(progress) {
              if (progress.status === 0) {
                pb.displayError(progress.data);
                return;
              }
  
              pb.setProgress(progress.percentage, progress.message, progress.label);
  
              pb.timer = setTimeout(function () {
                pb.sendPing();
              }, pb.delay);
            },
            error: function error(xmlhttp) {
              var e = new Drupal.AjaxError(xmlhttp, pb.uri);
              pb.displayError('<pre>' + e.message + '</pre>');
            }
          });
        }
      },
      displayError: function displayError(string) {
        var error = $('<div class="messages messages--error"></div>').html(string);
        $(this.element).before(error).hide();
  
        if (this.errorCallback) {
          this.errorCallback(this);
        }
      }
    });
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
  
  (function ($, window, Drupal, drupalSettings) {
    Drupal.behaviors.AJAX = {
      attach: function attach(context, settings) {
        function loadAjaxBehavior(base) {
          var elementSettings = settings.ajax[base];
          if (typeof elementSettings.selector === 'undefined') {
            elementSettings.selector = '#' + base;
          }
          $(elementSettings.selector).once('drupal-ajax').each(function () {
            elementSettings.element = this;
            elementSettings.base = base;
            Drupal.ajax(elementSettings);
          });
        }
  
        Object.keys(settings.ajax || {}).forEach(function (base) {
          return loadAjaxBehavior(base);
        });
  
        Drupal.ajax.bindAjaxLinks(document.body);
  
        $('.use-ajax-submit').once('ajax').each(function () {
          var elementSettings = {};
  
          elementSettings.url = $(this.form).attr('action');
  
          elementSettings.setClick = true;
  
          elementSettings.event = 'click';
  
          elementSettings.progress = { type: 'throbber' };
          elementSettings.base = $(this).attr('id');
          elementSettings.element = this;
  
          Drupal.ajax(elementSettings);
        });
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          Drupal.ajax.expired().forEach(function (instance) {
            Drupal.ajax.instances[instance.instanceIndex] = null;
          });
        }
      }
    };
  
    Drupal.AjaxError = function (xmlhttp, uri, customMessage) {
      var statusCode = void 0;
      var statusText = void 0;
      var responseText = void 0;
      if (xmlhttp.status) {
        statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', { '!status': xmlhttp.status });
      } else {
        statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.');
      }
      statusCode += '\n' + Drupal.t('Debugging information follows.');
      var pathText = '\n' + Drupal.t('Path: !uri', { '!uri': uri });
      statusText = '';
  
      try {
        statusText = '\n' + Drupal.t('StatusText: !statusText', {
          '!statusText': $.trim(xmlhttp.statusText)
        });
      } catch (e) {}
  
      responseText = '';
  
      try {
        responseText = '\n' + Drupal.t('ResponseText: !responseText', {
          '!responseText': $.trim(xmlhttp.responseText)
        });
      } catch (e) {}
  
      responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, '');
      responseText = responseText.replace(/[\n]+\s+/g, '\n');
  
      var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', {
        '!readyState': xmlhttp.readyState
      }) : '';
  
      customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', {
        '!customMessage': customMessage
      }) : '';
  
      this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
  
      this.name = 'AjaxError';
    };
  
    Drupal.AjaxError.prototype = new Error();
    Drupal.AjaxError.prototype.constructor = Drupal.AjaxError;
  
    Drupal.ajax = function (settings) {
      if (arguments.length !== 1) {
        throw new Error('Drupal.ajax() function must be called with one configuration object only');
      }
  
      var base = settings.base || false;
      var element = settings.element || false;
      delete settings.base;
      delete settings.element;
  
      if (!settings.progress && !element) {
        settings.progress = false;
      }
  
      var ajax = new Drupal.Ajax(base, element, settings);
      ajax.instanceIndex = Drupal.ajax.instances.length;
      Drupal.ajax.instances.push(ajax);
  
      return ajax;
    };
  
    Drupal.ajax.instances = [];
  
    Drupal.ajax.expired = function () {
      return Drupal.ajax.instances.filter(function (instance) {
        return instance && instance.element !== false && !document.body.contains(instance.element);
      });
    };
  
    Drupal.ajax.bindAjaxLinks = function (element) {
      $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) {
        var $linkElement = $(ajaxLink);
  
        var elementSettings = {
          progress: { type: 'throbber' },
          dialogType: $linkElement.data('dialog-type'),
          dialog: $linkElement.data('dialog-options'),
          dialogRenderer: $linkElement.data('dialog-renderer'),
          base: $linkElement.attr('id'),
          element: ajaxLink
        };
        var href = $linkElement.attr('href');
  
        if (href) {
          elementSettings.url = href;
          elementSettings.event = 'click';
        }
        Drupal.ajax(elementSettings);
      });
    };
  
    Drupal.Ajax = function (base, element, elementSettings) {
      var defaults = {
        event: element ? 'mousedown' : null,
        keypress: true,
        selector: base ? '#' + base : null,
        effect: 'none',
        speed: 'none',
        method: 'replaceWith',
        progress: {
          type: 'throbber',
          message: Drupal.t('Please wait...')
        },
        submit: {
          js: true
        }
      };
  
      $.extend(this, defaults, elementSettings);
  
      this.commands = new Drupal.AjaxCommands();
  
      this.instanceIndex = false;
  
      if (this.wrapper) {
        this.wrapper = '#' + this.wrapper;
      }
  
      this.element = element;
  
      this.element_settings = elementSettings;
  
      this.elementSettings = elementSettings;
  
      if (this.element && this.element.form) {
        this.$form = $(this.element.form);
      }
  
      if (!this.url) {
        var $element = $(this.element);
        if ($element.is('a')) {
          this.url = $element.attr('href');
        } else if (this.element && element.form) {
          this.url = this.$form.attr('action');
        }
      }
  
      var originalUrl = this.url;
  
      this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1');
  
      if (drupalSettings.ajaxTrustedUrl[originalUrl]) {
        drupalSettings.ajaxTrustedUrl[this.url] = true;
      }
  
      var ajax = this;
  
      ajax.options = {
        url: ajax.url,
        data: ajax.submit,
        beforeSerialize: function beforeSerialize(elementSettings, options) {
          return ajax.beforeSerialize(elementSettings, options);
        },
        beforeSubmit: function beforeSubmit(formValues, elementSettings, options) {
          ajax.ajaxing = true;
          return ajax.beforeSubmit(formValues, elementSettings, options);
        },
        beforeSend: function beforeSend(xmlhttprequest, options) {
          ajax.ajaxing = true;
          return ajax.beforeSend(xmlhttprequest, options);
        },
        success: function success(response, status, xmlhttprequest) {
          if (typeof response === 'string') {
            response = $.parseJSON(response);
          }
  
          if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) {
            if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
              var customMessage = Drupal.t('The response failed verification so will not be processed.');
              return ajax.error(xmlhttprequest, ajax.url, customMessage);
            }
          }
  
          return ajax.success(response, status);
        },
        complete: function complete(xmlhttprequest, status) {
          ajax.ajaxing = false;
          if (status === 'error' || status === 'parsererror') {
            return ajax.error(xmlhttprequest, ajax.url);
          }
        },
  
        dataType: 'json',
        type: 'POST'
      };
  
      if (elementSettings.dialog) {
        ajax.options.data.dialogOptions = elementSettings.dialog;
      }
  
      if (ajax.options.url.indexOf('?') === -1) {
        ajax.options.url += '?';
      } else {
        ajax.options.url += '&';
      }
  
      var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax');
      if (elementSettings.dialogRenderer) {
        wrapper += '.' + elementSettings.dialogRenderer;
      }
      ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper;
  
      $(ajax.element).on(elementSettings.event, function (event) {
        if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) {
          throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', {
            '!url': ajax.url
          }));
        }
        return ajax.eventResponse(this, event);
      });
  
      if (elementSettings.keypress) {
        $(ajax.element).on('keypress', function (event) {
          return ajax.keypressResponse(this, event);
        });
      }
  
      if (elementSettings.prevent) {
        $(ajax.element).on(elementSettings.prevent, false);
      }
    };
  
    Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format';
  
    Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax';
  
    Drupal.Ajax.prototype.execute = function () {
      if (this.ajaxing) {
        return;
      }
  
      try {
        this.beforeSerialize(this.element, this.options);
  
        return $.ajax(this.options);
      } catch (e) {
        this.ajaxing = false;
        window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message);
  
        return $.Deferred().reject();
      }
    };
  
    Drupal.Ajax.prototype.keypressResponse = function (element, event) {
      var ajax = this;
  
      if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') {
        event.preventDefault();
        event.stopPropagation();
        $(element).trigger(ajax.elementSettings.event);
      }
    };
  
    Drupal.Ajax.prototype.eventResponse = function (element, event) {
      event.preventDefault();
      event.stopPropagation();
  
      var ajax = this;
  
      if (ajax.ajaxing) {
        return;
      }
  
      try {
        if (ajax.$form) {
          if (ajax.setClick) {
            element.form.clk = element;
          }
  
          ajax.$form.ajaxSubmit(ajax.options);
        } else {
          ajax.beforeSerialize(ajax.element, ajax.options);
          $.ajax(ajax.options);
        }
      } catch (e) {
        ajax.ajaxing = false;
        window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message);
      }
    };
  
    Drupal.Ajax.prototype.beforeSerialize = function (element, options) {
      if (this.$form && document.body.contains(this.$form.get(0))) {
        var settings = this.settings || drupalSettings;
        Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize');
      }
  
      options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1;
  
      var pageState = drupalSettings.ajaxPageState;
      options.data['ajax_page_state[theme]'] = pageState.theme;
      options.data['ajax_page_state[theme_token]'] = pageState.theme_token;
      options.data['ajax_page_state[libraries]'] = pageState.libraries;
    };
  
    Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {};
  
    Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
      if (this.$form) {
        options.extraData = options.extraData || {};
  
        options.extraData.ajax_iframe_upload = '1';
  
        var v = $.fieldValue(this.element);
        if (v !== null) {
          options.extraData[this.element.name] = v;
        }
      }
  
      $(this.element).prop('disabled', true);
  
      if (!this.progress || !this.progress.type) {
        return;
      }
  
      var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase();
      if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') {
        this[progressIndicatorMethod].call(this);
      }
    };
  
    Drupal.theme.ajaxProgressThrobber = function (message) {
      var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : '';
      var throbber = '<div class="throbber">&nbsp;</div>';
  
      return '<div class="ajax-progress ajax-progress-throbber">' + throbber + messageMarkup + '</div>';
    };
  
    Drupal.theme.ajaxProgressIndicatorFullscreen = function () {
      return '<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>';
    };
  
    Drupal.theme.ajaxProgressMessage = function (message) {
      return '<div class="message">' + message + '</div>';
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorBar = function () {
      var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.id, $.noop, this.progress.method, $.noop);
      if (this.progress.message) {
        progressBar.setProgress(-1, this.progress.message);
      }
      if (this.progress.url) {
        progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
      }
      this.progress.element = $(progressBar.element).addClass('ajax-progress ajax-progress-bar');
      this.progress.object = progressBar;
      $(this.element).after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
      this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message));
      $(this.element).after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
      this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen'));
      $('body').after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.success = function (response, status) {
      var _this = this;
  
      if (this.progress.element) {
        $(this.progress.element).remove();
      }
      if (this.progress.object) {
        this.progress.object.stopMonitoring();
      }
      $(this.element).prop('disabled', false);
  
      var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
  
      var focusChanged = false;
      Object.keys(response || {}).forEach(function (i) {
        if (response[i].command && _this.commands[response[i].command]) {
          _this.commands[response[i].command](_this, response[i], status);
          if (response[i].command === 'invoke' && response[i].method === 'focus') {
            focusChanged = true;
          }
        }
      });
  
      if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
        var target = false;
  
        for (var n = elementParents.length - 1; !target && n >= 0; n--) {
          target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
        }
  
        if (target) {
          $(target).trigger('focus');
        }
      }
  
      if (this.$form && document.body.contains(this.$form.get(0))) {
        var settings = this.settings || drupalSettings;
        Drupal.attachBehaviors(this.$form.get(0), settings);
      }
  
      this.settings = null;
    };
  
    Drupal.Ajax.prototype.getEffect = function (response) {
      var type = response.effect || this.effect;
      var speed = response.speed || this.speed;
  
      var effect = {};
      if (type === 'none') {
        effect.showEffect = 'show';
        effect.hideEffect = 'hide';
        effect.showSpeed = '';
      } else if (type === 'fade') {
        effect.showEffect = 'fadeIn';
        effect.hideEffect = 'fadeOut';
        effect.showSpeed = speed;
      } else {
        effect.showEffect = type + 'Toggle';
        effect.hideEffect = type + 'Toggle';
        effect.showSpeed = speed;
      }
  
      return effect;
    };
  
    Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
      if (this.progress.element) {
        $(this.progress.element).remove();
      }
      if (this.progress.object) {
        this.progress.object.stopMonitoring();
      }
  
      $(this.wrapper).show();
  
      $(this.element).prop('disabled', false);
  
      if (this.$form && document.body.contains(this.$form.get(0))) {
        var settings = this.settings || drupalSettings;
        Drupal.attachBehaviors(this.$form.get(0), settings);
      }
      throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage);
    };
  
    Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) {
      return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) {
        return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent));
      }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent;
    };
  
    Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) {
      return $('<div></div>').append($elements);
    };
  
    Drupal.AjaxCommands = function () {};
    Drupal.AjaxCommands.prototype = {
      insert: function insert(ajax, response) {
        var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
        var method = response.method || ajax.method;
        var effect = ajax.getEffect(response);
  
        var settings = response.settings || ajax.settings || drupalSettings;
  
        var $newContent = $($.parseHTML(response.data, document, true));
  
        $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response);
  
        switch (method) {
          case 'html':
          case 'replaceWith':
          case 'replaceAll':
          case 'empty':
          case 'remove':
            Drupal.detachBehaviors($wrapper.get(0), settings);
            break;
          default:
            break;
        }
  
        $wrapper[method]($newContent);
  
        if (effect.showEffect !== 'show') {
          $newContent.hide();
        }
  
        var $ajaxNewContent = $newContent.find('.ajax-new-content');
        if ($ajaxNewContent.length) {
          $ajaxNewContent.hide();
          $newContent.show();
          $ajaxNewContent[effect.showEffect](effect.showSpeed);
        } else if (effect.showEffect !== 'show') {
          $newContent[effect.showEffect](effect.showSpeed);
        }
  
        if ($newContent.parents('html').length) {
          $newContent.each(function (index, element) {
            if (element.nodeType === Node.ELEMENT_NODE) {
              Drupal.attachBehaviors(element, settings);
            }
          });
        }
      },
      remove: function remove(ajax, response, status) {
        var settings = response.settings || ajax.settings || drupalSettings;
        $(response.selector).each(function () {
          Drupal.detachBehaviors(this, settings);
        }).remove();
      },
      changed: function changed(ajax, response, status) {
        var $element = $(response.selector);
        if (!$element.hasClass('ajax-changed')) {
          $element.addClass('ajax-changed');
          if (response.asterisk) {
            $element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> ');
          }
        }
      },
      alert: function alert(ajax, response, status) {
        window.alert(response.text, response.title);
      },
      redirect: function redirect(ajax, response, status) {
        window.location = response.url;
      },
      css: function css(ajax, response, status) {
        $(response.selector).css(response.argument);
      },
      settings: function settings(ajax, response, status) {
        var ajaxSettings = drupalSettings.ajax;
  
        if (ajaxSettings) {
          Drupal.ajax.expired().forEach(function (instance) {
  
            if (instance.selector) {
              var selector = instance.selector.replace('#', '');
              if (selector in ajaxSettings) {
                delete ajaxSettings[selector];
              }
            }
          });
        }
  
        if (response.merge) {
          $.extend(true, drupalSettings, response.settings);
        } else {
          ajax.settings = response.settings;
        }
      },
      data: function data(ajax, response, status) {
        $(response.selector).data(response.name, response.value);
      },
      invoke: function invoke(ajax, response, status) {
        var $element = $(response.selector);
        $element[response.method].apply($element, _toConsumableArray(response.args));
      },
      restripe: function restripe(ajax, response, status) {
        $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
      },
      update_build_id: function update_build_id(ajax, response, status) {
        $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new);
      },
      add_css: function add_css(ajax, response, status) {
        $('head').prepend(response.data);
  
        var match = void 0;
        var importMatch = /^@import url\("(.*)"\);$/gim;
        if (document.styleSheets[0].addImport && importMatch.test(response.data)) {
          importMatch.lastIndex = 0;
          do {
            match = importMatch.exec(response.data);
            document.styleSheets[0].addImport(match[1]);
          } while (match);
        }
      }
    };
  })(jQuery, window, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, drupalSettings) {
    Drupal.behaviors.activeLinks = {
      attach: function attach(context) {
        var path = drupalSettings.path;
        var queryString = JSON.stringify(path.currentQuery);
        var querySelector = path.currentQuery ? '[data-drupal-link-query=\'' + queryString + '\']' : ':not([data-drupal-link-query])';
        var originalSelectors = ['[data-drupal-link-system-path="' + path.currentPath + '"]'];
        var selectors = void 0;
  
        if (path.isFront) {
          originalSelectors.push('[data-drupal-link-system-path="<front>"]');
        }
  
        selectors = [].concat(originalSelectors.map(function (selector) {
          return selector + ':not([hreflang])';
        }), originalSelectors.map(function (selector) {
          return selector + '[hreflang="' + path.currentLanguage + '"]';
        }));
  
        selectors = selectors.map(function (current) {
          return current + querySelector;
        });
  
        var activeLinks = context.querySelectorAll(selectors.join(','));
        var il = activeLinks.length;
        for (var i = 0; i < il; i++) {
          activeLinks[i].classList.add('is-active');
        }
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          var activeLinks = context.querySelectorAll('[data-drupal-link-system-path].is-active');
          var il = activeLinks.length;
          for (var i = 0; i < il; i++) {
            activeLinks[i].classList.remove('is-active');
          }
        }
      }
    };
  })(Drupal, drupalSettings);;
  /**
   * @file
   * JavaScript behavior to remove destination from contextual links.
   */
  
  (function ($) {
  
    'use strict';
  
    // Bind click event to all .contextual links which are
    // dynamically inserted via Ajax.
    // @see webform_contextual_links_view_alter()
    // @see Drupal.behaviors.contextual
    $(document).on('click', '.contextual', function () {
      $(this).find('a.webform-contextual').once('webform-contextual').each(function () {
        this.href = this.href.split('?')[0];
  
        // Add ?_webform_test={webform} to the current page's URL.
        if (/webform\/([^/]+)\/test/.test(this.href)) {
          this.href = window.location.pathname + '?_webform_test=' + RegExp.$1;
        }
      });
    });
  
  })(jQuery);
  ;
  /**
   * @file
   * JavaScript behaviors for details element.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    /**
     * Attach handler to save details open/close state.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformDetailsSave = {
      attach: function (context) {
        if (!window.localStorage) {
          return;
        }
  
        // Summary click event handler.
        $('details > summary', context).once('webform-details-summary-save').click(function () {
          var $details = $(this).parent();
  
  
          // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
          if ($details[0].hasAttribute('data-webform-details-nosave')) {
            return;
          }
  
          var name = Drupal.webformDetailsSaveGetName($details);
          if (!name) {
            return;
          }
  
          var open = ($details.attr('open') !== 'open') ? '1' : '0';
          localStorage.setItem(name, open);
        });
  
        // Initialize details open state via local storage.
        $('details', context).once('webform-details-save').each(function () {
          var $details = $(this);
  
          var name = Drupal.webformDetailsSaveGetName($details);
          if (!name) {
            return;
          }
  
          var open = localStorage.getItem(name);
          if (open === null) {
            return;
          }
  
          if (open === '1') {
            $details.attr('open', 'open');
          }
          else {
            $details.removeAttr('open');
          }
        });
      }
  
    };
  
    /**
     * Get the name used to store the state of details element.
     *
     * @param {jQuery} $details
     *   A details element.
     *
     * @return {string}
     *   The name used to store the state of details element.
     */
    Drupal.webformDetailsSaveGetName = function ($details) {
      if (!window.localStorage) {
        return '';
      }
  
      // Any details element not included a webform must have define its own id.
      var webformId = $details.attr('data-webform-element-id');
      if (webformId) {
        return 'Drupal.webform.' + webformId.replace('--', '.');
      }
  
      var detailsId = $details.attr('id');
      if (!detailsId) {
        return '';
      }
  
      var $form = $details.parents('form');
      if (!$form.length || !$form.attr('id')) {
        return '';
      }
  
      var formId = $form.attr('id');
      if (!formId) {
        return '';
      }
  
      // ISSUE: When Drupal renders a webform in a modal dialog it appends a unique
      // identifier to webform ids and details ids. (i.e. my-form--FeSFISegTUI)
      // WORKAROUND: Remove the unique id that delimited using double dashes.
      formId = formId.replace(/--.+?$/, '').replace(/-/g, '_');
      detailsId = detailsId.replace(/--.+?$/, '').replace(/-/g, '_');
      return 'Drupal.webform.' + formId + '.' + detailsId;
    };
  
  })(jQuery, Drupal);
  ;
  /**
   * @file
   * JavaScript behaviors for message element integration.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    /**
     * Behavior for handler message close.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformMessageClose = {
      attach: function (context) {
        $(context).find('.js-webform-message--close').once('webform-message--close').each(function () {
          var $element = $(this);
  
          var id = $element.attr('data-message-id');
          var storage = $element.attr('data-message-storage');
          var effect = $element.attr('data-message-close-effect') || 'hide';
          switch (effect) {
            case 'slide': effect = 'slideUp'; break;
  
            case 'fade': effect = 'fadeOut'; break;
          }
  
          // Check storage status.
          if (isClosed($element, storage, id)) {
            return;
          }
  
          // Only show element if it's style is not set to 'display: none'.
          if ($element.attr('style') !== 'display: none;') {
            $element.show();
          }
  
          $element.find('.js-webform-message__link').on('click', function (event) {
            $element[effect]();
            setClosed($element, storage, id);
            $element.trigger('close');
            event.preventDefault();
          });
        });
      }
    };
  
    function isClosed($element, storage, id) {
      if (!id || !storage) {
        return false;
      }
  
      switch (storage) {
        case 'local':
          if (window.localStorage) {
            return localStorage.getItem('Drupal.webform.message.' + id) || false;
          }
          return false;
  
        case 'session':
          if (window.sessionStorage) {
            return sessionStorage.getItem('Drupal.webform.message.' + id) || false;
          }
          return false;
  
        default:
          return false;
      }
    }
  
    function setClosed($element, storage, id) {
      if (!id || !storage) {
        return;
      }
  
      switch (storage) {
        case 'local':
          if (window.localStorage) {
            localStorage.setItem('Drupal.webform.message.' + id, true);
          }
          break;
  
        case 'session':
          if (window.sessionStorage) {
            sessionStorage.setItem('Drupal.webform.message.' + id, true);
          }
          break;
  
        case 'user':
        case 'state':
        case 'custom':
          $.get($element.find('.js-webform-message__link').attr('href'));
          return true;
      }
    }
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  Drupal.debounce = function (func, wait, immediate) {
    var timeout = void 0;
    var result = void 0;
    return function () {
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      var context = this;
      var later = function later() {
        timeout = null;
        if (!immediate) {
          result = func.apply(context, args);
        }
      };
      var callNow = immediate && !timeout;
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
      if (callNow) {
        result = func.apply(context, args);
      }
      return result;
    };
  };;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, debounce) {
    var offsets = {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    };
  
    function getRawOffset(el, edge) {
      var $el = $(el);
      var documentElement = document.documentElement;
      var displacement = 0;
      var horizontal = edge === 'left' || edge === 'right';
  
      var placement = $el.offset()[horizontal ? 'left' : 'top'];
  
      placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal ? 'Left' : 'Top')] || 0;
  
      switch (edge) {
        case 'top':
          displacement = placement + $el.outerHeight();
          break;
  
        case 'left':
          displacement = placement + $el.outerWidth();
          break;
  
        case 'bottom':
          displacement = documentElement.clientHeight - placement;
          break;
  
        case 'right':
          displacement = documentElement.clientWidth - placement;
          break;
  
        default:
          displacement = 0;
      }
      return displacement;
    }
  
    function calculateOffset(edge) {
      var edgeOffset = 0;
      var displacingElements = document.querySelectorAll('[data-offset-' + edge + ']');
      var n = displacingElements.length;
      for (var i = 0; i < n; i++) {
        var el = displacingElements[i];
  
        if (el.style.display === 'none') {
          continue;
        }
  
        var displacement = parseInt(el.getAttribute('data-offset-' + edge), 10);
  
        if (isNaN(displacement)) {
          displacement = getRawOffset(el, edge);
        }
  
        edgeOffset = Math.max(edgeOffset, displacement);
      }
  
      return edgeOffset;
    }
  
    function calculateOffsets() {
      return {
        top: calculateOffset('top'),
        right: calculateOffset('right'),
        bottom: calculateOffset('bottom'),
        left: calculateOffset('left')
      };
    }
  
    function displace(broadcast) {
      offsets = calculateOffsets();
      Drupal.displace.offsets = offsets;
      if (typeof broadcast === 'undefined' || broadcast) {
        $(document).trigger('drupalViewportOffsetChange', offsets);
      }
      return offsets;
    }
  
    Drupal.behaviors.drupalDisplace = {
      attach: function attach() {
        if (this.displaceProcessed) {
          return;
        }
        this.displaceProcessed = true;
  
        $(window).on('resize.drupalDisplace', debounce(displace, 200));
      }
    };
  
    Drupal.displace = displace;
    $.extend(Drupal.displace, {
      offsets: offsets,
  
      calculateOffset: calculateOffset
    });
  })(jQuery, Drupal, Drupal.debounce);;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var a,b=this._super()||{};return this.isInput=this.element.is("input"),a=this.element[0].disabled,null!=a&&(b.disabled=a),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(b.label=this.originalLabel),b},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(b){b.keyCode===a.ui.keyCode.SPACE&&(b.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(b,c){var d="iconPosition"!==b,e=d?this.options.iconPosition:c,f="top"===e||"bottom"===e;this.icon?d&&this._removeClass(this.icon,null,this.options.icon):(this.icon=a("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),d&&this._addClass(this.icon,null,c),this._attachIcon(e),f?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=a("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(e))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(a){this.icon[/^(?:end|bottom)/.test(a)?"before":"after"](this.iconSpace)},_attachIcon:function(a){this.element[/^(?:end|bottom)/.test(a)?"append":"prepend"](this.icon)},_setOptions:function(a){var b=void 0===a.showLabel?this.options.showLabel:a.showLabel,c=void 0===a.icon?this.options.icon:a.icon;b||c||(a.showLabel=!0),this._super(a)},_setOption:function(a,b){"icon"===a&&(b?this._updateIcon(a,b):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===a&&this._updateIcon(a,b),"showLabel"===a&&(this._toggleClass("ui-button-icon-only",null,!b),this._updateTooltip()),"label"===a&&(this.isInput?this.element.val(b):(this.element.html(b),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(a,b),"disabled"===a&&(this._toggleClass(null,"ui-state-disabled",b),this.element[0].disabled=b,b&&this.element.blur())},refresh:function(){var a=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");a!==this.options.disabled&&this._setOptions({disabled:a}),this._updateTooltip()}}),a.uiBackCompat!==!1&&(a.widget("ui.button",a.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(a,b){return"text"===a?void this._super("showLabel",b):("showLabel"===a&&(this.options.text=b),"icon"===a&&(this.options.icons.primary=b),"icons"===a&&(b.primary?(this._super("icon",b.primary),this._super("iconPosition","beginning")):b.secondary&&(this._super("icon",b.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),a.fn.button=function(b){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?b.apply(this,arguments):(a.ui.checkboxradio||a.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(a.fn.button),a.fn.buttonset=function(){return a.ui.controlgroup||a.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),a.ui.button});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).on("mouseup",function(){b=!1}),a.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.on("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).on("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f=!("string"!=typeof this.options.cancel||!c.target.nodeName)&&a(c.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(c))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)if(b.originalEvent.altKey||b.originalEvent.ctrlKey||b.originalEvent.metaKey||b.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,b=!1,c.preventDefault()},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.draggable",a.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(a,b){this._super(a,b),"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(b){var c=this.options;return!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(this._blurActiveElement(b),this._blockFrames(c.iframeFix===!0?"iframe":c.iframeFix),!0))},_blockFrames:function(b){this.iframeBlocks=this.document.find(b).map(function(){var b=a(this);return a("<div>").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(b){var c=a.ui.safeActiveElement(this.document[0]),d=a(b.target);d.closest(c).length||a.ui.safeBlur(c)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===a(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(b),this.originalPosition=this.position=this._generatePosition(b,!1),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(b,c){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b,!0),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp(new a.Event("mouseup",b)),!1;this.position=d.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1},_mouseUp:function(b){return this._unblockFrames(),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),this.handleElement.is(b.target)&&this.element.trigger("focus"),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new a.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper),e=d?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d&&e[0]===this.element[0]&&this._setPositionRelative(),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];return this.relativeContainer=null,e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),b&&(this.containment&&(this.relativeContainer?(d=this.relativeContainer.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(i=this.originalPageX),"x"===g.axis&&(j=this.originalPageY)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d,this],!0),/^(drag|start|stop)/.test(b)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=a.extend({},c,{item:d.element});d.sortables=[],a(d.options.connectToSortable).each(function(){var c=a(this).sortable("instance");c&&!c.options.disabled&&(d.sortables.push(c),c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});d.cancelHelperRemoval=!1,a.each(d.sortables,function(){var a=this;a.isOver?(a.isOver=0,d.cancelHelperRemoval=!0,a.cancelHelperRemoval=!1,a._storedCSS={position:a.placeholder.css("position"),top:a.placeholder.css("top"),left:a.placeholder.css("left")},a._mouseStop(b),a.options.helper=a.options._helper):(a.cancelHelperRemoval=!0,a._trigger("deactivate",b,e))})},drag:function(b,c,d){a.each(d.sortables,function(){var e=!1,f=this;f.positionAbs=d.positionAbs,f.helperProportions=d.helperProportions,f.offset.click=d.offset.click,f._intersectsWith(f.containerCache)&&(e=!0,a.each(d.sortables,function(){return this.positionAbs=d.positionAbs,this.helperProportions=d.helperProportions,this.offset.click=d.offset.click,this!==f&&this._intersectsWith(this.containerCache)&&a.contains(f.element[0],this.element[0])&&(e=!1),e})),e?(f.isOver||(f.isOver=1,d._parent=c.helper.parent(),f.currentItem=c.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return c.helper[0]},b.target=f.currentItem[0],f._mouseCapture(b,!0),f._mouseStart(b,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",b),d.dropped=f.element,a.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(b),c.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",b,f._uiHash(f)),f._mouseStop(b,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),c.helper.appendTo(d._parent),d._refreshOffsets(b),c.position=d._generatePosition(b,!0),d._trigger("fromSortable",b),d.dropped=!1,a.each(d.sortables,function(){this.refreshPositions()}))})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;e.css("cursor")&&(f._cursor=e.css("cursor")),e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;e._cursor&&a("body").css("cursor",e._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("opacity")&&(f._opacity=e.css("opacity")),e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;e._opacity&&a(c.helper).css("opacity",e._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1)),c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(b,c,d){var e=d.options,f=!1,g=d.scrollParentNotHidden[0],h=d.document[0];g!==h&&"HTML"!==g.tagName?(e.axis&&"x"===e.axis||(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity?g.scrollTop=f=g.scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(g.scrollTop=f=g.scrollTop-e.scrollSpeed)),e.axis&&"y"===e.axis||(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity?g.scrollLeft=f=g.scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(g.scrollLeft=f=g.scrollLeft-e.scrollSpeed))):(e.axis&&"x"===e.axis||(b.pageY-a(h).scrollTop()<e.scrollSensitivity?f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity&&(f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed))),e.axis&&"y"===e.axis||(b.pageX-a(h).scrollLeft()<e.scrollSensitivity?f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity&&(f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)))),f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[],a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--)i=d.snapElements[m].left-d.margins.left,j=i+d.snapElements[m].width,k=d.snapElements[m].top-d.margins.top,l=k+d.snapElements[m].height,r<i-p||q>j+p||t<k-p||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)?(d.snapElements[m].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=!1):("inner"!==o.snapMode&&(e=Math.abs(k-t)<=p,f=Math.abs(l-s)<=p,g=Math.abs(i-r)<=p,h=Math.abs(j-q)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left)),n=e||f||g||h,"outer"!==o.snapMode&&(e=Math.abs(k-s)<=p,f=Math.abs(l-t)<=p,g=Math.abs(i-q)<=p,h=Math.abs(j-r)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left)),!d.snapElements[m].snapping&&(e||f||g||h||n)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=e||f||g||h||n)}}),a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});g.length&&(e=parseInt(a(g[0]).css("zIndex"),10)||0,a(g).each(function(b){a(this).css("zIndex",e+b)}),this.css("zIndex",e+g.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("zIndex")&&(f._zIndex=e.css("zIndex")),e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;e._zIndex&&a(c.helper).css("zIndex",e._zIndex)}}),a.ui.draggable});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return function(){function b(a,b,c){return[parseFloat(a[0])*(l.test(a[0])?b/100:1),parseFloat(a[1])*(l.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}var e,f=Math.max,g=Math.abs,h=/left|center|right/,i=/top|center|bottom/,j=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,l=/%$/,m=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType,f=!d&&!e;return{element:c,isWindow:d,isDocument:e,offset:f?a(b).offset():{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:c.outerWidth(),height:c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return m.apply(this,arguments);e=a.extend({},e);var l,n,o,p,q,r,s=a(e.of),t=a.position.getWithinInfo(e.within),u=a.position.getScrollInfo(t),v=(e.collision||"flip").split(" "),w={};return r=d(s),s[0].preventDefault&&(e.at="left top"),n=r.width,o=r.height,p=r.offset,q=a.extend({},p),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=h.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center","center"]),c[0]=h.test(c[0])?c[0]:"center",c[1]=i.test(c[1])?c[1]:"center",a=j.exec(c[0]),b=j.exec(c[1]),w[this]=[a?a[0]:0,b?b[0]:0],e[this]=[k.exec(c[0])[0],k.exec(c[1])[0]]}),1===v.length&&(v[1]=v[0]),"right"===e.at[0]?q.left+=n:"center"===e.at[0]&&(q.left+=n/2),"bottom"===e.at[1]?q.top+=o:"center"===e.at[1]&&(q.top+=o/2),l=b(w.at,n,o),q.left+=l[0],q.top+=l[1],this.each(function(){var d,h,i=a(this),j=i.outerWidth(),k=i.outerHeight(),m=c(this,"marginLeft"),r=c(this,"marginTop"),x=j+m+c(this,"marginRight")+u.width,y=k+r+c(this,"marginBottom")+u.height,z=a.extend({},q),A=b(w.my,i.outerWidth(),i.outerHeight());"right"===e.my[0]?z.left-=j:"center"===e.my[0]&&(z.left-=j/2),"bottom"===e.my[1]?z.top-=k:"center"===e.my[1]&&(z.top-=k/2),z.left+=A[0],z.top+=A[1],d={marginLeft:m,marginTop:r},a.each(["left","top"],function(b,c){a.ui.position[v[b]]&&a.ui.position[v[b]][c](z,{targetWidth:n,targetHeight:o,elemWidth:j,elemHeight:k,collisionPosition:d,collisionWidth:x,collisionHeight:y,offset:[l[0]+A[0],l[1]+A[1]],my:e.my,at:e.at,within:t,elem:i})}),e.using&&(h=function(a){var b=p.left-z.left,c=b+n-j,d=p.top-z.top,h=d+o-k,l={target:{element:s,left:p.left,top:p.top,width:n,height:o},element:{element:i,left:z.left,top:z.top,width:j,height:k},horizontal:c<0?"left":b>0?"right":"center",vertical:h<0?"top":d>0?"bottom":"middle"};n<j&&g(b+c)<n&&(l.horizontal="center"),o<k&&g(d+h)<o&&(l.vertical="middle"),f(g(b),g(c))>f(g(d),g(h))?l.important="horizontal":l.important="vertical",e.using.call(this,a,l)}),i.offset(a.extend(z,{using:h}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,g=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-g-e;b.collisionWidth>g?i>0&&j<=0?(c=a.left+i+b.collisionWidth-g-e,a.left+=i-c):j>0&&i<=0?a.left=e:i>j?a.left=e+g-b.collisionWidth:a.left=e:i>0?a.left+=i:j>0?a.left-=j:a.left=f(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,g=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-g-e;b.collisionHeight>g?i>0&&j<=0?(c=a.top+i+b.collisionHeight-g-e,a.top+=i-c):j>0&&i<=0?a.top=e:i>j?a.top=e+g-b.collisionHeight:a.top=e:i>0?a.top+=i:j>0?a.top-=j:a.top=f(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,h=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-h-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];k<0?(c=a.left+m+n+o+b.collisionWidth-h-f,(c<0||c<g(k))&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||g(d)<l)&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,h=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-h-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];k<0?(d=a.top+n+o+p+b.collisionHeight-h-f,(d<0||d<g(k))&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||g(c)<l)&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}}}(),a.ui.position});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.resizable",a.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseFloat(a)||0},_isNumber:function(a){return!isNaN(parseFloat(a))},_hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)},_create:function(){var b,c=this.options,d=this;this._addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,b={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(b),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(b),this._proportionallyResize()),this._setupHandles(),c.autoHide&&a(this.element).on("mouseenter",function(){c.disabled||(d._removeClass("ui-resizable-autohide"),d._handles.show())}).on("mouseleave",function(){c.disabled||d.resizing||(d._addClass("ui-resizable-autohide"),d._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_setOption:function(a,b){switch(this._super(a,b),a){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var b,c,d,e,f,g=this.options,h=this;if(this.handles=g.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=a(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),d=this.handles.split(","),this.handles={},c=0;c<d.length;c++)b=a.trim(d[c]),e="ui-resizable-"+b,f=a("<div>"),this._addClass(f,"ui-resizable-handle "+e),f.css({zIndex:g.zIndex}),this.handles[b]=".ui-resizable-"+b,this.element.append(f);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String?this.handles[c]=this.element.children(this.handles[c]).first().show():(this.handles[c].jquery||this.handles[c].nodeType)&&(this.handles[c]=a(this.handles[c]),this._on(this.handles[c],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[c])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(f=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=f&&f[1]?f[1]:"se")}),g.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;return this.resizing=!0,this._renderProxy(),c=this._num(this.helper.css("left")),d=this._num(this.helper.css("top")),f.containment&&(c+=a(f.containment).scrollLeft()||0,d+=a(f.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:c,top:d},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalPosition={left:c,top:d},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof f.aspectRatio?f.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===e?this.axis+"-resize":e),this._addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];return this._updatePrevProperties(),!!i&&(c=i.apply(this,[b,g,h]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),d=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",b,this.ui()),this._applyChanges()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseFloat(k.element.css("left"))+(k.position.left-k.originalPosition.left)||null,i=parseFloat(k.element.css("top"))+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};return this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px"),this.helper.css(a),a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:1/0,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:1/0},(this._aspectRatio||a)&&(b=f.minHeight*this.aspectRatio,d=f.minWidth/this.aspectRatio,c=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,b>f.minWidth&&(f.minWidth=b),d>f.minHeight&&(f.minHeight=d),c<f.maxWidth&&(f.maxWidth=c),e<f.maxHeight&&(f.maxHeight=e)),this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset(),this._isNumber(a.left)&&(this.position.left=a.left),this._isNumber(a.top)&&(this.position.top=a.top),this._isNumber(a.height)&&(this.size.height=a.height),this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.originalPosition.top+this.originalSize.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);return f&&(a.width=b.minWidth),g&&(a.height=b.minHeight),d&&(a.width=b.maxWidth),e&&(a.height=b.maxHeight),f&&j&&(a.left=h-b.minWidth),d&&j&&(a.left=h-b.maxWidth),g&&k&&(a.top=i-b.minHeight),e&&k&&(a.top=i-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_getPaddingPlusBorderDimensions:function(a){for(var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];b<4;b++)c[b]=parseFloat(d[b])||0,c[b]+=parseFloat(e[b])||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,k=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseFloat(c.element.css("width")),height:parseFloat(c.element.css("height")),top:parseFloat(c.element.css("top")),left:parseFloat(c.element.css("left"))};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;m&&(i.containerElement=a(m),/document/.test(l)||l===document?(i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),c=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))}),i.containerOffset=b.offset(),i.containerPosition=b.position(),i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]},d=i.containerOffset,e=i.containerSize.height,f=i.containerSize.width,g=i._hasScroll(m,"left")?m.scrollWidth:f,h=i._hasScroll(m)?m.scrollHeight:e,i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}))},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=!0;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio,n=!1),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio,n=!1),g.position.top=g._helper?i.top:0),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f?(g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top):(g.offset.left=g.element.offset().left,g.offset.top=g.element.offset().top),c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left)),d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top)),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio,n=!1)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio,n=!1)),n||(g.position.left=g.prevPosition.left,g.position.top=g.prevPosition.top,g.size.width=g.prevSize.width,g.size.height=g.prevSize.height)},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options;a(c.alsoResize).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseFloat(b.width()),height:parseFloat(b.height()),left:parseFloat(b.css("left")),top:parseFloat(b.css("top"))})})},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0};a(e.alsoResize).each(function(){var b=a(this),d=a(this).data("ui-resizable-alsoresize"),e={},f=b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(f,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&c>=0&&(e[b]=c||null)}),b.css(e)})},stop:function(){a(this).removeData("ui-resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}),b._addClass(b.ghost,"ui-resizable-ghost"),a.uiBackCompat!==!1&&"string"==typeof b.options.ghost&&b.ghost.addClass(this.options.ghost),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).resizable("instance");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i="number"==typeof d.grid?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i,r&&(n+=j),s&&(o+=k),p&&(n-=j),q&&(o-=k),/^(se|s|e)$/.test(h)?(c.size.width=n,c.size.height=o):/^(ne)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.top=g.top-m):/^(sw)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.left=g.left-l):((o-k<=0||n-j<=0)&&(b=c._getPaddingPlusBorderDimensions(this)),o-k>0?(c.size.height=o,c.position.top=g.top-m):(o=k-b.height,c.size.height=o,c.position.top=g.top+f.height-o),n-j>0?(c.size.width=n,c.position.left=g.left-l):(n=j-b.width,c.size.width=n,c.position.left=g.left+f.width-n))}}),a.ui.resizable});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../safe-active-element","../safe-blur","../tabbable","../unique-id","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&this._trigger("beforeClose",b)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||a.ui.safeBlur(a.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(b,c){var d=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+a(this).css("z-index")}).get(),f=Math.max.apply(null,e);return f>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",f+1),d=!0),d&&!c&&this._trigger("focus",b),d},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(a.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]")),a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).trigger("focus")},_keepFocus:function(b){function c(){var b=a.ui.safeActiveElement(this.document[0]),c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB&&!b.isDefaultPrevented()){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(this._delay(function(){e.trigger("focus")}),b.preventDefault()):(this._delay(function(){d.trigger("focus")}),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=a("<button type='button'></button>").button({label:a("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(b,"ui-dialog-title"),this._title(b),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title?a.text(this.options.title):a.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,f={icon:d.icon,iconPosition:d.iconPosition,showLabel:d.showLabel,icons:d.icons,text:d.text},delete d.click,delete d.icon,delete d.iconPosition,delete d.showLabel,delete d.icons,"boolean"==typeof d.text&&delete d.text,a("<button></button>",d).button(f).appendTo(b.uiButtonSet).on("click",function(){e.apply(b.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,e){c._addClass(a(this),"ui-dialog-dragging"),c._blockFrames(),c._trigger("dragStart",d,b(e))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(e,f){var g=f.offset.left-c.document.scrollLeft(),h=f.offset.top-c.document.scrollTop();d.position={my:"left top",at:"left"+(g>=0?"+":"")+g+" top"+(h>=0?"+":"")+h,of:c.window},c._removeClass(a(this),"ui-dialog-dragging"),c._unblockFrames(),c._trigger("dragStop",e,b(f))}})},_makeResizable:function(){function b(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=this,d=this.options,e=d.resizable,f=this.uiDialog.css("position"),g="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:d.maxWidth,maxHeight:d.maxHeight,minWidth:d.minWidth,minHeight:this._minHeight(),handles:g,start:function(d,e){c._addClass(a(this),"ui-dialog-resizing"),c._blockFrames(),c._trigger("resizeStart",d,b(e))},resize:function(a,d){c._trigger("resize",a,b(d))},stop:function(e,f){var g=c.uiDialog.offset(),h=g.left-c.document.scrollLeft(),i=g.top-c.document.scrollTop();d.height=c.uiDialog.height(),d.width=c.uiDialog.width(),d.position={my:"left top",at:"left"+(h>=0?"+":"")+h+" top"+(i>=0?"+":"")+i,of:c.window},c._removeClass(a(this),"ui-dialog-resizing"),c._unblockFrames(),c._trigger("resizeStop",e,b(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(b){this._makeFocusTarget(),this._focusedElement=a(b.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var b=this._trackingInstances(),c=a.inArray(this,b);c!==-1&&b.splice(c,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");return a||(a=[],this.document.data("ui-dialog-instances",a)),a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var c=this,d=!1,e={};a.each(b,function(a,b){c._setOption(a,b),a in c.sizeRelatedOptions&&(d=!0),a in c.resizableRelatedOptions&&(e[a]=b)}),d&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",e)},_setOption:function(b,c){var d,e,f=this.uiDialog;"disabled"!==b&&(this._super(b,c),"appendTo"===b&&this.uiDialog.appendTo(this._appendTo()),"buttons"===b&&this._createButtons(),"closeText"===b&&this.uiDialogTitlebarClose.button({label:a("<a>").text(""+this.options.closeText).html()}),"draggable"===b&&(d=f.is(":data(ui-draggable)"),d&&!c&&f.draggable("destroy"),!d&&c&&this._makeDraggable()),"position"===b&&this._position(),"resizable"===b&&(e=f.is(":data(ui-resizable)"),e&&!c&&f.resizable("destroy"),e&&"string"==typeof c&&f.resizable("option","handles",c),e||c===!1||this._makeResizable()),"title"===b&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=!0;this._delay(function(){b=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(a){b||this._allowInteraction(a)||(a.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=a("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),a.uiBackCompat!==!1&&a.widget("ui.dialog",a.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(a,b){"dialogClass"===a&&this.uiDialog.removeClass(this.options.dialogClass).addClass(b),this._superApply(arguments)}}),a.ui.dialog});;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings) {
    drupalSettings.dialog = {
      autoOpen: true,
      dialogClass: '',
  
      buttonClass: 'button',
      buttonPrimaryClass: 'button--primary',
      close: function close(event) {
        Drupal.dialog(event.target).close();
        Drupal.detachBehaviors(event.target, null, 'unload');
      }
    };
  
    Drupal.dialog = function (element, options) {
      var undef = void 0;
      var $element = $(element);
      var dialog = {
        open: false,
        returnValue: undef
      };
  
      function openDialog(settings) {
        settings = $.extend({}, drupalSettings.dialog, options, settings);
  
        $(window).trigger('dialog:beforecreate', [dialog, $element, settings]);
        $element.dialog(settings);
        dialog.open = true;
        $(window).trigger('dialog:aftercreate', [dialog, $element, settings]);
      }
  
      function closeDialog(value) {
        $(window).trigger('dialog:beforeclose', [dialog, $element]);
        $element.dialog('close');
        dialog.returnValue = value;
        dialog.open = false;
        $(window).trigger('dialog:afterclose', [dialog, $element]);
      }
  
      dialog.show = function () {
        openDialog({ modal: false });
      };
      dialog.showModal = function () {
        openDialog({ modal: true });
      };
      dialog.close = closeDialog;
  
      return dialog;
    };
  })(jQuery, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings, debounce, displace) {
    drupalSettings.dialog = $.extend({ autoResize: true, maxHeight: '95%' }, drupalSettings.dialog);
  
    function resetPosition(options) {
      var offsets = displace.offsets;
      var left = offsets.left - offsets.right;
      var top = offsets.top - offsets.bottom;
  
      var leftString = (left > 0 ? '+' : '-') + Math.abs(Math.round(left / 2)) + 'px';
      var topString = (top > 0 ? '+' : '-') + Math.abs(Math.round(top / 2)) + 'px';
      options.position = {
        my: 'center' + (left !== 0 ? leftString : '') + ' center' + (top !== 0 ? topString : ''),
        of: window
      };
      return options;
    }
  
    function resetSize(event) {
      var positionOptions = ['width', 'height', 'minWidth', 'minHeight', 'maxHeight', 'maxWidth', 'position'];
      var adjustedOptions = {};
      var windowHeight = $(window).height();
      var option = void 0;
      var optionValue = void 0;
      var adjustedValue = void 0;
      for (var n = 0; n < positionOptions.length; n++) {
        option = positionOptions[n];
        optionValue = event.data.settings[option];
        if (optionValue) {
          if (typeof optionValue === 'string' && /%$/.test(optionValue) && /height/i.test(option)) {
            windowHeight -= displace.offsets.top + displace.offsets.bottom;
            adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight, 10);
  
            if (option === 'height' && event.data.$element.parent().outerHeight() < adjustedValue) {
              adjustedValue = 'auto';
            }
            adjustedOptions[option] = adjustedValue;
          }
        }
      }
  
      if (!event.data.settings.modal) {
        adjustedOptions = resetPosition(adjustedOptions);
      }
      event.data.$element.dialog('option', adjustedOptions).trigger('dialogContentResize');
    }
  
    $(window).on({
      'dialog:aftercreate': function dialogAftercreate(event, dialog, $element, settings) {
        var autoResize = debounce(resetSize, 20);
        var eventData = { settings: settings, $element: $element };
        if (settings.autoResize === true || settings.autoResize === 'true') {
          $element.dialog('option', { resizable: false, draggable: false }).dialog('widget').css('position', 'fixed');
          $(window).on('resize.dialogResize scroll.dialogResize', eventData, autoResize).trigger('resize.dialogResize');
          $(document).on('drupalViewportOffsetChange.dialogResize', eventData, autoResize);
        }
      },
      'dialog:beforeclose': function dialogBeforeclose(event, dialog, $element) {
        $(window).off('.dialogResize');
        $(document).off('.dialogResize');
      }
    });
  })(jQuery, Drupal, drupalSettings, Drupal.debounce, Drupal.displace);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($) {
    $.widget('ui.dialog', $.ui.dialog, {
      options: {
        buttonClass: 'button',
        buttonPrimaryClass: 'button--primary'
      },
      _createButtons: function _createButtons() {
        var opts = this.options;
        var primaryIndex = void 0;
        var index = void 0;
        var il = opts.buttons.length;
        for (index = 0; index < il; index++) {
          if (opts.buttons[index].primary && opts.buttons[index].primary === true) {
            primaryIndex = index;
            delete opts.buttons[index].primary;
            break;
          }
        }
        this._super();
        var $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
        if (typeof primaryIndex !== 'undefined') {
          $buttons.eq(index).addClass(opts.buttonPrimaryClass);
        }
      }
    });
  })(jQuery);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.behaviors.dialog = {
      attach: function attach(context, settings) {
        var $context = $(context);
  
        if (!$('#drupal-modal').length) {
          $('<div id="drupal-modal" class="ui-front"/>').hide().appendTo('body');
        }
  
        var $dialog = $context.closest('.ui-dialog-content');
        if ($dialog.length) {
          if ($dialog.dialog('option', 'drupalAutoButtons')) {
            $dialog.trigger('dialogButtonsChange');
          }
  
          $dialog.dialog('widget').trigger('focus');
        }
  
        var originalClose = settings.dialog.close;
  
        settings.dialog.close = function (event) {
          for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
            args[_key - 1] = arguments[_key];
          }
  
          originalClose.apply(settings.dialog, [event].concat(args));
          $(event.target).remove();
        };
      },
      prepareDialogButtons: function prepareDialogButtons($dialog) {
        var buttons = [];
        var $buttons = $dialog.find('.form-actions input[type=submit], .form-actions a.button');
        $buttons.each(function () {
          var $originalButton = $(this).css({
            display: 'block',
            width: 0,
            height: 0,
            padding: 0,
            border: 0,
            overflow: 'hidden'
          });
          buttons.push({
            text: $originalButton.html() || $originalButton.attr('value'),
            class: $originalButton.attr('class'),
            click: function click(e) {
              if ($originalButton.is('a')) {
                $originalButton[0].click();
              } else {
                $originalButton.trigger('mousedown').trigger('mouseup').trigger('click');
                e.preventDefault();
              }
            }
          });
        });
        return buttons;
      }
    };
  
    Drupal.AjaxCommands.prototype.openDialog = function (ajax, response, status) {
      if (!response.selector) {
        return false;
      }
      var $dialog = $(response.selector);
      if (!$dialog.length) {
        $dialog = $('<div id="' + response.selector.replace(/^#/, '') + '" class="ui-front"/>').appendTo('body');
      }
  
      if (!ajax.wrapper) {
        ajax.wrapper = $dialog.attr('id');
      }
  
      response.command = 'insert';
      response.method = 'html';
      ajax.commands.insert(ajax, response, status);
  
      if (!response.dialogOptions.buttons) {
        response.dialogOptions.drupalAutoButtons = true;
        response.dialogOptions.buttons = Drupal.behaviors.dialog.prepareDialogButtons($dialog);
      }
  
      $dialog.on('dialogButtonsChange', function () {
        var buttons = Drupal.behaviors.dialog.prepareDialogButtons($dialog);
        $dialog.dialog('option', 'buttons', buttons);
      });
  
      response.dialogOptions = response.dialogOptions || {};
      var dialog = Drupal.dialog($dialog.get(0), response.dialogOptions);
      if (response.dialogOptions.modal) {
        dialog.showModal();
      } else {
        dialog.show();
      }
  
      $dialog.parent().find('.ui-dialog-buttonset').addClass('form-actions');
    };
  
    Drupal.AjaxCommands.prototype.closeDialog = function (ajax, response, status) {
      var $dialog = $(response.selector);
      if ($dialog.length) {
        Drupal.dialog($dialog.get(0)).close();
        if (!response.persist) {
          $dialog.remove();
        }
      }
  
      $dialog.off('dialogButtonsChange');
    };
  
    Drupal.AjaxCommands.prototype.setDialogOption = function (ajax, response, status) {
      var $dialog = $(response.selector);
      if ($dialog.length) {
        $dialog.dialog('option', response.optionName, response.optionValue);
      }
    };
  
    $(window).on('dialog:aftercreate', function (e, dialog, $element, settings) {
      $element.on('click.dialog', '.dialog-cancel', function (e) {
        dialog.close('cancel');
        e.preventDefault();
        e.stopPropagation();
      });
    });
  
    $(window).on('dialog:beforeclose', function (e, dialog, $element) {
      $element.off('.dialog');
    });
  })(jQuery, Drupal);;
  /**
   * @file
   * JavaScript behaviors to fix jQuery UI dialogs.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    /**
     * Ensure that ckeditor has focus when displayed inside of jquery-ui dialog widget
     *
     * @see http://stackoverflow.com/questions/20533487/how-to-ensure-that-ckeditor-has-focus-when-displayed-inside-of-jquery-ui-dialog
     */
    var _allowInteraction = $.ui.dialog.prototype._allowInteraction;
    $.ui.dialog.prototype._allowInteraction = function (event) {
      if ($(event.target).closest('.cke_dialog').length) {
        return true;
      }
      return _allowInteraction.apply(this, arguments);
    };
  
    /**
     * Attaches webform dialog behaviors.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches event listeners for webform dialogs.
     */
    Drupal.behaviors.webformDialogEvents = {
      attach: function () {
        $(window).once('webform-dialog').on({
          'dialog:aftercreate': function (event, dialog, $element, settings) {
            setTimeout(function () {
              var hasFocus = $element.find('[autofocus]:tabbable');
              if (!hasFocus.length) {
                // Move focus to first input which is not a button.
                hasFocus = $element.find(':input:tabbable:not(:button)');
              }
              if (!hasFocus.length) {
                // Move focus to close dialog button.
                hasFocus = $element.parent().find('.ui-dialog-titlebar-close');
              }
              hasFocus.eq(0).focus();
            });
          }
        });
      }
    };
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, debounce) {
    var liveElement = void 0;
    var announcements = [];
  
    Drupal.behaviors.drupalAnnounce = {
      attach: function attach(context) {
        if (!liveElement) {
          liveElement = document.createElement('div');
          liveElement.id = 'drupal-live-announce';
          liveElement.className = 'visually-hidden';
          liveElement.setAttribute('aria-live', 'polite');
          liveElement.setAttribute('aria-busy', 'false');
          document.body.appendChild(liveElement);
        }
      }
    };
  
    function announce() {
      var text = [];
      var priority = 'polite';
      var announcement = void 0;
  
      var il = announcements.length;
      for (var i = 0; i < il; i++) {
        announcement = announcements.pop();
        text.unshift(announcement.text);
  
        if (announcement.priority === 'assertive') {
          priority = 'assertive';
        }
      }
  
      if (text.length) {
        liveElement.innerHTML = '';
  
        liveElement.setAttribute('aria-busy', 'true');
  
        liveElement.setAttribute('aria-live', priority);
  
        liveElement.innerHTML = text.join('\n');
  
        liveElement.setAttribute('aria-busy', 'false');
      }
    }
  
    Drupal.announce = function (text, priority) {
      announcements.push({
        text: text,
        priority: priority
      });
  
      return debounce(announce, 200)();
    };
  })(Drupal, Drupal.debounce);;
  /*!
   * jQuery Form Plugin
   * version: 4.2.2
   * Requires jQuery v1.7.2 or later
   * Project repository: https://github.com/jquery-form/form
  
   * Copyright 2017 Kevin Morris
   * Copyright 2006 M. Alsup
  
   * Dual licensed under the LGPL-2.1+ or MIT licenses
   * https://github.com/jquery-form/form#license
  
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * Lesser General Public License for more details.
   */
  !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n=/\r?\n/g,i={};i.fileapi=void 0!==e('<input type="file">').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a<o;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function c(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){a("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function i(){function t(){try{var e=n(v).readyState;a("state = "+e),e&&"uninitialized"===e.toLowerCase()&&setTimeout(t,50)}catch(e){a("Server abort: ",e," (",e.name,")"),s(L),j&&clearTimeout(j),j=void 0}}var r=p.attr2("target"),i=p.attr2("action"),o=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";w.setAttribute("target",m),l&&!/post/i.test(l)||w.setAttribute("method","POST"),i!==f.url&&w.setAttribute("action",f.url),f.skipEncodingOverride||l&&!/post/i.test(l)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(j=setTimeout(function(){T=!0,s(A)},f.timeout));var u=[];try{if(f.extraData)for(var c in f.extraData)f.extraData.hasOwnProperty(c)&&(e.isPlainObject(f.extraData[c])&&f.extraData[c].hasOwnProperty("name")&&f.extraData[c].hasOwnProperty("value")?u.push(e('<input type="hidden" name="'+f.extraData[c].name+'">',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('<input type="hidden" name="'+c+'">',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c<g.length;c++)u=e(g[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");(f=e.extend(!0,{},e.ajaxSettings,t)).context=f.context||f,m="jqFormIO"+(new Date).getTime();var k=w.ownerDocument,D=p.closest("body");if(f.iframeTarget?(b=(h=e(f.iframeTarget,k)).attr2("name"))?m=b:h.attr2("name",m):(h=e('<iframe name="'+m+'" src="'+f.iframeSrc+'" />',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i<o;i++)T[i].apply(n,[e,r,a||p,p])},t.error){var w=t.error;t.error=function(e,r,a){var n=t.context||this;w.apply(n,[e,r,a,p])}}if(t.complete){var S=t.complete;t.complete=function(e,r){var a=t.context||this;S.apply(a,[e,r,p])}}var k=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}).length>0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n<r.length;n++)a.append(r[n].name,r[n].value);if(t.extraData){var i=u(t.extraData);for(n=0;n<i.length;n++)i[n]&&a.append(i[n][0],i[n][1])}t.data=null;var o=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});t.uploadProgress&&(o.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),o.data=null;var s=o.beforeSend;return o.beforeSend=function(e,r){t.formData?r.data=t.formData:r.data=a,s&&s.call(this,e,r)},e.ajax(o)}(x):e.ajax(t),p.removeData("jqxhr").data("jqxhr",F);for(var M=0;M<g.length;M++)g[M]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n,i,o,s){if(("string"==typeof n||!1===n&&arguments.length>0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l<h;l++)if(m=c[l],(d=m.name)&&!m.disabled)if(t&&s.clk&&"image"===m.type)s.clk===m&&(n.push({name:d,value:e(m).val(),type:m.type}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}));else if((p=e.fieldValue(m,!0))&&p.constructor===Array)for(r&&r.push(m),f=0,v=p.length;f<v;f++)n.push({name:d,value:p[f]});else if(i.fileapi&&"file"===m.type){r&&r.push(m);var g=m.files;if(g.length)for(f=0;f<g.length;f++)n.push({name:d,value:g[f],type:m.type});else n.push({name:d,value:"",type:m.type})}else null!==p&&void 0!==p&&(r&&r.push(m),n.push({name:d,value:p,type:m.type,required:m.required}));if(!t&&s.clk){var x=e(s.clk),y=x[0];(d=y.name)&&!y.disabled&&"image"===y.type&&(n.push({name:d,value:x.val()}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}))}return n},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor===Array)for(var i=0,o=n.length;i<o;i++)r.push({name:a,value:n[i]});else null!==n&&void 0!==n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;a<n;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor===Array&&!o.length||(o.constructor===Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,i=t.type,o=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"===i||"button"===i||("checkbox"===i||"radio"===i)&&!t.checked||("submit"===i||"image"===i)&&t.form&&t.form.clk!==t||"select"===o&&-1===t.selectedIndex))return null;if("select"===o){var s=t.selectedIndex;if(s<0)return null;for(var u=[],c=t.options,l="select-one"===i,f=l?s+1:c.length,d=l?s:0;d<f;d++){var p=c[d];if(p.selected&&!p.disabled){var m=p.value;if(m||(m=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),l)return m;u.push(m)}}return u}return e(t).val().replace(n,"\r\n")},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"===n?this.value="":"checkbox"===a||"radio"===a?this.checked=!1:"select"===n?this.selectedIndex=-1:"file"===a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){var t=e(this),r=this.tagName.toLowerCase();switch(r){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var a=t.parents("select");return a.length&&a[0].multiple?"option"===r?this.selected=this.defaultSelected:t.find("option").resetForm():a.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var n=e(t.attr("for")),i=t.find("input,select,textarea");return n[0]&&i.unshift(n[0]),i.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"===r||"radio"===r)this.checked=t;else if("option"===this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"===a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});
  
  ;
  /**
   * @file
   * JavaScript behaviors for Ajax.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    Drupal.webform = Drupal.webform || {};
    Drupal.webform.ajax = Drupal.webform.ajax || {};
    // Allow scrollTopOffset to be custom defined or based on whether there is a
    // floating toolbar.
    Drupal.webform.ajax.scrollTopOffset = Drupal.webform.ajax.scrollTopOffset || ($('#toolbar-administration').length ? 140 : 10);
  
    /**
     * Provide Webform Ajax link behavior.
     *
     * Display fullscreen progress indicator instead of throbber.
     * Copied from: Drupal.behaviors.AJAX
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior to a.webform-ajax-link.
     */
    Drupal.behaviors.webformAjaxLink = {
      attach: function (context) {
        $('.webform-ajax-link', context).once('webform-ajax-link').each(function () {
          var element_settings = {};
          element_settings.progress = {type: 'fullscreen'};
  
          // For anchor tags, these will go to the target of the anchor rather
          // than the usual location.
          var href = $(this).attr('href');
          if (href) {
            element_settings.url = href;
            element_settings.event = 'click';
          }
          element_settings.dialogType = $(this).data('dialog-type');
          element_settings.dialogRenderer = $(this).data('dialog-renderer');
          element_settings.dialog = $(this).data('dialog-options');
          element_settings.base = $(this).attr('id');
          element_settings.element = this;
          Drupal.ajax(element_settings);
  
          // Close all open modal dialogs when opening off-canvas dialog.
          if (element_settings.dialogRenderer === 'off_canvas') {
            $(this).on('click', function () {
              $('.ui-dialog.webform-ui-dialog:visible').find('.ui-dialog-content').dialog('close');
            });
          }
        });
      }
    };
  
    /**
     * Adds a hash (#) to current pages location for links and buttons
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior to a[data-hash] or :button[data-hash].
     *
     * @see \Drupal\webform_ui\WebformUiEntityElementsForm::getElementRow
     * @see Drupal.behaviors.webformFormTabs
     */
    Drupal.behaviors.webformAjaxHash = {
      attach: function (context) {
        $('[data-hash]', context).once('webform-ajax-hash').each(function () {
          var hash = $(this).data('hash');
          if (hash) {
            $(this).on('click', function () {
              location.hash = $(this).data('hash');
            });
          }
        });
      }
    };
  
    /**
     * Provide Ajax callback for confirmation back to link.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior to confirmation back to link.
     */
    Drupal.behaviors.webformConfirmationBackAjax = {
      attach: function (context) {
        $('.js-webform-confirmation-back-link-ajax', context)
          .once('webform-confirmation-back-ajax')
          .click(function (event) {
            var $form = $(this).parents('form');
  
            // Trigger the Ajax call back for the hidden submit button.
            // @see \Drupal\webform\WebformSubmissionForm::getCustomForm
            $form.find('.js-webform-confirmation-back-submit-ajax').click();
  
            // Move the progress indicator from the submit button to after this link.
            // @todo Figure out a better way to set a progress indicator.
            var $progress_indicator = $form.find('.ajax-progress');
            if ($progress_indicator) {
              $(this).after($progress_indicator);
            }
  
            // Cancel the click event.
            event.preventDefault();
            event.stopPropagation();
          });
      }
    };
  
    /** ********************************************************************** **/
    // Ajax commands.
    /** ********************************************************************** **/
  
    /**
     * Track the updated table row key.
     */
    var updateKey;
  
    /**
     * Track the add element key.
     */
    var addElement;
  
    /**
     * Command to insert new content into the DOM.
     *
     * @param {Drupal.Ajax} ajax
     *   {@link Drupal.Ajax} object created by {@link Drupal.ajax}.
     * @param {object} response
     *   The response from the Ajax request.
     * @param {string} response.data
     *   The data to use with the jQuery method.
     * @param {string} [response.method]
     *   The jQuery DOM manipulation method to be used.
     * @param {string} [response.selector]
     *   A optional jQuery selector string.
     * @param {object} [response.settings]
     *   An optional array of settings that will be used.
     * @param {number} [status]
     *   The XMLHttpRequest status.
     */
    Drupal.AjaxCommands.prototype.webformInsert = function (ajax, response, status) {
      // Insert the HTML.
      this.insert(ajax, response, status);
  
      // Add element.
      if (addElement) {
        var addSelector = (addElement === '_root_')
          ? '#webform-ui-add-element'
          : '[data-drupal-selector="edit-webform-ui-elements-' + addElement + '-add"]';
        $(addSelector).click();
      }
  
      // If not add element, then scroll to and highlight the updated table row.
      if (!addElement && updateKey) {
        var $element = $('tr[data-webform-key="' + updateKey + '"]');
  
        // Highlight the updated element's row.
        $element.addClass('color-success');
        setTimeout(function () {$element.removeClass('color-success');}, 3000);
  
        // Focus first tabbable item for the updated elements and handlers.
        $element.find(':tabbable:not(.tabledrag-handle)').eq(0).focus();
  
        // Scroll to elements that are not visible.
        if (!isScrolledIntoView($element)) {
          $('html, body').animate({scrollTop: $element.offset().top - Drupal.webform.ajax.scrollTopOffset}, 500);
        }
      }
      else {
        // Focus main content.
        $('#main-content').focus();
      }
  
      // Display main page's status message in a floating container.
      var $wrapper = $(response.selector);
      if ($wrapper.parents('.ui-dialog').length === 0) {
        var $messages = $wrapper.find('.messages');
        // If 'add element' don't show any messages.
        if (addElement) {
          $messages.remove();
        }
        else if ($messages.length) {
          var $floatingMessage = $('#webform-ajax-messages');
          if ($floatingMessage.length === 0) {
            $floatingMessage = $('<div id="webform-ajax-messages" class="webform-ajax-messages"></div>');
            $('body').append($floatingMessage);
          }
          if ($floatingMessage.is(':animated')) {
            $floatingMessage.stop(true, true);
          }
          $floatingMessage.html($messages).show().delay(3000).fadeOut(1000);
        }
      }
  
      updateKey = null; // Reset element update.
      addElement = null; // Reset add element.
    };
  
    /**
     * Scroll to top ajax command.
     *
     * @param {Drupal.Ajax} [ajax]
     *   A {@link Drupal.ajax} object.
     * @param {object} response
     *   Ajax response.
     * @param {string} response.selector
     *   Selector to use.
     *
     * @see Drupal.AjaxCommands.prototype.viewScrollTop
     */
    Drupal.AjaxCommands.prototype.webformScrollTop = function (ajax, response) {
      // Scroll to the top of the view. This will allow users
      // to browse newly loaded content after e.g. clicking a pager
      // link.
      var offset = $(response.selector).offset();
      // We can't guarantee that the scrollable object should be
      // the body, as the view could be embedded in something
      // more complex such as a modal popup. Recurse up the DOM
      // and scroll the first element that has a non-zero top.
      var scrollTarget = response.selector;
      while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) {
        scrollTarget = $(scrollTarget).parent();
      }
  
      if (response.target === 'page' && $(scrollTarget).length && $(scrollTarget)[0].tagName === 'HTML') {
        // Scroll to top when scroll target is the entire page.
        // @see https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
        var rect = $(scrollTarget)[0].getBoundingClientRect();
        if (!(rect.top >= 0 && rect.left >= 0 && rect.bottom <= $(window).height() && rect.right <= $(window).width())) {
          $(scrollTarget).animate({scrollTop: 0}, 500);
        }
      }
      else {
        // Only scroll upward.
        if (offset.top - Drupal.webform.ajax.scrollTopOffset < $(scrollTarget).scrollTop()) {
          $(scrollTarget).animate({scrollTop: (offset.top - Drupal.webform.ajax.scrollTopOffset)}, 500);
        }
      }
  
      // Focus on the form wrapper content bookmark if
      // .js-webform-autofocus is not enabled.
      // @see \Drupal\webform\Form\WebformAjaxFormTrait::buildAjaxForm
      var $form = $(response.selector + '-content').find('form');
      if (!$form.hasClass('js-webform-autofocus')) {
        $(response.selector + '-content').focus();
      }
    };
  
    /**
     * Command to refresh the current webform page.
     *
     * @param {Drupal.Ajax} [ajax]
     *   {@link Drupal.Ajax} object created by {@link Drupal.ajax}.
     * @param {object} response
     *   The response from the Ajax request.
     * @param {string} response.url
     *   The URL to redirect to.
     * @param {number} [status]
     *   The XMLHttpRequest status.
     */
    Drupal.AjaxCommands.prototype.webformRefresh = function (ajax, response, status) {
      // Get URL path name.
      // @see https://stackoverflow.com/questions/6944744/javascript-get-portion-of-url-path
      var a = document.createElement('a');
      a.href = response.url;
      if (a.pathname === window.location.pathname && $('.webform-ajax-refresh').length) {
        updateKey = (response.url.match(/[?|&]update=([^&]+)($|&)/)) ? RegExp.$1 : null;
        addElement = (response.url.match(/[?|&]add_element=([^&]+)($|&)/)) ? RegExp.$1 : null;
        $('.webform-ajax-refresh').click();
      }
      else {
        this.redirect(ajax, response, status);
      }
    };
  
    /**
     * Command to close a off-canvas and modal dialog.
     *
     * If no selector is given, it defaults to trying to close the modal.
     *
     * @param {Drupal.Ajax} [ajax]
     *   {@link Drupal.Ajax} object created by {@link Drupal.ajax}.
     * @param {object} response
     *   The response from the Ajax request.
     * @param {string} response.selector
     *   Selector to use.
     * @param {bool} response.persist
     *   Whether to persist the dialog element or not.
     * @param {number} [status]
     *   The HTTP status code.
     */
    Drupal.AjaxCommands.prototype.webformCloseDialog = function (ajax, response, status) {
      if ($('#drupal-off-canvas').length) {
        // Close off-canvas system tray which is not triggered by close dialog
        // command.
        // @see Drupal.behaviors.offCanvasEvents
        $('#drupal-off-canvas').remove();
        $('body').removeClass('js-tray-open');
        // Remove all *.off-canvas events
        $(document).off('.off-canvas');
        $(window).off('.off-canvas');
        var edge = document.documentElement.dir === 'rtl' ? 'left' : 'right';
        var $mainCanvasWrapper = $('[data-off-canvas-main-canvas]');
        $mainCanvasWrapper.css('padding-' + edge, 0);
  
        // Resize tabs when closing off-canvas system tray.
        $(window).trigger('resize.tabs');
      }
  
      // https://stackoverflow.com/questions/15763909/jquery-ui-dialog-check-if-exists-by-instance-method
      if ($(response.selector).hasClass('ui-dialog-content')) {
        this.closeDialog(ajax, response, status);
      }
    };
  
    /**
     * Triggers audio UAs to read the supplied text.
     *
     * @param {Drupal.Ajax} [ajax]
     *   A {@link Drupal.ajax} object.
     * @param {object} response
     *   Ajax response.
     * @param {string} response.text
     *   A string to be read by the UA.
     * @param {string} [response.priority='polite']
     *   A string to indicate the priority of the message. Can be either
     *   'polite' or 'assertive'.
     *
     * @see Drupal.announce
     */
    Drupal.AjaxCommands.prototype.webformAnnounce = function (ajax, response) {
      // Delay the announcement.
      setTimeout(function () {Drupal.announce(response.text, response.priority);}, 200);
    };
  
    /** ********************************************************************** **/
    // Helper functions.
    /** ********************************************************************** **/
  
    /**
     * Determine if element is visible in the viewport.
     *
     * @param {Element} element
     *   An element.
     *
     * @return {boolean}
     *   TRUE if element is visible in the viewport.
     *
     * @see https://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling
     */
    function isScrolledIntoView(element) {
      var docViewTop = $(window).scrollTop();
      var docViewBottom = docViewTop + $(window).height();
  
      var elemTop = $(element).offset().top;
      var elemBottom = elemTop + $(element).height();
  
      return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
    }
  
  })(jQuery, Drupal);
  ;
  /*! jquery.cookie v1.4.1 | MIT */
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, debounce) {
    $.fn.drupalGetSummary = function () {
      var callback = this.data('summaryCallback');
      return this[0] && callback ? $.trim(callback(this[0])) : '';
    };
  
    $.fn.drupalSetSummary = function (callback) {
      var self = this;
  
      if (typeof callback !== 'function') {
        var val = callback;
        callback = function callback() {
          return val;
        };
      }
  
      return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () {
        self.trigger('summaryUpdated');
      }).trigger('summaryUpdated');
    };
  
    Drupal.behaviors.formSingleSubmit = {
      attach: function attach() {
        function onFormSubmit(e) {
          var $form = $(e.currentTarget);
          var formValues = $form.serialize();
          var previousValues = $form.attr('data-drupal-form-submit-last');
          if (previousValues === formValues) {
            e.preventDefault();
          } else {
            $form.attr('data-drupal-form-submit-last', formValues);
          }
        }
  
        $('body').once('form-single-submit').on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit);
      }
    };
  
    function triggerFormUpdated(element) {
      $(element).trigger('formUpdated');
    }
  
    function fieldsList(form) {
      var $fieldList = $(form).find('[name]').map(function (index, element) {
        return element.getAttribute('id');
      });
  
      return $.makeArray($fieldList);
    }
  
    Drupal.behaviors.formUpdated = {
      attach: function attach(context) {
        var $context = $(context);
        var contextIsForm = $context.is('form');
        var $forms = (contextIsForm ? $context : $context.find('form')).once('form-updated');
        var formFields = void 0;
  
        if ($forms.length) {
          $.makeArray($forms).forEach(function (form) {
            var events = 'change.formUpdated input.formUpdated ';
            var eventHandler = debounce(function (event) {
              triggerFormUpdated(event.target);
            }, 300);
            formFields = fieldsList(form).join(',');
  
            form.setAttribute('data-drupal-form-fields', formFields);
            $(form).on(events, eventHandler);
          });
        }
  
        if (contextIsForm) {
          formFields = fieldsList(context).join(',');
  
          var currentFields = $(context).attr('data-drupal-form-fields');
  
          if (formFields !== currentFields) {
            triggerFormUpdated(context);
          }
        }
      },
      detach: function detach(context, settings, trigger) {
        var $context = $(context);
        var contextIsForm = $context.is('form');
        if (trigger === 'unload') {
          var $forms = (contextIsForm ? $context : $context.find('form')).removeOnce('form-updated');
          if ($forms.length) {
            $.makeArray($forms).forEach(function (form) {
              form.removeAttribute('data-drupal-form-fields');
              $(form).off('.formUpdated');
            });
          }
        }
      }
    };
  
    Drupal.behaviors.fillUserInfoFromBrowser = {
      attach: function attach(context, settings) {
        var userInfo = ['name', 'mail', 'homepage'];
        var $forms = $('[data-user-info-from-browser]').once('user-info-from-browser');
        if ($forms.length) {
          userInfo.forEach(function (info) {
            var $element = $forms.find('[name=' + info + ']');
            var browserData = localStorage.getItem('Drupal.visitor.' + info);
            var emptyOrDefault = $element.val() === '' || $element.attr('data-drupal-default-value') === $element.val();
            if ($element.length && emptyOrDefault && browserData) {
              $element.val(browserData);
            }
          });
        }
        $forms.on('submit', function () {
          userInfo.forEach(function (info) {
            var $element = $forms.find('[name=' + info + ']');
            if ($element.length) {
              localStorage.setItem('Drupal.visitor.' + info, $element.val());
            }
          });
        });
      }
    };
  
    var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) {
      var url = void 0;
      if (e.type === 'click') {
        url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget;
      } else {
        url = window.location;
      }
      var hash = url.hash.substr(1);
      if (hash) {
        var $target = $('#' + hash);
        $('body').trigger('formFragmentLinkClickOrHashChange', [$target]);
  
        setTimeout(function () {
          return $target.trigger('focus');
        }, 300);
      }
    };
  
    var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true);
  
    $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange);
  
    $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange);
  })(jQuery, Drupal, Drupal.debounce);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    var states = {
      postponed: []
    };
  
    Drupal.states = states;
  
    function invert(a, invertState) {
      return invertState && typeof a !== 'undefined' ? !a : a;
    }
  
    function _compare2(a, b) {
      if (a === b) {
        return typeof a === 'undefined' ? a : true;
      }
  
      return typeof a === 'undefined' || typeof b === 'undefined';
    }
  
    function ternary(a, b) {
      if (typeof a === 'undefined') {
        return b;
      }
      if (typeof b === 'undefined') {
        return a;
      }
  
      return a && b;
    }
  
    Drupal.behaviors.states = {
      attach: function attach(context, settings) {
        var $states = $(context).find('[data-drupal-states]');
        var il = $states.length;
  
        var _loop = function _loop(i) {
          var config = JSON.parse($states[i].getAttribute('data-drupal-states'));
          Object.keys(config || {}).forEach(function (state) {
            new states.Dependent({
              element: $($states[i]),
              state: states.State.sanitize(state),
              constraints: config[state]
            });
          });
        };
  
        for (var i = 0; i < il; i++) {
          _loop(i);
        }
  
        while (states.postponed.length) {
          states.postponed.shift()();
        }
      }
    };
  
    states.Dependent = function (args) {
      var _this = this;
  
      $.extend(this, { values: {}, oldValue: null }, args);
  
      this.dependees = this.getDependees();
      Object.keys(this.dependees || {}).forEach(function (selector) {
        _this.initializeDependee(selector, _this.dependees[selector]);
      });
    };
  
    states.Dependent.comparisons = {
      RegExp: function RegExp(reference, value) {
        return reference.test(value);
      },
      Function: function Function(reference, value) {
        return reference(value);
      },
      Number: function Number(reference, value) {
        return typeof value === 'string' ? _compare2(reference.toString(), value) : _compare2(reference, value);
      }
    };
  
    states.Dependent.prototype = {
      initializeDependee: function initializeDependee(selector, dependeeStates) {
        var _this2 = this;
  
        this.values[selector] = {};
  
        Object.keys(dependeeStates).forEach(function (i) {
          var state = dependeeStates[i];
  
          if ($.inArray(state, dependeeStates) === -1) {
            return;
          }
  
          state = states.State.sanitize(state);
  
          _this2.values[selector][state.name] = null;
  
          $(selector).on('state:' + state, { selector: selector, state: state }, function (e) {
            _this2.update(e.data.selector, e.data.state, e.value);
          });
  
          new states.Trigger({ selector: selector, state: state });
        });
      },
      compare: function compare(reference, selector, state) {
        var value = this.values[selector][state.name];
        if (reference.constructor.name in states.Dependent.comparisons) {
          return states.Dependent.comparisons[reference.constructor.name](reference, value);
        }
  
        return _compare2(reference, value);
      },
      update: function update(selector, state, value) {
        if (value !== this.values[selector][state.name]) {
          this.values[selector][state.name] = value;
          this.reevaluate();
        }
      },
      reevaluate: function reevaluate() {
        var value = this.verifyConstraints(this.constraints);
  
        if (value !== this.oldValue) {
          this.oldValue = value;
  
          value = invert(value, this.state.invert);
  
          this.element.trigger({
            type: 'state:' + this.state,
            value: value,
            trigger: true
          });
        }
      },
      verifyConstraints: function verifyConstraints(constraints, selector) {
        var result = void 0;
        if ($.isArray(constraints)) {
          var hasXor = $.inArray('xor', constraints) === -1;
          var len = constraints.length;
          for (var i = 0; i < len; i++) {
            if (constraints[i] !== 'xor') {
              var constraint = this.checkConstraints(constraints[i], selector, i);
  
              if (constraint && (hasXor || result)) {
                return hasXor;
              }
              result = result || constraint;
            }
          }
        } else if ($.isPlainObject(constraints)) {
            for (var n in constraints) {
              if (constraints.hasOwnProperty(n)) {
                result = ternary(result, this.checkConstraints(constraints[n], selector, n));
  
                if (result === false) {
                  return false;
                }
              }
            }
          }
        return result;
      },
      checkConstraints: function checkConstraints(value, selector, state) {
        if (typeof state !== 'string' || /[0-9]/.test(state[0])) {
          state = null;
        } else if (typeof selector === 'undefined') {
          selector = state;
          state = null;
        }
  
        if (state !== null) {
          state = states.State.sanitize(state);
          return invert(this.compare(value, selector, state), state.invert);
        }
  
        return this.verifyConstraints(value, selector);
      },
      getDependees: function getDependees() {
        var cache = {};
  
        var _compare = this.compare;
        this.compare = function (reference, selector, state) {
          (cache[selector] || (cache[selector] = [])).push(state.name);
        };
  
        this.verifyConstraints(this.constraints);
  
        this.compare = _compare;
  
        return cache;
      }
    };
  
    states.Trigger = function (args) {
      $.extend(this, args);
  
      if (this.state in states.Trigger.states) {
        this.element = $(this.selector);
  
        if (!this.element.data('trigger:' + this.state)) {
          this.initialize();
        }
      }
    };
  
    states.Trigger.prototype = {
      initialize: function initialize() {
        var _this3 = this;
  
        var trigger = states.Trigger.states[this.state];
  
        if (typeof trigger === 'function') {
          trigger.call(window, this.element);
        } else {
          Object.keys(trigger || {}).forEach(function (event) {
            _this3.defaultTrigger(event, trigger[event]);
          });
        }
  
        this.element.data('trigger:' + this.state, true);
      },
      defaultTrigger: function defaultTrigger(event, valueFn) {
        var oldValue = valueFn.call(this.element);
  
        this.element.on(event, $.proxy(function (e) {
          var value = valueFn.call(this.element, e);
  
          if (oldValue !== value) {
            this.element.trigger({
              type: 'state:' + this.state,
              value: value,
              oldValue: oldValue
            });
            oldValue = value;
          }
        }, this));
  
        states.postponed.push($.proxy(function () {
          this.element.trigger({
            type: 'state:' + this.state,
            value: oldValue,
            oldValue: null
          });
        }, this));
      }
    };
  
    states.Trigger.states = {
      empty: {
        keyup: function keyup() {
          return this.val() === '';
        }
      },
  
      checked: {
        change: function change() {
          var checked = false;
          this.each(function () {
            checked = $(this).prop('checked');
  
            return !checked;
          });
          return checked;
        }
      },
  
      value: {
        keyup: function keyup() {
          if (this.length > 1) {
            return this.filter(':checked').val() || false;
          }
          return this.val();
        },
        change: function change() {
          if (this.length > 1) {
            return this.filter(':checked').val() || false;
          }
          return this.val();
        }
      },
  
      collapsed: {
        collapsed: function collapsed(e) {
          return typeof e !== 'undefined' && 'value' in e ? e.value : !this.is('[open]');
        }
      }
    };
  
    states.State = function (state) {
      this.pristine = state;
      this.name = state;
  
      var process = true;
      do {
        while (this.name.charAt(0) === '!') {
          this.name = this.name.substring(1);
          this.invert = !this.invert;
        }
  
        if (this.name in states.State.aliases) {
          this.name = states.State.aliases[this.name];
        } else {
          process = false;
        }
      } while (process);
    };
  
    states.State.sanitize = function (state) {
      if (state instanceof states.State) {
        return state;
      }
  
      return new states.State(state);
    };
  
    states.State.aliases = {
      enabled: '!disabled',
      invisible: '!visible',
      invalid: '!valid',
      untouched: '!touched',
      optional: '!required',
      filled: '!empty',
      unchecked: '!checked',
      irrelevant: '!relevant',
      expanded: '!collapsed',
      open: '!collapsed',
      closed: 'collapsed',
      readwrite: '!readonly'
    };
  
    states.State.prototype = {
      invert: false,
  
      toString: function toString() {
        return this.name;
      }
    };
  
    var $document = $(document);
    $document.on('state:disabled', function (e) {
      if (e.trigger) {
        $(e.target).prop('disabled', e.value).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value).find('select, input, textarea').prop('disabled', e.value);
      }
    });
  
    $document.on('state:required', function (e) {
      if (e.trigger) {
        if (e.value) {
          var label = 'label' + (e.target.id ? '[for=' + e.target.id + ']' : '');
          var $label = $(e.target).attr({ required: 'required', 'aria-required': 'aria-required' }).closest('.js-form-item, .js-form-wrapper').find(label);
  
          if (!$label.hasClass('js-form-required').length) {
            $label.addClass('js-form-required form-required');
          }
        } else {
          $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required');
        }
      }
    });
  
    $document.on('state:visible', function (e) {
      if (e.trigger) {
        $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value);
      }
    });
  
    $document.on('state:checked', function (e) {
      if (e.trigger) {
        $(e.target).prop('checked', e.value);
      }
    });
  
    $document.on('state:collapsed', function (e) {
      if (e.trigger) {
        if ($(e.target).is('[open]') === e.value) {
          $(e.target).find('> summary').trigger('click');
        }
      }
    });
  })(jQuery, Drupal);;
  /**
   * @file
   * JavaScript behaviors for custom webform #states.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    Drupal.webform = Drupal.webform || {};
    Drupal.webform.states = Drupal.webform.states || {};
    Drupal.webform.states.slideDown = Drupal.webform.states.slideDown || {};
    Drupal.webform.states.slideDown.duration = 'slow';
    Drupal.webform.states.slideUp = Drupal.webform.states.slideUp || {};
    Drupal.webform.states.slideUp.duration = 'fast';
  
    /**
     * Check if an element has a specified data attribute.
     *
     * @param {string} data
     *   The data attribute name.
     *
     * @return {boolean}
     *   TRUE if an element has a specified data attribute.
     */
    $.fn.hasData = function (data) {
      return (typeof this.data(data) !== 'undefined');
    };
  
    /**
     * Check if element is within the webform or not.
     *
     * @return {boolean}
     *   TRUE if element is within the webform.
     */
    $.fn.isWebform = function () {
      return $(this).closest('form[id^="webform"]').length ? true : false;
    };
  
    // The change event is triggered by cut-n-paste and select menus.
    // Issue #2445271: #states element empty check not triggered on mouse
    // based paste.
    // @see https://www.drupal.org/node/2445271
    Drupal.states.Trigger.states.empty.change = function change() {
      return this.val() === '';
    };
  
    // Apply solution included in #1962800 patch.
    // Issue #1962800: Form #states not working with literal integers as
    // values in IE11.
    // @see https://www.drupal.org/project/drupal/issues/1962800
    // @see https://www.drupal.org/files/issues/core-states-not-working-with-integers-ie11_1962800_46.patch
    //
    // This issue causes pattern, less than, and greater than support to break.
    // @see https://www.drupal.org/project/webform/issues/2981724
    var states = Drupal.states;
    Drupal.states.Dependent.prototype.compare = function compare(reference, selector, state) {
      var value = this.values[selector][state.name];
  
      var name = reference.constructor.name;
      if (!name) {
        name = $.type(reference);
  
        name = name.charAt(0).toUpperCase() + name.slice(1);
      }
      if (name in states.Dependent.comparisons) {
        return states.Dependent.comparisons[name](reference, value);
      }
  
      if (reference.constructor.name in states.Dependent.comparisons) {
        return states.Dependent.comparisons[reference.constructor.name](reference, value);
      }
  
      return _compare2(reference, value);
    };
    function _compare2(a, b) {
      if (a === b) {
        return typeof a === 'undefined' ? a : true;
      }
  
      return typeof a === 'undefined' || typeof b === 'undefined';
    }
  
    // Adds pattern, less than, and greater than support to #state API.
    // @see http://drupalsun.com/julia-evans/2012/03/09/extending-form-api-states-regular-expressions
    Drupal.states.Dependent.comparisons.Object = function (reference, value) {
      if ('pattern' in reference) {
        return (new RegExp(reference['pattern'])).test(value);
      }
      else if ('!pattern' in reference) {
        return !((new RegExp(reference['!pattern'])).test(value));
      }
      else if ('less' in reference) {
        return (value !== '' && parseFloat(reference['less']) > parseFloat(value));
      }
      else if ('greater' in reference) {
        return (value !== '' && parseFloat(reference['greater']) < parseFloat(value));
      }
      else {
        return reference.indexOf(value) !== false;
      }
    };
  
    var $document = $(document);
  
    $document.on('state:required', function (e) {
      if (e.trigger && $(e.target).isWebform()) {
        var $target = $(e.target);
        // Fix #required file upload.
        // @see Issue #2860529: Conditional required File upload field don't work.
        if (e.value) {
          $target.find('input[type="file"]').attr({'required': 'required', 'aria-required': 'true'});
        }
        else {
          $target.find('input[type="file"]').removeAttr('required aria-required');
        }
  
        // Fix required label for checkboxes and radios.
        // @see Issue #2938414: Checkboxes don't support #states required
        // @see Issue #2731991: Setting required on radios marks all options required.
        // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset.
        // Fix #required for fieldsets.
        // @see Issue #2977569: Hidden fieldsets that become visible with conditional logic cannot be made required.
        if ($target.is('.js-webform-type-radios, .js-webform-type-checkboxes, fieldset')) {
          if (e.value) {
            $target.find('legend span.fieldset-legend:not(.visually-hidden)').addClass('js-form-required form-required');
          }
          else {
            $target.find('legend span.fieldset-legend:not(.visually-hidden)').removeClass('js-form-required form-required');
          }
        }
  
        // Fix #required for radios.
        // @see Issue #2856795: If radio buttons are required but not filled form is nevertheless submitted.
        if ($target.is('.js-webform-type-radios, .js-form-type-webform-radios-other')) {
          if (e.value) {
            $target.find('input[type="radio"]').attr({'required': 'required', 'aria-required': 'true'});
          }
          else {
            $target.find('input[type="radio"]').removeAttr('required aria-required');
          }
        }
  
        // Fix #required for checkboxes.
        // @see Issue #2938414: Checkboxes don't support #states required.
        // @see checkboxRequiredhandler
        if ($target.is('.js-webform-type-checkboxes, .js-form-type-webform-checkboxes-other')) {
          var $checkboxes = $target.find('input[type="checkbox"]');
          if (e.value) {
            // Bind the event handler and add custom HTML5 required validation
            // to all checkboxes.
            $checkboxes.bind('click', checkboxRequiredhandler);
            if (!$checkboxes.is(':checked')) {
              $checkboxes.attr({'required': 'required', 'aria-required': 'true'});
            }
          }
          else {
            // Remove custom HTML5 required validation from all checkboxes
            // and unbind the event handler.
            $checkboxes
              .removeAttr('required aria-required')
              .unbind('click', checkboxRequiredhandler);
          }
        }
  
        // Issue #2986017: Fieldsets shouldn't have required attribute.
        if ($target.is('fieldset')) {
          $target.removeAttr('required aria-required');
        }
      }
  
    });
  
    $document.on('state:readonly', function (e) {
      if (e.trigger && $(e.target).isWebform()) {
        $(e.target).prop('readonly', e.value).closest('.js-form-item, .js-form-wrapper').toggleClass('webform-readonly', e.value).find('input, textarea').prop('readonly', e.value);
      }
    });
  
    $document.on('state:visible state:visible-slide', function (e) {
      if (e.trigger && $(e.target).isWebform()) {
        if (e.value) {
          $(':input', e.target).addBack().each(function () {
            restoreValueAndRequired(this);
            triggerEventHandlers(this);
          });
        }
        else {
          // @see https://www.sitepoint.com/jquery-function-clear-form-data/
          $(':input', e.target).addBack().each(function () {
            backupValueAndRequired(this);
            clearValueAndRequired(this);
            triggerEventHandlers(this);
          });
        }
      }
    });
  
    $document.bind('state:visible-slide', function (e) {
      if (e.trigger && $(e.target).isWebform()) {
        var effect = e.value ? 'slideDown' : 'slideUp';
        var duration = Drupal.webform.states[effect].duration;
        $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper')[effect](duration);
      }
    });
    Drupal.states.State.aliases['invisible-slide'] = '!visible-slide';
  
    $document.on('state:disabled', function (e) {
      if (e.trigger && $(e.target).isWebform()) {
        // Make sure disabled property is set before triggering webform:disabled.
        // Copied from: core/misc/states.js
        $(e.target)
          .prop('disabled', e.value)
          .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value)
          .find('select, input, textarea, button').prop('disabled', e.value);
  
        // Trigger webform:disabled.
        $(e.target).trigger('webform:disabled')
          .find('select, input, textarea, button').trigger('webform:disabled');
      }
    });
  
    /**
     * Trigger custom HTML5 multiple checkboxes validation.
     *
     * @see https://stackoverflow.com/a/37825072/145846
     */
    function checkboxRequiredhandler() {
      var $checkboxes = $(this).closest('.js-webform-type-checkboxes, .js-form-type-webform-checkboxes-other').find('input[type="checkbox"]');
      if ($checkboxes.is(':checked')) {
        $checkboxes.removeAttr('required aria-required');
      }
      else {
        $checkboxes.attr({'required': 'required', 'aria-required': 'true'});
      }
    }
  
    /**
     * Trigger an input's event handlers.
     *
     * @param {element} input
     *   An input.
     */
    function triggerEventHandlers(input) {
      var $input = $(input);
      var type = input.type;
      var tag = input.tagName.toLowerCase();
      // Add 'webform.states' as extra parameter to event handlers.
      // @see Drupal.behaviors.webformUnsaved
      var extraParameters = ['webform.states'];
      if (type === 'checkbox' || type === 'radio') {
        $input
          .trigger('change', extraParameters)
          .trigger('blur', extraParameters);
      }
      else if (tag === 'select') {
        $input
          .trigger('change', extraParameters)
          .trigger('blur', extraParameters);
      }
      else if (type !== 'submit' && type !== 'button' && type !== 'file') {
        $input
          .trigger('input', extraParameters)
          .trigger('change', extraParameters)
          .trigger('keydown', extraParameters)
          .trigger('keyup', extraParameters)
          .trigger('blur', extraParameters);
      }
    }
  
    /**
     * Backup an input's current value and required attribute
     *
     * @param {element} input
     *   An input.
     */
    function backupValueAndRequired(input) {
      var $input = $(input);
      var type = input.type;
      var tag = input.tagName.toLowerCase(); // Normalize case.
  
      // Backup required.
      if ($input.prop('required') && !$input.hasData('webform-required')) {
        $input.data('webform-required', true);
      }
  
      // Backup value.
      if (!$input.hasData('webform-value')) {
        if (type === 'checkbox' || type === 'radio') {
          $input.data('webform-value', $input.prop('checked'));
        }
        else if (tag === 'select') {
          var values = [];
          $input.find('option:selected').each(function (i, option) {
            values[i] = option.value;
          });
          $input.data('webform-value', values);
        }
        else if (type !== 'submit' && type !== 'button') {
          $input.data('webform-value', input.value);
        }
      }
    }
  
    /**
     * Restore an input's value and required attribute.
     *
     * @param {element} input
     *   An input.
     */
    function restoreValueAndRequired(input) {
      var $input = $(input);
  
      // Restore value.
      var value = $input.data('webform-value');
      if (typeof value !== 'undefined') {
        var type = input.type;
        var tag = input.tagName.toLowerCase(); // Normalize case.
  
        if (type === 'checkbox' || type === 'radio') {
          $input.prop('checked', value);
        }
        else if (tag === 'select') {
          $.each(value, function (i, option_value) {
            $input.find("option[value='" + option_value + "']").prop('selected', true);
          });
        }
        else if (type !== 'submit' && type !== 'button') {
          input.value = value;
        }
        $input.removeData('webform-value');
      }
  
      // Restore required.
      var required = $input.data('webform-required');
      if (typeof required !== 'undefined') {
        if (required) {
          $input.prop('required', true);
        }
        $input.removeData('webform-required');
      }
    }
  
    /**
     * Clear an input's value and required attributes.
     *
     * @param {element} input
     *   An input.
     */
    function clearValueAndRequired(input) {
      var $input = $(input);
  
      // Check for #states no clear attribute.
      // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
      if ($input.closest('[data-webform-states-no-clear]').length) {
        return;
      }
  
      // Clear value.
      var type = input.type;
      var tag = input.tagName.toLowerCase(); // Normalize case.
      if (type === 'checkbox' || type === 'radio') {
        $input.prop('checked', false);
      }
      else if (tag === 'select') {
        if ($input.find('option[value=""]').length) {
          $input.val('');
        }
        else {
          input.selectedIndex = -1;
        }
      }
      else if (type !== 'submit' && type !== 'button') {
        input.value = (type === 'color') ? '#000000' : '';
      }
  
      // Clear required.
      $input.prop('required', false);
    }
  
  })(jQuery, Drupal);
  ;
  /**
   * @file
   * JavaScript behaviors for webforms.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    /**
     * Remove single submit event listener.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior for removing single submit event listener.
     *
     * @see Drupal.behaviors.formSingleSubmit
     */
    Drupal.behaviors.weformRemoveFormSingleSubmit = {
      attach: function attach() {
        function onFormSubmit(e) {
          var $form = $(e.currentTarget);
          $form.removeAttr('data-drupal-form-submit-last');
        }
        $('body')
          .once('webform-single-submit')
          .on('submit.singleSubmit', 'form.webform-remove-single-submit:not([method~="GET"])', onFormSubmit);
      }
    };
  
    /**
     * Autofocus first input.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior for the webform autofocusing.
     */
    Drupal.behaviors.webformAutofocus = {
      attach: function (context) {
        $(context).find('.webform-submission-form.js-webform-autofocus :input:visible:enabled:first').focus();
      }
    };
  
    /**
     * Prevent webform autosubmit on wizard pages.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior for disabling webform autosubmit.
     *   Wizard pages need to be progressed with the Previous or Next buttons, not by pressing Enter.
     */
    Drupal.behaviors.webformDisableAutoSubmit = {
      attach: function (context) {
        // @see http://stackoverflow.com/questions/11235622/jquery-disable-form-submit-on-enter
        $(context).find('.webform-submission-form.js-webform-disable-autosubmit input')
          .not(':button, :submit, :reset, :image, :file')
          .once('webform-disable-autosubmit')
          .on('keyup keypress', function (e) {
            var keyCode = e.keyCode || e.which;
            if (keyCode === 13) {
              e.preventDefault();
              return false;
            }
          });
      }
    };
  
    /**
     * Skip client-side validation when submit button is pressed.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior for the skipping client-side validation.
     */
    Drupal.behaviors.webformSubmitNoValidate = {
      attach: function (context) {
        $(context).find(':submit.js-webform-novalidate').once('webform-novalidate').on('click', function () {
          $(this.form).attr('novalidate', 'novalidate');
        });
      }
    };
  
    /**
     * Attach behaviors to trigger submit button from input onchange.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches form trigger submit events.
     */
    Drupal.behaviors.webformSubmitTrigger = {
      attach: function (context) {
        $('[data-webform-trigger-submit]').once('webform-trigger-submit').on('change', function () {
          var submit = $(this).attr('data-webform-trigger-submit');
          $(submit).mousedown();
        });
      }
    };
  
    /**
     * Custom required error message.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior for the webform custom required error message.
     *
     * @see http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message
     */
    Drupal.behaviors.webformRequiredError = {
      attach: function (context) {
        $(context).find(':input[data-webform-required-error]').once('webform-required-error')
          .on('invalid', function () {
            this.setCustomValidity('');
            if (!this.valid) {
              this.setCustomValidity($(this).attr('data-webform-required-error'));
            }
          })
          .on('input, change', function () {
            // Find all related elements by name and reset custom validity.
            // This specifically applies to required radios and checkboxes.
            var name = $(this).attr('name');
            $(this.form).find(':input[name="' + name + '"]').each(function () {
              this.setCustomValidity('');
            });
          });
      }
    };
  
    // When #state:required is triggered we need to reset the target elements
    // custom validity.
    $(document).on('state:required', function (e) {
      $(e.target).filter('[data-webform-required-error]')
        .each(function () {this.setCustomValidity('');});
    });
  
    if (window.imceInput) {
      window.imceInput.processUrlInput = function (i, el) {
        var button = imceInput.createUrlButton(el.id, el.getAttribute('data-imce-type'));
        el.parentNode.insertAfter(button, el);
      };
    }
  
  })(jQuery, Drupal);
  ;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","../escape-selector","../keycode","../safe-active-element","../unique-id","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,d;c=b.href.replace(a,""),d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(e){}try{d=decodeURIComponent(d)}catch(e){}return b.hash.length>1&&c===d}}(),_create:function(){var b=this,c=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,c.collapsible),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(c.active):this.active=a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){if(a(e).attr("aria-controls")===d)return b=c,!1}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==b&&b!==-1||(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),b===-1&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(a.ui.safeActiveElement(this.document[0])).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||b.metaKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function d(){return b>e&&(b=0),b<0&&(b=e),b}for(var e=this.tabs.length-1;a.inArray(d(),this.options.disabled)!==-1;)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).trigger("focus"),a},_setOption:function(a,b){return"active"===a?void this._activate(b):(this._super(a,b),"collapsible"===a&&(this._toggleClass("ui-tabs-collapsible",null,b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this,c=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=a(),this.anchors.each(function(c,d){var e,f,g,h=a(d).uniqueId().attr("id"),i=a(d).closest("li"),j=i.attr("aria-controls");b._isLocal(d)?(e=d.hash,g=e.substring(1),f=b.element.find(b._sanitizeSelector(e))):(g=i.attr("aria-controls")||a({}).uniqueId()[0].id,e="#"+g,f=b.element.find(e),f.length||(f=b._createPanel(g),f.insertAfter(b.panels[c-1]||b.tablist)),f.attr("aria-live","polite")),f.length&&(b.panels=b.panels.add(f)),j&&i.data("ui-tabs-aria-controls",j),i.attr({"aria-controls":g,"aria-labelledby":h}),f.attr("aria-labelledby",h)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),c&&(this._off(c.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(b){var c,d,e;for(a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1),e=0;d=this.tabs[e];e++)c=a(d),b===!0||a.inArray(e,b)!==-1?(c.attr("aria-disabled","true"),this._addClass(c,null,"ui-state-disabled")):(c.removeAttr("aria-disabled"),this._removeClass(c,null,"ui-state-disabled"));this.options.disabled=b,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,b===!0)},_setupEvents:function(b){var c={};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(a){a.preventDefault()}}),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function d(){f.running=!1,f._trigger("activate",b,c)}function e(){f._addClass(c.newTab.closest("li"),"ui-tabs-active","ui-state-active"),g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=c.newPanel,h=c.oldPanel;this.running=!0,h.length&&this.options.hide?this._hide(h,this.options.hide,function(){f._removeClass(c.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),e()}):(this._removeClass(c.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),h.hide(),e()),h.attr("aria-hidden","true"),c.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),g.length&&h.length?c.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),g.attr("aria-hidden","false"),c.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(b){return"string"==typeof b&&(b=this.anchors.index(this.anchors.filter("[href$='"+a.ui.escapeSelector(b)+"']"))),b},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;c!==!1&&(void 0===b?c=!1:(b=this._getIndex(b),c=a.isArray(c)?a.map(c,function(a){return a!==b?a:null}):a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setOptionDisabled(c))},disable:function(b){var c=this.options.disabled;if(c!==!0){if(void 0===b)c=!0;else{if(b=this._getIndex(b),a.inArray(b,c)!==-1)return;c=a.isArray(c)?a.merge([b],c).sort():[b]}this._setOptionDisabled(c)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},i=function(a,b){"abort"===b&&d.panels.stop(!1,!0),d._removeClass(e,"ui-tabs-loading"),g.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=a.ajax(this._ajaxSettings(f,c,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(e,"ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a),d._trigger("load",c,h),i(e,b)},1)}).fail(function(a,b){setTimeout(function(){i(a,b)},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href").replace(/#.*$/,""),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}}),a.uiBackCompat!==!1&&a.widget("ui.tabs",a.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),a.ui.tabs});;
  /**
   * @file
   * JavaScript behaviors for form tabs using jQuery UI.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    // @see http://api.jqueryui.com/tabs/
    Drupal.webform = Drupal.webform || {};
    Drupal.webform.formTabs = Drupal.webform.formTabs || {};
    Drupal.webform.formTabs.options = Drupal.webform.formTabs.options || {
      hide: true,
      show: true
    };
  
    /**
     * Initialize webform tabs.
     *
     * @type {Drupal~behavior}
     *
     * @prop {Drupal~behaviorAttach} attach
     *   Attaches the behavior for form tabs using jQuery UI.
     *
     * @see \Drupal\webform\Utility\WebformFormHelper::buildTabs
     */
    Drupal.behaviors.webformFormTabs = {
      attach: function (context) {
        $(context).find('div.webform-tabs').once('webform-tabs').each(function () {
          var $tabs = $(this);
          var options = jQuery.extend({}, Drupal.webform.formTabs.options);
  
          // Set active tab and clear the location hash once it is set.
          if (location.hash) {
            var active = $('a[href="' + location.hash + '"]').data('tab-index');
            if (typeof active !== 'undefined') {
              options.active = active;
              location.hash = '';
            }
          }
  
          $tabs.tabs(options);
        });
      }
    };
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    function DropButton(dropbutton, settings) {
      var options = $.extend({ title: Drupal.t('List additional actions') }, settings);
      var $dropbutton = $(dropbutton);
  
      this.$dropbutton = $dropbutton;
  
      this.$list = $dropbutton.find('.dropbutton');
  
      this.$actions = this.$list.find('li').addClass('dropbutton-action');
  
      if (this.$actions.length > 1) {
        var $primary = this.$actions.slice(0, 1);
  
        var $secondary = this.$actions.slice(1);
        $secondary.addClass('secondary-action');
  
        $primary.after(Drupal.theme('dropbuttonToggle', options));
  
        this.$dropbutton.addClass('dropbutton-multiple').on({
          'mouseleave.dropbutton': $.proxy(this.hoverOut, this),
  
          'mouseenter.dropbutton': $.proxy(this.hoverIn, this),
  
          'focusout.dropbutton': $.proxy(this.focusOut, this),
  
          'focusin.dropbutton': $.proxy(this.focusIn, this)
        });
      } else {
        this.$dropbutton.addClass('dropbutton-single');
      }
    }
  
    function dropbuttonClickHandler(e) {
      e.preventDefault();
      $(e.target).closest('.dropbutton-wrapper').toggleClass('open');
    }
  
    Drupal.behaviors.dropButton = {
      attach: function attach(context, settings) {
        var $dropbuttons = $(context).find('.dropbutton-wrapper').once('dropbutton');
        if ($dropbuttons.length) {
          var $body = $('body').once('dropbutton-click');
          if ($body.length) {
            $body.on('click', '.dropbutton-toggle', dropbuttonClickHandler);
          }
  
          var il = $dropbuttons.length;
          for (var i = 0; i < il; i++) {
            DropButton.dropbuttons.push(new DropButton($dropbuttons[i], settings.dropbutton));
          }
        }
      }
    };
  
    $.extend(DropButton, {
      dropbuttons: []
    });
  
    $.extend(DropButton.prototype, {
      toggle: function toggle(show) {
        var isBool = typeof show === 'boolean';
        show = isBool ? show : !this.$dropbutton.hasClass('open');
        this.$dropbutton.toggleClass('open', show);
      },
      hoverIn: function hoverIn() {
        if (this.timerID) {
          window.clearTimeout(this.timerID);
        }
      },
      hoverOut: function hoverOut() {
        this.timerID = window.setTimeout($.proxy(this, 'close'), 500);
      },
      open: function open() {
        this.toggle(true);
      },
      close: function close() {
        this.toggle(false);
      },
      focusOut: function focusOut(e) {
        this.hoverOut.call(this, e);
      },
      focusIn: function focusIn(e) {
        this.hoverIn.call(this, e);
      }
    });
  
    $.extend(Drupal.theme, {
      dropbuttonToggle: function dropbuttonToggle(options) {
        return '<li class="dropbutton-toggle"><button type="button"><span class="dropbutton-arrow"><span class="visually-hidden">' + options.title + '</span></span></button></li>';
      }
    });
  
    Drupal.DropButton = DropButton;
  })(jQuery, Drupal);;
  /**
   * @file
   * Dropbutton feature.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    // Make sure that dropButton behavior exists.
    if (!Drupal.behaviors.dropButton) {
      return;
    }
  
    /**
     * Wrap Drupal's dropbutton behavior so that the dropbutton widget is only visible after it is initialized.
     */
    var dropButton = Drupal.behaviors.dropButton;
    Drupal.behaviors.dropButton = {
      attach: function (context, settings) {
        dropButton.attach(context, settings);
        $(context).find('.webform-dropbutton .dropbutton-wrapper').once('webform-dropbutton').css('visibility', 'visible');
      }
    };
  
  })(jQuery, Drupal);
  ;
  