UNPKG

awv3

Version:
1,493 lines (1,492 loc) 577 kB
{ "type": "Program", "start": 0, "end": 5240, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 156, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 0, "end": 5239, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 155, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 15, "end": 5239, "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": 5239, "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 155, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 34, "end": 130, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 5, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 34, "end": 45, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 45, "end": 130, "loc": { "start": { "line": 2, "column": 15 }, "end": { "line": 5, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 48, "end": 130, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 5, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 58, "end": 86, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 58, "end": 85, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 58, "end": 73, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 23 } }, "object": { "type": "ThisExpression", "start": 58, "end": 62, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 12 } } }, "property": { "type": "Identifier", "start": 63, "end": 73, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 23 } }, "name": "_callbacks" }, "computed": false }, "right": { "type": "Identifier", "start": 76, "end": 85, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 35 } }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 95, "end": 124, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 95, "end": 123, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 95, "end": 111, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "object": { "type": "ThisExpression", "start": 95, "end": 99, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 12 } } }, "property": { "type": "Identifier", "start": 100, "end": 111, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 24 } }, "name": "_inspectors" }, "computed": false }, "right": { "type": "Identifier", "start": 114, "end": 123, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 36 } }, "name": "undefined" } } } ] } } }, { "type": "MethodDefinition", "start": 136, "end": 203, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 9, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 136, "end": 140, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 8 } }, "name": "once" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 140, "end": 203, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 9, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 141, "end": 145, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 13 } }, "name": "type" }, { "type": "Identifier", "start": 147, "end": 155, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 7, "column": 23 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 157, "end": 203, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 9, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 167, "end": 197, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 38 } }, "expression": { "type": "CallExpression", "start": 167, "end": 196, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 167, "end": 174, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 15 } }, "object": { "type": "ThisExpression", "start": 167, "end": 171, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 172, "end": 174, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 15 } }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 175, "end": 179, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 } }, "name": "type" }, { "type": "Identifier", "start": 181, "end": 189, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 30 } }, "name": "callback" }, { "type": "Literal", "start": 191, "end": 195, "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 36 } }, "value": true, "rawValue": true, "raw": "true" } ] } } ] } } }, { "type": "MethodDefinition", "start": 209, "end": 283, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 209, "end": 216, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 11 } }, "name": "onFirst" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 216, "end": 283, "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 13, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 217, "end": 221, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 16 } }, "name": "type" }, { "type": "Identifier", "start": 223, "end": 231, "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 26 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 233, "end": 283, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 13, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 243, "end": 277, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } }, "expression": { "type": "CallExpression", "start": 243, "end": 276, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 41 } }, "callee": { "type": "MemberExpression", "start": 243, "end": 250, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 15 } }, "object": { "type": "ThisExpression", "start": 243, "end": 247, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 248, "end": 250, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 15 } }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 251, "end": 255, "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 20 } }, "name": "type" }, { "type": "Identifier", "start": 257, "end": 265, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 30 } }, "name": "callback" }, { "type": "Literal", "start": 267, "end": 272, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 37 } }, "value": false, "rawValue": false, "raw": "false" }, { "type": "Literal", "start": 274, "end": 275, "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 12, "column": 40 } }, "value": 1, "rawValue": 1, "raw": "1" } ] } } ] } } }, { "type": "MethodDefinition", "start": 289, "end": 363, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 17, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 289, "end": 295, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 10 } }, "name": "onLast" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 295, "end": 363, "loc": { "start": { "line": 15, "column": 10 }, "end": { "line": 17, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 296, "end": 300, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 15 } }, "name": "type" }, { "type": "Identifier", "start": 302, "end": 310, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 25 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 312, "end": 363, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 17, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 322, "end": 357, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 43 } }, "expression": { "type": "CallExpression", "start": 322, "end": 356, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 322, "end": 329, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 15 } }, "object": { "type": "ThisExpression", "start": 322, "end": 326, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 327, "end": 329, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 15 } }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 330, "end": 334, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 20 } }, "name": "type" }, { "type": "Identifier", "start": 336, "end": 344, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 30 } }, "name": "callback" }, { "type": "Literal", "start": 346, "end": 351, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 37 } }, "value": false, "rawValue": false, "raw": "false" }, { "type": "UnaryExpression", "start": 353, "end": 355, "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 41 } }, "operator": "-", "prefix": true, "argument": { "type": "Literal", "start": 354, "end": 355, "loc": { "start": { "line": 16, "column": 40 }, "end": { "line": 16, "column": 41 } }, "value": 1, "rawValue": 1, "raw": "1" } } ] } } ] } } }, { "type": "MethodDefinition", "start": 369, "end": 1726, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 54, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 369, "end": 371, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 6 } }, "name": "on" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 371, "end": 1726, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 54, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 372, "end": 381, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 16 } }, "operator": "=", "left": { "type": "Identifier", "start": 372, "end": 376, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 11 } }, "name": "arg1" }, "right": { "type": "ObjectExpression", "start": 379, "end": 381, "loc": { "start": { "line": 19, "column": 14 }, "end": { "line": 19, "column": 16 } }, "properties": [] } }, { "type": "AssignmentPattern", "start": 383, "end": 399, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 34 } }, "operator": "=", "left": { "type": "Identifier", "start": 383, "end": 387, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 22 } }, "name": "arg2" }, "right": { "type": "Identifier", "start": 390, "end": 399, "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 34 } }, "name": "undefined" } }, { "type": "AssignmentPattern", "start": 401, "end": 415, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 50 } }, "operator": "=", "left": { "type": "Identifier", "start": 401, "end": 407, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 42 } }, "name": "remove" }, "right": { "type": "Literal", "start": 410, "end": 415, "loc": { "start": { "line": 19, "column": 45 }, "end": { "line": 19, "column": 50 } }, "value": false, "rawValue": false, "raw": "false" } }, { "type": "AssignmentPattern", "start": 417, "end": 437, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 72 } }, "operator": "=", "left": { "type": "Identifier", "start": 417, "end": 425, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 60 } }, "name": "priority" }, "right": { "type": "Identifier", "start": 428, "end": 437, "loc": { "start": { "line": 19, "column": 63 }, "end": { "line": 19, "column": 72 } }, "name": "undefined" } } ], "body": { "type": "BlockStatement", "start": 439, "end": 1726, "loc": { "start": { "line": 19, "column": 74 }, "end": { "line": 54, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 449, "end": 492, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 51 } }, "test": { "type": "UnaryExpression", "start": 453, "end": 469, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 28 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 454, "end": 469, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 28 } }, "object": { "type": "ThisExpression", "start": 454, "end": 458, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 17 } } }, "property": { "type": "Identifier", "start": 459, "end": 469, "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 28 } }, "name": "_callbacks" }, "computed": false } }, "consequent": { "type": "ExpressionStatement", "start": 471, "end": 492, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 51 } }, "expression": { "type": "AssignmentExpression", "start": 471, "end": 491, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 50 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 471, "end": 486, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 45 } }, "object": { "type": "ThisExpression", "start": 471, "end": 475, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 34 } } }, "property": { "type": "Identifier", "start": 476, "end": 486, "loc": { "start": { "line": 20,