"use strict";

const _ = require( 'underscore' );
const Backbone = require( 'backbone' );
Backbone.LocalStorage = require( "backbone.localstorage" );
//require( 'backbone-event-logger' );

const VariableModel = require( '../models/dirPickerVariable' );

//noinspection JSUnusedGlobalSymbols
/**
 * @class
 * @extends {Backbone.Collection}
 */
const CollectionsDirPickerVariables = Backbone.Collection.extend( {
  localStorage: new Backbone.LocalStorage( "dirPickerVariablesCollection" ),
  model: VariableModel,
  comparator: 'sort',
  initialize: function () {
    //this.debugEvents('CollectionsVariables');
  }
} );
_.extend( CollectionsDirPickerVariables.prototype, require( './mixin' ) );

const variables = module.exports = new CollectionsDirPickerVariables();
variables.fetch();
@@ -12,91 +12,88 @@
 %22;%0A%0A
-const _ = require( 'underscore' );%0Aconst Backbone = require( 'backbone' );%0A
+import DirPickerCollectionBase from './dirPickerCollectionBase';%0Aimport 
 Backbone
 .Loc
@@ -80,33 +80,32 @@
 %0Aimport Backbone
-.
 LocalStorage = r
@@ -105,20 +105,14 @@
 age 
-= require( %22
+from '
 back
@@ -132,56 +132,16 @@
 rage
-%22 );%0A//require( 'backbone-event-logger' );%0A%0Acons
+';%0Aimpor
 t Va
@@ -156,18 +156,12 @@
 del 
-= require(
+from
  '..
@@ -190,172 +190,435 @@
 ble'
- );%0A%0A//noinspection JSUnusedGlobalSymbols%0A
+%0A%0A/**%0A * Variable%E3%82%92%E6%9D%9F%E3%81%AD%E3%82%8B%E3%82%B3%E3%83%AC%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%0A */%0Aexport class DirPickerVariables extends DirPickerCollectionBase %7B%0A%0A  
 /**%0A
+  
  * @
-class%0A * @extends %7BBackbone.Collection%7D%0A */%0Aconst CollectionsDirPickerVariables = Backbone.Collection.extend( %7B%0A  
+param %7Bobject%7D %5Battr%5D%0A   * @param %7Bobject%7D %5Boptions%5D%0A   */%0A  constructor ( attr, options ) %7B%0A    super( attr, options );%0A%0A    //eventsLogger%E3%82%92%E6%9C%89%E5%8A%B9%E5%8C%96%0A    this.debugEvents( 'CollectionsVariables' );%0A%0A    //noinspection JSUnusedGlobalSymbols%0A    /**%0A     * %E6%B0%B8%E7%B6%9A%E5%85%88%E3%81%AFlocalStorage%E3%80%81%E5%90%8D%E5%89%8D%E3%81%AFdirPickerTemplatesCollection%0A     */%0A    this.
 loca
@@ -625,17 +625,18 @@
 lStorage
-:
+ =
  new Bac
@@ -640,17 +640,16 @@
 Backbone
-.
 LocalSto
@@ -690,18 +690,83 @@
 n%22 )
-,%0A  
+;%0A%0A    /**%0A     *%0A     * @type %7BDirPickerVariable%7D%0A     */%0A    this.
 model
-:
+ =
  Var
@@ -779,127 +779,158 @@
 odel
-,%0A  comparator: 'sort',%0A  initialize: function () %7B
+;%0A%0A    //noinspection JSUnusedGlobalSymbols%0A    /**%0A     *%0A     * @type %7Bstring%7D%0A     */
 %0A    
-//
 this.
-debugEvents('CollectionsVariables');%0A  %7D%0A%7D );%0A_.extend( 
+comparator = 'sort';%0A  %7D%0A%7D%0A%0Aconst dirPickerVariables
 Coll
@@ -927,33 +927,39 @@
 iablesCollection
-s
+ = new 
 DirPickerVariabl
@@ -964,131 +964,91 @@
 bles
-.prototype, require( './mixin' ) );%0A%0Aconst variables = module.exports = new CollectionsDirPickerVariables();%0Avariables.fetch();
+();%0AdirPickerVariablesCollection.fetch();%0Aexport default dirPickerVariablesCollection;%0A

Refactor to ES6