<commit_before>import EmitterKit

/**
  Represents zero or more params for a title or menu
*/
final class Container: Equatable {
  private var listener: Listener?
  private var namedStore = [Int: NamedParam]()
  private var filterStore = [String: Param]()
  internal var namedParams: [NamedParam] {
    return Array(namedStore.values)
  }
  internal var filterParams: [Param] {
    return Array(filterStore.values)
  }
  internal weak var delegate: Menuable? {
    didSet { self.handleDelegate() }
  }

  /**
    A non sorted list of all params
    I.e terminal=false, param7=2
  */
  var params: [Param] {
    return namedParams + filterParams
  }

  /**
    Params to be passed as argument to a bash script
    Sorted. I.e param2="A", param1="B"
    Becomes ["B", "A"]
  */
  var args: [String] {
    return namedParams.sorted {<commit_msg>Sort params<commit_after>import EmitterKit

/**
  Represents zero or more params for a title or menu
*/
final class Container: Equatable {
  private var listener: Listener?
  private var namedStore = [Int: NamedParam]()
  private var filterStore = [String: Param]()
  internal var namedParams: [NamedParam] {
    return Array(namedStore.values)
  }
  internal var filterParams: [Param] {
    return Array(filterStore.values).sorted {
      return $0.priority > $1.priority
    }
  }
  internal weak var delegate: Menuable? {
    didSet { self.handleDelegate() }
  }

  /**
    A non sorted list of all params
    I.e terminal=false, param7=2
  */
  var params: [Param] {
    return namedParams + filterParams
  }

  /**
    Params to be passed as argument to a bash script
    Sorted. I.e param2="A", param1="B"
    Becomes ["B", "A"]
  */
  var args: [String] {
    return namedParams.sorted {
{'fraction_non_alphanumeric': 0.10944700460829493, 'fraction_numerical': 0.00576036866359447, 'mean_word_length': 3.1654676258992804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4408751', 'n_tokens_mistral': 552, 'n_tokens_neox': 543, 'n_words': 178}