-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathbrowser.js
11669 lines (10494 loc) · 424 KB
/
browser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
/** @jsx React.DOM */'use strict'
var React = __webpack_require__(1)
var moment = __webpack_require__(8)
var copyUtils = __webpack_require__(7)
var copy = copyUtils.copy
var copyList = copyUtils.copyList
var asConfig = __webpack_require__(5)
var MonthView = __webpack_require__(2)
var YearView = __webpack_require__(3)
var DecadeView = __webpack_require__(4)
var Views = {
month : MonthView,
year : YearView,
decade: DecadeView
}
var getWeekDayNames = __webpack_require__(6)
function emptyFn(){}
var DatePicker = React.createClass({
displayName: 'DatePicker',
getInitialState: function() {
return {
}
},
getDefaultProps: function() {
return asConfig()
},
getViewName: function() {
return this.state.view || this.props.view || 'month'
},
getViewOrder: function() {
return ['month', 'year', 'decade']
},
addViewIndex: function(amount) {
var viewName = this.getViewName()
var order = this.getViewOrder()
var index = order.indexOf(viewName)
index += amount
return index % order.length
},
getNextViewName: function() {
return this.getViewOrder()[this.addViewIndex(1)]
},
getPrevViewName: function() {
return this.getViewOrder()[this.addViewIndex(-1)]
},
getView: function() {
return Views[this.getViewName()] || Views.month
},
getViewDate: function() {
return this.state.viewMoment || this.props.viewDate || this.props.date || this.now
},
render: function() {
this.now = +new Date()
var view = this.getView()
var props = asConfig(this.props)
props.viewDate = this.getViewDate()
props.onChange = this.handleChange
props.onSelect = this.handleSelect
return React.DOM.div({className: "date-picker"},
React.DOM.div({className: "dp-inner"},
this.renderHeader(view),
React.DOM.div({className: "dp-body"},
React.DOM.div({className: "dp-anim-target"},
view(props)
)
),
this.renderFooter()
)
)
},
renderFooter: function() {
var todayText = this.props.today || 'Today'
var gotoSelected = this.props.gotoSelected || 'Go to selected'
return (
React.DOM.div({className: "dp-footer"},
React.DOM.div({className: "dp-footer-today", onClick: this.gotoNow},
todayText
),
React.DOM.div({className: "dp-footer-selected", onClick: this.gotoSelected},
gotoSelected
)
)
)
},
gotoNow: function() {
this.gotoDate(+new Date())
},
gotoSelected: function() {
this.gotoDate(this.props.date || +new Date())
},
gotoDate: function(value) {
this.setState({
view: 'month',
viewMoment: moment(value)
})
},
getViewColspan: function(){
var map = {
month : 5,
year : 2,
decade: 2
}
return map[this.getViewName()]
},
renderHeader: function(view) {
var viewDate = this.getViewDate()
var headerText = this.getView().getHeaderText(viewDate)
var colspan = this.getViewColspan()
var prev = this.props.navPrev
var next = this.props.navNext
return (
React.DOM.div({className: "dp-header"},
React.DOM.table({className: "dp-nav-table"}, React.DOM.tbody(null,
React.DOM.tr({className: "dp-row"},
React.DOM.td({className: "dp-prev-nav dp-nav-cell dp-cell", onClick: this.handlePrevNav}, prev),
React.DOM.td({className: "dp-nav-view dp-cell ", colSpan: colspan, onClick: this.handleViewChange}, headerText),
React.DOM.td({className: "dp-next-nav dp-nav-cell dp-cell", onClick: this.handleNextNav}, next)
)
))
)
)
},
handleViewChange: function() {
this.setState({
view: this.getNextViewName()
})
},
getNext: function() {
var current = this.getViewDate()
return ({
month: function() {
return moment(current).add(1, 'month')
},
year: function() {
return moment(current).add(1, 'year')
},
decade: function() {
return moment(current).add(10, 'year')
}
})[this.getViewName()]()
},
getPrev: function() {
var current = this.getViewDate()
return ({
month: function() {
return moment(current).add(-1, 'month')
},
year: function() {
return moment(current).add(-1, 'year')
},
decade: function() {
return moment(current).add(-10, 'year')
}
})[this.getViewName()]()
},
handlePrevNav: function() {
this.setState({
viewMoment: this.getPrev()
})
},
handleNextNav: function() {
this.setState({
viewMoment: this.getNext()
})
},
handleChange: function(date, event) {
;(this.props.onChange || emptyFn)(moment(date), event)
},
handleSelect: function(date, event) {
var viewName = this.getViewName()
var property = ({
decade: 'year',
year : 'month'
})[viewName]
var value = date.get(property)
var viewMoment = moment(this.getViewDate()).set(property, value)
this.setState({
viewMoment: viewMoment,
view: this.getPrevViewName()
})
}
})
module.exports = DatePicker
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
module.exports = React;
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
/** @jsx React.DOM */'use strict'
var React = __webpack_require__(1)
var moment = __webpack_require__(8)
var copy = __webpack_require__(7).copy
var FORMAT = __webpack_require__(9)
var asConfig = __webpack_require__(5)
var toMoment = __webpack_require__(10)
var TODAY
function emptyFn(){}
var MonthView = React.createClass({
displayName: 'MonthView',
/**
* Formats the given date in the specified format.
* @method format
*
* @param {Date/String/Moment} value
* @param {String} [format] If none specified, #dateFormat will be used
*
* @return {String}
*/
formatAsDay: function(moment, dayDisplayFormat){
return moment.format(dayDisplayFormat || 'D')
},
getDefaultProps: function() {
return asConfig()
},
getWeekStartMoment: function(value){
var clone = moment(value).startOf('week')
// if (DEFAULT_WEEK_START_DAY != this.weekStartDay){
// clone.add('days', this.weekStartDay - DEFAULT_WEEK_START_DAY)
// }
return clone
},
/**
* Returns all the days in the specified month.
*
* @param {Moment/Date/Number} value
* @return {Moment[]}
*/
getDaysInMonth: function(value){
var first = moment(value).startOf('month')
var start = this.getWeekStartMoment(first)
var result = []
var i = 0
if (first.add(-1, 'days').isBefore(start)){
//make sure the last day of prev month is included
start.add(-1, 'weeks')
}
for (; i < 42; i++){
result.push(moment(start))
start.add(1, 'days')
}
return result
},
render: function() {
TODAY = +moment().startOf('day')
var viewMoment = this.props.viewMoment = moment(this.props.viewDate)
this.monthFirst = moment(viewMoment).startOf('month')
this.monthLast = moment(viewMoment).endOf('month')
if (this.props.date){
this.props.moment = moment(this.props.date).startOf('day')
}
var daysInView = this.getDaysInMonth(viewMoment)
return (
React.DOM.table({className: "dp-table dp-month-view"},
React.DOM.tbody(null,
this.renderWeekDayNames(),
this.renderDays(daysInView)
)
)
)
},
/**
* Render the given array of days
* @param {Moment[]} days
* @return {React.DOM}
*/
renderDays: function(days) {
var nodes = days.map(this.renderDay, this)
var len = days.length
var buckets = []
var bucketsLen = Math.ceil(len / 7)
var i = 0
for ( ; i < bucketsLen; i++){
buckets.push(nodes.slice(i * 7, (i + 1) * 7))
}
return buckets.map(function(bucket, i){
return React.DOM.tr({key: "row" + i, className: "dp-week dp-row"}, bucket)
})
},
renderDay: function(date) {
var dayText = FORMAT.day(date)
var classes = ["dp-cell dp-day"]
var dateTimestamp = +date
if (dateTimestamp == TODAY){
classes.push('dp-current')
} else if (dateTimestamp < this.monthFirst){
classes.push('dp-prev')
} else if (dateTimestamp > this.monthLast){
classes.push('dp-next')
}
if (dateTimestamp == this.props.moment){
classes.push('dp-value')
}
return (
React.DOM.td({key: dayText, className: classes.join(' '), onClick: this.handleClick.bind(this, date)},
dayText
)
)
},
renderWeekDayNames: function(){
var names = this.props.weekDayNames
return (
React.DOM.tr({className: "dp-row dp-week-day-names"},
names.map(function(name) {return React.DOM.td({key: name, className: "dp-cell dp-week-day-name"}, name);})
)
)
},
handleClick: function(date) {
event.target.value = date
;(this.props.onChange || emptyFn)(date, event)
}
})
copy({
getHeaderText: function(moment) {
return toMoment(moment).format('MMMM YYYY')
}
}, MonthView)
module.exports = MonthView
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/** @jsx React.DOM */'use strict'
var React = __webpack_require__(1)
var moment = __webpack_require__(8)
var copy = __webpack_require__(7).copy
var FORMAT = __webpack_require__(9)
var asConfig = __webpack_require__(5)
var toMoment = __webpack_require__(10)
var TODAY
function emptyFn(){}
var YearView = React.createClass({
displayName: 'YearView',
getDefaultProps: function() {
return asConfig()
},
/**
* Returns all the days in the specified month.
*
* @param {Moment/Date/Number} value
* @return {Moment[]}
*/
getMonthsInYear: function(value){
var start = moment(value).startOf('year')
var result = []
var i = 0
for (; i < 12; i++){
result.push(moment(start))
start.add(1, 'month')
}
return result
},
render: function() {
TODAY = +moment().startOf('day')
var viewMoment = this.props.viewMoment = moment(this.props.viewDate)
if (this.props.date){
this.props.moment = moment(this.props.date).startOf('month')
}
var monthsInView = this.getMonthsInYear(viewMoment)
return (
React.DOM.table({className: "dp-table dp-year-view"},
React.DOM.tbody(null,
this.renderMonths(monthsInView)
)
)
)
},
/**
* Render the given array of days
* @param {Moment[]} days
* @return {React.DOM}
*/
renderMonths: function(days) {
var nodes = days.map(this.renderMonth, this)
var len = days.length
var buckets = []
var bucketsLen = Math.ceil(len / 4)
var i = 0
for ( ; i < bucketsLen; i++){
buckets.push(nodes.slice(i * 4, (i + 1) * 4))
}
return buckets.map(function(bucket, i){
return React.DOM.tr({key: "row" + i}, bucket)
})
},
renderMonth: function(date) {
var monthText = FORMAT.month(date)
var classes = ["dp-cell dp-month"]
var dateTimestamp = +date
if (dateTimestamp == this.props.moment){
classes.push('dp-value')
}
return (
React.DOM.td({key: monthText, className: classes.join(' '), onClick: this.handleClick.bind(this, date)},
monthText
)
)
},
handleClick: function(date) {
event.target.value = date
;(this.props.onSelect || emptyFn)(date, event)
}
})
copy({
getHeaderText: function(moment) {
return toMoment(moment).format('YYYY')
}
}, YearView)
module.exports = YearView
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/** @jsx React.DOM */'use strict'
var React = __webpack_require__(1)
var moment = __webpack_require__(8)
var copy = __webpack_require__(7).copy
var FORMAT = __webpack_require__(9)
var asConfig = __webpack_require__(5)
var toMoment = __webpack_require__(10)
var TODAY
function emptyFn(){}
var DecadeView = React.createClass({
displayName: 'DecadeView',
getDefaultProps: function() {
return asConfig()
},
/**
* Returns all the years in the decade of the given value
*
* @param {Moment/Date/Number} value
* @return {Moment[]}
*/
getYearsInDecade: function(value){
var year = moment(value).get('year')
var offset = year % 10
year = year - offset - 1
var result = []
var i = 0
var start = moment(year, 'YYYY').startOf('year')
for (; i < 12; i++){
result.push(moment(start))
start.add(1, 'year')
}
return result
},
render: function() {
TODAY = +moment().startOf('day')
var viewMoment = this.props.viewMoment = moment(this.props.viewDate)
if (this.props.date){
this.props.moment = moment(this.props.date).startOf('year')
}
var yearsInView = this.getYearsInDecade(viewMoment)
return (
React.DOM.table({className: "dp-table dp-decade-view"},
React.DOM.tbody(null,
this.renderYears(yearsInView)
)
)
)
},
/**
* Render the given array of days
* @param {Moment[]} days
* @return {React.DOM}
*/
renderYears: function(days) {
var nodes = days.map(this.renderYear, this)
var len = days.length
var buckets = []
var bucketsLen = Math.ceil(len / 4)
var i = 0
for ( ; i < bucketsLen; i++){
buckets.push(nodes.slice(i * 4, (i + 1) * 4))
}
return buckets.map(function(bucket, i){
return React.DOM.tr({key: "row" + i}, bucket)
})
},
renderYear: function(date, index, arr) {
var yearText = FORMAT.year(date)
var classes = ["dp-cell dp-year"]
var dateTimestamp = +date
if (dateTimestamp == this.props.moment){
classes.push('dp-value')
}
if (!index){
classes.push('dp-prev')
}
if (index == arr.length - 1){
classes.push('dp-next')
}
return (
React.DOM.td({key: yearText, className: classes.join(' '), onClick: this.handleClick.bind(this, date)},
yearText
)
)
},
handleClick: function(date) {
event.target.value = date
;(this.props.onSelect || emptyFn)(date, event)
}
})
copy({
getHeaderText: function(value) {
var year = moment(value).get('year')
var offset = year % 10
year = year - offset - 1
return year + ' - ' + (year + 11)
}
}, DecadeView)
module.exports = DecadeView
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
'use strict'
var copyUtils = __webpack_require__(7)
var copy = copyUtils.copy
var copyList = copyUtils.copyList
var CONFIG = __webpack_require__(11)
var KEYS = Object.keys(CONFIG)
/**
* Returns an object that copies from given source object
* on the resulting object only the properties also found in cfg.
*
* If no cfg specified, CONFIG is assumed
*
* @param {object} source
* @param {Object} [cfg] If not specied, CONFIG will be used
*
* @return {Object}
*/
module.exports = function asConfig(source, cfg){
var keys = KEYS
if (cfg){
keys = Object.keys(cfg)
}
cfg = cfg || CONFIG
if (!source){
return copy(cfg)
}
return copyList(source, copy(cfg), keys)
}
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
'use strict'
var moment = __webpack_require__(8)
var DEFAULT_WEEK_START_DAY = moment().startOf('week').format('d') * 1
module.exports = function getWeekDayNames(startDay){
var names = moment.weekdaysShort()
if (startDay !== undefined && DEFAULT_WEEK_START_DAY != startDay){
var index = startDay
while (index > DEFAULT_WEEK_START_DAY){
names.push(names.shift())
index--
}
}
return names
}
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
module.exports = function(){
'use strict'
var HAS_OWN = Object.prototype.hasOwnProperty,
STR_OBJECT = 'object',
STR_UNDEFINED = 'undefined'
return {
/**
* Copies all properties from source to destination
*
* copy({name: 'jon',age:5}, this);
* // => this will have the 'name' and 'age' properties set to 'jon' and 5 respectively
*
* @param {Object} source
* @param {Object} destination
*
* @return {Object} destination
*/
copy: __webpack_require__(12),
/**
* Copies all properties from source to destination, if the property does not exist into the destination
*
* copyIf({name: 'jon',age:5}, {age:7})
* // => { name: 'jon', age: 7}
*
* @param {Object} source
* @param {Object} destination
*
* @return {Object} destination
*/
copyIf: __webpack_require__(13),
/**
* Copies all properties from source to a new object, with the given value. This object is returned
*
* copyAs({name: 'jon',age:5})
* // => the resulting object will have the 'name' and 'age' properties set to 1
*
* @param {Object} source
* @param {Object/Number/String} [value=1]
*
* @return {Object} destination
*/
copyAs: function(source, value){
var destination = {}
value = value || 1
if (source != null && typeof source === STR_OBJECT ){
for (var i in source) if ( HAS_OWN.call(source, i) ) {
destination[i] = value
}
}
return destination
},
/**
* Copies all properties named in the list, from source to destination
*
* copyList({name: 'jon',age:5, year: 2006}, {}, ['name','age'])
* // => {name: 'jon', age: 5}
*
* @param {Object} source
* @param {Object} destination
* @param {Array} list the array with the names of the properties to copy
*
* @return {Object} destination
*/
copyList: __webpack_require__(14),
/**
* Copies all properties named in the list, from source to destination, if the property does not exist into the destination
*
* copyListIf({name: 'jon',age:5, year: 2006}, {age: 10}, ['name','age'])
* // => {name: 'jon', age: 10}
*
* @param {Object} source
* @param {Object} destination
* @param {Array} list the array with the names of the properties to copy
*
* @return {Object} destination
*/
copyListIf: __webpack_require__(15),
/**
* Copies all properties named in the namedKeys, from source to destination
*
* copyKeys({name: 'jon',age:5, year: 2006, date: '2010/05/12'}, {}, {name:1 ,age: true, year: 'theYear'})
* // => {name: 'jon', age: 5, theYear: 2006}
*
* @param {Object} source
* @param {Object} destination
* @param {Object} namedKeys an object with keys denoting the properties to be copied
*
* @return {Object} destination
*/
copyKeys: __webpack_require__(16),
/**
* Copies all properties named in the namedKeys, from source to destination,
* but only if the property does not already exist in the destination object
*
* copyKeysIf({name: 'jon',age:5, year: 2006}, {aname: 'test'}, {name:'aname' ,age: true})
* // => {aname: 'test', age: 5}
*
* @param {Object} source
* @param {Object} destination
* @param {Object} namedKeys an object with keys denoting the properties to be copied
*
* @return {Object} destination
*/
copyKeysIf: __webpack_require__(17),
copyExceptKeys: function(source, destination, exceptKeys){
destination = destination || {}
exceptKeys = exceptKeys || {}
if (source != null && typeof source === STR_OBJECT ){
for (var i in source) if ( HAS_OWN.call(source, i) && !HAS_OWN.call(exceptKeys, i) ) {
destination[i] = source[i]
}
}
return destination
},
/**
* Copies the named keys from source to destination.
* For the keys that are functions, copies the functions bound to the source
*
* @param {Object} source The source object
* @param {Object} destination The target object
* @param {Object} namedKeys An object with the names of the keys to copy The values from the keys in this object
* need to be either numbers or booleans if you want to copy the property under the same name,
* or a string if you want to copy the property under a different name
* @return {Object} Returns the destination object
*/
bindCopyKeys: function(source, destination, namedKeys){
if (arguments.length == 2){
namedKeys = destination
destination = null
}
destination = destination || {}
if (
source != null && typeof source === STR_OBJECT &&
namedKeys != null && typeof namedKeys === STR_OBJECT
) {
var typeOfNamedProperty,
namedPropertyValue,
typeOfSourceProperty,
propValue
for(var propName in namedKeys) if (HAS_OWN.call(namedKeys, propName)) {
namedPropertyValue = namedKeys[propName]
typeOfNamedProperty = typeof namedPropertyValue
propValue = source[propName]
typeOfSourceProperty = typeof propValue
if ( typeOfSourceProperty !== STR_UNDEFINED ) {
destination[
typeOfNamedProperty == 'string'?
namedPropertyValue :
propName
] = typeOfSourceProperty == 'function' ?
propValue.bind(source):
propValue
}
}
}
return destination
}
}
}()
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(global, module) {//! moment.js
//! version : 2.8.3