awv3
Version:
AWV client CAD framework
1,350 lines (1,349 loc) • 329 kB
JSON
{
"type": "Program",
"start": 0,
"end": 2542,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 73,
"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": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
}
},
"name": "io"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 15,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 33
}
},
"value": "socket.io-client",
"rawValue": "socket.io-client",
"raw": "'socket.io-client'"
}
},
{
"type": "ImportDeclaration",
"start": 35,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 42,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 42,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 11
}
},
"name": "Base"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 52,
"end": 75,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 40
}
},
"value": "../communication/base",
"rawValue": "../communication/base",
"raw": "'../communication/base'"
}
},
{
"type": "ImportDeclaration",
"start": 77,
"end": 113,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 84,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 84,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Parser"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 96,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 35
}
},
"value": "../core/parser",
"rawValue": "../core/parser",
"raw": "'../core/parser'"
}
},
{
"type": "ImportDeclaration",
"start": 114,
"end": 175,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 61
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 123,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 123,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 22
}
},
"name": "createContext"
},
"local": {
"type": "Identifier",
"start": 123,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 22
}
},
"name": "createContext"
}
},
{
"type": "ImportSpecifier",
"start": 138,
"end": 150,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
},
"imported": {
"type": "Identifier",
"start": 138,
"end": 150,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
},
"name": "handleResult"
},
"local": {
"type": "Identifier",
"start": 138,
"end": 150,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
},
"name": "handleResult"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 158,
"end": 174,
"loc": {
"start": {
"line": 4,
"column": 44
},
"end": {
"line": 4,
"column": 60
}
},
"value": "../core/parser",
"rawValue": "../core/parser",
"raw": "'../core/parser'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 177,
"end": 2541,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 72,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 192,
"end": 2541,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 72,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 198,
"end": 206,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 29
}
},
"name": "SocketIO"
},
"superClass": {
"type": "Identifier",
"start": 215,
"end": 219,
"loc": {
"start": {
"line": 6,
"column": 38
},
"end": {
"line": 6,
"column": 42
}
},
"name": "Base"
},
"body": {
"type": "ClassBody",
"start": 220,
"end": 2541,
"loc": {
"start": {
"line": 6,
"column": 43
},
"end": {
"line": 72,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 226,
"end": 278,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 9,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 226,
"end": 237,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 237,
"end": 278,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 9,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 238,
"end": 245,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 23
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 247,
"end": 278,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 9,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 257,
"end": 272,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 23
}
},
"expression": {
"type": "CallExpression",
"start": 257,
"end": 271,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 22
}
},
"callee": {
"type": "Super",
"start": 257,
"end": 262,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"start": 263,
"end": 270,
"loc": {
"start": {
"line": 8,
"column": 14
},
"end": {
"line": 8,
"column": 21
}
},
"name": "options"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 284,
"end": 1720,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 47,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 284,
"end": 291,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 11
}
},
"name": "connect"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 291,
"end": 1720,
"loc": {
"start": {
"line": 11,
"column": 11
},
"end": {
"line": 47,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 292,
"end": 306,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 26
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 292,
"end": 295,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 15
}
},
"name": "url"
},
"right": {
"type": "MemberExpression",
"start": 298,
"end": 306,
"loc": {
"start": {
"line": 11,
"column": 18
},
"end": {
"line": 11,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 298,
"end": 302,
"loc": {
"start": {
"line": 11,
"column": 18
},
"end": {
"line": 11,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"start": 303,
"end": 306,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 26
}
},
"name": "url"
},
"computed": false
}
},
{
"type": "Identifier",
"start": 308,
"end": 315,
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 35
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 317,
"end": 1720,
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 47,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 327,
"end": 1714,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 46,
"column": 11
}
},
"argument": {
"type": "NewExpression",
"start": 334,
"end": 1713,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 46,
"column": 10
}
},
"callee": {
"type": "Identifier",
"start": 338,
"end": 345,
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 26
}
},
"name": "Promise"
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 346,
"end": 1712,
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 46,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 347,
"end": 354,
"loc": {
"start": {
"line": 12,
"column": 28
},
"end": {
"line": 12,
"column": 35
}
},
"name": "resolve"
},
{
"type": "Identifier",
"start": 356,
"end": 362,
"loc": {
"start": {
"line": 12,
"column": 37
},
"end": {
"line": 12,
"column": 43
}
},
"name": "reject"
}
],
"body": {
"type": "BlockStatement",
"start": 367,
"end": 1712,
"loc": {
"start": {
"line": 12,
"column": 48
},
"end": {
"line": 46,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 381,
"end": 396,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 381,
"end": 395,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 381,
"end": 389,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 381,
"end": 385,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 386,
"end": 389,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 20
}
},
"name": "url"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 392,
"end": 395,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 26
}
},
"name": "url"
}
}
},
{
"type": "ExpressionStatement",
"start": 409,
"end": 431,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 409,
"end": 430,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 409,
"end": 420,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 409,
"end": 413,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 414,
"end": 420,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 423,
"end": 430,
"loc": {
"start": {
"line": 14,
"column": 26
},
"end": {
"line": 14,
"column": 33
}
},
"callee": {
"type": "Identifier",
"start": 423,
"end": 425,
"loc": {
"start": {
"line": 14,
"column": 26
},
"end": {
"line": 14,
"column": 28
}
},
"name": "io"
},
"arguments": [
{
"type": "Identifier",
"start": 426,
"end": 429,
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 32
}
},
"name": "url"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 444,
"end": 806,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 23,
"column": 15
}
},
"expression": {
"type": "CallExpression",
"start": 444,
"end": 805,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 23,
"column": 14
}
},
"callee": {
"type": "MemberExpression",
"start": 444,
"end": 460,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 28
}
},
"object": {
"type": "MemberExpression",
"start": 444,
"end": 455,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 444,
"end": 448,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 449,
"end": 455,
"loc": {
"start": {
"line": 15,
"column": 17
},
"end": {
"line": 15,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 456,
"end": 460,
"loc": {
"start": {
"line": 15,
"column": 24
},
"end": {
"line": 15,
"column": 28
}
},
"name": "once"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 461,
"end": 470,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 38
}
},
"value": "connect",
"rawValue": "connect",
"raw": "\"connect\""
},
{
"type": "ArrowFunctionExpression",
"start": 472,
"end": 804,
"loc": {
"start": {
"line": 15,
"column": 40
},
"end": {
"line": 23,
"column": 13
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 478,
"end": 804,
"loc": {
"start": {
"line": 15,
"column": 46
},
"end": {
"line": 23,
"column": 13
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 496,
"end": 723,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 21,
"column": 19
}
},
"expression": {
"type": "CallExpression",
"start": 496,
"end": 722,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 21,
"column": 18
}
},
"callee": {
"type": "MemberExpression",
"start": 496,
"end": 512,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 496,
"end": 507,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 496,
"end": 500,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 20
}
}
},
"property": {
"type": "Identifier",
"start": 501,
"end": 507,
"loc": {
"start": {
"line": 16,
"column": 21
},
"end": {
"line": 16,
"column": 27
}
},
"name": "socket"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 508,
"end": 512,
"loc": {
"start": {
"line": 16,
"column": 28
},
"end": {
"line": 16,
"column": 32
}
},
"name": "once"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 513,
"end": 525,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 45