awv3
Version:
AWV client CAD framework
1,487 lines (1,486 loc) • 146 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1391,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 51,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"name": "Events"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 19,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 35
}
},
"value": "../core/events",
"rawValue": "../core/events",
"raw": "'../core/events'"
}
},
{
"type": "ImportDeclaration",
"start": 37,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 46,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 46,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 13
}
},
"name": "guid"
},
"local": {
"type": "Identifier",
"start": 46,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 13
}
},
"name": "guid"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 58,
"end": 75,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 38
}
},
"value": "../core/helpers",
"rawValue": "../core/helpers",
"raw": "'../core/helpers'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 78,
"end": 1390,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 50,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 93,
"end": 1390,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 50,
"column": 1
}
},
"id": null,
"superClass": {
"type": "Identifier",
"start": 107,
"end": 113,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 35
}
},
"name": "Events"
},
"body": {
"type": "ClassBody",
"start": 114,
"end": 1390,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 50,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 121,
"end": 352,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 121,
"end": 132,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 132,
"end": 352,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 14,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 133,
"end": 145,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 28
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 133,
"end": 140,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 23
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 143,
"end": 145,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 28
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 147,
"end": 352,
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 14,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 157,
"end": 165,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 157,
"end": 164,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 157,
"end": 162,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 174,
"end": 191,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 174,
"end": 190,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 24
}
},
"operator": "=",
"left": {
"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": "id"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 184,
"end": 190,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 24
}
},
"callee": {
"type": "Identifier",
"start": 184,
"end": 188,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 22
}
},
"name": "guid"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 200,
"end": 219,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 200,
"end": 218,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 200,
"end": 210,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 200,
"end": 204,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 205,
"end": 210,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 18
}
},
"name": "alive"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 213,
"end": 218,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 26
}
},
"value": false,
"rawValue": false,
"raw": "false"
}
}
},
{
"type": "ExpressionStatement",
"start": 228,
"end": 251,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 228,
"end": 250,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 228,
"end": 240,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 228,
"end": 232,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 233,
"end": 240,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 20
}
},
"name": "options"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 243,
"end": 250,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 30
}
},
"name": "options"
}
}
},
{
"type": "ExpressionStatement",
"start": 260,
"end": 284,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 32
}
},
"expression": {
"type": "AssignmentExpression",
"start": 260,
"end": 283,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 31
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 260,
"end": 271,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 260,
"end": 264,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 265,
"end": 271,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 19
}
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 274,
"end": 283,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 31
}
},
"name": "undefined"
}
}
},
{
"type": "ExpressionStatement",
"start": 293,
"end": 316,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 293,
"end": 315,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 293,
"end": 303,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 293,
"end": 297,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 298,
"end": 303,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 18
}
},
"name": "tasks"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 306,
"end": 315,
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 30
}
},
"callee": {
"type": "Identifier",
"start": 310,
"end": 313,
"loc": {
"start": {
"line": 12,
"column": 25
},
"end": {
"line": 12,
"column": 28
}
},
"name": "Map"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 325,
"end": 346,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 325,
"end": 345,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 325,
"end": 333,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 325,
"end": 329,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 330,
"end": 333,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 16
}
},
"name": "url"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 336,
"end": 345,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 13,
"column": 28
}
},
"name": "undefined"
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 358,
"end": 456,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 358,
"end": 365,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 11
}
},
"name": "execute"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 365,
"end": 456,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 18,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 366,
"end": 370,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 16
}
},
"name": "task"
},
{
"type": "Identifier",
"start": 372,
"end": 379,
"loc": {
"start": {
"line": 16,
"column": 18
},
"end": {
"line": 16,
"column": 25
}
},
"name": "factory"
}
],
"body": {
"type": "BlockStatement",
"start": 381,
"end": 456,
"loc": {
"start": {
"line": 16,
"column": 27
},
"end": {
"line": 18,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 391,
"end": 450,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 67
}
},
"argument": {
"type": "CallExpression",
"start": 398,
"end": 449,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 398,
"end": 410,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 398,
"end": 402,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 403,
"end": 410,
"loc": {
"start": {
"line": 17,
"column": 20
},
"end": {
"line": 17,
"column": 27
}
},
"name": "request"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 411,
"end": 439,
"loc": {
"start": {
"line": 17,
"column": 28
},
"end": {
"line": 17,
"column": 56
}
},
"properties": [
{
"type": "Property",
"start": 413,
"end": 431,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 48
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 413,
"end": 420,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 37
}
},
"name": "command"
},
"value": {
"type": "Literal",
"start": 422,
"end": 431,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 48
}
},
"value": "Execute",
"rawValue": "Execute",
"raw": "'Execute'"
},
"kind": "init"
},
{
"type": "Property",
"start": 433,
"end": 437,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 433,
"end": 437,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"name": "task"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 433,
"end": 437,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"name": "task"
}
}
]
},
{
"type": "Identifier",
"start": 441,
"end": 448,
"loc": {
"start": {
"line": 17,
"column": 58
},
"end": {
"line": 17,
"column": 65
}
},
"name": "factory"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 462,
"end": 623,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 462,
"end": 468,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 10
}
},
"name": "result"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 468,
"end": 623,
"loc": {
"start": {
"line": 20,
"column": 10
},
"end": {
"line": 23,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 469,
"end": 473,
"loc": {
"start": {
"line": 20,
"column": 11
},
"end": {
"line": 20,
"column": 15
}
},
"name": "task"
},
{
"type": "Identifier",
"start": 475,
"end": 482,
"loc": {
"start": {
"line": 20,
"column": 17
},
"end": {
"line": 20,
"column": 24
}
},
"name": "factory"
}
],
"body": {
"type": "BlockStatement",
"start": 484,
"end": 623,
"loc": {
"start": {
"line": 20,
"column": 26
},
"end": {
"line": 23,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 494,
"end": 617,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 22,
"column": 46
}
},
"argument": {
"type": "CallExpression",
"start": 501,
"end": 616,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 22,
"column": 45
}
},
"callee": {
"type": "MemberExpression",
"start": 501,
"end": 588,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 22,
"column": 17
}
},
"object": {
"type": "CallExpression",
"start": 501,
"end": 570,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 84
}
},
"callee": {
"type": "MemberExpression",
"start": 501,
"end": 513,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 501,
"end": 505,
"loc": {
"start": {