"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _immutable = require("immutable");

var _QuizEntry = _interopRequireDefault(require("../QuizEntry"));

var _Bank = _interopRequireDefault(require("../Bank"));

var _BankEntry = _interopRequireDefault(require("../BankEntry"));

var _Item = _interopRequireDefault(require("../Item"));

var _Stimulus = _interopRequireDefault(require("../Stimulus"));

var _reduxStore = require("../../../reduxStore");

var _constants = require("@instructure/quiz-common/lib/constants");

describe('QuizEntry Record', function () {
  it('#getProperties returns parsed properties when present', function () {
    var defaultProps = new _QuizEntry.default({
      stimulusQuizEntryId: 55
    }).getProperties();
    expect(defaultProps.points_possible).to.eq(1);
    expect(defaultProps.position).to.eq(null);
    expect(defaultProps.stimulus_quiz_entry_id).to.eq(55);
  });
  describe('#getEntry', function () {
    var fakeState = (0, _immutable.fromJS)({
      items: {
        1: {}
      },
      bankEntries: {
        1: {
          entryType: 'Item',
          entry: {
            get: function get() {}
          }
        }
      },
      modifications: {
        items: {
          TEMPORARY_ITEM_ID: {}
        },
        stimuli: {
          TEMPORARY_STIMULUS_ID: {}
        }
      },
      stimuli: {
        44: {}
      },
      banks: {
        1: {}
      }
    });
    before(function () {
      (0, _reduxStore.setFakeStore)(fakeState);
    });
    after(function () {
      (0, _reduxStore.unsetFakeStore)();
    });

    var sharedExamples = function sharedExamples(type) {
      var quizEntry = new _QuizEntry.default({
        entryType: type,
        entry: (0, _immutable.Map)({
          id: '1'
        })
      });
      it('returns correct entry', function () {
        expect(quizEntry.getEntry().constructor.name).to.equal(type);
      });
      it('returns correct entry by entryId', function () {
        expect(quizEntry.merge({
          entry: (0, _immutable.Map)(),
          entryId: '1'
        }).getEntry().constructor.name).to.equal(type);
      });
      it('sets reference to self on entry', function () {
        expect(quizEntry.getEntry().quizEntry).to.eq(quizEntry);
      });
    };

    context('item', function () {
      var type = 'Item';
      it('returns correct entry', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: type,
          entry: _constants.TEMPORARY_ITEM_ID
        });
        expect(quizEntry.getEntry().constructor.name).to.equal('Item');
      });
      sharedExamples(type);
    });
    context('stimulus', function () {
      var type = 'Stimulus';
      it('returns correct entry', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: type,
          entry: _constants.TEMPORARY_STIMULUS_ID
        });
        expect(quizEntry.getEntry().constructor.name).to.equal(type);
      });
      sharedExamples(type);
    });
    context('bankEntry', function () {
      var type = 'BankEntry';
      sharedExamples(type);
    });
    context('Bank', function () {
      var type = 'Bank';
      sharedExamples(type);
    });
  });
  describe('#getItem', function () {
    var quizEntryId = '3';
    var itemOverrides = {
      properties: {
        varyPointsByAnswer: true
      },
      scoringAlgorithm: 'VaryPointsByAnswer'
    };
    var fakeState = (0, _immutable.fromJS)({
      items: {
        1: {
          id: '1',
          title: 'Math'
        }
      },
      bankEntries: {
        2: {
          id: '2',
          entryType: 'Item',
          entry: {
            id: '1'
          }
        }
      },
      modifications: {
        items: {
          1: {
            title: 'Mather'
          }
        },
        quizEntries: (0, _defineProperty2.default)({}, quizEntryId, {
          properties: {
            itemOverrides: itemOverrides
          }
        })
      }
    });
    before(function () {
      (0, _reduxStore.setFakeStore)(fakeState);
    });
    after(function () {
      (0, _reduxStore.unsetFakeStore)();
    });

    var sharedExamples = function sharedExamples(quizEntryAttributes) {
      var quizEntry = new _QuizEntry.default((0, _objectSpread2.default)({
        id: quizEntryId
      }, quizEntryAttributes));
      it('returns correct item', function () {
        expect(quizEntry.getItem().title).to.eq('Math');
      });
      it('gets working item from working quiz entry', function () {
        expect(quizEntry.set('isWorkingInstance', true).getItem().title).to.eq('Mather');
      });
      it('merges item overrides', function () {
        expect(quizEntry.set('properties', (0, _immutable.fromJS)({
          itemOverrides: {
            title: 'Mathest'
          }
        })).getItem().title).to.eq('Mathest');
      });
      it('merges item overrides from working quiz entry', function () {
        expect(quizEntry.getItem().toJS()).to.deep.include(itemOverrides);
      });
    };

    context('Item', function () {
      sharedExamples({
        entryType: 'Item',
        entry: (0, _immutable.Map)({
          id: '1'
        })
      });
    });
    context('BankEntry', function () {
      sharedExamples({
        entryType: 'BankEntry',
        entry: (0, _immutable.Map)({
          id: '2'
        })
      });
    });
    context('Stimulus', function () {
      it('returns undefined', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: 'Stimulus',
          entry: _constants.TEMPORARY_STIMULUS_ID
        });
        expect(quizEntry.getItem()).to.be.undefined();
      });
    });
    context('Bank', function () {
      it('returns undefined', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: 'Bank'
        });
        expect(quizEntry.getItem()).to.be.undefined();
      });
    });
  });
  describe('#getNestedEntries', function () {
    var fakeState = (0, _immutable.fromJS)({
      items: {
        1: {}
      },
      bankEntries: {
        1: {
          entryType: 'Item',
          entry: {
            get: function get() {}
          }
        },
        2: {
          entryType: 'Stimulus',
          entry: {
            get: function get() {}
          }
        }
      },
      modifications: {
        items: {
          TEMPORARY_ITEM_ID: {},
          1: {
            isStimulus: false
          }
        },
        stimuli: {
          TEMPORARY_STIMULUS_ID: {}
        },
        quizEntries: (0, _defineProperty2.default)({}, _constants.TEMPORARY_QUIZ_ENTRY_ID, {
          id: _constants.TEMPORARY_QUIZ_ENTRY_ID,
          stimulusQuizEntryId: '1',
          entryType: 'Item'
        })
      },
      banks: {
        1: {}
      },
      stimuli: {
        44: {}
      },
      quizEntries: {
        1: {
          id: '1',
          entryType: 'Stimulus'
        }
      }
    });
    before(function () {
      (0, _reduxStore.setFakeStore)(fakeState);
    });
    after(function () {
      (0, _reduxStore.unsetFakeStore)();
    });

    var sharedExample = function sharedExample(type) {
      it('returns correct entries', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: type,
          entry: {
            get: function get() {
              return '1';
            }
          }
        });
        expect(quizEntry.getNestedEntries().get(0).constructor.name).to.equal('QuizEntry');
      });
    };

    sharedExample('Item');
    sharedExample('Bank');
    context('BankEntry', function () {
      context('attached to item', function () {
        sharedExample('BankEntry');
      });
      context('attached to stimulus', function () {
        (0, _reduxStore.setFakeStore)(fakeState);
        var quizEntry = new _QuizEntry.default({
          entryType: 'BankEntry',
          entry: {
            get: function get() {
              return '2';
            }
          }
        });
        expect(quizEntry.getNestedEntries()).to.equal((0, _immutable.List)());
      });
    });
    context('stimulus', function () {
      it('returns correct entries', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: 'Stimulus',
          entry: {
            get: function get() {
              return '44';
            }
          }
        });
        expect(quizEntry.getNestedEntries()).to.eql((0, _immutable.List)());
      });
      it('returns correct entries', function () {
        var quizEntry = new _QuizEntry.default({
          entryType: 'Stimulus',
          entry: _constants.TEMPORARY_STIMULUS_ID
        });
        expect(quizEntry.getNestedEntries()).to.eql((0, _immutable.List)());
      });
      it('returns temporary quizEntry when creating a new entry', function () {
        var quizEntry = new _QuizEntry.default(fakeState.getIn(['quizEntries', '1']));
        expect(quizEntry.getNestedEntries().size).to.eq(1);
      });
    });
  });
  describe('#getWorkingInstance', function () {
    var fakeState = (0, _immutable.fromJS)({
      modifications: {
        quizEntries: {
          83: {
            pointsPossible: 4,
            properties: {
              itemOverrides: {
                properties: {
                  shuffleRules: {
                    choices: {
                      toLock: [3]
                    }
                  }
                }
              }
            }
          }
        }
      }
    });
    before(function () {
      (0, _reduxStore.setFakeStore)(fakeState);
    });
    after(function () {
      (0, _reduxStore.unsetFakeStore)();
    });
    it('returns quiz entry from the store', function () {
      var quizEntry = new _QuizEntry.default({
        id: '83',
        pointsPossible: 2
      });
      var workingQuizEntry = quizEntry.getWorkingInstance();
      expect(workingQuizEntry.pointsPossible).to.eq(4);
    });
    it('sets isWorkingInstance', function () {
      var quizEntry = new _QuizEntry.default({
        id: '83',
        pointsPossible: 2
      });
      var workingQuizEntry = quizEntry.getWorkingInstance();
      expect(workingQuizEntry.isWorkingInstance).to.be.true();
    });
    it('deep merges modifications to object attributes', function () {
      var quizEntry = new _QuizEntry.default((0, _immutable.fromJS)({
        id: '83',
        properties: {
          itemOverrides: {
            properties: {
              shuffleRules: {
                choices: {
                  shuffled: true,
                  toLock: [0, 3]
                }
              }
            }
          }
        }
      }));
      var workingQuizEntry = quizEntry.getWorkingInstance();
      var shuffleRules = workingQuizEntry.properties.toJS().itemOverrides.properties.shuffleRules;
      expect(shuffleRules.choices.shuffled).to.eq(true);
      expect(shuffleRules.choices.toLock).to.eql([3]);
    });
  });
  describe('#hasModifications', function () {
    it('returns false if it has no modifications', function () {
      var quizEntry = new _QuizEntry.default();
      var unmodifiedQuizEntry = quizEntry.merge({});
      sinon.stub(quizEntry, 'getWorkingInstance').returns(unmodifiedQuizEntry);
      expect(quizEntry.hasModifications()).to.be.false();
    });
    it('returns true if modifications exist', function () {
      var quizEntry = new _QuizEntry.default();
      var modifiedQuizEntry = quizEntry.merge({
        pointsPossible: '99'
      });
      sinon.stub(quizEntry, 'getWorkingInstance').returns(modifiedQuizEntry);
      expect(quizEntry.hasModifications()).to.be.true();
    });
    it('ignores the isWorkingInstance attribute', function () {
      var quizEntry = new _QuizEntry.default();
      var unmodifiedQuizEntry = quizEntry.merge({
        isWorkingInstance: true
      });
      sinon.stub(quizEntry, 'getWorkingInstance').returns(unmodifiedQuizEntry);
      expect(quizEntry.hasModifications()).to.be.false();
    });
  });
  describe('getters', function () {
    var createEntry = function createEntry(entryType, attrs) {
      var bankEntry = new _BankEntry.default();
      sinon.stub(bankEntry, 'getEntry').returns(new _Item.default());
      return {
        Bank: new _Bank.default(attrs),
        BankEntry: bankEntry,
        Item: new _Item.default(attrs),
        Stimulus: new _Stimulus.default(attrs)
      }[entryType];
    };

    var stubGetEntry = function stubGetEntry(qe, entryType, attrs) {
      sinon.stub(qe, 'getEntry').returns(createEntry(entryType, attrs));
    };

    var sharedExamples = function sharedExamples(entryType, attrs) {
      var qe = new _QuizEntry.default({
        entryType: entryType
      });
      stubGetEntry(qe, entryType, attrs);
      it('returns the correct type for isBank', function () {
        expect(qe.isBank).to.eq(entryType === 'Bank');
      });
      it('returns the correct type for isBankEntry', function () {
        expect(qe.isBankEntry).to.eq(entryType === 'BankEntry');
      });
      it('returns the correct type for isStimulus', function () {
        expect(qe.isStimulus).to.eq(entryType === 'Stimulus');
      });
      it('returns the correct type for isItem', function () {
        expect(qe.isItem).to.eq(entryType === 'Item');
      });
      it('returns the correct value for isInStimulus', function () {
        expect(qe.isInStimulus).to.eq(false);
      });
      it('returns the correct type for type', function () {
        expect(qe.type).to.eq(entryType);
      });
      it('returns the correct value for hasNestedRecords', function () {
        expect(qe.hasNestedRecords).to.eq(entryType === 'Stimulus');
      });
      it('returns the correct value for hasStimulus', function () {
        expect(qe.hasStimulus).to.eq(entryType === 'Stimulus');
      });
      it('returns the correct value for isArchivedBank', function () {
        expect(qe.isArchivedBank).to.eq(entryType === 'Bank' && qe.getEntry().archived);
      });
    };

    sharedExamples('Bank');
    sharedExamples('Bank', {
      archived: true
    });
    sharedExamples('Stimulus');
    sharedExamples('Item');
    sharedExamples('BankEntry');
    describe('pointsPossible', function () {
      it('returns own pointsPossible when interactionPoints is undefined', function () {
        var qe = new _QuizEntry.default({
          pointsPossible: 4
        });
        var item = new _Item.default();
        sinon.stub(qe, 'getItem').returns(item);
        expect(qe.pointsPossible).to.equal(4);
      });
      it('returns interactionPoints when given', function () {
        var qe = new _QuizEntry.default({
          pointsPossible: 4
        });
        var item = new _Item.default({
          properties: {
            varyPointsByAnswer: true
          },
          scoringData: {
            values: [{
              points: 3
            }, {
              points: 5
            }]
          }
        });
        sinon.stub(qe, 'getItem').returns(item);
        expect(qe.pointsPossible).to.equal(5);
      });
      it('returns 0 when iteractionPoints is 0', function () {
        var qe = new _QuizEntry.default({
          pointsPossible: 4
        });
        var item = new _Item.default({
          properties: {
            varyPointsByAnswer: true
          },
          scoringData: {
            values: [{
              points: 0
            }, {
              points: 0
            }]
          }
        });
        sinon.stub(qe, 'getItem').returns(item);
        expect(qe.pointsPossible).to.equal(0);
      });
    });
    describe('positionSlots', function () {
      context('stimulus type', function () {
        it('returns the number of items in the stimulus', function () {
          var qe = new _QuizEntry.default({
            entryType: 'Stimulus'
          });
          sinon.stub(qe, 'getNestedEntries').returns((0, _immutable.List)([new _QuizEntry.default(), new _QuizEntry.default(), new _QuizEntry.default()]));
          expect(qe.positionSlots).to.eq(3);
        });
      });

      var sharedExample = function sharedExample(entryType) {
        it("returns 1 for ".concat(entryType), function () {
          var qe = new _QuizEntry.default({
            entryType: entryType
          });
          expect(qe.positionSlots).to.eq(1);
        });
      };

      sharedExample('Bank');
      sharedExample('Item');
    });
    describe('displayPositionSlots', function () {
      context('for banks', function () {
        it('returns the itemEntryCount', function () {
          var qe = new _QuizEntry.default({
            entryType: 'Bank'
          });
          sinon.stub(qe, 'getEntry').returns({
            itemEntryCount: 5
          });
          expect(qe.displayPositionSlots).to.eq(5);
        });
      });
      context('for stimulus', function () {
        it('returns the entryCount', function () {
          var qe = new _QuizEntry.default({
            entryType: 'Stimulus'
          });
          sinon.stub(qe, 'getNestedEntries').returns((0, _immutable.List)([new _QuizEntry.default(), new _QuizEntry.default(), new _QuizEntry.default()]));
          expect(qe.displayPositionSlots).to.eq(3);
        });
        it('honors the nested banks count', function () {
          var qe = new _QuizEntry.default({
            entryType: 'Stimulus'
          });
          var bank = new _QuizEntry.default({
            entryType: 'Bank'
          });
          var bankRecord = new _Bank.default({
            itemEntryCount: 3
          });
          sinon.stub(bank, 'getEntry').returns(bankRecord);
          sinon.stub(qe, 'getNestedEntries').returns((0, _immutable.List)([bank, new _QuizEntry.default(), new _QuizEntry.default()]));
          expect(qe.displayPositionSlots).to.eq(5);
        });
      });
      context('for banked stimulus', function () {
        it('returns the entryCount', function () {
          var qe = new _QuizEntry.default({
            entryType: 'BankEntry'
          });
          var be = new _BankEntry.default();
          sinon.stub(be, 'getEntry').returns(new _Stimulus.default());
          sinon.stub(qe, 'getEntry').returns(be);
          sinon.stub(qe, 'getNestedEntries').returns((0, _immutable.List)([new _QuizEntry.default(), new _QuizEntry.default(), new _QuizEntry.default()]));
          expect(qe.displayPositionSlots).to.eq(3);
        });
      });

      var sharedExample = function sharedExample(entryType) {
        it("returns 1 for ".concat(entryType), function () {
          var qe = new _QuizEntry.default({
            entryType: entryType
          });
          expect(qe.displayPositionSlots).to.eq(1);
        });
      };

      sharedExample('Item');
    });
  });
  describe('#positionToDisplay', function () {
    context('for banks', function () {
      it('returns a #-# string', function () {
        var qe = new _QuizEntry.default({
          entryType: 'Bank'
        });
        sinon.stub(qe, 'getEntry').returns({
          itemEntryCount: 5
        });
        expect(qe.positionToDisplay(5)).to.eq('5 - 9');
      });
      it('honors sampleNum', function () {
        var qe = new _QuizEntry.default({
          entryType: 'Bank',
          properties: (0, _immutable.Map)({
            sampleNum: '3'
          })
        });
        sinon.stub(qe, 'getEntry').returns({
          itemEntryCount: 5
        });
        expect(qe.positionToDisplay(5)).to.eq('5 - 7');
      });
      it('does not return a range if sample num is 1', function () {
        var qe = new _QuizEntry.default({
          entryType: 'Bank',
          properties: (0, _immutable.Map)({
            sampleNum: '1'
          })
        });
        sinon.stub(qe, 'getEntry').returns({
          itemEntryCount: 5
        });
        expect(qe.positionToDisplay(5)).to.eq('5');
      });
      it('does not return a range if bankSize is 1', function () {
        var qe = new _QuizEntry.default({
          entryType: 'Bank'
        });
        sinon.stub(qe, 'getEntry').returns({
          itemEntryCount: 1
        });
        expect(qe.positionToDisplay(5)).to.eq('5');
      });
    });

    var sharedExample = function sharedExample(entryType) {
      it("returns the number given for ".concat(entryType), function () {
        var qe = new _QuizEntry.default({
          entryType: entryType
        });
        expect(qe.positionToDisplay(5)).to.eq('5');
      });
    };

    sharedExample('Stimulus');
    sharedExample('Item');
  });
  describe('#getErrors', function () {
    var createQuizEntry = function createQuizEntry() {
      var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var qe = new _QuizEntry.default(Object.assign({
        entryType: 'Bank',
        pointsPossible: 1,
        properties: (0, _immutable.Map)({
          sampleNum: '',
          selection: 'rand'
        })
      }, override));
      sinon.stub(qe, 'getEntry').returns({
        itemEntryCount: 5
      });
      return qe;
    };

    it('renders two error messages when both inputs are blank', function () {
      var qe = createQuizEntry({
        pointsPossible: ''
      });
      expect(qe.isValid()).to.eq(false);
      var errors = qe.getErrors();
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      var deletedBankMessages = errors.get('deletedBank');
      expect(deletedBankMessages.size).to.eq(0);
      expect(pointsMessages.size).to.eq(1);
      expect(pointsMessages.first().get('text')).to.eq('Must be a number');
      expect(sampleMessages.size).to.eq(1);
      expect(sampleMessages.first().get('text')).to.eq('Must be a whole number');
    });
    it('renders one error message when only points possible is blank', function () {
      var qe = createQuizEntry({
        pointsPossible: '',
        properties: (0, _immutable.Map)({
          selection: 'all'
        })
      });
      expect(qe.isValid()).to.eq(false);
      var errors = qe.getErrors();
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      var deletedBankMessages = errors.get('deletedBank');
      expect(deletedBankMessages.size).to.eq(0);
      expect(pointsMessages.size).to.eq(1);
      expect(sampleMessages.size).to.eq(0);
      expect(pointsMessages.first().get('text')).to.eq('Must be a number');
    });
    it('renders one error message when sampleNum is NaN', function () {
      var qe = createQuizEntry({
        properties: (0, _immutable.Map)({
          selection: 'rand',
          sampleNum: 'NaN'
        })
      });
      expect(qe.isValid()).to.eq(false);
      var errors = qe.getErrors();
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      var deletedBankMessages = errors.get('deletedBank');
      expect(deletedBankMessages.size).to.eq(0);
      expect(pointsMessages.size).to.eq(0);
      expect(sampleMessages.size).to.eq(1);
      expect(sampleMessages.first().get('text')).to.eq('Must be a whole number');
    });
    it('renders one error message when sampleNum is not an integer', function () {
      var qe = createQuizEntry({
        properties: (0, _immutable.Map)({
          selection: 'rand',
          sampleNum: '1.1'
        })
      });
      expect(qe.isValid()).to.eq(false);
      var errors = qe.getErrors();
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      var deletedBankMessages = errors.get('deletedBank');
      expect(deletedBankMessages.size).to.eq(0);
      expect(pointsMessages.size).to.eq(0);
      expect(sampleMessages.size).to.eq(1);
      expect(sampleMessages.first().get('text')).to.eq('Must be a whole number');
    });
    it('renders one error message when sampleNum is <= 0', function () {
      var qe = createQuizEntry({
        properties: (0, _immutable.Map)({
          selection: 'rand',
          sampleNum: '0'
        })
      });
      expect(qe.isValid()).to.eq(false);
      var errors = qe.getErrors();
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      var deletedBankMessages = errors.get('deletedBank');
      expect(deletedBankMessages.size).to.eq(0);
      expect(pointsMessages.size).to.eq(0);
      expect(sampleMessages.size).to.eq(1);
      expect(sampleMessages.first().get('text')).to.eq('Must be at least 1');
    });
    it('renders one error message when sampleNum is > bank entry count', function () {
      var qe = createQuizEntry({
        properties: (0, _immutable.Map)({
          selection: 'rand',
          sampleNum: '6'
        })
      });
      expect(qe.isValid()).to.eq(false);
      var errors = qe.getErrors();
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      var deletedBankMessages = errors.get('deletedBank');
      expect(deletedBankMessages.size).to.eq(0);
      expect(pointsMessages.size).to.eq(0);
      expect(sampleMessages.size).to.eq(1);
      expect(sampleMessages.first().get('text')).to.eq('Max number exceeded (this bank contains 5 questions)');
    });
    it('renders one error message when entry is archived bank', function () {
      var qe = new _QuizEntry.default({
        entryType: 'Bank'
      });
      sinon.stub(qe, 'getEntry').returns(new _Bank.default({
        archived: true
      }));
      expect(qe.isValid()).to.be.false();
      var errors = qe.getErrors();
      var deletedBankMessages = errors.get('deletedBank');
      var pointsMessages = errors.get('pointsPossible');
      var sampleMessages = errors.get('sampleNum');
      expect(deletedBankMessages.size).to.eq(1);
      expect(pointsMessages.size).to.eq(0);
      expect(sampleMessages.size).to.eq(0);
      expect(deletedBankMessages.first().get('text')).to.eq('This item bank no longer exists. Please select a valid bank.');
    });
  });
});