UNPKG

awv3

Version:
1,493 lines (1,492 loc) 577 kB
{ "type": "Program", "start": 0, "end": 5395, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 156, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 0, "end": 5393, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 155, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 15, "end": 5393, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 155, "column": 1 } }, "id": { "type": "Identifier", "start": 21, "end": 27, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 27 } }, "name": "Events" }, "superClass": null, "body": { "type": "ClassBody", "start": 28, "end": 5393, "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 155, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 35, "end": 134, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 5, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 35, "end": 46, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 46, "end": 134, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 5, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 49, "end": 134, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 5, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 60, "end": 88, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 60, "end": 87, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 60, "end": 75, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 } }, "object": { "type": "ThisExpression", "start": 60, "end": 64, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 12 } } }, "property": { "type": "Identifier", "start": 65, "end": 75, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 23 } }, "name": "_callbacks" }, "computed": false }, "right": { "type": "Identifier", "start": 78, "end": 87, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 35 } }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 98, "end": 127, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 98, "end": 126, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 98, "end": 114, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "object": { "type": "ThisExpression", "start": 98, "end": 102, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 12 } } }, "property": { "type": "Identifier", "start": 103, "end": 114, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 24 } }, "name": "_inspectors" }, "computed": false }, "right": { "type": "Identifier", "start": 117, "end": 126, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 36 } }, "name": "undefined" } } } ] } } }, { "type": "MethodDefinition", "start": 142, "end": 211, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 9, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 142, "end": 146, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 8 } }, "name": "once" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 146, "end": 211, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 9, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 147, "end": 151, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 13 } }, "name": "type" }, { "type": "Identifier", "start": 153, "end": 161, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 7, "column": 23 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 163, "end": 211, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 9, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 174, "end": 204, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 38 } }, "expression": { "type": "CallExpression", "start": 174, "end": 203, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 174, "end": 181, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 15 } }, "object": { "type": "ThisExpression", "start": 174, "end": 178, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 179, "end": 181, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 15 } }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 182, "end": 186, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 } }, "name": "type" }, { "type": "Identifier", "start": 188, "end": 196, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 30 } }, "name": "callback" }, { "type": "Literal", "start": 198, "end": 202, "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 36 } }, "value": true, "rawValue": true, "raw": "true" } ] } } ] } } }, { "type": "MethodDefinition", "start": 219, "end": 295, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 219, "end": 226, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 11 } }, "name": "onFirst" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 226, "end": 295, "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 13, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 227, "end": 231, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 16 } }, "name": "type" }, { "type": "Identifier", "start": 233, "end": 241, "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 26 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 243, "end": 295, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 13, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 254, "end": 288, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } }, "expression": { "type": "CallExpression", "start": 254, "end": 287, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 41 } }, "callee": { "type": "MemberExpression", "start": 254, "end": 261, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 15 } }, "object": { "type": "ThisExpression", "start": 254, "end": 258, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 259, "end": 261, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 15 } }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 262, "end": 266, "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 20 } }, "name": "type" }, { "type": "Identifier", "start": 268, "end": 276, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 30 } }, "name": "callback" }, { "type": "Literal", "start": 278, "end": 283, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 37 } }, "value": false, "rawValue": false, "raw": "false" }, { "type": "Literal", "start": 285, "end": 286, "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 12, "column": 40 } }, "value": 1, "rawValue": 1, "raw": "1" } ] } } ] } } }, { "type": "MethodDefinition", "start": 303, "end": 379, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 17, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 303, "end": 309, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 10 } }, "name": "onLast" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 309, "end": 379, "loc": { "start": { "line": 15, "column": 10 }, "end": { "line": 17, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 310, "end": 314, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 15 } }, "name": "type" }, { "type": "Identifier", "start": 316, "end": 324, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 25 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 326, "end": 379, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 17, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 337, "end": 372, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 43 } }, "expression": { "type": "CallExpression", "start": 337, "end": 371, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 337, "end": 344, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 15 } }, "object": { "type": "ThisExpression", "start": 337, "end": 341, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 342, "end": 344, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 15 } }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 345, "end": 349, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 20 } }, "name": "type" }, { "type": "Identifier", "start": 351, "end": 359, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 30 } }, "name": "callback" }, { "type": "Literal", "start": 361, "end": 366, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 37 } }, "value": false, "rawValue": false, "raw": "false" }, { "type": "UnaryExpression", "start": 368, "end": 370, "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 41 } }, "operator": "-", "prefix": true, "argument": { "type": "Literal", "start": 369, "end": 370, "loc": { "start": { "line": 16, "column": 40 }, "end": { "line": 16, "column": 41 } }, "value": 1, "rawValue": 1, "raw": "1" } } ] } } ] } } }, { "type": "MethodDefinition", "start": 387, "end": 1779, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 54, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 387, "end": 389, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 6 } }, "name": "on" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 389, "end": 1779, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 54, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 390, "end": 399, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 16 } }, "operator": "=", "left": { "type": "Identifier", "start": 390, "end": 394, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 11 } }, "name": "arg1" }, "right": { "type": "ObjectExpression", "start": 397, "end": 399, "loc": { "start": { "line": 19, "column": 14 }, "end": { "line": 19, "column": 16 } }, "properties": [] } }, { "type": "AssignmentPattern", "start": 401, "end": 417, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 34 } }, "operator": "=", "left": { "type": "Identifier", "start": 401, "end": 405, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 22 } }, "name": "arg2" }, "right": { "type": "Identifier", "start": 408, "end": 417, "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 34 } }, "name": "undefined" } }, { "type": "AssignmentPattern", "start": 419, "end": 433, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 50 } }, "operator": "=", "left": { "type": "Identifier", "start": 419, "end": 425, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 42 } }, "name": "remove" }, "right": { "type": "Literal", "start": 428, "end": 433, "loc": { "start": { "line": 19, "column": 45 }, "end": { "line": 19, "column": 50 } }, "value": false, "rawValue": false, "raw": "false" } }, { "type": "AssignmentPattern", "start": 435, "end": 455, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 72 } }, "operator": "=", "left": { "type": "Identifier", "start": 435, "end": 443, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 60 } }, "name": "priority" }, "right": { "type": "Identifier", "start": 446, "end": 455, "loc": { "start": { "line": 19, "column": 63 }, "end": { "line": 19, "column": 72 } }, "name": "undefined" } } ], "body": { "type": "BlockStatement", "start": 457, "end": 1779, "loc": { "start": { "line": 19, "column": 74 }, "end": { "line": 54, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 468, "end": 511, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 51 } }, "test": { "type": "UnaryExpression", "start": 472, "end": 488, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 28 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 473, "end": 488, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 28 } }, "object": { "type": "ThisExpression", "start": 473, "end": 477, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 17 } } }, "property": { "type": "Identifier", "start": 478, "end": 488, "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 28 } }, "name": "_callbacks" }, "computed": false } }, "consequent": { "type": "ExpressionStatement", "start": 490, "end": 511, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 51 } }, "expression": { "type": "AssignmentExpression", "start": 490, "end": 510, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 50 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 490, "end": 505, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 45 } }, "object": { "type": "ThisExpression", "start": 490, "end": 494, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 34 } } }, "property": { "type": "Identifier", "start": 495, "end": 505, "loc": { "start": { "line": 20,