416
417
418
-419
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428 |
@@ -743,58 +752,63 @@
-535
+493
+493
+493
+493
+493
-535
-535
-535
-535
-535
+493
-535
+493
+493
+416
+339
+261
-535
-535
-452
-369
-285
+183
+183
-201
-201
+493
-535
+493
+493
+493
-535
-150
-385
+493
+493
+493
+493
+493
+493
+493
+493
+493
+493
-83
+493
-535
-535
-535
+144
+349
-535
-535
-535
-535
-535
-535
-535
-535
+77
+
+
+493
+493
@@ -806,6 +820,10 @@
19
19
19
+16
+13
+11
+8
19
@@ -924,7 +942,7 @@
-85
+79
@@ -943,28 +961,28 @@
-170
+158
-85
-85
+79
+79
-85
-85
-85
-85
-85
-85
-85
-85
-85
-85
+79
+79
+79
+79
+79
+79
+79
+79
+79
+79
-85
-85
+79
+79
@@ -974,62 +992,62 @@
-80
-80
+74
+74
-80
-80
+74
+74
-80
-77
-193
+74
+71
+175
-80
-80
-320
-320
-320
+74
+74
+296
+296
+296
-320
-320
-320
-160
+296
+296
+296
+148
-80
+74
-80
+74
-80
-46
-306
+74
+40
+264
-80
+74
-80
-80
-513
+74
+74
+471
-80
+74
-80
+74
@@ -1161,8 +1179,6 @@
@param {boolean} [options.isFastForward=false]
*/
initialize: function (options) {
- Backbone.View.prototype.initialize.apply(this, arguments);
-
var collection = this.collection;
var state = collection.state;
var currentPage = state.currentPage;
@@ -1182,19 +1198,6 @@
pageIndex = (firstPage ? pageIndex + 1 : pageIndex);
}
this.pageIndex = pageIndex;
-
- if (((this.isRewind || this.isBack) && currentPage == firstPage) ||
- ((this.isForward || this.isFastForward) &&
- (currentPage == lastPage || collection.state.totalPages < 1))) {
- this.$el.addClass("disabled");
- }
- else if (!(this.isRewind ||
- this.isBack ||
- this.isForward ||
- this.isFastForward) &&
- currentPage == pageIndex) {
- this.$el.addClass("active");
- }
this.label = (options.label || (firstPage ? pageIndex : pageIndex + 1)) + '';
var title = options.title || this.title;
@@ -1211,6 +1214,26 @@
Eif (this.title) anchor.title = this.title;
anchor.innerHTML = this.label;
this.el.appendChild(anchor);
+
+ var collection = this.collection;
+ var state = collection.state;
+ var currentPage = state.currentPage;
+ var pageIndex = this.pageIndex;
+
+ if (this.isRewind && currentPage == state.firstPage ||
+ this.isBack && !collection.hasPrevious() ||
+ this.isForward && !collection.hasNext() ||
+ this.isFastForward && (currentPage == state.lastPage || state.totalPages < 1)) {
+ this.$el.addClass("disabled");
+ }
+ else if (!(this.isRewind ||
+ this.isBack ||
+ this.isForward ||
+ this.isFastForward) &&
+ state.currentPage == pageIndex) {
+ this.$el.addClass("active");
+ }
+
this.delegateEvents();
return this;
},
@@ -1221,9 +1244,13 @@
*/
changePage: function (e) {
e.preventDefault();
- var $el = this.$el;
+ var $el = this.$el, col = this.collection;
Eif (!$el.hasClass("active") && !$el.hasClass("disabled")) {
- this.collection.getPage(this.pageIndex);
+ if (this.isRewind) col.getFirstPage();
+ else if (this.isBack) col.getPreviousPage();
+ else if (this.isForward) col.getNextPage();
+ else if (this.isFastForward) col.getLastPage();
+ else col.getPage(this.pageIndex, {reset: true});
}
return this;
}
@@ -1313,16 +1340,16 @@
self.controls = _.defaults(options.controls || {}, self.controls,
Paginator.prototype.controls);
- _.extend(this, _.pick(options || {}, "windowSize", "pageHandle",
+ _.extend(self, _.pick(options || {}, "windowSize", "pageHandle",
"slideScale", "goBackFirstOnSort",
"renderIndexedPageHandles"));
- var collection = self.collection;
- self.listenTo(collection, "add", self.render);
- self.listenTo(collection, "remove", self.render);
- self.listenTo(collection, "reset", self.render);
- self.listenTo(collection, "backgrid:sort", function () {
- if (self.goBackFirstOnSort) collection.getFirstPage();
+ var col = self.collection;
+ self.listenTo(col, "add", self.render);
+ self.listenTo(col, "remove", self.render);
+ self.listenTo(col, "reset", self.render);
+ self.listenTo(col, "backgrid:sorted", function () {
+ if (self.goBackFirstOnSort) col.getFirstPage({reset: true});
});
},
@@ -1458,7 +1485,7 @@
diff --git a/test/coverage/coverage.json b/test/coverage/coverage.json
index 3991224..9936f54 100644
--- a/test/coverage/coverage.json
+++ b/test/coverage/coverage.json
@@ -1 +1 @@
-{"backgrid-paginator.js":{"path":"backgrid-paginator.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":535,"7":535,"8":535,"9":535,"10":535,"11":535,"12":535,"13":535,"14":535,"15":83,"16":452,"17":83,"18":369,"19":84,"20":285,"21":84,"22":201,"23":201,"24":535,"25":535,"26":150,"27":385,"28":83,"29":535,"30":535,"31":535,"32":535,"33":535,"34":535,"35":535,"36":535,"37":535,"38":535,"39":535,"40":535,"41":19,"42":19,"43":19,"44":19,"45":19,"46":1,"47":37,"48":37,"49":37,"50":37,"51":37,"52":37,"53":37,"54":37,"55":2,"56":1,"57":85,"58":170,"59":85,"60":85,"61":85,"62":85,"63":85,"64":85,"65":85,"66":85,"67":85,"68":85,"69":85,"70":85,"71":85,"72":85,"73":80,"74":80,"75":80,"76":80,"77":80,"78":77,"79":193,"80":80,"81":80,"82":320,"83":320,"84":320,"85":320,"86":320,"87":320,"88":160,"89":160,"90":80,"91":80,"92":80,"93":46,"94":306,"95":80,"96":80,"97":80,"98":513,"99":80,"100":80},"b":{"1":[0,1],"2":[83,452],"3":[83,369],"4":[84,285],"5":[84,201],"6":[141,60],"7":[150,385],"8":[535,452,166,413,329,168,148],"9":[83,302],"10":[385,201],"11":[385,363,341,271],"12":[535,202],"13":[142,60],"14":[535,201],"15":[202,333],"16":[535,0],"17":[19,0],"18":[19,19],"19":[37,37],"20":[37,0],"21":[1,1],"22":[65,20],"23":[65,20],"24":[85,0],"25":[77,3],"26":[320,0],"27":[160,160],"28":[320,240],"29":[46,34]},"f":{"1":1,"2":1,"3":535,"4":535,"5":19,"6":37,"7":2,"8":85,"9":170,"10":85,"11":80,"12":320,"13":80},"fnMap":{"1":{"name":"(anonymous_1)","line":8,"loc":{"start":{"line":8,"column":1},"end":{"line":8,"column":26}}},"2":{"name":"(anonymous_2)","line":22,"loc":{"start":{"line":22,"column":8},"end":{"line":22,"column":41}}},"3":{"name":"(anonymous_3)","line":126,"loc":{"start":{"line":126,"column":16},"end":{"line":126,"column":35}}},"4":{"name":"(anonymous_4)","line":170,"loc":{"start":{"line":170,"column":12},"end":{"line":170,"column":24}}},"5":{"name":"(anonymous_5)","line":185,"loc":{"start":{"line":185,"column":16},"end":{"line":185,"column":29}}},"6":{"name":"(anonymous_6)","line":274,"loc":{"start":{"line":274,"column":16},"end":{"line":274,"column":35}}},"7":{"name":"(anonymous_7)","line":287,"loc":{"start":{"line":287,"column":49},"end":{"line":287,"column":61}}},"8":{"name":"(anonymous_8)","line":307,"loc":{"start":{"line":307,"column":16},"end":{"line":307,"column":84}}},"9":{"name":"(anonymous_9)","line":326,"loc":{"start":{"line":326,"column":19},"end":{"line":326,"column":87}}},"10":{"name":"(anonymous_10)","line":330,"loc":{"start":{"line":330,"column":22},"end":{"line":330,"column":34}}},"11":{"name":"(anonymous_11)","line":356,"loc":{"start":{"line":356,"column":17},"end":{"line":356,"column":29}}},"12":{"name":"(anonymous_12)","line":374,"loc":{"start":{"line":374,"column":59},"end":{"line":374,"column":74}}},"13":{"name":"(anonymous_13)","line":395,"loc":{"start":{"line":395,"column":12},"end":{"line":395,"column":24}}}},"statementMap":{"1":{"start":{"line":8,"column":0},"end":{"line":418,"column":4}},"2":{"start":{"line":11,"column":2},"end":{"line":20,"column":3}},"3":{"start":{"line":12,"column":4},"end":{"line":15,"column":59}},"4":{"start":{"line":19,"column":4},"end":{"line":19,"column":50}},"5":{"start":{"line":67,"column":2},"end":{"line":194,"column":5}},"6":{"start":{"line":127,"column":6},"end":{"line":127,"column":64}},"7":{"start":{"line":129,"column":6},"end":{"line":129,"column":39}},"8":{"start":{"line":130,"column":6},"end":{"line":130,"column":35}},"9":{"start":{"line":131,"column":6},"end":{"line":131,"column":42}},"10":{"start":{"line":132,"column":6},"end":{"line":132,"column":38}},"11":{"start":{"line":133,"column":6},"end":{"line":133,"column":36}},"12":{"start":{"line":135,"column":6},"end":{"line":136,"column":83}},"13":{"start":{"line":138,"column":6},"end":{"line":138,"column":20}},"14":{"start":{"line":139,"column":6},"end":{"line":146,"column":7}},"15":{"start":{"line":139,"column":25},"end":{"line":139,"column":47}},"16":{"start":{"line":140,"column":11},"end":{"line":146,"column":7}},"17":{"start":{"line":140,"column":28},"end":{"line":140,"column":77}},"18":{"start":{"line":141,"column":11},"end":{"line":146,"column":7}},"19":{"start":{"line":141,"column":31},"end":{"line":141,"column":79}},"20":{"start":{"line":142,"column":11},"end":{"line":146,"column":7}},"21":{"start":{"line":142,"column":35},"end":{"line":142,"column":56}},"22":{"start":{"line":144,"column":8},"end":{"line":144,"column":39}},"23":{"start":{"line":145,"column":8},"end":{"line":145,"column":60}},"24":{"start":{"line":147,"column":6},"end":{"line":147,"column":33}},"25":{"start":{"line":149,"column":6},"end":{"line":160,"column":7}},"26":{"start":{"line":152,"column":8},"end":{"line":152,"column":38}},"27":{"start":{"line":154,"column":11},"end":{"line":160,"column":7}},"28":{"start":{"line":159,"column":8},"end":{"line":159,"column":36}},"29":{"start":{"line":162,"column":6},"end":{"line":162,"column":83}},"30":{"start":{"line":163,"column":6},"end":{"line":163,"column":46}},"31":{"start":{"line":164,"column":6},"end":{"line":164,"column":76}},"32":{"start":{"line":171,"column":6},"end":{"line":171,"column":23}},"33":{"start":{"line":172,"column":6},"end":{"line":172,"column":47}},"34":{"start":{"line":173,"column":6},"end":{"line":173,"column":24}},"35":{"start":{"line":174,"column":6},"end":{"line":174,"column":48}},"36":{"start":{"line":174,"column":22},"end":{"line":174,"column":48}},"37":{"start":{"line":175,"column":6},"end":{"line":175,"column":36}},"38":{"start":{"line":176,"column":6},"end":{"line":176,"column":34}},"39":{"start":{"line":177,"column":6},"end":{"line":177,"column":28}},"40":{"start":{"line":178,"column":6},"end":{"line":178,"column":18}},"41":{"start":{"line":186,"column":6},"end":{"line":186,"column":25}},"42":{"start":{"line":187,"column":6},"end":{"line":187,"column":25}},"43":{"start":{"line":188,"column":6},"end":{"line":190,"column":7}},"44":{"start":{"line":189,"column":8},"end":{"line":189,"column":48}},"45":{"start":{"line":191,"column":6},"end":{"line":191,"column":18}},"46":{"start":{"line":206,"column":2},"end":{"line":416,"column":5}},"47":{"start":{"line":275,"column":6},"end":{"line":275,"column":22}},"48":{"start":{"line":276,"column":6},"end":{"line":277,"column":63}},"49":{"start":{"line":279,"column":6},"end":{"line":281,"column":57}},"50":{"start":{"line":283,"column":6},"end":{"line":283,"column":39}},"51":{"start":{"line":284,"column":6},"end":{"line":284,"column":52}},"52":{"start":{"line":285,"column":6},"end":{"line":285,"column":55}},"53":{"start":{"line":286,"column":6},"end":{"line":286,"column":54}},"54":{"start":{"line":287,"column":6},"end":{"line":289,"column":9}},"55":{"start":{"line":288,"column":8},"end":{"line":288,"column":62}},"56":{"start":{"line":288,"column":36},"end":{"line":288,"column":62}},"57":{"start":{"line":308,"column":6},"end":{"line":308,"column":63}},"58":{"start":{"line":327,"column":6},"end":{"line":327,"column":41}},"59":{"start":{"line":331,"column":6},"end":{"line":331,"column":39}},"60":{"start":{"line":332,"column":6},"end":{"line":332,"column":35}},"61":{"start":{"line":335,"column":6},"end":{"line":335,"column":38}},"62":{"start":{"line":336,"column":6},"end":{"line":336,"column":37}},"63":{"start":{"line":337,"column":6},"end":{"line":337,"column":66}},"64":{"start":{"line":338,"column":6},"end":{"line":338,"column":69}},"65":{"start":{"line":339,"column":6},"end":{"line":339,"column":62}},"66":{"start":{"line":340,"column":6},"end":{"line":340,"column":39}},"67":{"start":{"line":341,"column":6},"end":{"line":341,"column":39}},"68":{"start":{"line":342,"column":6},"end":{"line":342,"column":74}},"69":{"start":{"line":343,"column":6},"end":{"line":346,"column":7}},"70":{"start":{"line":344,"column":8},"end":{"line":345,"column":102}},"71":{"start":{"line":347,"column":6},"end":{"line":347,"column":71}},"72":{"start":{"line":348,"column":6},"end":{"line":348,"column":38}},"73":{"start":{"line":358,"column":6},"end":{"line":358,"column":23}},"74":{"start":{"line":359,"column":6},"end":{"line":359,"column":39}},"75":{"start":{"line":361,"column":6},"end":{"line":361,"column":43}},"76":{"start":{"line":362,"column":6},"end":{"line":362,"column":51}},"77":{"start":{"line":364,"column":6},"end":{"line":371,"column":7}},"78":{"start":{"line":365,"column":8},"end":{"line":370,"column":9}},"79":{"start":{"line":366,"column":10},"end":{"line":369,"column":14}},"80":{"start":{"line":373,"column":6},"end":{"line":373,"column":35}},"81":{"start":{"line":374,"column":6},"end":{"line":387,"column":15}},"82":{"start":{"line":375,"column":8},"end":{"line":375,"column":34}},"83":{"start":{"line":376,"column":8},"end":{"line":386,"column":9}},"84":{"start":{"line":377,"column":10},"end":{"line":381,"column":12}},"85":{"start":{"line":382,"column":10},"end":{"line":382,"column":85}},"86":{"start":{"line":383,"column":10},"end":{"line":383,"column":59}},"87":{"start":{"line":384,"column":10},"end":{"line":385,"column":36}},"88":{"start":{"line":384,"column":48},"end":{"line":384,"column":72}},"89":{"start":{"line":385,"column":15},"end":{"line":385,"column":36}},"90":{"start":{"line":389,"column":6},"end":{"line":389,"column":21}},"91":{"start":{"line":396,"column":6},"end":{"line":396,"column":23}},"92":{"start":{"line":398,"column":6},"end":{"line":402,"column":7}},"93":{"start":{"line":399,"column":8},"end":{"line":401,"column":9}},"94":{"start":{"line":400,"column":10},"end":{"line":400,"column":35}},"95":{"start":{"line":404,"column":6},"end":{"line":404,"column":54}},"96":{"start":{"line":406,"column":6},"end":{"line":406,"column":44}},"97":{"start":{"line":407,"column":6},"end":{"line":409,"column":7}},"98":{"start":{"line":408,"column":8},"end":{"line":408,"column":47}},"99":{"start":{"line":411,"column":6},"end":{"line":411,"column":30}},"100":{"start":{"line":413,"column":6},"end":{"line":413,"column":18}}},"branchMap":{"1":{"line":11,"type":"if","locations":[{"start":{"line":11,"column":2},"end":{"line":11,"column":2}},{"start":{"line":11,"column":2},"end":{"line":11,"column":2}}]},"2":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":6},"end":{"line":139,"column":6}},{"start":{"line":139,"column":6},"end":{"line":139,"column":6}}]},"3":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":11},"end":{"line":140,"column":11}},{"start":{"line":140,"column":11},"end":{"line":140,"column":11}}]},"4":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":11},"end":{"line":141,"column":11}},{"start":{"line":141,"column":11},"end":{"line":141,"column":11}}]},"5":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":11},"end":{"line":142,"column":11}},{"start":{"line":142,"column":11},"end":{"line":142,"column":11}}]},"6":{"line":145,"type":"cond-expr","locations":[{"start":{"line":145,"column":33},"end":{"line":145,"column":46}},{"start":{"line":145,"column":49},"end":{"line":145,"column":58}}]},"7":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":6},"end":{"line":149,"column":6}},{"start":{"line":149,"column":6},"end":{"line":149,"column":6}}]},"8":{"line":149,"type":"binary-expr","locations":[{"start":{"line":149,"column":12},"end":{"line":149,"column":25}},{"start":{"line":149,"column":29},"end":{"line":149,"column":40}},{"start":{"line":149,"column":45},"end":{"line":149,"column":69}},{"start":{"line":150,"column":12},"end":{"line":150,"column":26}},{"start":{"line":150,"column":30},"end":{"line":150,"column":48}},{"start":{"line":151,"column":12},"end":{"line":151,"column":35}},{"start":{"line":151,"column":39},"end":{"line":151,"column":70}}]},"9":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":11},"end":{"line":154,"column":11}},{"start":{"line":154,"column":11},"end":{"line":154,"column":11}}]},"10":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":15},"end":{"line":157,"column":36}},{"start":{"line":158,"column":15},"end":{"line":158,"column":39}}]},"11":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":17},"end":{"line":154,"column":30}},{"start":{"line":155,"column":17},"end":{"line":155,"column":28}},{"start":{"line":156,"column":17},"end":{"line":156,"column":31}},{"start":{"line":157,"column":17},"end":{"line":157,"column":35}}]},"12":{"line":162,"type":"binary-expr","locations":[{"start":{"line":162,"column":20},"end":{"line":162,"column":33}},{"start":{"line":162,"column":38},"end":{"line":162,"column":75}}]},"13":{"line":162,"type":"cond-expr","locations":[{"start":{"line":162,"column":50},"end":{"line":162,"column":59}},{"start":{"line":162,"column":62},"end":{"line":162,"column":75}}]},"14":{"line":163,"type":"binary-expr","locations":[{"start":{"line":163,"column":18},"end":{"line":163,"column":31}},{"start":{"line":163,"column":35},"end":{"line":163,"column":45}}]},"15":{"line":164,"type":"cond-expr","locations":[{"start":{"line":164,"column":41},"end":{"line":164,"column":67}},{"start":{"line":164,"column":70},"end":{"line":164,"column":75}}]},"16":{"line":174,"type":"if","locations":[{"start":{"line":174,"column":6},"end":{"line":174,"column":6}},{"start":{"line":174,"column":6},"end":{"line":174,"column":6}}]},"17":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":6},"end":{"line":188,"column":6}},{"start":{"line":188,"column":6},"end":{"line":188,"column":6}}]},"18":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":10},"end":{"line":188,"column":33}},{"start":{"line":188,"column":37},"end":{"line":188,"column":62}}]},"19":{"line":276,"type":"binary-expr","locations":[{"start":{"line":276,"column":33},"end":{"line":276,"column":49}},{"start":{"line":276,"column":53},"end":{"line":276,"column":55}}]},"20":{"line":279,"type":"binary-expr","locations":[{"start":{"line":279,"column":28},"end":{"line":279,"column":35}},{"start":{"line":279,"column":39},"end":{"line":279,"column":41}}]},"21":{"line":288,"type":"if","locations":[{"start":{"line":288,"column":8},"end":{"line":288,"column":8}},{"start":{"line":288,"column":8},"end":{"line":288,"column":8}}]},"22":{"line":337,"type":"cond-expr","locations":[{"start":{"line":337,"column":41},"end":{"line":337,"column":53}},{"start":{"line":337,"column":56},"end":{"line":337,"column":64}}]},"23":{"line":339,"type":"cond-expr","locations":[{"start":{"line":339,"column":32},"end":{"line":339,"column":47}},{"start":{"line":339,"column":50},"end":{"line":339,"column":61}}]},"24":{"line":343,"type":"if","locations":[{"start":{"line":343,"column":6},"end":{"line":343,"column":6}},{"start":{"line":343,"column":6},"end":{"line":343,"column":6}}]},"25":{"line":364,"type":"if","locations":[{"start":{"line":364,"column":6},"end":{"line":364,"column":6}},{"start":{"line":364,"column":6},"end":{"line":364,"column":6}}]},"26":{"line":376,"type":"if","locations":[{"start":{"line":376,"column":8},"end":{"line":376,"column":8}},{"start":{"line":376,"column":8},"end":{"line":376,"column":8}}]},"27":{"line":384,"type":"if","locations":[{"start":{"line":384,"column":10},"end":{"line":384,"column":10}},{"start":{"line":384,"column":10},"end":{"line":384,"column":10}}]},"28":{"line":384,"type":"binary-expr","locations":[{"start":{"line":384,"column":14},"end":{"line":384,"column":29}},{"start":{"line":384,"column":33},"end":{"line":384,"column":46}}]},"29":{"line":398,"type":"if","locations":[{"start":{"line":398,"column":6},"end":{"line":398,"column":6}},{"start":{"line":398,"column":6},"end":{"line":398,"column":6}}]}}}}
\ No newline at end of file
+{"backgrid-paginator.js":{"path":"backgrid-paginator.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":493,"7":493,"8":493,"9":493,"10":493,"11":493,"12":493,"13":493,"14":77,"15":416,"16":77,"17":339,"18":78,"19":261,"20":78,"21":183,"22":183,"23":493,"24":493,"25":493,"26":493,"27":493,"28":493,"29":493,"30":493,"31":493,"32":493,"33":493,"34":493,"35":493,"36":493,"37":493,"38":493,"39":144,"40":349,"41":77,"42":493,"43":493,"44":19,"45":19,"46":19,"47":19,"48":3,"49":16,"50":3,"51":13,"52":2,"53":11,"54":3,"55":8,"56":19,"57":1,"58":37,"59":37,"60":37,"61":37,"62":37,"63":37,"64":37,"65":37,"66":2,"67":1,"68":79,"69":158,"70":79,"71":79,"72":79,"73":79,"74":79,"75":79,"76":79,"77":79,"78":79,"79":79,"80":79,"81":79,"82":79,"83":79,"84":74,"85":74,"86":74,"87":74,"88":74,"89":71,"90":175,"91":74,"92":74,"93":296,"94":296,"95":296,"96":296,"97":296,"98":296,"99":148,"100":148,"101":74,"102":74,"103":74,"104":40,"105":264,"106":74,"107":74,"108":74,"109":471,"110":74,"111":74},"b":{"1":[0,1],"2":[77,416],"3":[77,339],"4":[78,261],"5":[78,183],"6":[141,42],"7":[493,184],"8":[142,42],"9":[493,183],"10":[184,309],"11":[493,0],"12":[144,349],"13":[493,77,435,77,377,78,363,78,68],"14":[77,272],"15":[349,183],"16":[349,330,311,247],"17":[19,0],"18":[19,19],"19":[3,16],"20":[3,13],"21":[2,11],"22":[3,8],"23":[37,37],"24":[37,0],"25":[1,1],"26":[65,14],"27":[65,14],"28":[79,0],"29":[71,3],"30":[296,0],"31":[148,148],"32":[296,222],"33":[40,34]},"f":{"1":1,"2":1,"3":493,"4":493,"5":19,"6":37,"7":2,"8":79,"9":158,"10":79,"11":74,"12":296,"13":74},"fnMap":{"1":{"name":"(anonymous_1)","line":8,"loc":{"start":{"line":8,"column":1},"end":{"line":8,"column":26}}},"2":{"name":"(anonymous_2)","line":22,"loc":{"start":{"line":22,"column":8},"end":{"line":22,"column":41}}},"3":{"name":"(anonymous_3)","line":126,"loc":{"start":{"line":126,"column":16},"end":{"line":126,"column":35}}},"4":{"name":"(anonymous_4)","line":155,"loc":{"start":{"line":155,"column":12},"end":{"line":155,"column":24}}},"5":{"name":"(anonymous_5)","line":190,"loc":{"start":{"line":190,"column":16},"end":{"line":190,"column":29}}},"6":{"name":"(anonymous_6)","line":283,"loc":{"start":{"line":283,"column":16},"end":{"line":283,"column":35}}},"7":{"name":"(anonymous_7)","line":296,"loc":{"start":{"line":296,"column":44},"end":{"line":296,"column":56}}},"8":{"name":"(anonymous_8)","line":316,"loc":{"start":{"line":316,"column":16},"end":{"line":316,"column":84}}},"9":{"name":"(anonymous_9)","line":335,"loc":{"start":{"line":335,"column":19},"end":{"line":335,"column":87}}},"10":{"name":"(anonymous_10)","line":339,"loc":{"start":{"line":339,"column":22},"end":{"line":339,"column":34}}},"11":{"name":"(anonymous_11)","line":365,"loc":{"start":{"line":365,"column":17},"end":{"line":365,"column":29}}},"12":{"name":"(anonymous_12)","line":383,"loc":{"start":{"line":383,"column":59},"end":{"line":383,"column":74}}},"13":{"name":"(anonymous_13)","line":404,"loc":{"start":{"line":404,"column":12},"end":{"line":404,"column":24}}}},"statementMap":{"1":{"start":{"line":8,"column":0},"end":{"line":427,"column":4}},"2":{"start":{"line":11,"column":2},"end":{"line":20,"column":3}},"3":{"start":{"line":12,"column":4},"end":{"line":15,"column":59}},"4":{"start":{"line":19,"column":4},"end":{"line":19,"column":50}},"5":{"start":{"line":67,"column":2},"end":{"line":203,"column":5}},"6":{"start":{"line":127,"column":6},"end":{"line":127,"column":39}},"7":{"start":{"line":128,"column":6},"end":{"line":128,"column":35}},"8":{"start":{"line":129,"column":6},"end":{"line":129,"column":42}},"9":{"start":{"line":130,"column":6},"end":{"line":130,"column":38}},"10":{"start":{"line":131,"column":6},"end":{"line":131,"column":36}},"11":{"start":{"line":133,"column":6},"end":{"line":134,"column":83}},"12":{"start":{"line":136,"column":6},"end":{"line":136,"column":20}},"13":{"start":{"line":137,"column":6},"end":{"line":144,"column":7}},"14":{"start":{"line":137,"column":25},"end":{"line":137,"column":47}},"15":{"start":{"line":138,"column":11},"end":{"line":144,"column":7}},"16":{"start":{"line":138,"column":28},"end":{"line":138,"column":77}},"17":{"start":{"line":139,"column":11},"end":{"line":144,"column":7}},"18":{"start":{"line":139,"column":31},"end":{"line":139,"column":79}},"19":{"start":{"line":140,"column":11},"end":{"line":144,"column":7}},"20":{"start":{"line":140,"column":35},"end":{"line":140,"column":56}},"21":{"start":{"line":142,"column":8},"end":{"line":142,"column":39}},"22":{"start":{"line":143,"column":8},"end":{"line":143,"column":60}},"23":{"start":{"line":145,"column":6},"end":{"line":145,"column":33}},"24":{"start":{"line":147,"column":6},"end":{"line":147,"column":83}},"25":{"start":{"line":148,"column":6},"end":{"line":148,"column":46}},"26":{"start":{"line":149,"column":6},"end":{"line":149,"column":76}},"27":{"start":{"line":156,"column":6},"end":{"line":156,"column":23}},"28":{"start":{"line":157,"column":6},"end":{"line":157,"column":47}},"29":{"start":{"line":158,"column":6},"end":{"line":158,"column":24}},"30":{"start":{"line":159,"column":6},"end":{"line":159,"column":48}},"31":{"start":{"line":159,"column":22},"end":{"line":159,"column":48}},"32":{"start":{"line":160,"column":6},"end":{"line":160,"column":36}},"33":{"start":{"line":161,"column":6},"end":{"line":161,"column":34}},"34":{"start":{"line":163,"column":6},"end":{"line":163,"column":39}},"35":{"start":{"line":164,"column":6},"end":{"line":164,"column":35}},"36":{"start":{"line":165,"column":6},"end":{"line":165,"column":42}},"37":{"start":{"line":166,"column":6},"end":{"line":166,"column":37}},"38":{"start":{"line":168,"column":6},"end":{"line":180,"column":7}},"39":{"start":{"line":172,"column":8},"end":{"line":172,"column":38}},"40":{"start":{"line":174,"column":11},"end":{"line":180,"column":7}},"41":{"start":{"line":179,"column":8},"end":{"line":179,"column":36}},"42":{"start":{"line":182,"column":6},"end":{"line":182,"column":28}},"43":{"start":{"line":183,"column":6},"end":{"line":183,"column":18}},"44":{"start":{"line":191,"column":6},"end":{"line":191,"column":25}},"45":{"start":{"line":192,"column":6},"end":{"line":192,"column":48}},"46":{"start":{"line":193,"column":6},"end":{"line":199,"column":7}},"47":{"start":{"line":194,"column":8},"end":{"line":198,"column":56}},"48":{"start":{"line":194,"column":27},"end":{"line":194,"column":46}},"49":{"start":{"line":195,"column":13},"end":{"line":198,"column":56}},"50":{"start":{"line":195,"column":30},"end":{"line":195,"column":52}},"51":{"start":{"line":196,"column":13},"end":{"line":198,"column":56}},"52":{"start":{"line":196,"column":33},"end":{"line":196,"column":51}},"53":{"start":{"line":197,"column":13},"end":{"line":198,"column":56}},"54":{"start":{"line":197,"column":37},"end":{"line":197,"column":55}},"55":{"start":{"line":198,"column":13},"end":{"line":198,"column":56}},"56":{"start":{"line":200,"column":6},"end":{"line":200,"column":18}},"57":{"start":{"line":215,"column":2},"end":{"line":425,"column":5}},"58":{"start":{"line":284,"column":6},"end":{"line":284,"column":22}},"59":{"start":{"line":285,"column":6},"end":{"line":286,"column":63}},"60":{"start":{"line":288,"column":6},"end":{"line":290,"column":57}},"61":{"start":{"line":292,"column":6},"end":{"line":292,"column":32}},"62":{"start":{"line":293,"column":6},"end":{"line":293,"column":45}},"63":{"start":{"line":294,"column":6},"end":{"line":294,"column":48}},"64":{"start":{"line":295,"column":6},"end":{"line":295,"column":47}},"65":{"start":{"line":296,"column":6},"end":{"line":298,"column":9}},"66":{"start":{"line":297,"column":8},"end":{"line":297,"column":68}},"67":{"start":{"line":297,"column":36},"end":{"line":297,"column":68}},"68":{"start":{"line":317,"column":6},"end":{"line":317,"column":63}},"69":{"start":{"line":336,"column":6},"end":{"line":336,"column":41}},"70":{"start":{"line":340,"column":6},"end":{"line":340,"column":39}},"71":{"start":{"line":341,"column":6},"end":{"line":341,"column":35}},"72":{"start":{"line":344,"column":6},"end":{"line":344,"column":38}},"73":{"start":{"line":345,"column":6},"end":{"line":345,"column":37}},"74":{"start":{"line":346,"column":6},"end":{"line":346,"column":66}},"75":{"start":{"line":347,"column":6},"end":{"line":347,"column":69}},"76":{"start":{"line":348,"column":6},"end":{"line":348,"column":62}},"77":{"start":{"line":349,"column":6},"end":{"line":349,"column":39}},"78":{"start":{"line":350,"column":6},"end":{"line":350,"column":39}},"79":{"start":{"line":351,"column":6},"end":{"line":351,"column":74}},"80":{"start":{"line":352,"column":6},"end":{"line":355,"column":7}},"81":{"start":{"line":353,"column":8},"end":{"line":354,"column":102}},"82":{"start":{"line":356,"column":6},"end":{"line":356,"column":71}},"83":{"start":{"line":357,"column":6},"end":{"line":357,"column":38}},"84":{"start":{"line":367,"column":6},"end":{"line":367,"column":23}},"85":{"start":{"line":368,"column":6},"end":{"line":368,"column":39}},"86":{"start":{"line":370,"column":6},"end":{"line":370,"column":43}},"87":{"start":{"line":371,"column":6},"end":{"line":371,"column":51}},"88":{"start":{"line":373,"column":6},"end":{"line":380,"column":7}},"89":{"start":{"line":374,"column":8},"end":{"line":379,"column":9}},"90":{"start":{"line":375,"column":10},"end":{"line":378,"column":14}},"91":{"start":{"line":382,"column":6},"end":{"line":382,"column":35}},"92":{"start":{"line":383,"column":6},"end":{"line":396,"column":15}},"93":{"start":{"line":384,"column":8},"end":{"line":384,"column":34}},"94":{"start":{"line":385,"column":8},"end":{"line":395,"column":9}},"95":{"start":{"line":386,"column":10},"end":{"line":390,"column":12}},"96":{"start":{"line":391,"column":10},"end":{"line":391,"column":85}},"97":{"start":{"line":392,"column":10},"end":{"line":392,"column":59}},"98":{"start":{"line":393,"column":10},"end":{"line":394,"column":36}},"99":{"start":{"line":393,"column":48},"end":{"line":393,"column":72}},"100":{"start":{"line":394,"column":15},"end":{"line":394,"column":36}},"101":{"start":{"line":398,"column":6},"end":{"line":398,"column":21}},"102":{"start":{"line":405,"column":6},"end":{"line":405,"column":23}},"103":{"start":{"line":407,"column":6},"end":{"line":411,"column":7}},"104":{"start":{"line":408,"column":8},"end":{"line":410,"column":9}},"105":{"start":{"line":409,"column":10},"end":{"line":409,"column":35}},"106":{"start":{"line":413,"column":6},"end":{"line":413,"column":54}},"107":{"start":{"line":415,"column":6},"end":{"line":415,"column":44}},"108":{"start":{"line":416,"column":6},"end":{"line":418,"column":7}},"109":{"start":{"line":417,"column":8},"end":{"line":417,"column":47}},"110":{"start":{"line":420,"column":6},"end":{"line":420,"column":30}},"111":{"start":{"line":422,"column":6},"end":{"line":422,"column":18}}},"branchMap":{"1":{"line":11,"type":"if","locations":[{"start":{"line":11,"column":2},"end":{"line":11,"column":2}},{"start":{"line":11,"column":2},"end":{"line":11,"column":2}}]},"2":{"line":137,"type":"if","locations":[{"start":{"line":137,"column":6},"end":{"line":137,"column":6}},{"start":{"line":137,"column":6},"end":{"line":137,"column":6}}]},"3":{"line":138,"type":"if","locations":[{"start":{"line":138,"column":11},"end":{"line":138,"column":11}},{"start":{"line":138,"column":11},"end":{"line":138,"column":11}}]},"4":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":11},"end":{"line":139,"column":11}},{"start":{"line":139,"column":11},"end":{"line":139,"column":11}}]},"5":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":11},"end":{"line":140,"column":11}},{"start":{"line":140,"column":11},"end":{"line":140,"column":11}}]},"6":{"line":143,"type":"cond-expr","locations":[{"start":{"line":143,"column":33},"end":{"line":143,"column":46}},{"start":{"line":143,"column":49},"end":{"line":143,"column":58}}]},"7":{"line":147,"type":"binary-expr","locations":[{"start":{"line":147,"column":20},"end":{"line":147,"column":33}},{"start":{"line":147,"column":38},"end":{"line":147,"column":75}}]},"8":{"line":147,"type":"cond-expr","locations":[{"start":{"line":147,"column":50},"end":{"line":147,"column":59}},{"start":{"line":147,"column":62},"end":{"line":147,"column":75}}]},"9":{"line":148,"type":"binary-expr","locations":[{"start":{"line":148,"column":18},"end":{"line":148,"column":31}},{"start":{"line":148,"column":35},"end":{"line":148,"column":45}}]},"10":{"line":149,"type":"cond-expr","locations":[{"start":{"line":149,"column":41},"end":{"line":149,"column":67}},{"start":{"line":149,"column":70},"end":{"line":149,"column":75}}]},"11":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":6},"end":{"line":159,"column":6}},{"start":{"line":159,"column":6},"end":{"line":159,"column":6}}]},"12":{"line":168,"type":"if","locations":[{"start":{"line":168,"column":6},"end":{"line":168,"column":6}},{"start":{"line":168,"column":6},"end":{"line":168,"column":6}}]},"13":{"line":168,"type":"binary-expr","locations":[{"start":{"line":168,"column":10},"end":{"line":168,"column":23}},{"start":{"line":168,"column":27},"end":{"line":168,"column":57}},{"start":{"line":169,"column":9},"end":{"line":169,"column":20}},{"start":{"line":169,"column":24},"end":{"line":169,"column":49}},{"start":{"line":170,"column":9},"end":{"line":170,"column":23}},{"start":{"line":170,"column":27},"end":{"line":170,"column":48}},{"start":{"line":171,"column":9},"end":{"line":171,"column":27}},{"start":{"line":171,"column":32},"end":{"line":171,"column":61}},{"start":{"line":171,"column":65},"end":{"line":171,"column":85}}]},"14":{"line":174,"type":"if","locations":[{"start":{"line":174,"column":11},"end":{"line":174,"column":11}},{"start":{"line":174,"column":11},"end":{"line":174,"column":11}}]},"15":{"line":174,"type":"binary-expr","locations":[{"start":{"line":174,"column":15},"end":{"line":177,"column":36}},{"start":{"line":178,"column":15},"end":{"line":178,"column":45}}]},"16":{"line":174,"type":"binary-expr","locations":[{"start":{"line":174,"column":17},"end":{"line":174,"column":30}},{"start":{"line":175,"column":17},"end":{"line":175,"column":28}},{"start":{"line":176,"column":17},"end":{"line":176,"column":31}},{"start":{"line":177,"column":17},"end":{"line":177,"column":35}}]},"17":{"line":193,"type":"if","locations":[{"start":{"line":193,"column":6},"end":{"line":193,"column":6}},{"start":{"line":193,"column":6},"end":{"line":193,"column":6}}]},"18":{"line":193,"type":"binary-expr","locations":[{"start":{"line":193,"column":10},"end":{"line":193,"column":33}},{"start":{"line":193,"column":37},"end":{"line":193,"column":62}}]},"19":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":8},"end":{"line":194,"column":8}},{"start":{"line":194,"column":8},"end":{"line":194,"column":8}}]},"20":{"line":195,"type":"if","locations":[{"start":{"line":195,"column":13},"end":{"line":195,"column":13}},{"start":{"line":195,"column":13},"end":{"line":195,"column":13}}]},"21":{"line":196,"type":"if","locations":[{"start":{"line":196,"column":13},"end":{"line":196,"column":13}},{"start":{"line":196,"column":13},"end":{"line":196,"column":13}}]},"22":{"line":197,"type":"if","locations":[{"start":{"line":197,"column":13},"end":{"line":197,"column":13}},{"start":{"line":197,"column":13},"end":{"line":197,"column":13}}]},"23":{"line":285,"type":"binary-expr","locations":[{"start":{"line":285,"column":33},"end":{"line":285,"column":49}},{"start":{"line":285,"column":53},"end":{"line":285,"column":55}}]},"24":{"line":288,"type":"binary-expr","locations":[{"start":{"line":288,"column":28},"end":{"line":288,"column":35}},{"start":{"line":288,"column":39},"end":{"line":288,"column":41}}]},"25":{"line":297,"type":"if","locations":[{"start":{"line":297,"column":8},"end":{"line":297,"column":8}},{"start":{"line":297,"column":8},"end":{"line":297,"column":8}}]},"26":{"line":346,"type":"cond-expr","locations":[{"start":{"line":346,"column":41},"end":{"line":346,"column":53}},{"start":{"line":346,"column":56},"end":{"line":346,"column":64}}]},"27":{"line":348,"type":"cond-expr","locations":[{"start":{"line":348,"column":32},"end":{"line":348,"column":47}},{"start":{"line":348,"column":50},"end":{"line":348,"column":61}}]},"28":{"line":352,"type":"if","locations":[{"start":{"line":352,"column":6},"end":{"line":352,"column":6}},{"start":{"line":352,"column":6},"end":{"line":352,"column":6}}]},"29":{"line":373,"type":"if","locations":[{"start":{"line":373,"column":6},"end":{"line":373,"column":6}},{"start":{"line":373,"column":6},"end":{"line":373,"column":6}}]},"30":{"line":385,"type":"if","locations":[{"start":{"line":385,"column":8},"end":{"line":385,"column":8}},{"start":{"line":385,"column":8},"end":{"line":385,"column":8}}]},"31":{"line":393,"type":"if","locations":[{"start":{"line":393,"column":10},"end":{"line":393,"column":10}},{"start":{"line":393,"column":10},"end":{"line":393,"column":10}}]},"32":{"line":393,"type":"binary-expr","locations":[{"start":{"line":393,"column":14},"end":{"line":393,"column":29}},{"start":{"line":393,"column":33},"end":{"line":393,"column":46}}]},"33":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":6},"end":{"line":407,"column":6}},{"start":{"line":407,"column":6},"end":{"line":407,"column":6}}]}}}}
\ No newline at end of file
diff --git a/test/coverage/index.html b/test/coverage/index.html
index 591f4e4..d693d8b 100644
--- a/test/coverage/index.html
+++ b/test/coverage/index.html
@@ -183,16 +183,16 @@
Code coverage report for ./
- Statements: 99% (99 / 100)
+ Statements: 99.1% (110 / 111)
- Branches: 90.77% (59 / 65)
+ Branches: 92% (69 / 75)
Functions: 100% (13 / 13)
- Lines: 98.92% (92 / 93)
+ Lines: 99% (99 / 100)
@@ -216,15 +216,15 @@ |