rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,368 lines • 1.91 MB
JSON
{
"type": "Program",
"start": 0,
"end": 2423,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 33,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 48,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"name": "MobileUtil"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 23,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 47
}
},
"value": "../../core/mobile_util",
"rawValue": "../../core/mobile_util",
"raw": "\"../../core/mobile_util\""
}
},
{
"type": "ImportDeclaration",
"start": 49,
"end": 97,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 56,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 56,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"name": "CookieUtil"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 72,
"end": 96,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 47
}
},
"value": "../../core/cookie_util",
"rawValue": "../../core/cookie_util",
"raw": "\"../../core/cookie_util\""
},
"trailingComments": [
{
"type": "Block",
"value": "eslint-disable ",
"start": 99,
"end": 118,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 19
}
},
"range": [
99,
118
]
}
]
},
{
"type": "Identifier",
"start": 119,
"end": 2377,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 29,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 125,
"end": 133,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 14
}
},
"name": "Usabilla",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 134,
"end": 2377,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 29,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 138,
"end": 468,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 16,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 138,
"end": 157,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 6,
"column": 21
}
},
"name": "serveMobileOrDestop"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 157,
"end": 468,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 16,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 160,
"end": 468,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 16,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 166,
"end": 194,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 32
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 170,
"end": 193,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 31
}
},
"id": {
"type": "Identifier",
"start": 170,
"end": 188,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 26
}
},
"name": "usabillaLiveScript"
},
"init": {
"type": "Literal",
"start": 191,
"end": 193,
"loc": {
"start": {
"line": 7,
"column": 29
},
"end": {
"line": 7,
"column": 31
}
},
"value": "",
"rawValue": "",
"raw": "\"\""
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 199,
"end": 218,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 23
}
},
"expression": {
"type": "CallExpression",
"start": 199,
"end": 217,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 22
}
},
"callee": {
"type": "MemberExpression",
"start": 199,
"end": 215,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 199,
"end": 203,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 204,
"end": 215,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 20
}
},
"name": "setupScript"
},
"computed": false
},
"arguments": []
}
},
{
"type": "IfStatement",
"start": 224,
"end": 354,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
},
"test": {
"type": "CallExpression",
"start": 227,
"end": 248,
"loc": {
"start": {
"line": 10,
"column": 7
},
"end": {
"line": 10,
"column": 28
}
},
"callee": {
"type": "MemberExpression",
"start": 227,
"end": 246,
"loc": {
"start": {
"line": 10,
"column": 7
},
"end": {
"line": 10,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 227,
"end": 237,
"loc": {
"start": {
"line": 10,
"column": 7
},
"end": {
"line": 10,
"column": 17
}
},
"name": "MobileUtil"
},
"property": {
"type": "Identifier",
"start": 238,
"end": 246,
"loc": {
"start": {
"line": 10,
"column": 18
},
"end": {
"line": 10,
"column": 26
}
},
"name": "isMobile"
},
"computed": false
},
"arguments": []
},
"consequent": {
"type": "BlockStatement",
"start": 249,
"end": 299,
"loc": {
"start": {
"line": 10,
"column": 29
},
"end": {
"line": 12,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 257,
"end": 293,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 42
}
},
"expression": {
"type": "AssignmentExpression",
"start": 257,
"end": 292,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 41
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 257,
"end": 275,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 24
}
},
"name": "usabillaLiveScript"
},
"right": {
"type": "Literal",
"start": 278,
"end": 292,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 41
}
},
"value": "cd92fa18ad96",
"rawValue": "cd92fa18ad96",
"raw": "\"cd92fa18ad96\""
}
}
}
]
},
"alternate": {
"type": "BlockStatement",
"start": 304,
"end": 354,
"loc": {
"start": {
"line": 12,
"column": 10
},
"end": {
"line": 14,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 312,
"end": 348,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 42
}
},
"expression": {
"type": "AssignmentExpression",
"start": 312,
"end": 347,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 41
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 312,
"end": 330,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 24
}
},
"name": "usabillaLiveScript"
},
"right": {
"type": "Literal",
"start": 333,
"end": 347,
"loc": {
"start": {
"line": 13,
"column": 27
},
"end": {
"line": 13,
"column": 41
}
},
"value": "fcbe92690840",
"rawValue": "fcbe92690840",
"raw": "\"fcbe92690840\""
}
}
}
]
}
},
{
"type": "ExpressionStatement",
"start": 359,
"end": 464,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 109
}
},
"expression": {
"type": "AssignmentExpression",
"start": 359,
"end": 463,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 108
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 359,
"end": 379,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 24
}
},
"object": {
"type": "Identifier",
"start": 359,
"end": 365,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 10
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 366,
"end": 379,
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 24
}
},
"name": "usabilla_live"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 382,
"end": 463,
"loc": {
"start": {
"line": 15,
"column": 27
},
"end": {
"line": 15,
"column": 108
}
},
"callee": {
"type": "MemberExpression",
"start": 382,
"end": 401,
"loc": {
"start": {
"line": 15,
"column": 27
},
"end": {
"line": 15,
"column": 46
}
},
"object": {
"type": "Identifier",
"start": 382,
"end": 393,
"loc": {
"start": {
"line": 15,
"column": 27
},
"end": {
"line": 15,
"column": 38
}
},
"name": "lightningjs"
},
"property": {
"type": "Identifier",
"start": 394,
"end": 401,
"loc": {
"start": {
"line": 15,
"column": 39
},
"end": {
"line": 15,
"column": 46
}
},
"name": "require"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 402,
"end": 417,
"loc": {
"start": {
"line": 15,
"column": 47
},
"end": {
"line": 15,
"column": 62
}
},
"value": "usabilla_live",
"rawValue": "usabilla_live",
"raw": "\"usabilla_live\""
},
{
"type": "TemplateLiteral",
"start": 419,
"end": 462,
"loc": {
"start": {
"line": 15,
"column": 64
},
"end": {
"line": 15,
"column": 107
}
},
"expressions": [
{
"type": "Identifier",
"start": 439,
"end": 457,
"loc": {
"start": {
"line": 15,
"column": 84
},
"end": {
"line": 15,
"column": 102
}
},
"name": "usabillaLiveScript"
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 420,
"end": 437,
"loc": {
"start": {
"line": 15,
"column": 65
},
"end": {
"line": 15,
"column": 82
}
},
"value": {
"raw": "//w.usabilla.com/",
"cooked": "//w.usabilla.com/"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 458,
"end": 461,
"loc": {
"start": {
"line": 15,
"column": 103
},
"end": {
"line": 15,
"column": 106
}
},
"value": {
"raw": ".js",
"cooked": ".js"
},
"tail": true
}
]
}
]
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 471,
"end": 2196,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 20,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 471,
"end": 482,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 13
}
},
"name": "setupScript"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 482,
"end": 2196,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 20,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 485,
"end": 2196,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 20,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 496,
"end": 2192,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 1700
}
},
"expression": {
"type": "LogicalExpression",
"start": 496,
"end": 2191,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 1699
}
},
"left": {
"type": "MemberExpression",
"start": 496,
"end": 514,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 22
}
},
"object": {
"type": "Identifier",
"start": 496,
"end": 502,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 10
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 503,
"end": 514,
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 22
}
},
"name": "lightningjs"
},
"computed": false
},
"operator": "||",
"right": {
"type": "CallExpression",
"start": 516,
"end": 2191,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 1699
}
},
"callee": {
"type": "FunctionExpression",
"start": 516,
"end": 2187,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 1695
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 525,
"end": 526,
"loc": {
"start": {
"line": 19,
"column": 33
},
"end": {
"line": 19,
"column": 34
}
},
"name": "c"
}
],
"body": {
"type": "BlockStatement",
"start": 527,
"end": 2187,
"loc": {
"start": {
"line": 19,
"column": 35
},
"end": {
"line": 19,
"column": 1695
}
},
"body": [
{
"type": "FunctionDeclaration",
"start": 528,
"end": 2126,
"loc": {
"start": {
"line": 19,
"column": 36
},
"end": {
"line": 19,
"column": 1634
}
},
"id": {
"type": "Identifier",
"start": 537,
"end": 538,
"loc": {
"start": {
"line": 19,
"column": 45
},
"end": {
"line": 19,
"column": 46
}
},
"name": "g"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 539,
"end": 540,
"loc": {
"start": {
"line": 19,
"column": 47
},
"end": {
"line": 19,
"column": 48
}
},
"name": "b"
},
{
"type": "Identifier",
"start": 541,
"end": 542,
"loc": {
"start": {
"line": 19,
"column": 49
},
"end": {
"line": 19,
"column": 50
}
},
"name": "d"
}
],
"body": {
"type": "BlockStatement",
"start": 543,
"end": 2126,
"loc": {
"start": {
"line": 19,
"column": 51
},
"end": {
"line": 19,
"column": 1634
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 544,
"end": 582,
"loc": {
"start": {
"line": 19,
"column": 52
},
"end": {
"line": 19,
"column": 90
}
},
"expression": {
"type": "LogicalExpression",
"start": 544,
"end": 581,
"loc": {
"start": {
"line": 19,
"column": 52
},
"end": {
"line": 19,
"column": 89
}
},
"left": {
"type": "Identifier",
"start": 544,
"end": 545,
"loc": {
"start": {
"line": 19,
"column": 52
},
"end": {
"line": 19,
"column": 53
}
},
"name": "d"
},
"operator": "&&",
"right": {
"type": "AssignmentExpression",
"start": 548,
"end": 580,
"loc": {
"start": {
"line": 19,
"column": 56
},
"end": {
"line": 19,
"column": 88
}
},
"operator": "+=",
"left": {
"type": "Identifier",
"start": 548,
"end": 549,
"loc": {
"start": {
"line": 19,
"column": 56
},
"end": {
"line": 19,
"column": 57
}
},
"name": "d"
},
"right": {
"type": "BinaryExpression",
"start": 551,
"end": 580,
"loc": {
"start": {
"line": 19,
"column": 59
},
"end": {
"line": 19,
"column": 88
}
},
"left": {
"type": "ConditionalExpression",
"start": 552,
"end": 572,
"loc": {
"start": {
"line": 19,
"column": 60
},
"end": {
"line": 19,
"column": 80
}
},
"test": {
"type": "CallExpression",
"start": 552,
"end": 564,
"loc": {
"start": {
"line": 19,
"column": 60
},
"end": {
"line": 19,
"column": 72
}
},
"callee": {
"type": "MemberExpression",
"start": 552,
"end": 561,
"loc": {
"start": {
"line": 19,
"column": 60
},
"end": {
"line": 19,
"column": 69
}
},
"object": {
"type": "Literal",
"start": 552,
"end": 556,
"loc": {
"start": {
"line": 19,
"column": 60
},
"end": {
"line": 19,
"column": 64
}
},
"value": {},
"rawValue": {},
"raw": "/\\?/",
"regex": {
"pattern": "\\?",
"flags": ""
}
},
"property": {
"type": "Identifier",
"start": 557,
"end": 561,
"loc": {
"start": {
"line": 19,
"col