UNPKG

awv3

Version:
1,451 lines (1,450 loc) 531 kB
{ "type": "Program", "start": 0, "end": 6457, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 182, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 54, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 54 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 26, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 26 } }, "imported": { "type": "Identifier", "start": 8, "end": 26, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 26 } }, "name": "getObjectStatement" }, "local": { "type": "Identifier", "start": 8, "end": 26, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 26 } }, "name": "getObjectStatement" } } ], "importKind": "value", "source": { "type": "Literal", "start": 33, "end": 53, "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 53 } }, "value": "sketcher/cchelpers", "rawValue": "sketcher/cchelpers", "raw": "'sketcher/cchelpers'" } }, { "type": "ImportDeclaration", "start": 55, "end": 81, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 62, "end": 67, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 62, "end": 67, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 73, "end": 80, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" } }, { "type": "ImportDeclaration", "start": 82, "end": 118, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 89, "end": 96, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "local": { "type": "Identifier", "start": 89, "end": 96, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "name": "Object3" } } ], "importKind": "value", "source": { "type": "Literal", "start": 102, "end": 117, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 35 } }, "value": "three/object3", "rawValue": "three/object3", "raw": "'three/object3'" }, "trailingComments": [ { "type": "Block", "value": "\n * Base class for all objects having corresponding object on the server.\n * It is the default class for creating objects when parsing object tree.\n * To provide more specialized client class for corresponding server class use classMapping:\n * ClassCadObject.classMapping[\"MyServerClass\"] = MyClientClass;\n ", "start": 120, "end": 431, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 10, "column": 3 } }, "range": [ 120, 431 ] } ] }, { "type": "ExportNamedDeclaration", "start": 432, "end": 2955, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 78, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 439, "end": 2955, "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 78, "column": 1 } }, "id": { "type": "Identifier", "start": 445, "end": 459, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 27 } }, "name": "ClassCadObject", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 468, "end": 475, "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 43 } }, "name": "Object3" }, "body": { "type": "ClassBody", "start": 476, "end": 2955, "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 78, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 482, "end": 564, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 15, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 482, "end": 493, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 493, "end": 564, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 15, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 496, "end": 564, "loc": { "start": { "line": 12, "column": 18 }, "end": { "line": 15, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 506, "end": 514, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 16 } }, "expression": { "type": "CallExpression", "start": 506, "end": 513, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 15 } }, "callee": { "type": "Super", "start": 506, "end": 511, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 523, "end": 558, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 43 } }, "expression": { "type": "AssignmentExpression", "start": 523, "end": 557, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 42 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 523, "end": 535, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 20 } }, "object": { "type": "ThisExpression", "start": 523, "end": 527, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "start": 528, "end": 535, "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 20 } }, "name": "members" }, "computed": false }, "right": { "type": "CallExpression", "start": 538, "end": 557, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 538, "end": 551, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 36 } }, "object": { "type": "Identifier", "start": 538, "end": 544, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 29 } }, "name": "Object" }, "property": { "type": "Identifier", "start": 545, "end": 551, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 36 } }, "name": "create" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 552, "end": 556, "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 41 } }, "value": null, "rawValue": null, "raw": "null" } ] } } } ] } } }, { "type": "MethodDefinition", "start": 570, "end": 763, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 21, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 574, "end": 582, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } }, "name": "fullName" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 582, "end": 763, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 21, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 585, "end": 763, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 21, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 595, "end": 619, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 32 } }, "declarations": [ { "type": "VariableDeclarator", "start": 599, "end": 618, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 31 } }, "id": { "type": "Identifier", "start": 599, "end": 604, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 17 } }, "name": "names" }, "init": { "type": "ArrayExpression", "start": 607, "end": 618, "loc": { "start": { "line": 18, "column": 20 }, "end": { "line": 18, "column": 31 } }, "elements": [ { "type": "MemberExpression", "start": 608, "end": 617, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 30 } }, "object": { "type": "ThisExpression", "start": 608, "end": 612, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 25 } } }, "property": { "type": "Identifier", "start": 613, "end": 617, "loc": { "start": { "line": 18, "column": 26 }, "end": { "line": 18, "column": 30 } }, "name": "name" }, "computed": false } ] } } ], "kind": "var" }, { "type": "ExpressionStatement", "start": 628, "end": 715, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 95 } }, "expression": { "type": "CallExpression", "start": 628, "end": 714, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 94 } }, "callee": { "type": "MemberExpression", "start": 628, "end": 650, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 30 } }, "object": { "type": "ThisExpression", "start": 628, "end": 632, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "start": 633, "end": 650, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 30 } }, "name": "traverseAncestors" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 651, "end": 713, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 93 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 651, "end": 654, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 34 } }, "name": "anc" } ], "body": { "type": "LogicalExpression", "start": 658, "end": 713, "loc": { "start": { "line": 19, "column": 38 }, "end": { "line": 19, "column": 93 } }, "left": { "type": "BinaryExpression", "start": 659, "end": 688, "loc": { "start": { "line": 19, "column": 39 }, "end": { "line": 19, "column": 68 } }, "left": { "type": "Identifier", "start": 659, "end": 662, "loc": { "start": { "line": 19, "column": 39 }, "end": { "line": 19, "column": 42 } }, "name": "anc" }, "operator": "instanceof", "right": { "type": "Identifier", "start": 674, "end": 688, "loc": { "start": { "line": 19, "column": 54 }, "end": { "line": 19, "column": 68 } }, "name": "ClassCadObject" }, "parenthesizedExpression": true }, "operator": "&&", "right": { "type": "CallExpression", "start": 693, "end": 713, "loc": { "start": { "line": 19, "column": 73 }, "end": { "line": 19, "column": 93 } }, "callee": { "type": "MemberExpression", "start": 693, "end": 703, "loc": { "start": { "line": 19, "column": 73 }, "end": { "line": 19, "column": 83 } }, "object": { "type": "Identifier", "start": 693, "end": 698, "loc": { "start": { "line": 19, "column": 73 }, "end": { "line": 19, "column": 78 } }, "name": "names" }, "property": { "type": "Identifier", "start": 699, "end": 703, "loc": { "start": { "line": 19, "column": 79 }, "end": { "line": 19, "column": 83 } }, "name": "push" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 704, "end": 712, "loc": { "start": { "line": 19, "column": 84 }, "end": { "line": 19, "column": 92 } }, "object": { "type": "Identifier", "start": 704, "end": 707, "loc": { "start": { "line": 19, "column": 84 }, "end": { "line": 19, "column": 87 } }, "name": "anc" }, "property": { "type": "Identifier", "start": 708, "end": 712, "loc": { "start": { "line": 19, "column": 88 }, "end": { "line": 19, "column": 92 } }, "name": "name" }, "computed": false } ] } } } ] } }, { "type": "ReturnStatement", "start": 724, "end": 757, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 41 } }, "argument": { "type": "CallExpression", "start": 731, "end": 756, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 40 } }, "callee": { "type": "MemberExpression", "start": 731, "end": 751, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 35 } }, "object": { "type": "CallExpression", "start": 731, "end": 746, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 30 } }, "callee": { "type": "MemberExpression", "start": 731, "end": 744, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 28 } }, "object": { "type": "Identifier", "start": 731, "end": 736, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 20 } }, "name": "names" }, "property": { "type": "Identifier", "start": 737, "end": 744, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 28 } }, "name": "reverse" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 747, "end": 751, "loc": { "start": { "line": 20, "column": 31 }, "end": { "line": 20, "column": 35 } }, "name": "join" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 752, "end": 755, "loc": { "start": { "line": 20, "column": 36 }, "end": { "line": 20, "column": 39 } }, "value": ".", "rawValue": ".", "raw": "'.'" } ] } } ] } } }, { "type": "MethodDefinition", "start": 769, "end": 878, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 25, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 769, "end": 785, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 20 } }, "name": "updateFromServer" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 785, "end": 878, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 25, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 786, "end": 792, "loc": { "start": { "line": 23, "column": 21 }, "end": { "line": 23, "column": 27 } }, "name": "server" } ], "body": { "type": "BlockStatement", "start": 794, "end": 878, "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 25, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 804, "end": 872, "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 76 } }, "argument": { "type": "CallExpression", "start": 811, "end": 871, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 75 } }, "callee": { "type": "MemberExpression", "start": 811, "end": 863, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 67 } }, "object": { "type": "CallExpression", "start": 811, "end": 855, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 59 } }, "callee": { "type": "MemberExpression", "start": 811, "end": 849, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 53 } }, "object": { "type": "CallExpression", "start": 811, "end": 835, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 39 } }, "callee": { "type": "Identifier", "start": 811, "end": 829, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 33 } }, "name": "getObjectStatement" }, "arguments": [ { "type": "ThisExpression", "start": 830, "end": 834, "loc": { "start": { "line": 24, "column": 34 }, "end": { "line": 24, "column": 38 } } } ] }, "property": { "type": "Identifier", "start": 836, "end": 849, "loc": { "start": { "line": 24, "column": 40 }, "end": { "line": 24, "column": 53 } }, "name": "parseToObject"