facetwp set a facet selections to a different facet

(function($) {
    $(document).on('facetwp-refresh', function() {
      if ( 'undefined' !== typeof FWP.facets['facet_1'] && FWP.facets['facet_1'].length > 0 ) {
          FWP.facets['facet_2'] = FWP.facets['facet_1'];
          FWP.facets['facet_1'] = [];
      }
    });
})(jQuery);