UNPKG

awv3

Version:
1,398 lines (1,397 loc) 490 kB
{ "type": "File", "start": 0, "end": 2407, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 70, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 2407, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 70, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 23, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "local": { "type": "Identifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 }, "identifierName": "$" }, "name": "$" } } ], "source": { "type": "StringLiteral", "start": 14, "end": 22, "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } }, "extra": { "rawValue": "jquery", "raw": "'jquery'" }, "value": "jquery" }, "trailingComments": [ { "type": "CommentLine", "value": " Thank you very much, Microsoft ...", "start": 25, "end": 62, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } } } ] }, { "type": "ExpressionStatement", "start": 63, "end": 81, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 18 } }, "expression": { "type": "AssignmentExpression", "start": 63, "end": 80, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 17 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 63, "end": 76, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 13 } }, "object": { "type": "Identifier", "start": 63, "end": 69, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 6 }, "identifierName": "window" }, "name": "window", "leadingComments": null }, "property": { "type": "Identifier", "start": 70, "end": 76, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 }, "identifierName": "jQuery" }, "name": "jQuery" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 79, "end": 80, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 17 }, "identifierName": "$" }, "name": "$" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " Thank you very much, Microsoft ...", "start": 25, "end": 62, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } } } ] }, { "type": "ExpressionStatement", "start": 82, "end": 111, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 29 } }, "expression": { "type": "CallExpression", "start": 82, "end": 110, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 28 } }, "callee": { "type": "Identifier", "start": 82, "end": 89, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 7 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 90, "end": 109, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 27 } }, "extra": { "rawValue": "ms-signalr-client", "raw": "'ms-signalr-client'" }, "value": "ms-signalr-client" } ] } }, { "type": "ExportDefaultDeclaration", "start": 113, "end": 2406, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 69, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 128, "end": 2406, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 69, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 137, "end": 142, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 29 }, "identifierName": "scope" }, "name": "scope" } ], "body": { "type": "BlockStatement", "start": 144, "end": 2406, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 69, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 150, "end": 174, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 28 } }, "declarations": [ { "type": "VariableDeclarator", "start": 154, "end": 173, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 27 } }, "id": { "type": "Identifier", "start": 154, "end": 161, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 15 }, "identifierName": "signalR" }, "name": "signalR" }, "init": { "type": "MemberExpression", "start": 164, "end": 173, "loc": { "start": { "line": 8, "column": 18 }, "end": { "line": 8, "column": 27 } }, "object": { "type": "Identifier", "start": 164, "end": 165, "loc": { "start": { "line": 8, "column": 18 }, "end": { "line": 8, "column": 19 }, "identifierName": "$" }, "name": "$" }, "property": { "type": "Identifier", "start": 166, "end": 173, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 27 }, "identifierName": "signalR" }, "name": "signalR" }, "computed": false } } ], "kind": "var" }, { "type": "FunctionDeclaration", "start": 179, "end": 324, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 13, "column": 5 } }, "id": { "type": "Identifier", "start": 188, "end": 205, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 30 }, "identifierName": "makeProxyCallback" }, "name": "makeProxyCallback" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 206, "end": 209, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 34 }, "identifierName": "hub" }, "name": "hub" }, { "type": "Identifier", "start": 211, "end": 219, "loc": { "start": { "line": 9, "column": 36 }, "end": { "line": 9, "column": 44 }, "identifierName": "callback" }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 221, "end": 324, "loc": { "start": { "line": 9, "column": 46 }, "end": { "line": 13, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 231, "end": 318, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 12, "column": 10 } }, "argument": { "type": "FunctionExpression", "start": 238, "end": 317, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 12, "column": 9 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 249, "end": 317, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 12, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 263, "end": 307, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 56 } }, "expression": { "type": "CallExpression", "start": 263, "end": 306, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 55 } }, "callee": { "type": "MemberExpression", "start": 263, "end": 277, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 26 } }, "object": { "type": "Identifier", "start": 263, "end": 271, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 }, "identifierName": "callback" }, "name": "callback" }, "property": { "type": "Identifier", "start": 272, "end": 277, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 26 }, "identifierName": "apply" }, "name": "apply" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 278, "end": 281, "loc": { "start": { "line": 11, "column": 27 }, "end": { "line": 11, "column": 30 }, "identifierName": "hub" }, "name": "hub" }, { "type": "CallExpression", "start": 283, "end": 305, "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 54 } }, "callee": { "type": "MemberExpression", "start": 283, "end": 294, "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 43 } }, "object": { "type": "Identifier", "start": 283, "end": 284, "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 33 }, "identifierName": "$" }, "name": "$" }, "property": { "type": "Identifier", "start": 285, "end": 294, "loc": { "start": { "line": 11, "column": 34 }, "end": { "line": 11, "column": 43 }, "identifierName": "makeArray" }, "name": "makeArray" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 295, "end": 304, "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 11, "column": 53 }, "identifierName": "arguments" }, "name": "arguments" } ] } ] } } ], "directives": [] } } } ], "directives": [] } }, { "type": "FunctionDeclaration", "start": 330, "end": 1208, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 38, "column": 5 } }, "id": { "type": "Identifier", "start": 339, "end": 357, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 31 }, "identifierName": "registerHubProxies" }, "name": "registerHubProxies" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 358, "end": 366, "loc": { "start": { "line": 15, "column": 32 }, "end": { "line": 15, "column": 40 }, "identifierName": "instance" }, "name": "instance" }, { "type": "Identifier", "start": 368, "end": 383, "loc": { "start": { "line": 15, "column": 42 }, "end": { "line": 15, "column": 57 }, "identifierName": "shouldSubscribe" }, "name": "shouldSubscribe" } ], "body": { "type": "BlockStatement", "start": 385, "end": 1208, "loc": { "start": { "line": 15, "column": 59 }, "end": { "line": 38, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 395, "end": 452, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 65 } }, "declarations": [ { "type": "VariableDeclarator", "start": 399, "end": 402, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 15 } }, "id": { "type": "Identifier", "start": 399, "end": 402, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 15 }, "identifierName": "key" }, "name": "key" }, "init": null }, { "type": "VariableDeclarator", "start": 404, "end": 407, "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 20 } }, "id": { "type": "Identifier", "start": 404, "end": 407, "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 20 }, "identifierName": "hub" }, "name": "hub" }, "init": null }, { "type": "VariableDeclarator", "start": 409, "end": 418, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 31 } }, "id": { "type": "Identifier", "start": 409, "end": 418, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 31 }, "identifierName": "memberKey" }, "name": "memberKey" }, "init": null }, { "type": "VariableDeclarator", "start": 420, "end": 431, "loc": { "start": { "line": 16, "column": 33 }, "end": { "line": 16, "column": 44 } }, "id": { "type": "Identifier", "start": 420, "end": 431, "loc": { "start": { "line": 16, "column": 33 }, "end": { "line": 16, "column": 44 }, "identifierName": "memberValue" }, "name": "memberValue" }, "init": null }, { "type": "VariableDeclarator", "start": 433, "end": 451, "loc": { "start": { "line": 16, "column": 46 }, "end": { "line": 16, "column": 64 } }, "id": { "type": "Identifier", "start": 433, "end": 451, "loc": { "start": { "line": 16, "column": 46 }, "end": { "line": 16, "column": 64 }, "identifierName": "subscriptionMethod" }, "name": "subscriptionMethod" }, "init": null } ], "kind": "var" }, { "type": "ForInStatement", "start": 461, "end": 1202, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 37, "column": 9 } }, "left": { "type": "Identifier", "start": 466, "end": 469, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 16 }, "identifierName": "key" }, "name": "key" }, "right": { "type": "Identifier", "start": 473, "end": 481, "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 28 }, "identifierName": "instance" }, "name": "instance" }, "body": { "type": "BlockStatement", "start": 483, "end": 1202, "loc": { "start": { "line": 17, "column": 30 }, "end": { "line": 37, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 497, "end": 1192, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 36, "column": 13 } }, "test": { "type": "CallExpression", "start": 501, "end": 529, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 44 } }, "callee": { "type": "MemberExpression", "start": 501, "end": 524, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 39 } }, "object": { "type": "Identifier", "start": 501, "end": 509, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 24 }, "identifierName": "instance" }, "name": "instance" }, "property": { "type": "Identifier", "start": 510, "end": 524, "loc": { "start": { "line": 18, "column": 25 }, "end": { "line": 18, "column": 39 }, "identifierName": "hasOwnProperty" }, "name": "hasOwnProperty" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 525, "end": 528, "loc": { "start": { "line": 18, "column": 40 }, "end": { "line": 18, "column": 43 }, "identifierName": "key" }, "name": "key" } ] }, "consequent": { "type": "BlockStatement", "start": 531, "end": 1192, "loc": { "start": { "line": 18, "column": 46 }, "end": { "line": 36, "column": 13 } }, "body": [ { "type": "ExpressionStatement", "start": 549, "end": 569, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 549, "end": 568, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 35 } }, "operator": "=", "left": { "type": "Identifier", "start": 549, "end": 552, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 19 }, "identifierName": "hub" }, "name": "hub" }, "right": { "type": "MemberExpression", "start": 555, "end": 568, "loc": { "start": { "line": 19, "column": 22 }, "end": { "line": 19, "column": 35 } }, "object": { "type": "Identifier", "start": 555, "end": 563, "loc": { "start": { "line": 19, "column": 22 }, "end": { "line": 19, "column": 30 }, "identifierName": "instance" }, "name": "instance" }, "property": { "type": "Identifier", "start": 564, "end": 567, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 34 }, "identifierName": "key" }, "name": "key" }, "computed": true } } }, { "type": "IfStatement", "start": 587, "end": 614, "loc": { "start": { "line": 21, "column": 16 }, "end": { "line": 21, "column": 43 } }, "test": { "type": "UnaryExpression", "start": 591, "end": 603, "loc": { "start": { "line": 21, "column": 20 }, "end": { "line": 21, "column": 32 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 592, "end": 603, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 32 } }, "object": { "type": "Identifier", "start": 592, "end": 595, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 24 }, "identifierName": "hub" },