<commit_before>//        ____ _   _  ___   ___  ____  _____ ____  
//       / ___| | | |/ _ \ / _ \/ ___|| ____|  _ \ 
//      | |   | |_| | | | | | | \___ \|  _| | |_) |
//      | |___|  _  | |_| | |_| |___) | |___|  _ < 
//       \____|_| |_|\___/ \___/|____/|_____|_| \_\
//
//
// Choosers are UI elements without semantic ties to other choosers,
// who are given semantic ties by figures.
// So a figure could have two chooser_booleans 
// or two chooser_dancers (e.g. GENTS roll away the NEIGHBORS)
// Choosers are referenced by global variables, e.g. chooser_boolean evaluates to a chooser object. 
// Choosers can be compared with == in this file and in angular controller scopey thing.
// They are basically a big enum with all the functionality in a giant case statement in dances/_form.erb
// They also have to define dance filter UI in app/assets/javascripts/welcome.js

var defined_choosers = {};

function defineChooser(name){
  "string" == typeof name || throw_up("first argument isn't a string");
  "chooser_" == name.slice(0,8) || throw_up("first argument doesn't begin with 'chooser_'");
  defined_choosers[name] = defined_choosers[name] || name;
  eval(name+"='"+name+"'");
}

function setChoosers(hash){
  $.each(defined_choosers,function(k,v) {hash[k]=v;});
}

defineChooser("chooser_boolean");
defineChooser("chooser_beats");
defineChooser("chooser_spin");
defineChooser("chooser_left_right_spin");
defineChooser("chooser_right_left_hand");
defineChooser("chooser_right_left_shoulder");
defineChooser("chooser_revolutions");
defineChooser("chooser_places");
defineChooser("chooser_dancers");  // some collection of dancers
defineChooser("chooser_pair");     // 1 pair of dancers
defineChooser("chooser_pair_or_everyone"); // 1 pair or everyone
defineChooser("chooser_pairc_or_everyone"); // 1 pair or centers or everyone<commit_msg>remove a jquery dependency in JSLibFigure<commit_after>//        ____ _   _  ___   ___  ____  _____ ____  
//       / ___| | | |/ _ \ / _ \/ ___|| ____|  _ \ 
//      | |   | |_| | | | | | | \___ \|  _| | |_) |
//      | |___|  _  | |_| | |_| |___) | |___|  _ < 
//       \____|_| |_|\___/ \___/|____/|_____|_| \_\
//
//
// Choosers are UI elements without semantic ties to other choosers,
// who are given semantic ties by figures.
// So a figure could have two chooser_booleans 
// or two chooser_dancers (e.g. GENTS roll away the NEIGHBORS)
// Choosers are referenced by global variables, e.g. chooser_boolean evaluates to a chooser object. 
// Choosers can be compared with == in this file and in angular controller scopey thing.
// They are basically a big enum with all the functionality in a giant case statement in dances/_form.erb
// They also have to define dance filter UI in app/assets/javascripts/welcome.js

var defined_choosers = {};

function defineChooser(name){
  "string" == typeof name || throw_up("first argument isn't a string");
  "chooser_" == name.slice(0,8) || throw_up("first argument doesn't begin with 'chooser_'");
  defined_choosers[name] = defined_choosers[name] || name;
  eval(name+"='"+name+"'");
}

function setChoosers(hash){
  Object.keys(defined_choosers).forEach(function(key) {
    hash[key] = defined_choosers[key];
  });
}

defineChooser("chooser_boolean");
defineChooser("chooser_beats");
defineChooser("chooser_spin");
defineChooser("chooser_left_right_spin");
defineChooser("chooser_right_left_hand");
defineChooser("chooser_right_left_shoulder");
defineChooser("chooser_revolutions");
defineChooser("chooser_places");
defineChooser("chooser_dancers");  // some collection of dancers
defineChooser("chooser_pair");     // 1 pair of dancers
defineChooser("chooser_pair_or_everyone"); // 1 pair or everyone
defineChooser("chooser_pairc_or_everyone"); // 1 pair or centers or everyone
{'fraction_non_alphanumeric': 0.13915343915343914, 'fraction_numerical': 0.0026455026455026454, 'mean_word_length': 4.048064085447263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4638706', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1244, 'n_words': 297}