UNPKG

awv3

Version:
1,631 lines (1,630 loc) 144 kB
{ "type": "File", "start": 0, "end": 870, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 28, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 870, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 28, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 53, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 7, "end": 26, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 26 } }, "local": { "type": "Identifier", "start": 12, "end": 26, "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 26 }, "identifierName": "ConstraintType" }, "name": "ConstraintType" } } ], "source": { "type": "StringLiteral", "start": 32, "end": 52, "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 52 } }, "extra": { "rawValue": "../constraint/type", "raw": "'../constraint/type'" }, "value": "../constraint/type" } }, { "type": "ImportDeclaration", "start": 54, "end": 82, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 28 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 61, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 61, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 }, "identifierName": "Point" }, "name": "Point" } } ], "source": { "type": "StringLiteral", "start": 72, "end": 81, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 27 } }, "extra": { "rawValue": "./point", "raw": "'./point'" }, "value": "./point" } }, { "type": "ImportDeclaration", "start": 83, "end": 109, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 90, "end": 94, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 11 } }, "local": { "type": "Identifier", "start": 90, "end": 94, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 11 }, "identifierName": "Line" }, "name": "Line" } } ], "source": { "type": "StringLiteral", "start": 100, "end": 108, "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 25 } }, "extra": { "rawValue": "./line", "raw": "'./line'" }, "value": "./line" } }, { "type": "ImportDeclaration", "start": 110, "end": 134, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 24 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 117, "end": 120, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 10 } }, "local": { "type": "Identifier", "start": 117, "end": 120, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 10 }, "identifierName": "Arc" }, "name": "Arc" } } ], "source": { "type": "StringLiteral", "start": 126, "end": 133, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 23 } }, "extra": { "rawValue": "./arc", "raw": "'./arc'" }, "value": "./arc" } }, { "type": "ImportDeclaration", "start": 135, "end": 165, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 30 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 142, "end": 148, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 } }, "local": { "type": "Identifier", "start": 142, "end": 148, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 }, "identifierName": "Circle" }, "name": "Circle" } } ], "source": { "type": "StringLiteral", "start": 154, "end": 164, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 29 } }, "extra": { "rawValue": "./circle", "raw": "'./circle'" }, "value": "./circle" } }, { "type": "ImportDeclaration", "start": 166, "end": 196, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 30 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 173, "end": 179, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 13 } }, "local": { "type": "Identifier", "start": 173, "end": 179, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 13 }, "identifierName": "Sketch" }, "name": "Sketch" } } ], "source": { "type": "StringLiteral", "start": 185, "end": 195, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 29 } }, "extra": { "rawValue": "./sketch", "raw": "'./sketch'" }, "value": "./sketch" } }, { "type": "ImportDeclaration", "start": 197, "end": 235, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 38 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 204, "end": 214, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 17 } }, "local": { "type": "Identifier", "start": 204, "end": 214, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 17 }, "identifierName": "Constraint" }, "name": "Constraint" } } ], "source": { "type": "StringLiteral", "start": 220, "end": 234, "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 37 } }, "extra": { "rawValue": "./constraint", "raw": "'./constraint'" }, "value": "./constraint" } }, { "type": "ExportDefaultDeclaration", "start": 237, "end": 736, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 24, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 252, "end": 736, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 24, "column": 1 } }, "id": { "type": "Identifier", "start": 261, "end": 269, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 32 }, "identifierName": "Graphics" }, "name": "Graphics" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 270, "end": 274, "loc": { "start": { "line": 9, "column": 33 }, "end": { "line": 9, "column": 37 }, "identifierName": "name" }, "name": "name" } ], "body": { "type": "BlockStatement", "start": 276, "end": 736, "loc": { "start": { "line": 9, "column": 39 }, "end": { "line": 24, "column": 1 } }, "body": [ { "type": "SwitchStatement", "start": 282, "end": 586, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 21, "column": 5 } }, "discriminant": { "type": "Identifier", "start": 290, "end": 294, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 16 }, "identifierName": "name" }, "name": "name" }, "cases": [ { "type": "SwitchCase", "start": 306, "end": 354, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 12, "column": 31 } }, "consequent": [ { "type": "ReturnStatement", "start": 335, "end": 354, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 31 } }, "argument": { "type": "NewExpression", "start": 342, "end": 353, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 30 } }, "callee": { "type": "Identifier", "start": 346, "end": 351, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 28 }, "identifierName": "Point" }, "name": "Point" }, "arguments": [] } } ], "test": { "type": "StringLiteral", "start": 311, "end": 321, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 23 } }, "extra": { "rawValue": "CC_Point", "raw": "'CC_Point'" }, "value": "CC_Point" } }, { "type": "SwitchCase", "start": 363, "end": 409, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 14, "column": 30 } }, "consequent": [ { "type": "ReturnStatement", "start": 391, "end": 409, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 30 } }, "argument": { "type": "NewExpression", "start": 398, "end": 408, "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 14, "column": 29 } }, "callee": { "type": "Identifier", "start": 402, "end": 406, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 27 }, "identifierName": "Line" }, "name": "Line" }, "arguments": [] } } ], "test": { "type": "StringLiteral", "start": 368, "end": 377, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } }, "extra": { "rawValue": "CC_Line", "raw": "'CC_Line'" }, "value": "CC_Line" } }, { "type": "SwitchCase", "start": 418, "end": 462, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 16, "column": 29 } }, "consequent": [ { "type": "ReturnStatement", "start": 445, "end": 462, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 29 } }, "argument": { "type": "NewExpression", "start": 452, "end": 461, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 28 } }, "callee": { "type": "Identifier", "start": 456, "end": 459, "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 16, "column": 26 }, "identifierName": "Arc" }, "name": "Arc" }, "arguments": [] } } ], "test": { "type": "StringLiteral", "start": 423, "end": 431, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 21 } }, "extra": { "rawValue": "CC_Arc", "raw": "'CC_Arc'" }, "value": "CC_Arc" } }, { "type": "SwitchCase", "start": 471, "end": 521, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 18, "column": 32 } }, "consequent": [ { "type": "ReturnStatement", "start": 501, "end": 521, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 32 } }, "argument": { "type": "NewExpression", "start": 508, "end": 520, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 31 } }, "callee": { "type": "Identifier", "start": 512, "end": 518, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 29 }, "identifierName": "Circle" }, "name": "Circle" }, "arguments": [] } } ], "test": { "type": "StringLiteral", "start": 476, "end": 487, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 24 } }, "extra": { "rawValue": "CC_Circle", "raw": "'CC_Circle'" }, "value": "CC_Circle" } }, { "type": "SwitchCase", "start": 530, "end": 580, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 20, "column": 32 } }, "consequent": [ { "type": "ReturnStatement", "start": 560, "end": 580, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 32 } }, "argument": { "type": "NewExpression", "start": 567, "end": 579, "loc": { "start": { "line": 20, "column": 19 }, "end": { "line": 20, "column": 31 } }, "callee": { "type": "Identifier", "start": 571, "end": 577, "loc": { "start": { "line": 20, "column": 23 }, "end": { "line": 20, "column": 29 }, "identifierName": "Sketch" }, "name": "Sketch" }, "arguments": [] } } ], "test": { "type": "StringLiteral", "start": 535, "end": 546, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 24 } }, "extra": { "rawValue": "CC_Sketch", "raw": "'CC_Sketch'" }, "value": "CC_Sketch" } } ] }, { "type": "IfStatement", "start": 591, "end": 734, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 23, "column": 110 } }, "test": { "type": "CallExpression", "start": 595, "end": 622, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 595, "end": 608, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 21 } }, "object": { "type": "Identifier", "start": 595, "end": 599, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 12 }, "identifierName": "name" }, "name": "name" }, "property": { "type": "Identifier", "start": 600, "end": 608, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 21 }, "identifierName": "endsWith" }, "name": "endsWith" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 609, "end": 621, "loc": { "start": { "line": 22, "column": 22 }, "end": { "line": 22, "column": 34 } }, "extra": { "rawValue": "Constraint", "raw": "'Constraint'" }, "value": "Constraint" } ] }, "consequent": { "type": "IfStatement", "start": 632, "end": 734, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 110 } }, "test": { "type": "UnaryExpression", "start": 636, "end": 708, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 84 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 637, "end": 708, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 84 } }, "object": { "type": "CallExpression", "start": 637, "end": 695, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 71 } }, "callee": { "type": "MemberExpression", "start": 637, "end": 671, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 47 } }, "object": { "type": "CallExpression", "start": 637, "end": 666, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 637, "end": 650, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 26 } }, "object": { "type": "Identifier", "start": 637, "end": 643, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 19 }, "identifierName": "Object" }, "name": "Object" }, "property": { "type": "Identifier", "start": 644, "end": 650, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 23, "column": 26 }, "identifierName": "values" }, "name": "values" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 651, "end": 665, "loc": { "start": { "line": 23, "column": 27 }, "end": { "line": 23, "column": 41 }, "identifierName": "ConstraintType" }, "name": "ConstraintType" } ] }, "property": { "type": "Identifier", "start": 667, "end": 671, "loc": { "start": { "line": 23, "column": 43 }, "end": { "line": 23, "column": 47 }, "identifierName": "find" }, "name": "find" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 672, "end": 694, "loc": { "start": { "line": 23, "column": 48 }, "end": { "line": 23, "column": 70 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 672, "end": 674, "loc": { "start": { "line": 23, "column": 48 }, "end": { "line": 23, "column": 50 }, "identifierName": "ct" }, "name": "ct" } ], "body": { "type": "BinaryExpression", "start": 678, "end": 694, "loc": { "start": { "line": 23, "column": 54 }, "end": { "line": 23, "column": 70 } }, "left": { "type": "MemberExpression", "start": 678, "end": 685, "loc": { "start": { "line": 23, "column": 54 }, "end": { "line": 23, "column": 61 } }, "object": { "type": "Identifier", "start": 678, "end": 680, "loc": { "start": { "line": 23, "column": 54 }, "end": { "line": 23, "column": 56 }, "identifierName": "ct" }, "name": "ct" }, "property": { "type": "Identifier", "start": 681, "end": 685, "loc": { "start": { "line": 23, "column": 57 }, "end": { "line": 23, "column": 61 }, "identifierName": "type" }, "name": "type" }, "computed": false }, "operator": "===", "right": { "type": "Identifier", "start": 690, "end": 694, "loc": { "start": { "line": 23, "column": 66 }, "end": { "line": 23, "column": 70 }, "identifierName": "name" }, "name": "name" } } } ] }, "property": { "type": "Identifier", "start": 696, "end": 708, "loc": { "start": { "line": 23, "column": 72 }, "end": { "line": 23, "column": 84 }, "identifierName": "isParametric" }, "name": "isParametric" }, "computed": false }, "extra": { "parenthesizedArgument": false } }, "consequent": { "type": "ReturnStatement", "start": 710, "end": 734, "loc": { "start": { "line": 23, "column": 86 }, "end": { "line": 23, "column": 110 } }, "argument": { "type": "NewExpression", "start": 717, "end": 733, "loc": { "start": { "line": 23, "column": 93 }, "end": { "line": 23, "column": 109 } }, "callee": { "type": "Identifier", "start": 721, "end": 731, "loc": { "start": { "line": 23, "column": 97 }, "end": { "line": 23, "column": 107 }, "identifierName": "Constraint" }, "name": "Constraint" }, "arguments": [] } }, "alternate": null }, "alternate": null } ], "directives": [], "trailingComments": null }, "trailingComments": [ { "type": "CommentLine", "value": " Support hot reloading", "start": 738, "end": 762, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 26, "column": 24 } } } ], "leadingComments": [] }, "trailingComments": [ { "type": "CommentLine", "value": " Support hot reloading", "start": 738, "end": 762, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 26, "column": 24 } } } ] }, { "type": "IfStatement", "start": 763, "end": 869, "loc": { "start": { "line": 27, "column": 0 }, "end": { "line": 27, "column": 106 } }, "test": { "type": "MemberExpression", "start": 767, "end": 777, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 14 } }, "object": { "type": "Identifier", "start": 767, "end": 773, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 10 }, "identifierName": "module" }, "name": "module", "leadingComments": null }, "property": { "type": "Identifier", "start": 774, "end": 777, "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 14