StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
StackGenVis/frontend/node_modules/babel-plugin-jsx-event-modi.../dist/bundle-test.js

2410 lines
47 KiB

4 years ago
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var syntaxJsx = _interopDefault(require('babel-plugin-syntax-jsx'));
var cov_10u8a89794 = function () {
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/group-event-attributes.js',
hash = '27cab2aae265cb2fd54e5c36a9c17d8fe4d5cfc5',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/group-event-attributes.js',
statementMap: {
'0': {
start: {
line: 1,
column: 20
},
end: {
line: 42,
column: 1
}
},
'1': {
start: {
line: 2,
column: 2
},
end: {
line: 4,
column: 3
}
},
'2': {
start: {
line: 3,
column: 4
},
end: {
line: 3,
column: 14
}
},
'3': {
start: {
line: 6,
column: 23
},
end: {
line: 6,
column: 67
}
},
'4': {
start: {
line: 7,
column: 16
},
end: {
line: 7,
column: 112
}
},
'5': {
start: {
line: 8,
column: 20
},
end: {
line: 8,
column: 117
}
},
'6': {
start: {
line: 10,
column: 2
},
end: {
line: 12,
column: 3
}
},
'7': {
start: {
line: 11,
column: 4
},
end: {
line: 11,
column: 14
}
},
'8': {
start: {
line: 14,
column: 16
},
end: {
line: 14,
column: 38
}
},
'9': {
start: {
line: 16,
column: 2
},
end: {
line: 16,
column: 20
}
},
'10': {
start: {
line: 17,
column: 2
},
end: {
line: 19,
column: 3
}
},
'11': {
start: {
line: 18,
column: 4
},
end: {
line: 18,
column: 14
}
},
'12': {
start: {
line: 21,
column: 21
},
end: {
line: 21,
column: 49
}
},
'13': {
start: {
line: 23,
column: 18
},
end: {
line: 23,
column: 33
}
},
'14': {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
},
'15': {
start: {
line: 25,
column: 4
},
end: {
line: 25,
column: 35
}
},
'16': {
start: {
line: 27,
column: 2
},
end: {
line: 27,
column: 62
}
},
'17': {
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
},
'18': {
start: {
line: 29,
column: 4
},
end: {
line: 29,
column: 31
}
},
'19': {
start: {
line: 31,
column: 2
},
end: {
line: 33,
column: 3
}
},
'20': {
start: {
line: 32,
column: 4
},
end: {
line: 32,
column: 31
}
},
'21': {
start: {
line: 35,
column: 2
},
end: {
line: 37,
column: 3
}
},
'22': {
start: {
line: 36,
column: 4
},
end: {
line: 36,
column: 23
}
},
'23': {
start: {
line: 39,
column: 2
},
end: {
line: 39,
column: 59
}
},
'24': {
start: {
line: 41,
column: 2
},
end: {
line: 41,
column: 12
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 1,
column: 15
},
end: {
line: 1,
column: 16
}
},
loc: {
start: {
line: 1,
column: 20
},
end: {
line: 42,
column: 1
}
},
line: 1
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 1,
column: 20
},
end: {
line: 1,
column: 21
}
},
loc: {
start: {
line: 1,
column: 40
},
end: {
line: 42,
column: 1
}
},
line: 1
}
},
branchMap: {
'0': {
loc: {
start: {
line: 2,
column: 2
},
end: {
line: 4,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 2,
column: 2
},
end: {
line: 4,
column: 3
}
}, {
start: {
line: 2,
column: 2
},
end: {
line: 4,
column: 3
}
}],
line: 2
},
'1': {
loc: {
start: {
line: 7,
column: 17
},
end: {
line: 7,
column: 94
}
},
type: 'cond-expr',
locations: [{
start: {
line: 7,
column: 32
},
end: {
line: 7,
column: 70
}
}, {
start: {
line: 7,
column: 73
},
end: {
line: 7,
column: 94
}
}],
line: 7
},
'2': {
loc: {
start: {
line: 8,
column: 20
},
end: {
line: 8,
column: 117
}
},
type: 'cond-expr',
locations: [{
start: {
line: 8,
column: 35
},
end: {
line: 8,
column: 105
}
}, {
start: {
line: 8,
column: 108
},
end: {
line: 8,
column: 117
}
}],
line: 8
},
'3': {
loc: {
start: {
line: 10,
column: 2
},
end: {
line: 12,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 10,
column: 2
},
end: {
line: 12,
column: 3
}
}, {
start: {
line: 10,
column: 2
},
end: {
line: 12,
column: 3
}
}],
line: 10
},
'4': {
loc: {
start: {
line: 17,
column: 2
},
end: {
line: 19,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 17,
column: 2
},
end: {
line: 19,
column: 3
}
}, {
start: {
line: 17,
column: 2
},
end: {
line: 19,
column: 3
}
}],
line: 17
},
'5': {
loc: {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
}, {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
}],
line: 24
},
'6': {
loc: {
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
}, {
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
}],
line: 28
},
'7': {
loc: {
start: {
line: 31,
column: 2
},
end: {
line: 33,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 31,
column: 2
},
end: {
line: 33,
column: 3
}
}, {
start: {
line: 31,
column: 2
},
end: {
line: 33,
column: 3
}
}],
line: 31
},
'8': {
loc: {
start: {
line: 35,
column: 2
},
end: {
line: 37,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 35,
column: 2
},
end: {
line: 37,
column: 3
}
}, {
start: {
line: 35,
column: 2
},
end: {
line: 37,
column: 3
}
}],
line: 35
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0
},
f: {
'0': 0,
'1': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0]
},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var groupEventAttributes = (function (t) {
cov_10u8a89794.f[0]++;
cov_10u8a89794.s[0]++;
return function (obj, attribute) {
cov_10u8a89794.f[1]++;
cov_10u8a89794.s[1]++;
if (t.isJSXSpreadAttribute(attribute)) {
cov_10u8a89794.b[0][0]++;
cov_10u8a89794.s[2]++;
return obj;
} else {
cov_10u8a89794.b[0][1]++;
}
var isNamespaced = (cov_10u8a89794.s[3]++, t.isJSXNamespacedName(attribute.get('name')));
var event = (cov_10u8a89794.s[4]++, (isNamespaced ? (cov_10u8a89794.b[1][0]++, attribute.get('name').get('namespace')) : (cov_10u8a89794.b[1][1]++, attribute.get('name'))).get('name').node);
var modifiers = (cov_10u8a89794.s[5]++, isNamespaced ? (cov_10u8a89794.b[2][0]++, new Set(attribute.get('name').get('name').get('name').node.split('-'))) : (cov_10u8a89794.b[2][1]++, new Set()));
cov_10u8a89794.s[6]++;
if (event.indexOf('on') !== 0) {
cov_10u8a89794.b[3][0]++;
cov_10u8a89794.s[7]++;
return obj;
} else {
cov_10u8a89794.b[3][1]++;
}
var value = (cov_10u8a89794.s[8]++, attribute.get('value'));
cov_10u8a89794.s[9]++;
attribute.remove();
cov_10u8a89794.s[10]++;
if (!t.isJSXExpressionContainer(value)) {
cov_10u8a89794.b[4][0]++;
cov_10u8a89794.s[11]++;
return obj;
} else {
cov_10u8a89794.b[4][1]++;
}
var expression = (cov_10u8a89794.s[12]++, value.get('expression').node);
var eventName = (cov_10u8a89794.s[13]++, event.substr(2));
cov_10u8a89794.s[14]++;
if (eventName[0] === '-') {
cov_10u8a89794.b[5][0]++;
cov_10u8a89794.s[15]++;
eventName = eventName.substr(1);
} else {
cov_10u8a89794.b[5][1]++;
}
cov_10u8a89794.s[16]++;
eventName = eventName[0].toLowerCase() + eventName.substr(1);
cov_10u8a89794.s[17]++;
if (modifiers.has('capture')) {
cov_10u8a89794.b[6][0]++;
cov_10u8a89794.s[18]++;
eventName = '!' + eventName;
} else {
cov_10u8a89794.b[6][1]++;
}
cov_10u8a89794.s[19]++;
if (modifiers.has('once')) {
cov_10u8a89794.b[7][0]++;
cov_10u8a89794.s[20]++;
eventName = '~' + eventName;
} else {
cov_10u8a89794.b[7][1]++;
}
cov_10u8a89794.s[21]++;
if (!obj[eventName]) {
cov_10u8a89794.b[8][0]++;
cov_10u8a89794.s[22]++;
obj[eventName] = [];
} else {
cov_10u8a89794.b[8][1]++;
}
cov_10u8a89794.s[23]++;
obj[eventName].push({ modifiers, expression, attribute });
cov_10u8a89794.s[24]++;
return obj;
};
});
var cov_1rltg07vsx = function () {
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/constants.js',
hash = '5e383c3f2b1f822d166abc9d641e15bf0fc99eba',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/constants.js',
statementMap: {
'0': {
start: {
line: 1,
column: 23
},
end: {
line: 11,
column: 1
}
},
'1': {
start: {
line: 13,
column: 28
},
end: {
line: 13,
column: 60
}
},
'2': {
start: {
line: 15,
column: 25
},
end: {
line: 15,
column: 38
}
}
},
fnMap: {},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0
},
f: {},
b: {},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var aliases = (cov_1rltg07vsx.s[0]++, {
esc: 27,
tab: 9,
enter: 13,
space: 32,
up: 38,
left: 37,
right: 39,
down: 40,
delete: [8, 46]
});
var keyModifiers = (cov_1rltg07vsx.s[1]++, ['ctrl', 'shift', 'alt', 'meta']);
var keyCodeRE = (cov_1rltg07vsx.s[2]++, /^k(\d{1,})$/);
var cov_28cz23z0dk = function () {
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-binding-body.js',
hash = '034116a2beaa240e6479f1fafe6f22bfb8397848',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-binding-body.js',
statementMap: {
'0': {
start: {
line: 4,
column: 24
},
end: {
line: 6,
column: 3
}
},
'1': {
start: {
line: 7,
column: 17
},
end: {
line: 7,
column: 19
}
},
'2': {
start: {
line: 8,
column: 21
},
end: {
line: 8,
column: 23
}
},
'3': {
start: {
line: 9,
column: 24
},
end: {
line: 11,
column: 3
}
},
'4': {
start: {
line: 13,
column: 2
},
end: {
line: 65,
column: 4
}
},
'5': {
start: {
line: 14,
column: 4
},
end: {
line: 64,
column: 5
}
},
'6': {
start: {
line: 15,
column: 6
},
end: {
line: 19,
column: 7
}
},
'7': {
start: {
line: 20,
column: 11
},
end: {
line: 64,
column: 5
}
},
'8': {
start: {
line: 21,
column: 6
},
end: {
line: 25,
column: 7
}
},
'9': {
start: {
line: 26,
column: 11
},
end: {
line: 64,
column: 5
}
},
'10': {
start: {
line: 27,
column: 6
},
end: {
line: 33,
column: 7
}
},
'11': {
start: {
line: 34,
column: 11
},
end: {
line: 64,
column: 5
}
},
'12': {
start: {
line: 35,
column: 6
},
end: {
line: 37,
column: 7
}
},
'13': {
start: {
line: 38,
column: 11
},
end: {
line: 64,
column: 5
}
},
'14': {
start: {
line: 39,
column: 6
},
end: {
line: 44,
column: 7
}
},
'15': {
start: {
line: 41,
column: 33
},
end: {
line: 41,
column: 60
}
},
'16': {
start: {
line: 42,
column: 30
},
end: {
line: 42,
column: 107
}
},
'17': {
start: {
line: 43,
column: 53
},
end: {
line: 43,
column: 109
}
},
'18': {
start: {
line: 45,
column: 11
},
end: {
line: 64,
column: 5
}
},
'19': {
start: {
line: 46,
column: 6
},
end: {
line: 54,
column: 7
}
},
'20': {
start: {
line: 51,
column: 60
},
end: {
line: 51,
column: 80
}
},
'21': {
start: {
line: 55,
column: 11
},
end: {
line: 64,
column: 5
}
},
'22': {
start: {
line: 56,
column: 22
},
end: {
line: 56,
column: 51
}
},
'23': {
start: {
line: 57,
column: 6
},
end: {
line: 63,
column: 7
}
},
'24': {
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
},
'25': {
start: {
line: 68,
column: 4
},
end: {
line: 70,
column: 5
}
},
'26': {
start: {
line: 69,
column: 62
},
end: {
line: 69,
column: 118
}
},
'27': {
start: {
line: 73,
column: 2
},
end: {
line: 80,
column: 3
}
},
'28': {
start: {
line: 74,
column: 4
},
end: {
line: 79,
column: 5
}
},
'29': {
start: {
line: 76,
column: 61
},
end: {
line: 76,
column: 117
}
},
'30': {
start: {
line: 82,
column: 2
},
end: {
line: 82,
column: 28
}
},
'31': {
start: {
line: 83,
column: 2
},
end: {
line: 83,
column: 15
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 3,
column: 15
},
end: {
line: 3,
column: 16
}
},
loc: {
start: {
line: 3,
column: 49
},
end: {
line: 84,
column: 1
}
},
line: 3
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 13,
column: 20
},
end: {
line: 13,
column: 21
}
},
loc: {
start: {
line: 13,
column: 32
},
end: {
line: 65,
column: 3
}
},
line: 13
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 41,
column: 18
},
end: {
line: 41,
column: 19
}
},
loc: {
start: {
line: 41,
column: 33
},
end: {
line: 41,
column: 60
}
},
line: 41
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 42,
column: 15
},
end: {
line: 42,
column: 16
}
},
loc: {
start: {
line: 42,
column: 30
},
end: {
line: 42,
column: 107
}
},
line: 42
},
'4': {
name: '(anonymous_4)',
decl: {
start: {
line: 43,
column: 18
},
end: {
line: 43,
column: 19
}
},
loc: {
start: {
line: 43,
column: 53
},
end: {
line: 43,
column: 109
}
},
line: 43
},
'5': {
name: '(anonymous_5)',
decl: {
start: {
line: 51,
column: 54
},
end: {
line: 51,
column: 55
}
},
loc: {
start: {
line: 51,
column: 60
},
end: {
line: 51,
column: 80
}
},
line: 51
},
'6': {
name: '(anonymous_6)',
decl: {
start: {
line: 69,
column: 27
},
end: {
line: 69,
column: 28
}
},
loc: {
start: {
line: 69,
column: 62
},
end: {
line: 69,
column: 118
}
},
line: 69
},
'7': {
name: '(anonymous_7)',
decl: {
start: {
line: 76,
column: 26
},
end: {
line: 76,
column: 27
}
},
loc: {
start: {
line: 76,
column: 61
},
end: {
line: 76,
column: 117
}
},
line: 76
}
},
branchMap: {
'0': {
loc: {
start: {
line: 14,
column: 4
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 14,
column: 4
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 14,
column: 4
},
end: {
line: 64,
column: 5
}
}],
line: 14
},
'1': {
loc: {
start: {
line: 20,
column: 11
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 20,
column: 11
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 20,
column: 11
},
end: {
line: 64,
column: 5
}
}],
line: 20
},
'2': {
loc: {
start: {
line: 26,
column: 11
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 26,
column: 11
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 26,
column: 11
},
end: {
line: 64,
column: 5
}
}],
line: 26
},
'3': {
loc: {
start: {
line: 34,
column: 11
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 34,
column: 11
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 34,
column: 11
},
end: {
line: 64,
column: 5
}
}],
line: 34
},
'4': {
loc: {
start: {
line: 38,
column: 11
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 38,
column: 11
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 38,
column: 11
},
end: {
line: 64,
column: 5
}
}],
line: 38
},
'5': {
loc: {
start: {
line: 45,
column: 11
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 45,
column: 11
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 45,
column: 11
},
end: {
line: 64,
column: 5
}
}],
line: 45
},
'6': {
loc: {
start: {
line: 50,
column: 10
},
end: {
line: 52,
column: 49
}
},
type: 'cond-expr',
locations: [{
start: {
line: 51,
column: 14
},
end: {
line: 51,
column: 82
}
}, {
start: {
line: 52,
column: 14
},
end: {
line: 52,
column: 49
}
}],
line: 50
},
'7': {
loc: {
start: {
line: 55,
column: 11
},
end: {
line: 64,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 55,
column: 11
},
end: {
line: 64,
column: 5
}
}, {
start: {
line: 55,
column: 11
},
end: {
line: 64,
column: 5
}
}],
line: 55
},
'8': {
loc: {
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
}, {
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
}],
line: 67
},
'9': {
loc: {
start: {
line: 73,
column: 2
},
end: {
line: 80,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 73,
column: 2
},
end: {
line: 80,
column: 3
}
}, {
start: {
line: 73,
column: 2
},
end: {
line: 80,
column: 3
}
}],
line: 73
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0]
},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var generateBindingBody = (function (t, _ref) {
var modifiers = _ref.modifiers,
expression = _ref.expression;
cov_28cz23z0dk.f[0]++;
var callStatement = (cov_28cz23z0dk.s[0]++, t.expressionStatement(t.callExpression(expression, [t.identifier('$event'), t.spreadElement(t.identifier('attrs'))])));
var result = (cov_28cz23z0dk.s[1]++, []);
var conditions = (cov_28cz23z0dk.s[2]++, []);
var keyConditions = (cov_28cz23z0dk.s[3]++, [t.unaryExpression('!', t.binaryExpression('in', t.stringLiteral('button'), t.identifier('$event')))]);
cov_28cz23z0dk.s[4]++;
modifiers.forEach(function (modifier) {
cov_28cz23z0dk.f[1]++;
cov_28cz23z0dk.s[5]++;
if (modifier === 'stop') {
cov_28cz23z0dk.b[0][0]++;
cov_28cz23z0dk.s[6]++;
result.push(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier('$event'), t.identifier('stopPropagation')), [])));
} else {
cov_28cz23z0dk.b[0][1]++;
cov_28cz23z0dk.s[7]++;
if (modifier === 'prevent') {
cov_28cz23z0dk.b[1][0]++;
cov_28cz23z0dk.s[8]++;
result.push(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier('$event'), t.identifier('preventDefault')), [])));
} else {
cov_28cz23z0dk.b[1][1]++;
cov_28cz23z0dk.s[9]++;
if (modifier === 'self') {
cov_28cz23z0dk.b[2][0]++;
cov_28cz23z0dk.s[10]++;
conditions.push(t.binaryExpression('!==', t.memberExpression(t.identifier('$event'), t.identifier('target')), t.memberExpression(t.identifier('$event'), t.identifier('currentTarget'))));
} else {
cov_28cz23z0dk.b[2][1]++;
cov_28cz23z0dk.s[11]++;
if (keyModifiers.includes(modifier)) {
cov_28cz23z0dk.b[3][0]++;
cov_28cz23z0dk.s[12]++;
conditions.push(t.unaryExpression('!', t.memberExpression(t.identifier('$event'), t.identifier(`${modifier}Key`))));
} else {
cov_28cz23z0dk.b[3][1]++;
cov_28cz23z0dk.s[13]++;
if (modifier === 'bare') {
cov_28cz23z0dk.b[4][0]++;
cov_28cz23z0dk.s[14]++;
conditions.push(keyModifiers.filter(function (keyModifier) {
cov_28cz23z0dk.f[2]++;
cov_28cz23z0dk.s[15]++;
return !modifiers.has(keyModifier);
}).map(function (keyModifier) {
cov_28cz23z0dk.f[3]++;
cov_28cz23z0dk.s[16]++;
return t.memberExpression(t.identifier('$event'), t.identifier(`${keyModifier}Key`));
}).reduce(function (leftCondition, rightCondition) {
cov_28cz23z0dk.f[4]++;
cov_28cz23z0dk.s[17]++;
return t.logicalExpression('||', leftCondition, rightCondition);
}));
} else {
cov_28cz23z0dk.b[4][1]++;
cov_28cz23z0dk.s[18]++;
if (aliases[modifier]) {
cov_28cz23z0dk.b[5][0]++;
cov_28cz23z0dk.s[19]++;
keyConditions.push(t.callExpression(t.memberExpression(t.thisExpression(), t.identifier('_k')), [t.memberExpression(t.identifier('$event'), t.identifier('keyCode')), t.stringLiteral(modifier), Array.isArray(aliases[modifier]) ? (cov_28cz23z0dk.b[6][0]++, t.arrayExpression(aliases[modifier].map(function (el) {
cov_28cz23z0dk.f[5]++;
cov_28cz23z0dk.s[20]++;
return t.numericLiteral(el);
}))) : (cov_28cz23z0dk.b[6][1]++, t.numericLiteral(aliases[modifier]))]));
} else {
cov_28cz23z0dk.b[5][1]++;
cov_28cz23z0dk.s[21]++;
if (modifier.match(keyCodeRE)) {
cov_28cz23z0dk.b[7][0]++;
var keyCode = (cov_28cz23z0dk.s[22]++, +modifier.match(keyCodeRE)[1]);
cov_28cz23z0dk.s[23]++;
keyConditions.push(t.binaryExpression('!==', t.memberExpression(t.identifier('$event'), t.identifier('keyCode')), t.numericLiteral(keyCode)));
} else {
cov_28cz23z0dk.b[7][1]++;
}
}
}
}
}
}
}
});
cov_28cz23z0dk.s[24]++;
if (keyConditions.length > 1) {
cov_28cz23z0dk.b[8][0]++;
cov_28cz23z0dk.s[25]++;
conditions.push(keyConditions.reduce(function (leftCondition, rightCondition) {
cov_28cz23z0dk.f[6]++;
cov_28cz23z0dk.s[26]++;
return t.logicalExpression('&&', leftCondition, rightCondition);
}));
} else {
cov_28cz23z0dk.b[8][1]++;
}
cov_28cz23z0dk.s[27]++;
if (conditions.length > 0) {
cov_28cz23z0dk.b[9][0]++;
cov_28cz23z0dk.s[28]++;
result.push(t.ifStatement(conditions.reduce(function (leftCondition, rightCondition) {
cov_28cz23z0dk.f[7]++;
cov_28cz23z0dk.s[29]++;
return t.logicalExpression('||', leftCondition, rightCondition);
}), t.returnStatement(t.nullLiteral())));
} else {
cov_28cz23z0dk.b[9][1]++;
}
cov_28cz23z0dk.s[30]++;
result.push(callStatement);
cov_28cz23z0dk.s[31]++;
return result;
});
var cov_2jta5ux1ch = function () {
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-bindings-list.js',
hash = 'f199c9e4c60d7dbdd94379c8a9a7443b1cc5d62f',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-bindings-list.js',
statementMap: {
'0': {
start: {
line: 4,
column: 2
},
end: {
line: 9,
column: 3
}
},
'1': {
start: {
line: 5,
column: 4
},
end: {
line: 8,
column: 5
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 3,
column: 15
},
end: {
line: 3,
column: 16
}
},
loc: {
start: {
line: 3,
column: 32
},
end: {
line: 10,
column: 1
}
},
line: 3
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 4,
column: 22
},
end: {
line: 4,
column: 23
}
},
loc: {
start: {
line: 5,
column: 4
},
end: {
line: 8,
column: 5
}
},
line: 5
}
},
branchMap: {},
s: {
'0': 0,
'1': 0
},
f: {
'0': 0,
'1': 0
},
b: {},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var generateBindingsList = (function (t, bindings) {
cov_2jta5ux1ch.f[0]++;
cov_2jta5ux1ch.s[0]++;
return bindings.map(function (binding) {
cov_2jta5ux1ch.f[1]++;
cov_2jta5ux1ch.s[1]++;
return t.arrowFunctionExpression([t.identifier('$event'), t.restElement(t.identifier('attrs'))], t.blockStatement(generateBindingBody(t, binding)));
});
});
var cov_34300l8ld = function () {
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-spread-event.js',
hash = '691af611be9161f1f796a7d48f0d856cdb5d2ae7',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-spread-event.js',
statementMap: {
'0': {
start: {
line: 3,
column: 20
},
end: {
line: 6,
column: 1
}
},
'1': {
start: {
line: 4,
column: 20
},
end: {
line: 4,
column: 53
}
},
'2': {
start: {
line: 5,
column: 2
},
end: {
line: 5,
column: 119
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 3,
column: 15
},
end: {
line: 3,
column: 16
}
},
loc: {
start: {
line: 3,
column: 20
},
end: {
line: 6,
column: 1
}
},
line: 3
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 3,
column: 20
},
end: {
line: 3,
column: 21
}
},
loc: {
start: {
line: 3,
column: 43
},
end: {
line: 6,
column: 1
}
},
line: 3
}
},
branchMap: {
'0': {
loc: {
start: {
line: 5,
column: 50
},
end: {
line: 5,
column: 118
}
},
type: 'cond-expr',
locations: [{
start: {
line: 5,
column: 75
},
end: {
line: 5,
column: 87
}
}, {
start: {
line: 5,
column: 90
},
end: {
line: 5,
column: 118
}
}],
line: 5
}
},
s: {
'0': 0,
'1': 0,
'2': 0
},
f: {
'0': 0,
'1': 0
},
b: {
'0': [0, 0]
},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var generateSpreadEvent = (function (t) {
cov_34300l8ld.f[0]++;
cov_34300l8ld.s[0]++;
return function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
event = _ref2[0],
bindings = _ref2[1];
cov_34300l8ld.f[1]++;
var callbacks = (cov_34300l8ld.s[1]++, generateBindingsList(t, bindings));
cov_34300l8ld.s[2]++;
return t.objectProperty(t.stringLiteral(event), callbacks.length === 1 ? (cov_34300l8ld.b[0][0]++, callbacks[0]) : (cov_34300l8ld.b[0][1]++, t.arrayExpression(callbacks)));
};
});
var cov_131o2j1ear = function () {
var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/index.js',
hash = '014199d1d98abed5c3c5abff53ae757229b98206',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/index.js',
statementMap: {
'0': {
start: {
line: 5,
column: 34
},
end: {
line: 28,
column: 1
}
},
'1': {
start: {
line: 9,
column: 6
},
end: {
line: 25,
column: 8
}
},
'2': {
start: {
line: 11,
column: 29
},
end: {
line: 11,
column: 51
}
},
'3': {
start: {
line: 12,
column: 41
},
end: {
line: 12,
column: 87
}
},
'4': {
start: {
line: 13,
column: 25
},
end: {
line: 13,
column: 107
}
},
'5': {
start: {
line: 13,
column: 72
},
end: {
line: 13,
column: 106
}
},
'6': {
start: {
line: 14,
column: 10
},
end: {
line: 23,
column: 11
}
},
'7': {
start: {
line: 15,
column: 12
},
end: {
line: 22,
column: 13
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 5,
column: 15
},
end: {
line: 5,
column: 16
}
},
loc: {
start: {
line: 5,
column: 34
},
end: {
line: 28,
column: 1
}
},
line: 5
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 13,
column: 65
},
end: {
line: 13,
column: 66
}
},
loc: {
start: {
line: 13,
column: 72
},
end: {
line: 13,
column: 106
}
},
line: 13
}
},
branchMap: {
'0': {
loc: {
start: {
line: 14,
column: 10
},
end: {
line: 23,
column: 11
}
},
type: 'if',
locations: [{
start: {
line: 14,
column: 10
},
end: {
line: 23,
column: 11
}
}, {
start: {
line: 14,
column: 10
},
end: {
line: 23,
column: 11
}
}],
line: 14
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0
},
f: {
'0': 0,
'1': 0
},
b: {
'0': [0, 0]
},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var index = (function (_ref) {
var t = _ref.types;
cov_131o2j1ear.f[0]++;
cov_131o2j1ear.s[0]++;
return {
inherits: syntaxJsx,
visitor: {
Program(path) {
cov_131o2j1ear.s[1]++;
path.traverse({
JSXOpeningElement(path) {
var attributes = (cov_131o2j1ear.s[2]++, path.get('attributes'));
var groupedEventAttributes = (cov_131o2j1ear.s[3]++, attributes.reduce(groupEventAttributes(t), {}));
var events = (cov_131o2j1ear.s[4]++, Object.keys(groupedEventAttributes).map(function (key) {
cov_131o2j1ear.f[1]++;
cov_131o2j1ear.s[5]++;
return [key, groupedEventAttributes[key]];
}));
cov_131o2j1ear.s[6]++;
if (events.length > 0) {
cov_131o2j1ear.b[0][0]++;
cov_131o2j1ear.s[7]++;
path.pushContainer('attributes', t.jSXSpreadAttribute(t.objectExpression([t.objectProperty(t.identifier('on'), t.objectExpression(events.map(generateSpreadEvent(t))))])));
} else {
cov_131o2j1ear.b[0][1]++;
}
}
});
}
}
};
});
module.exports = index;