awv3
Version:
AWV client CAD framework
1,487 lines (1,486 loc) • 146 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1395,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 51,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 19
}
},
"name": "EventEmitter"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 25,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 33
}
},
"value": "events",
"rawValue": "events",
"raw": "'events'"
}
},
{
"type": "ImportDeclaration",
"start": 35,
"end": 74,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 44,
"end": 48,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 44,
"end": 48,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 13
}
},
"name": "guid"
},
"local": {
"type": "Identifier",
"start": 44,
"end": 48,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 13
}
},
"name": "guid"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 56,
"end": 73,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 38
}
},
"value": "../core/helpers",
"rawValue": "../core/helpers",
"raw": "'../core/helpers'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 76,
"end": 1394,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 50,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 91,
"end": 1394,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 50,
"column": 1
}
},
"id": null,
"superClass": {
"type": "Identifier",
"start": 105,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 41
}
},
"name": "EventEmitter"
},
"body": {
"type": "ClassBody",
"start": 118,
"end": 1394,
"loc": {
"start": {
"line": 4,
"column": 42
},
"end": {
"line": 50,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 125,
"end": 356,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 125,
"end": 136,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 136,
"end": 356,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 14,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 137,
"end": 149,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 28
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 137,
"end": 144,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 23
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 147,
"end": 149,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 28
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 151,
"end": 356,
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 14,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 161,
"end": 169,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 161,
"end": 168,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 161,
"end": 166,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 178,
"end": 195,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 178,
"end": 194,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 178,
"end": 185,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 178,
"end": 182,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 183,
"end": 185,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 15
}
},
"name": "id"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 188,
"end": 194,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 24
}
},
"callee": {
"type": "Identifier",
"start": 188,
"end": 192,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 22
}
},
"name": "guid"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 204,
"end": 223,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 204,
"end": 222,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 204,
"end": 214,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 204,
"end": 208,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 209,
"end": 214,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 18
}
},
"name": "alive"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 217,
"end": 222,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 26
}
},
"value": false,
"rawValue": false,
"raw": "false"
}
}
},
{
"type": "ExpressionStatement",
"start": 232,
"end": 255,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 232,
"end": 254,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 232,
"end": 244,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 232,
"end": 236,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 237,
"end": 244,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 20
}
},
"name": "options"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 247,
"end": 254,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 30
}
},
"name": "options"
}
}
},
{
"type": "ExpressionStatement",
"start": 264,
"end": 288,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 32
}
},
"expression": {
"type": "AssignmentExpression",
"start": 264,
"end": 287,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 31
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 264,
"end": 275,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 264,
"end": 268,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 269,
"end": 275,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 19
}
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 278,
"end": 287,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 31
}
},
"name": "undefined"
}
}
},
{
"type": "ExpressionStatement",
"start": 297,
"end": 320,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 297,
"end": 319,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 297,
"end": 307,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 297,
"end": 301,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 302,
"end": 307,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 18
}
},
"name": "tasks"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 310,
"end": 319,
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 30
}
},
"callee": {
"type": "Identifier",
"start": 314,
"end": 317,
"loc": {
"start": {
"line": 12,
"column": 25
},
"end": {
"line": 12,
"column": 28
}
},
"name": "Map"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 329,
"end": 350,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 329,
"end": 349,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 329,
"end": 337,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 329,
"end": 333,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 334,
"end": 337,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 16
}
},
"name": "url"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 340,
"end": 349,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 13,
"column": 28
}
},
"name": "undefined"
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 362,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 362,
"end": 369,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 11
}
},
"name": "execute"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 369,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 18,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 370,
"end": 374,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 16
}
},
"name": "task"
},
{
"type": "Identifier",
"start": 376,
"end": 383,
"loc": {
"start": {
"line": 16,
"column": 18
},
"end": {
"line": 16,
"column": 25
}
},
"name": "factory"
}
],
"body": {
"type": "BlockStatement",
"start": 385,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 27
},
"end": {
"line": 18,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 395,
"end": 454,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 67
}
},
"argument": {
"type": "CallExpression",
"start": 402,
"end": 453,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 402,
"end": 414,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 402,
"end": 406,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 407,
"end": 414,
"loc": {
"start": {
"line": 17,
"column": 20
},
"end": {
"line": 17,
"column": 27
}
},
"name": "request"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 415,
"end": 443,
"loc": {
"start": {
"line": 17,
"column": 28
},
"end": {
"line": 17,
"column": 56
}
},
"properties": [
{
"type": "Property",
"start": 417,
"end": 435,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 48
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 417,
"end": 424,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 37
}
},
"name": "command"
},
"value": {
"type": "Literal",
"start": 426,
"end": 435,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 48
}
},
"value": "Execute",
"rawValue": "Execute",
"raw": "'Execute'"
},
"kind": "init"
},
{
"type": "Property",
"start": 437,
"end": 441,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 437,
"end": 441,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"name": "task"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 437,
"end": 441,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"name": "task"
}
}
]
},
{
"type": "Identifier",
"start": 445,
"end": 452,
"loc": {
"start": {
"line": 17,
"column": 58
},
"end": {
"line": 17,
"column": 65
}
},
"name": "factory"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 466,
"end": 627,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 466,
"end": 472,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 10
}
},
"name": "result"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 472,
"end": 627,
"loc": {
"start": {
"line": 20,
"column": 10
},
"end": {
"line": 23,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 473,
"end": 477,
"loc": {
"start": {
"line": 20,
"column": 11
},
"end": {
"line": 20,
"column": 15
}
},
"name": "task"
},
{
"type": "Identifier",
"start": 479,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 17
},
"end": {
"line": 20,
"column": 24
}
},
"name": "factory"
}
],
"body": {
"type": "BlockStatement",
"start": 488,
"end": 627,
"loc": {
"start": {
"line": 20,
"column": 26
},
"end": {
"line": 23,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 498,
"end": 621,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 22,
"column": 46
}
},
"argument": {
"type": "CallExpression",
"start": 505,
"end": 620,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 22,
"column": 45
}
},
"callee": {
"type": "MemberExpression",
"start": 505,
"end": 592,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 22,
"column": 17
}
},
"object": {
"type": "CallExpression",
"start": 505,
"end": 574,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 84
}
},
"callee": {
"type": "MemberExpression",
"start": 505,
"end": 517,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 505,
"end": 509,
"loc": {
"start": {