forked from bonnag/ubitok-jslib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
reference-exchange-instrumented.js
91 lines (91 loc) · 108 KB
/
reference-exchange-instrumented.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
var cov_npqogpf4g=function(){var path='reference-exchange.js',hash='c91af9b6871093be8817b12eeb861b6a4ca3c7fb',global=new Function('return this')(),gcv='__coverage__',coverageData={path:'reference-exchange.js',statementMap:{'0':{start:{line:1,column:16},end:{line:1,column:39}},'1':{start:{line:19,column:2},end:{line:21,column:3}},'2':{start:{line:20,column:4},end:{line:20,column:52}},'3':{start:{line:23,column:2},end:{line:23,column:34}},'4':{start:{line:25,column:2},end:{line:25,column:33}},'5':{start:{line:26,column:2},end:{line:26,column:33}},'6':{start:{line:27,column:2},end:{line:27,column:33}},'7':{start:{line:30,column:2},end:{line:30,column:34}},'8':{start:{line:31,column:2},end:{line:31,column:34}},'9':{start:{line:32,column:2},end:{line:32,column:29}},'10':{start:{line:33,column:2},end:{line:33,column:29}},'11':{start:{line:34,column:2},end:{line:34,column:29}},'12':{start:{line:36,column:2},end:{line:36,column:28}},'13':{start:{line:37,column:2},end:{line:37,column:31}},'14':{start:{line:38,column:2},end:{line:38,column:65}},'15':{start:{line:39,column:2},end:{line:39,column:64}},'16':{start:{line:40,column:2},end:{line:40,column:43}},'17':{start:{line:41,column:2},end:{line:41,column:63}},'18':{start:{line:42,column:2},end:{line:42,column:43}},'19':{start:{line:43,column:2},end:{line:43,column:22}},'20':{start:{line:44,column:2},end:{line:44,column:26}},'21':{start:{line:45,column:2},end:{line:45,column:19}},'22':{start:{line:47,column:0},end:{line:47,column:35}},'23':{start:{line:49,column:0},end:{line:53,column:2}},'24':{start:{line:50,column:15},end:{line:50,column:26}},'25':{start:{line:51,column:2},end:{line:51,column:19}},'26':{start:{line:52,column:2},end:{line:52,column:16}},'27':{start:{line:55,column:0},end:{line:57,column:2}},'28':{start:{line:56,column:2},end:{line:56,column:26}},'29':{start:{line:59,column:0},end:{line:65,column:2}},'30':{start:{line:60,column:2},end:{line:64,column:3}},'31':{start:{line:61,column:4},end:{line:61,column:20}},'32':{start:{line:63,column:4},end:{line:63,column:16}},'33':{start:{line:67,column:0},end:{line:77,column:2}},'34':{start:{line:68,column:2},end:{line:76,column:4}},'35':{start:{line:80,column:0},end:{line:82,column:2}},'36':{start:{line:81,column:2},end:{line:81,column:70}},'37':{start:{line:85,column:0},end:{line:87,column:2}},'38':{start:{line:86,column:2},end:{line:86,column:44}},'39':{start:{line:90,column:0},end:{line:92,column:2}},'40':{start:{line:91,column:2},end:{line:91,column:44}},'41':{start:{line:94,column:0},end:{line:101,column:2}},'42':{start:{line:95,column:2},end:{line:95,column:50}},'43':{start:{line:96,column:2},end:{line:96,column:50}},'44':{start:{line:97,column:2},end:{line:97,column:50}},'45':{start:{line:98,column:2},end:{line:98,column:42}},'46':{start:{line:99,column:2},end:{line:99,column:42}},'47':{start:{line:100,column:2},end:{line:100,column:42}},'48':{start:{line:104,column:0},end:{line:115,column:2}},'49':{start:{line:105,column:31},end:{line:105,column:65}},'50':{start:{line:106,column:2},end:{line:109,column:3}},'51':{start:{line:107,column:4},end:{line:107,column:54}},'52':{start:{line:108,column:4},end:{line:108,column:42}},'53':{start:{line:110,column:2},end:{line:112,column:3}},'54':{start:{line:111,column:4},end:{line:111,column:91}},'55':{start:{line:114,column:2},end:{line:114,column:57}},'56':{start:{line:117,column:0},end:{line:126,column:2}},'57':{start:{line:118,column:19},end:{line:118,column:53}},'58':{start:{line:119,column:2},end:{line:121,column:3}},'59':{start:{line:120,column:4},end:{line:120,column:65}},'60':{start:{line:122,column:2},end:{line:122,column:78}},'61':{start:{line:123,column:2},end:{line:123,column:73}},'62':{start:{line:124,column:2},end:{line:124,column:44}},'63':{start:{line:128,column:0},end:{line:136,column:2}},'64':{start:{line:129,column:20},end:{line:129,column:53}},'65':{start:{line:130,column:2},end:{line:132,column:3}},'66':{start:{line:131,column:4},end:{line:131,column:55}},'67':{start:{line:133,column:2},end:{line:133,column:63}},'68':{start:{line:134,column:2},end:{line:134,column:54}},'69':{start:{line:139,column:0},end:{line:147,column:2}},'70':{start:{line:140,column:23},end:{line:140,column:52}},'71':{start:{line:141,column:2},end:{line:143,column:3}},'72':{start:{line:142,column:4},end:{line:142,column:62}},'73':{start:{line:144,column:2},end:{line:144,column:73}},'74':{start:{line:145,column:2},end:{line:145,column:44}},'75':{start:{line:149,column:0},end:{line:157,column:2}},'76':{start:{line:150,column:20},end:{line:150,column:53}},'77':{start:{line:151,column:2},end:{line:153,column:3}},'78':{start:{line:152,column:4},end:{line:152,column:55}},'79':{start:{line:154,column:2},end:{line:154,column:63}},'80':{start:{line:155,column:2},end:{line:155,column:54}},'81':{start:{line:160,column:0},end:{line:171,column:2}},'82':{start:{line:161,column:31},end:{line:161,column:65}},'83':{start:{line:162,column:2},end:{line:165,column:3}},'84':{start:{line:163,column:4},end:{line:163,column:54}},'85':{start:{line:164,column:4},end:{line:164,column:42}},'86':{start:{line:166,column:2},end:{line:168,column:3}},'87':{start:{line:167,column:4},end:{line:167,column:91}},'88':{start:{line:170,column:2},end:{line:170,column:57}},'89':{start:{line:173,column:0},end:{line:182,column:2}},'90':{start:{line:174,column:19},end:{line:174,column:53}},'91':{start:{line:175,column:2},end:{line:177,column:3}},'92':{start:{line:176,column:4},end:{line:176,column:65}},'93':{start:{line:178,column:2},end:{line:178,column:78}},'94':{start:{line:179,column:2},end:{line:179,column:73}},'95':{start:{line:180,column:2},end:{line:180,column:44}},'96':{start:{line:184,column:0},end:{line:192,column:2}},'97':{start:{line:185,column:20},end:{line:185,column:53}},'98':{start:{line:186,column:2},end:{line:188,column:3}},'99':{start:{line:187,column:4},end:{line:187,column:55}},'100':{start:{line:189,column:2},end:{line:189,column:63}},'101':{start:{line:190,column:2},end:{line:190,column:54}},'102':{start:{line:194,column:0},end:{line:202,column:2}},'103':{start:{line:195,column:2},end:{line:197,column:3}},'104':{start:{line:196,column:4},end:{line:196,column:38}},'105':{start:{line:198,column:2},end:{line:198,column:54}},'106':{start:{line:199,column:2},end:{line:201,column:3}},'107':{start:{line:200,column:4},end:{line:200,column:57}},'108':{start:{line:204,column:0},end:{line:206,column:2}},'109':{start:{line:205,column:2},end:{line:205,column:67}},'110':{start:{line:208,column:0},end:{line:210,column:2}},'111':{start:{line:209,column:2},end:{line:209,column:67}},'112':{start:{line:212,column:0},end:{line:214,column:2}},'113':{start:{line:213,column:2},end:{line:213,column:67}},'114':{start:{line:216,column:0},end:{line:237,column:2}},'115':{start:{line:217,column:20},end:{line:217,column:38}},'116':{start:{line:218,column:21},end:{line:218,column:36}},'117':{start:{line:219,column:17},end:{line:219,column:73}},'118':{start:{line:220,column:18},end:{line:220,column:55}},'119':{start:{line:222,column:2},end:{line:235,column:3}},'120':{start:{line:223,column:4},end:{line:223,column:25}},'121':{start:{line:224,column:4},end:{line:234,column:5}},'122':{start:{line:225,column:23},end:{line:225,column:53}},'123':{start:{line:226,column:18},end:{line:226,column:30}},'124':{start:{line:227,column:18},end:{line:227,column:30}},'125':{start:{line:228,column:6},end:{line:232,column:7}},'126':{start:{line:229,column:20},end:{line:229,column:33}},'127':{start:{line:230,column:8},end:{line:230,column:68}},'128':{start:{line:231,column:8},end:{line:231,column:29}},'129':{start:{line:233,column:6},end:{line:233,column:35}},'130':{start:{line:236,column:2},end:{line:236,column:48}},'131':{start:{line:241,column:0},end:{line:279,column:2}},'132':{start:{line:242,column:16},end:{line:242,column:18}},'133':{start:{line:243,column:16},end:{line:243,column:18}},'134':{start:{line:247,column:2},end:{line:247,column:67}},'135':{start:{line:249,column:2},end:{line:262,column:3}},'136':{start:{line:250,column:4},end:{line:250,column:25}},'137':{start:{line:251,column:4},end:{line:261,column:5}},'138':{start:{line:252,column:6},end:{line:252,column:50}},'139':{start:{line:253,column:6},end:{line:253,column:27}},'140':{start:{line:254,column:6},end:{line:254,column:27}},'141':{start:{line:255,column:6},end:{line:259,column:7}},'142':{start:{line:256,column:8},end:{line:256,column:30}},'143':{start:{line:257,column:8},end:{line:257,column:68}},'144':{start:{line:258,column:8},end:{line:258,column:29}},'145':{start:{line:260,column:6},end:{line:260,column:42}},'146':{start:{line:263,column:2},end:{line:263,column:69}},'147':{start:{line:264,column:2},end:{line:277,column:3}},'148':{start:{line:265,column:4},end:{line:265,column:25}},'149':{start:{line:266,column:4},end:{line:276,column:5}},'150':{start:{line:267,column:6},end:{line:267,column:50}},'151':{start:{line:268,column:6},end:{line:268,column:27}},'152':{start:{line:269,column:6},end:{line:269,column:27}},'153':{start:{line:270,column:6},end:{line:274,column:7}},'154':{start:{line:271,column:8},end:{line:271,column:30}},'155':{start:{line:272,column:8},end:{line:272,column:68}},'156':{start:{line:273,column:8},end:{line:273,column:29}},'157':{start:{line:275,column:6},end:{line:275,column:42}},'158':{start:{line:278,column:2},end:{line:278,column:28}},'159':{start:{line:281,column:0},end:{line:286,column:2}},'160':{start:{line:282,column:2},end:{line:284,column:3}},'161':{start:{line:283,column:4},end:{line:283,column:60}},'162':{start:{line:285,column:2},end:{line:285,column:39}},'163':{start:{line:288,column:0},end:{line:330,column:2}},'164':{start:{line:289,column:2},end:{line:291,column:3}},'165':{start:{line:290,column:4},end:{line:290,column:60}},'166':{start:{line:292,column:14},end:{line:305,column:3}},'167':{start:{line:306,column:2},end:{line:306,column:40}},'168':{start:{line:307,column:2},end:{line:311,column:3}},'169':{start:{line:308,column:4},end:{line:308,column:30}},'170':{start:{line:309,column:4},end:{line:309,column:38}},'171':{start:{line:310,column:4},end:{line:310,column:11}},'172':{start:{line:312,column:2},end:{line:316,column:3}},'173':{start:{line:313,column:4},end:{line:313,column:30}},'174':{start:{line:314,column:4},end:{line:314,column:37}},'175':{start:{line:315,column:4},end:{line:315,column:11}},'176':{start:{line:317,column:17},end:{line:317,column:56}},'177':{start:{line:318,column:2},end:{line:322,column:3}},'178':{start:{line:319,column:4},end:{line:319,column:30}},'179':{start:{line:320,column:4},end:{line:320,column:37}},'180':{start:{line:321,column:4},end:{line:321,column:11}},'181':{start:{line:323,column:2},end:{line:323,column:28}},'182':{start:{line:324,column:2},end:{line:328,column:3}},'183':{start:{line:325,column:4},end:{line:325,column:30}},'184':{start:{line:326,column:4},end:{line:326,column:43}},'185':{start:{line:327,column:4},end:{line:327,column:11}},'186':{start:{line:329,column:2},end:{line:329,column:40}},'187':{start:{line:332,column:0},end:{line:367,column:2}},'188':{start:{line:333,column:14},end:{line:333,column:43}},'189':{start:{line:334,column:2},end:{line:336,column:3}},'190':{start:{line:335,column:4},end:{line:335,column:38}},'191':{start:{line:337,column:2},end:{line:340,column:3}},'192':{start:{line:339,column:4},end:{line:339,column:11}},'193':{start:{line:341,column:2},end:{line:365,column:3}},'194':{start:{line:342,column:21},end:{line:342,column:57}},'195':{start:{line:343,column:4},end:{line:345,column:5}},'196':{start:{line:344,column:6},end:{line:344,column:84}},'197':{start:{line:346,column:24},end:{line:348,column:6}},'198':{start:{line:347,column:6},end:{line:347,column:35}},'199':{start:{line:349,column:4},end:{line:351,column:5}},'200':{start:{line:350,column:6},end:{line:350,column:90}},'201':{start:{line:352,column:4},end:{line:356,column:5}},'202':{start:{line:353,column:6},end:{line:353,column:50}},'203':{start:{line:355,column:6},end:{line:355,column:59}},'204':{start:{line:357,column:4},end:{line:364,column:7}},'205':{start:{line:366,column:2},end:{line:366,column:64}},'206':{start:{line:369,column:0},end:{line:380,column:2}},'207':{start:{line:370,column:14},end:{line:370,column:43}},'208':{start:{line:371,column:2},end:{line:373,column:3}},'209':{start:{line:372,column:4},end:{line:372,column:38}},'210':{start:{line:374,column:2},end:{line:377,column:3}},'211':{start:{line:376,column:4},end:{line:376,column:11}},'212':{start:{line:378,column:2},end:{line:378,column:27}},'213':{start:{line:379,column:2},end:{line:379,column:40}},'214':{start:{line:392,column:0},end:{line:444,column:2}},'215':{start:{line:393,column:2},end:{line:395,column:3}},'216':{start:{line:394,column:4},end:{line:394,column:56}},'217':{start:{line:396,column:2},end:{line:398,column:3}},'218':{start:{line:397,column:4},end:{line:397,column:42}},'219':{start:{line:399,column:25},end:{line:399,column:41}},'220':{start:{line:400,column:2},end:{line:402,column:3}},'221':{start:{line:401,column:4},end:{line:401,column:42}},'222':{start:{line:403,column:25},end:{line:403,column:67}},'223':{start:{line:404,column:2},end:{line:406,column:3}},'224':{start:{line:405,column:4},end:{line:405,column:69}},'225':{start:{line:407,column:15},end:{line:407,column:33}},'226':{start:{line:408,column:2},end:{line:411,column:3}},'227':{start:{line:409,column:4},end:{line:409,column:45}},'228':{start:{line:412,column:2},end:{line:414,column:3}},'229':{start:{line:413,column:4},end:{line:413,column:69}},'230':{start:{line:415,column:17},end:{line:415,column:42}},'231':{start:{line:416,column:17},end:{line:416,column:40}},'232':{start:{line:417,column:2},end:{line:419,column:3}},'233':{start:{line:418,column:4},end:{line:418,column:78}},'234':{start:{line:420,column:2},end:{line:422,column:3}},'235':{start:{line:421,column:4},end:{line:421,column:78}},'236':{start:{line:423,column:21},end:{line:423,column:45}},'237':{start:{line:424,column:2},end:{line:442,column:3}},'238':{start:{line:425,column:4},end:{line:440,column:5}},'239':{start:{line:426,column:24},end:{line:426,column:48}},'240':{start:{line:427,column:21},end:{line:427,column:42}},'241':{start:{line:428,column:6},end:{line:439,column:7}},'242':{start:{line:429,column:8},end:{line:431,column:9}},'243':{start:{line:430,column:10},end:{line:430,column:62}},'244':{start:{line:432,column:8},end:{line:432,column:71}},'245':{start:{line:435,column:24},end:{line:435,column:89}},'246':{start:{line:436,column:28},end:{line:436,column:56}},'247':{start:{line:437,column:28},end:{line:437,column:69}},'248':{start:{line:438,column:8},end:{line:438,column:107}},'249':{start:{line:441,column:4},end:{line:441,column:45}},'250':{start:{line:443,column:2},end:{line:443,column:54}},'251':{start:{line:448,column:0},end:{line:470,column:2}},'252':{start:{line:449,column:26},end:{line:449,column:43}},'253':{start:{line:450,column:2},end:{line:452,column:3}},'254':{start:{line:451,column:4},end:{line:451,column:29}},'255':{start:{line:455,column:2},end:{line:463,column:3}},'256':{start:{line:456,column:4},end:{line:456,column:22}},'257':{start:{line:457,column:4},end:{line:457,column:46}},'258':{start:{line:458,column:9},end:{line:463,column:3}},'259':{start:{line:459,column:4},end:{line:459,column:23}},'260':{start:{line:460,column:4},end:{line:460,column:47}},'261':{start:{line:462,column:4},end:{line:462,column:29}},'262':{start:{line:464,column:23},end:{line:464,column:73}},'263':{start:{line:465,column:2},end:{line:469,column:3}},'264':{start:{line:466,column:4},end:{line:466,column:29}},'265':{start:{line:468,column:4},end:{line:468,column:29}},'266':{start:{line:472,column:0},end:{line:497,column:2}},'267':{start:{line:473,column:14},end:{line:473,column:16}},'268':{start:{line:474,column:2},end:{line:480,column:3}},'269':{start:{line:475,column:4},end:{line:475,column:22}},'270':{start:{line:476,column:9},end:{line:480,column:3}},'271':{start:{line:477,column:4},end:{line:477,column:23}},'272':{start:{line:479,column:4},end:{line:479,column:21}},'273':{start:{line:481,column:2},end:{line:483,column:3}},'274':{start:{line:482,column:4},end:{line:482,column:21}},'275':{start:{line:484,column:2},end:{line:486,column:3}},'276':{start:{line:485,column:4},end:{line:485,column:21}},'277':{start:{line:487,column:26},end:{line:487,column:38}},'278':{start:{line:489,column:2},end:{line:493,column:3}},'279':{start:{line:490,column:4},end:{line:490,column:12}},'280':{start:{line:492,column:4},end:{line:492,column:32}},'281':{start:{line:495,column:2},end:{line:495,column:69}},'282':{start:{line:496,column:2},end:{line:496,column:15}},'283':{start:{line:499,column:0},end:{line:502,column:2}},'284':{start:{line:500,column:19},end:{line:500,column:42}},'285':{start:{line:501,column:2},end:{line:501,column:37}},'286':{start:{line:504,column:0},end:{line:507,column:2}},'287':{start:{line:505,column:19},end:{line:505,column:42}},'288':{start:{line:506,column:2},end:{line:506,column:70}},'289':{start:{line:509,column:0},end:{line:515,column:2}},'290':{start:{line:510,column:19},end:{line:510,column:42}},'291':{start:{line:511,column:2},end:{line:513,column:3}},'292':{start:{line:512,column:4},end:{line:512,column:47}},'293':{start:{line:514,column:2},end:{line:514,column:33}},'294':{start:{line:517,column:0},end:{line:528,column:2}},'295':{start:{line:518,column:19},end:{line:518,column:42}},'296':{start:{line:520,column:2},end:{line:526,column:3}},'297':{start:{line:521,column:4},end:{line:521,column:31}},'298':{start:{line:522,column:9},end:{line:526,column:3}},'299':{start:{line:523,column:4},end:{line:523,column:30}},'300':{start:{line:525,column:4},end:{line:525,column:34}},'301':{start:{line:527,column:2},end:{line:527,column:74}},'302':{start:{line:530,column:0},end:{line:540,column:2}},'303':{start:{line:531,column:19},end:{line:531,column:42}},'304':{start:{line:532,column:2},end:{line:534,column:3}},'305':{start:{line:533,column:4},end:{line:533,column:47}},'306':{start:{line:535,column:15},end:{line:535,column:25}},'307':{start:{line:536,column:2},end:{line:536,column:39}},'308':{start:{line:537,column:2},end:{line:537,column:68}},'309':{start:{line:538,column:2},end:{line:538,column:30}},'310':{start:{line:539,column:2},end:{line:539,column:16}},'311':{start:{line:542,column:0},end:{line:558,column:2}},'312':{start:{line:543,column:2},end:{line:557,column:3}},'313':{start:{line:544,column:24},end:{line:544,column:63}},'314':{start:{line:545,column:4},end:{line:547,column:5}},'315':{start:{line:546,column:6},end:{line:546,column:19}},'316':{start:{line:548,column:4},end:{line:548,column:82}},'317':{start:{line:549,column:4},end:{line:549,column:16}},'318':{start:{line:551,column:24},end:{line:551,column:63}},'319':{start:{line:552,column:4},end:{line:554,column:5}},'320':{start:{line:553,column:6},end:{line:553,column:19}},'321':{start:{line:555,column:4},end:{line:555,column:82}},'322':{start:{line:556,column:4},end:{line:556,column:16}},'323':{start:{line:560,column:0},end:{line:646,column:2}},'324':{start:{line:561,column:32},end:{line:561,column:50}},'325':{start:{line:562,column:32},end:{line:562,column:50}},'326':{start:{line:564,column:2},end:{line:568,column:3}},'327':{start:{line:565,column:4},end:{line:565,column:42}},'328':{start:{line:567,column:4},end:{line:567,column:37}},'329':{start:{line:569,column:22},end:{line:569,column:53}},'330':{start:{line:570,column:24},end:{line:570,column:97}},'331':{start:{line:571,column:2},end:{line:593,column:3}},'332':{start:{line:572,column:29},end:{line:572,column:78}},'333':{start:{line:573,column:29},end:{line:573,column:78}},'334':{start:{line:575,column:19},end:{line:575,column:110}},'335':{start:{line:576,column:4},end:{line:592,column:5}},'336':{start:{line:577,column:6},end:{line:577,column:62}},'337':{start:{line:578,column:6},end:{line:582,column:7}},'338':{start:{line:579,column:8},end:{line:579,column:64}},'339':{start:{line:581,column:8},end:{line:581,column:64}},'340':{start:{line:583,column:6},end:{line:583,column:52}},'341':{start:{line:584,column:11},end:{line:592,column:5}},'342':{start:{line:585,column:21},end:{line:585,column:88}},'343':{start:{line:586,column:6},end:{line:586,column:78}},'344':{start:{line:587,column:6},end:{line:587,column:64}},'345':{start:{line:589,column:21},end:{line:589,column:88}},'346':{start:{line:590,column:6},end:{line:590,column:78}},'347':{start:{line:591,column:6},end:{line:591,column:64}},'348':{start:{line:594,column:2},end:{line:645,column:3}},'349':{start:{line:595,column:4},end:{line:606,column:5}},'350':{start:{line:596,column:6},end:{line:596,column:60}},'351':{start:{line:597,column:6},end:{line:597,column:13}},'352':{start:{line:598,column:11},end:{line:606,column:5}},'353':{start:{line:599,column:6},end:{line:599,column:70}},'354':{start:{line:600,column:6},end:{line:600,column:13}},'355':{start:{line:601,column:11},end:{line:606,column:5}},'356':{start:{line:602,column:6},end:{line:602,column:65}},'357':{start:{line:603,column:6},end:{line:603,column:13}},'358':{start:{line:605,column:6},end:{line:605,column:40}},'359':{start:{line:607,column:9},end:{line:645,column:3}},'360':{start:{line:608,column:4},end:{line:616,column:5}},'361':{start:{line:609,column:6},end:{line:609,column:69}},'362':{start:{line:610,column:6},end:{line:610,column:13}},'363':{start:{line:611,column:11},end:{line:616,column:5}},'364':{start:{line:612,column:6},end:{line:612,column:30}},'365':{start:{line:613,column:6},end:{line:613,column:13}},'366':{start:{line:615,column:6},end:{line:615,column:40}},'367':{start:{line:617,column:9},end:{line:645,column:3}},'368':{start:{line:618,column:4},end:{line:629,column:5}},'369':{start:{line:619,column:6},end:{line:619,column:60}},'370':{start:{line:620,column:6},end:{line:620,column:13}},'371':{start:{line:621,column:11},end:{line:629,column:5}},'372':{start:{line:622,column:6},end:{line:622,column:70}},'373':{start:{line:623,column:6},end:{line:623,column:13}},'374':{start:{line:624,column:11},end:{line:629,column:5}},'375':{start:{line:625,column:6},end:{line:625,column:30}},'376':{start:{line:626,column:6},end:{line:626,column:13}},'377':{start:{line:628,column:6},end:{line:628,column:40}},'378':{start:{line:630,column:9},end:{line:645,column:3}},'379':{start:{line:631,column:4},end:{line:642,column:5}},'380':{start:{line:632,column:6},end:{line:632,column:60}},'381':{start:{line:633,column:6},end:{line:633,column:13}},'382':{start:{line:634,column:11},end:{line:642,column:5}},'383':{start:{line:635,column:6},end:{line:635,column:32}},'384':{start:{line:636,column:6},end:{line:636,column:13}},'385':{start:{line:637,column:11},end:{line:642,column:5}},'386':{start:{line:638,column:6},end:{line:638,column:30}},'387':{start:{line:639,column:6},end:{line:639,column:13}},'388':{start:{line:641,column:6},end:{line:641,column:40}},'389':{start:{line:644,column:4},end:{line:644,column:52}},'390':{start:{line:648,column:0},end:{line:656,column:2}},'391':{start:{line:649,column:2},end:{line:653,column:3}},'392':{start:{line:650,column:4},end:{line:650,column:82}},'393':{start:{line:652,column:4},end:{line:652,column:82}},'394':{start:{line:654,column:2},end:{line:654,column:24}},'395':{start:{line:655,column:2},end:{line:655,column:32}},'396':{start:{line:658,column:0},end:{line:685,column:2}},'397':{start:{line:659,column:20},end:{line:659,column:30}},'398':{start:{line:660,column:20},end:{line:660,column:68}},'399':{start:{line:661,column:24},end:{line:661,column:30}},'400':{start:{line:662,column:2},end:{line:680,column:3}},'401':{start:{line:663,column:21},end:{line:663,column:35}},'402':{start:{line:664,column:4},end:{line:679,column:5}},'403':{start:{line:665,column:19},end:{line:665,column:79}},'404':{start:{line:666,column:31},end:{line:666,column:40}},'405':{start:{line:667,column:6},end:{line:667,column:30}},'406':{start:{line:668,column:6},end:{line:668,column:34}},'407':{start:{line:669,column:6},end:{line:673,column:7}},'408':{start:{line:672,column:8},end:{line:672,column:51}},'409':{start:{line:674,column:6},end:{line:678,column:7}},'410':{start:{line:675,column:8},end:{line:675,column:33}},'411':{start:{line:676,column:13},end:{line:678,column:7}},'412':{start:{line:677,column:8},end:{line:677,column:14}},'413':{start:{line:681,column:2},end:{line:683,column:3}},'414':{start:{line:682,column:4},end:{line:682,column:38}},'415':{start:{line:684,column:2},end:{line:684,column:25}},'416':{start:{line:708,column:0},end:{line:740,column:2}},'417':{start:{line:709,column:24},end:{line:709,column:30}},'418':{start:{line:710,column:20},end:{line:710,column:30}},'419':{start:{line:711,column:19},end:{line:711,column:54}},'420':{start:{line:712,column:2},end:{line:738,column:3}},'421':{start:{line:713,column:4},end:{line:716,column:5}},'422':{start:{line:714,column:6},end:{line:714,column:37}},'423':{start:{line:715,column:6},end:{line:715,column:12}},'424':{start:{line:717,column:21},end:{line:717,column:34}},'425':{start:{line:718,column:4},end:{line:718,column:45}},'426':{start:{line:719,column:4},end:{line:719,column:21}},'427':{start:{line:724,column:4},end:{line:726,column:5}},'428':{start:{line:725,column:6},end:{line:725,column:36}},'429':{start:{line:727,column:4},end:{line:734,column:5}},'430':{start:{line:728,column:6},end:{line:728,column:30}},'431':{start:{line:729,column:6},end:{line:733,column:7}},'432':{start:{line:730,column:8},end:{line:732,column:9}},'433':{start:{line:731,column:10},end:{line:731,column:45}},'434':{start:{line:735,column:4},end:{line:737,column:5}},'435':{start:{line:736,column:6},end:{line:736,column:12}},'436':{start:{line:739,column:2},end:{line:739,column:67}},'437':{start:{line:752,column:0},end:{line:794,column:2}},'438':{start:{line:753,column:25},end:{line:753,column:71}},'439':{start:{line:754,column:27},end:{line:754,column:77}},'440':{start:{line:756,column:2},end:{line:760,column:3}},'441':{start:{line:757,column:4},end:{line:757,column:33}},'442':{start:{line:759,column:4},end:{line:759,column:35}},'443':{start:{line:761,column:18},end:{line:761,column:69}},'444':{start:{line:762,column:2},end:{line:762,column:63}},'445':{start:{line:763,column:2},end:{line:763,column:63}},'446':{start:{line:764,column:2},end:{line:764,column:67}},'447':{start:{line:765,column:2},end:{line:765,column:67}},'448':{start:{line:766,column:2},end:{line:772,column:3}},'449':{start:{line:768,column:5},end:{line:768,column:57}},'450':{start:{line:771,column:5},end:{line:771,column:57}},'451':{start:{line:773,column:32},end:{line:773,column:82}},'452':{start:{line:774,column:2},end:{line:793,column:3}},'453':{start:{line:775,column:4},end:{line:775,column:63}},'454':{start:{line:776,column:4},end:{line:783,column:7}},'455':{start:{line:785,column:4},end:{line:792,column:7}},'456':{start:{line:796,column:0},end:{line:836,column:2}},'457':{start:{line:797,column:24},end:{line:797,column:52}},'458':{start:{line:798,column:22},end:{line:798,column:48}},'459':{start:{line:799,column:15},end:{line:799,column:17}},'460':{start:{line:800,column:2},end:{line:802,column:3}},'461':{start:{line:801,column:4},end:{line:801,column:54}},'462':{start:{line:804,column:2},end:{line:834,column:3}},'463':{start:{line:805,column:4},end:{line:817,column:5}},'464':{start:{line:806,column:6},end:{line:806,column:19}},'465':{start:{line:807,column:6},end:{line:807,column:17}},'466':{start:{line:808,column:6},end:{line:810,column:7}},'467':{start:{line:809,column:8},end:{line:809,column:36}},'468':{start:{line:811,column:6},end:{line:813,column:7}},'469':{start:{line:812,column:8},end:{line:812,column:32}},'470':{start:{line:814,column:6},end:{line:816,column:7}},'471':{start:{line:815,column:8},end:{line:815,column:63}},'472':{start:{line:818,column:9},end:{line:834,column:3}},'473':{start:{line:819,column:4},end:{line:831,column:5}},'474':{start:{line:820,column:6},end:{line:820,column:19}},'475':{start:{line:821,column:6},end:{line:821,column:17}},'476':{start:{line:822,column:6},end:{line:824,column:7}},'477':{start:{line:823,column:8},end:{line:823,column:36}},'478':{start:{line:825,column:6},end:{line:827,column:7}},'479':{start:{line:826,column:8},end:{line:826,column:32}},'480':{start:{line:828,column:6},end:{line:830,column:7}},'481':{start:{line:829,column:8},end:{line:829,column:63}},'482':{start:{line:833,column:4},end:{line:833,column:63}},'483':{start:{line:835,column:2},end:{line:835,column:16}},'484':{start:{line:838,column:0},end:{line:852,column:2}},'485':{start:{line:839,column:2},end:{line:841,column:3}},'486':{start:{line:840,column:4},end:{line:840,column:46}},'487':{start:{line:842,column:2},end:{line:842,column:51}},'488':{start:{line:843,column:2},end:{line:843,column:24}},'489':{start:{line:844,column:2},end:{line:851,column:5}}},fnMap:{'0':{name:'ReferenceExchange',decl:{start:{line:18,column:9},end:{line:18,column:26}},loc:{start:{line:18,column:29},end:{line:46,column:1}},line:18},'1':{name:'(anonymous_1)',decl:{start:{line:49,column:44},end:{line:49,column:45}},loc:{start:{line:49,column:55},end:{line:53,column:1}},line:49},'2':{name:'(anonymous_2)',decl:{start:{line:55,column:42},end:{line:55,column:43}},loc:{start:{line:55,column:58},end:{line:57,column:1}},line:55},'3':{name:'(anonymous_3)',decl:{start:{line:59,column:41},end:{line:59,column:42}},loc:{start:{line:59,column:66},end:{line:65,column:1}},line:59},'4':{name:'(anonymous_4)',decl:{start:{line:67,column:48},end:{line:67,column:49}},loc:{start:{line:67,column:65},end:{line:77,column:1}},line:67},'5':{name:'(anonymous_5)',decl:{start:{line:80,column:48},end:{line:80,column:49}},loc:{start:{line:80,column:65},end:{line:82,column:1}},line:80},'6':{name:'(anonymous_6)',decl:{start:{line:85,column:52},end:{line:85,column:53}},loc:{start:{line:85,column:81},end:{line:87,column:1}},line:85},'7':{name:'(anonymous_7)',decl:{start:{line:90,column:52},end:{line:90,column:53}},loc:{start:{line:90,column:82},end:{line:92,column:1}},line:90},'8':{name:'(anonymous_8)',decl:{start:{line:94,column:52},end:{line:94,column:53}},loc:{start:{line:94,column:136},end:{line:101,column:1}},line:94},'9':{name:'(anonymous_9)',decl:{start:{line:104,column:47},end:{line:104,column:48}},loc:{start:{line:104,column:84},end:{line:115,column:1}},line:104},'10':{name:'(anonymous_10)',decl:{start:{line:117,column:47},end:{line:117,column:48}},loc:{start:{line:117,column:65},end:{line:126,column:1}},line:117},'11':{name:'(anonymous_11)',decl:{start:{line:128,column:43},end:{line:128,column:44}},loc:{start:{line:128,column:73},end:{line:136,column:1}},line:128},'12':{name:'(anonymous_12)',decl:{start:{line:139,column:42},end:{line:139,column:43}},loc:{start:{line:139,column:72},end:{line:147,column:1}},line:139},'13':{name:'(anonymous_13)',decl:{start:{line:149,column:43},end:{line:149,column:44}},loc:{start:{line:149,column:73},end:{line:157,column:1}},line:149},'14':{name:'(anonymous_14)',decl:{start:{line:160,column:47},end:{line:160,column:48}},loc:{start:{line:160,column:84},end:{line:171,column:1}},line:160},'15':{name:'(anonymous_15)',decl:{start:{line:173,column:47},end:{line:173,column:48}},loc:{start:{line:173,column:65},end:{line:182,column:1}},line:173},'16':{name:'(anonymous_16)',decl:{start:{line:184,column:43},end:{line:184,column:44}},loc:{start:{line:184,column:73},end:{line:192,column:1}},line:184},'17':{name:'(anonymous_17)',decl:{start:{line:194,column:43},end:{line:194,column:44}},loc:{start:{line:194,column:81},end:{line:202,column:1}},line:194},'18':{name:'(anonymous_18)',decl:{start:{line:204,column:47},end:{line:204,column:48}},loc:{start:{line:204,column:77},end:{line:206,column:1}},line:204},'19':{name:'(anonymous_19)',decl:{start:{line:208,column:47},end:{line:208,column:48}},loc:{start:{line:208,column:77},end:{line:210,column:1}},line:208},'20':{name:'(anonymous_20)',decl:{start:{line:212,column:47},end:{line:212,column:48}},loc:{start:{line:212,column:77},end:{line:214,column:1}},line:212},'21':{name:'(anonymous_21)',decl:{start:{line:216,column:39},end:{line:216,column:40}},loc:{start:{line:216,column:59},end:{line:237,column:1}},line:216},'22':{name:'(anonymous_22)',decl:{start:{line:241,column:38},end:{line:241,column:39}},loc:{start:{line:241,column:50},end:{line:279,column:1}},line:241},'23':{name:'(anonymous_23)',decl:{start:{line:281,column:39},end:{line:281,column:40}},loc:{start:{line:281,column:58},end:{line:286,column:1}},line:281},'24':{name:'(anonymous_24)',decl:{start:{line:288,column:42},end:{line:288,column:43}},loc:{start:{line:288,column:105},end:{line:330,column:1}},line:288},'25':{name:'(anonymous_25)',decl:{start:{line:332,column:42},end:{line:332,column:43}},loc:{start:{line:332,column:69},end:{line:367,column:1}},line:332},'26':{name:'(anonymous_26)',decl:{start:{line:346,column:42},end:{line:346,column:43}},loc:{start:{line:346,column:54},end:{line:348,column:5}},line:346},'27':{name:'(anonymous_27)',decl:{start:{line:369,column:44},end:{line:369,column:45}},loc:{start:{line:369,column:83},end:{line:380,column:1}},line:369},'28':{name:'(anonymous_28)',decl:{start:{line:392,column:54},end:{line:392,column:55}},loc:{start:{line:392,column:86},end:{line:444,column:1}},line:392},'29':{name:'(anonymous_29)',decl:{start:{line:448,column:42},end:{line:448,column:43}},loc:{start:{line:448,column:59},end:{line:470,column:1}},line:448},'30':{name:'(anonymous_30)',decl:{start:{line:472,column:41},end:{line:472,column:42}},loc:{start:{line:472,column:81},end:{line:497,column:1}},line:472},'31':{name:'(anonymous_31)',decl:{start:{line:499,column:44},end:{line:499,column:45}},loc:{start:{line:499,column:61},end:{line:502,column:1}},line:499},'32':{name:'(anonymous_32)',decl:{start:{line:504,column:46},end:{line:504,column:47}},loc:{start:{line:504,column:63},end:{line:507,column:1}},line:504},'33':{name:'(anonymous_33)',decl:{start:{line:509,column:42},end:{line:509,column:43}},loc:{start:{line:509,column:58},end:{line:515,column:1}},line:509},'34':{name:'(anonymous_34)',decl:{start:{line:517,column:44},end:{line:517,column:45}},loc:{start:{line:517,column:61},end:{line:528,column:1}},line:517},'35':{name:'(anonymous_35)',decl:{start:{line:530,column:48},end:{line:530,column:49}},loc:{start:{line:530,column:77},end:{line:540,column:1}},line:530},'36':{name:'(anonymous_36)',decl:{start:{line:542,column:50},end:{line:542,column:51}},loc:{start:{line:542,column:67},end:{line:558,column:1}},line:542},'37':{name:'(anonymous_37)',decl:{start:{line:560,column:44},end:{line:560,column:45}},loc:{start:{line:560,column:73},end:{line:646,column:1}},line:560},'38':{name:'(anonymous_38)',decl:{start:{line:648,column:56},end:{line:648,column:57}},loc:{start:{line:648,column:92},end:{line:656,column:1}},line:648},'39':{name:'(anonymous_39)',decl:{start:{line:658,column:48},end:{line:658,column:49}},loc:{start:{line:658,column:109},end:{line:685,column:1}},line:658},'40':{name:'(anonymous_40)',decl:{start:{line:708,column:54},end:{line:708,column:55}},loc:{start:{line:708,column:95},end:{line:740,column:1}},line:708},'41':{name:'(anonymous_41)',decl:{start:{line:752,column:47},end:{line:752,column:48}},loc:{start:{line:752,column:79},end:{line:794,column:1}},line:752},'42':{name:'(anonymous_42)',decl:{start:{line:796,column:42},end:{line:796,column:43}},loc:{start:{line:796,column:74},end:{line:836,column:1}},line:796},'43':{name:'(anonymous_43)',decl:{start:{line:838,column:42},end:{line:838,column:43}},loc:{start:{line:838,column:59},end:{line:852,column:1}},line:838}},branchMap:{'0':{loc:{start:{line:19,column:2},end:{line:21,column:3}},type:'if',locations:[{start:{line:19,column:2},end:{line:21,column:3}},{start:{line:19,column:2},end:{line:21,column:3}}],line:19},'1':{loc:{start:{line:60,column:2},end:{line:64,column:3}},type:'if',locations:[{start:{line:60,column:2},end:{line:64,column:3}},{start:{line:60,column:2},end:{line:64,column:3}}],line:60},'2':{loc:{start:{line:106,column:2},end:{line:109,column:3}},type:'if',locations:[{start:{line:106,column:2},end:{line:109,column:3}},{start:{line:106,column:2},end:{line:109,column:3}}],line:106},'3':{loc:{start:{line:110,column:2},end:{line:112,column:3}},type:'if',locations:[{start:{line:110,column:2},end:{line:112,column:3}},{start:{line:110,column:2},end:{line:112,column:3}}],line:110},'4':{loc:{start:{line:110,column:6},end:{line:110,column:69}},type:'binary-expr',locations:[{start:{line:110,column:6},end:{line:110,column:38}},{start:{line:110,column:42},end:{line:110,column:69}}],line:110},'5':{loc:{start:{line:119,column:2},end:{line:121,column:3}},type:'if',locations:[{start:{line:119,column:2},end:{line:121,column:3}},{start:{line:119,column:2},end:{line:121,column:3}}],line:119},'6':{loc:{start:{line:119,column:6},end:{line:119,column:49}},type:'binary-expr',locations:[{start:{line:119,column:6},end:{line:119,column:17}},{start:{line:119,column:21},end:{line:119,column:49}}],line:119},'7':{loc:{start:{line:130,column:2},end:{line:132,column:3}},type:'if',locations:[{start:{line:130,column:2},end:{line:132,column:3}},{start:{line:130,column:2},end:{line:132,column:3}}],line:130},'8':{loc:{start:{line:130,column:6},end:{line:130,column:48}},type:'binary-expr',locations:[{start:{line:130,column:6},end:{line:130,column:18}},{start:{line:130,column:22},end:{line:130,column:48}}],line:130},'9':{loc:{start:{line:141,column:2},end:{line:143,column:3}},type:'if',locations:[{start:{line:141,column:2},end:{line:143,column:3}},{start:{line:141,column:2},end:{line:143,column:3}}],line:141},'10':{loc:{start:{line:141,column:6},end:{line:141,column:54}},type:'binary-expr',locations:[{start:{line:141,column:6},end:{line:141,column:21}},{start:{line:141,column:25},end:{line:141,column:54}}],line:141},'11':{loc:{start:{line:151,column:2},end:{line:153,column:3}},type:'if',locations:[{start:{line:151,column:2},end:{line:153,column:3}},{start:{line:151,column:2},end:{line:153,column:3}}],line:151},'12':{loc:{start:{line:151,column:6},end:{line:151,column:48}},type:'binary-expr',locations:[{start:{line:151,column:6},end:{line:151,column:18}},{start:{line:151,column:22},end:{line:151,column:48}}],line:151},'13':{loc:{start:{line:162,column:2},end:{line:165,column:3}},type:'if',locations:[{start:{line:162,column:2},end:{line:165,column:3}},{start:{line:162,column:2},end:{line:165,column:3}}],line:162},'14':{loc:{start:{line:166,column:2},end:{line:168,column:3}},type:'if',locations:[{start:{line:166,column:2},end:{line:168,column:3}},{start:{line:166,column:2},end:{line:168,column:3}}],line:166},'15':{loc:{start:{line:166,column:6},end:{line:166,column:69}},type:'binary-expr',locations:[{start:{line:166,column:6},end:{line:166,column:38}},{start:{line:166,column:42},end:{line:166,column:69}}],line:166},'16':{loc:{start:{line:175,column:2},end:{line:177,column:3}},type:'if',locations:[{start:{line:175,column:2},end:{line:177,column:3}},{start:{line:175,column:2},end:{line:177,column:3}}],line:175},'17':{loc:{start:{line:175,column:6},end:{line:175,column:49}},type:'binary-expr',locations:[{start:{line:175,column:6},end:{line:175,column:17}},{start:{line:175,column:21},end:{line:175,column:49}}],line:175},'18':{loc:{start:{line:186,column:2},end:{line:188,column:3}},type:'if',locations:[{start:{line:186,column:2},end:{line:188,column:3}},{start:{line:186,column:2},end:{line:188,column:3}}],line:186},'19':{loc:{start:{line:186,column:6},end:{line:186,column:48}},type:'binary-expr',locations:[{start:{line:186,column:6},end:{line:186,column:18}},{start:{line:186,column:22},end:{line:186,column:48}}],line:186},'20':{loc:{start:{line:195,column:2},end:{line:197,column:3}},type:'if',locations:[{start:{line:195,column:2},end:{line:197,column:3}},{start:{line:195,column:2},end:{line:197,column:3}}],line:195},'21':{loc:{start:{line:199,column:2},end:{line:201,column:3}},type:'if',locations:[{start:{line:199,column:2},end:{line:201,column:3}},{start:{line:199,column:2},end:{line:201,column:3}}],line:199},'22':{loc:{start:{line:219,column:17},end:{line:219,column:73}},type:'cond-expr',locations:[{start:{line:219,column:47},end:{line:219,column:58}},{start:{line:219,column:61},end:{line:219,column:73}}],line:219},'23':{loc:{start:{line:224,column:4},end:{line:234,column:5}},type:'if',locations:[{start:{line:224,column:4},end:{line:234,column:5}},{start:{line:224,column:4},end:{line:234,column:5}}],line:224},'24':{loc:{start:{line:251,column:4},end:{line:261,column:5}},type:'if',locations:[{start:{line:251,column:4},end:{line:261,column:5}},{start:{line:251,column:4},end:{line:261,column:5}}],line:251},'25':{loc:{start:{line:266,column:4},end:{line:276,column:5}},type:'if',locations:[{start:{line:266,column:4},end:{line:276,column:5}},{start:{line:266,column:4},end:{line:276,column:5}}],line:266},'26':{loc:{start:{line:282,column:2},end:{line:284,column:3}},type:'if',locations:[{start:{line:282,column:2},end:{line:284,column:3}},{start:{line:282,column:2},end:{line:284,column:3}}],line:282},'27':{loc:{start:{line:289,column:2},end:{line:291,column:3}},type:'if',locations:[{start:{line:289,column:2},end:{line:291,column:3}},{start:{line:289,column:2},end:{line:291,column:3}}],line:289},'28':{loc:{start:{line:307,column:2},end:{line:311,column:3}},type:'if',locations:[{start:{line:307,column:2},end:{line:311,column:3}},{start:{line:307,column:2},end:{line:311,column:3}}],line:307},'29':{loc:{start:{line:312,column:2},end:{line:316,column:3}},type:'if',locations:[{start:{line:312,column:2},end:{line:316,column:3}},{start:{line:312,column:2},end:{line:316,column:3}}],line:312},'30':{loc:{start:{line:312,column:6},end:{line:312,column:76}},type:'binary-expr',locations:[{start:{line:312,column:6},end:{line:312,column:42}},{start:{line:312,column:46},end:{line:312,column:76}}],line:312},'31':{loc:{start:{line:318,column:2},end:{line:322,column:3}},type:'if',locations:[{start:{line:318,column:2},end:{line:322,column:3}},{start:{line:318,column:2},end:{line:322,column:3}}],line:318},'32':{loc:{start:{line:318,column:6},end:{line:318,column:76}},type:'binary-expr',locations:[{start:{line:318,column:6},end:{line:318,column:42}},{start:{line:318,column:46},end:{line:318,column:76}}],line:318},'33':{loc:{start:{line:324,column:2},end:{line:328,column:3}},type:'if',locations:[{start:{line:324,column:2},end:{line:328,column:3}},{start:{line:324,column:2},end:{line:328,column:3}}],line:324},'34':{loc:{start:{line:334,column:2},end:{line:336,column:3}},type:'if',locations:[{start:{line:334,column:2},end:{line:336,column:3}},{start:{line:334,column:2},end:{line:336,column:3}}],line:334},'35':{loc:{start:{line:337,column:2},end:{line:340,column:3}},type:'if',locations:[{start:{line:337,column:2},end:{line:340,column:3}},{start:{line:337,column:2},end:{line:340,column:3}}],line:337},'36':{loc:{start:{line:337,column:6},end:{line:337,column:60}},type:'binary-expr',locations:[{start:{line:337,column:6},end:{line:337,column:29}},{start:{line:337,column:33},end:{line:337,column:60}}],line:337},'37':{loc:{start:{line:341,column:2},end:{line:365,column:3}},type:'if',locations:[{start:{line:341,column:2},end:{line:365,column:3}},{start:{line:341,column:2},end:{line:365,column:3}}],line:341},'38':{loc:{start:{line:343,column:4},end:{line:345,column:5}},type:'if',locations:[{start:{line:343,column:4},end:{line:345,column:5}},{start:{line:343,column:4},end:{line:345,column:5}}],line:343},'39':{loc:{start:{line:349,column:4},end:{line:351,column:5}},type:'if',locations:[{start:{line:349,column:4},end:{line:351,column:5}},{start:{line:349,column:4},end:{line:351,column:5}}],line:349},'40':{loc:{start:{line:352,column:4},end:{line:356,column:5}},type:'if',locations:[{start:{line:352,column:4},end:{line:356,column:5}},{start:{line:352,column:4},end:{line:356,column:5}}],line:352},'41':{loc:{start:{line:371,column:2},end:{line:373,column:3}},type:'if',locations:[{start:{line:371,column:2},end:{line:373,column:3}},{start:{line:371,column:2},end:{line:373,column:3}}],line:371},'42':{loc:{start:{line:374,column:2},end:{line:377,column:3}},type:'if',locations:[{start:{line:374,column:2},end:{line:377,column:3}},{start:{line:374,column:2},end:{line:377,column:3}}],line:374},'43':{loc:{start:{line:393,column:2},end:{line:395,column:3}},type:'if',locations:[{start:{line:393,column:2},end:{line:395,column:3}},{start:{line:393,column:2},end:{line:395,column:3}}],line:393},'44':{loc:{start:{line:393,column:6},end:{line:393,column:49}},type:'binary-expr',locations:[{start:{line:393,column:6},end:{line:393,column:25}},{start:{line:393,column:29},end:{line:393,column:49}}],line:393},'45':{loc:{start:{line:396,column:2},end:{line:398,column:3}},type:'if',locations:[{start:{line:396,column:2},end:{line:398,column:3}},{start:{line:396,column:2},end:{line:398,column:3}}],line:396},'46':{loc:{start:{line:400,column:2},end:{line:402,column:3}},type:'if',locations:[{start:{line:400,column:2},end:{line:402,column:3}},{start:{line:400,column:2},end:{line:402,column:3}}],line:400},'47':{loc:{start:{line:404,column:2},end:{line:406,column:3}},type:'if',locations:[{start:{line:404,column:2},end:{line:406,column:3}},{start:{line:404,column:2},end:{line:406,column:3}}],line:404},'48':{loc:{start:{line:412,column:2},end:{line:414,column:3}},type:'if',locations:[{start:{line:412,column:2},end:{line:414,column:3}},{start:{line:412,column:2},end:{line:414,column:3}}],line:412},'49':{loc:{start:{line:412,column:6},end:{line:412,column:42}},type:'binary-expr',locations:[{start:{line:412,column:6},end:{line:412,column:20}},{start:{line:412,column:24},end:{line:412,column:42}}],line:412},'50':{loc:{start:{line:417,column:2},end:{line:419,column:3}},type:'if',locations:[{start:{line:417,column:2},end:{line:419,column:3}},{start:{line:417,column:2},end:{line:419,column:3}}],line:417},'51':{loc:{start:{line:420,column:2},end:{line:422,column:3}},type:'if',locations:[{start:{line:420,column:2},end:{line:422,column:3}},{start:{line:420,column:2},end:{line:422,column:3}}],line:420},'52':{loc:{start:{line:425,column:4},end:{line:440,column:5}},type:'if',locations:[{start:{line:425,column:4},end:{line:440,column:5}},{start:{line:425,column:4},end:{line:440,column:5}}],line:425},'53':{loc:{start:{line:428,column:6},end:{line:439,column:7}},type:'if',locations:[{start:{line:428,column:6},end:{line:439,column:7}},{start:{line:428,column:6},end:{line:439,column:7}}],line:428},'54':{loc:{start:{line:429,column:8},end:{line:431,column:9}},type:'if',locations:[{start:{line:429,column:8},end:{line:431,column:9}},{start:{line:429,column:8},end:{line:431,column:9}}],line:429},'55':{loc:{start:{line:429,column:12},end:{line:429,column:48}},type:'binary-expr',locations:[{start:{line:429,column:12},end:{line:429,column:28}},{start:{line:429,column:32},end:{line:429,column:48}}],line:429},'56':{loc:{start:{line:435,column:24},end:{line:435,column:89}},type:'cond-expr',locations:[{start:{line:435,column:48},end:{line:435,column:68}},{start:{line:435,column:71},end:{line:435,column:89}}],line:435},'57':{loc:{start:{line:450,column:2},end:{line:452,column:3}},type:'if',locations:[{start:{line:450,column:2},end:{line:452,column:3}},{start:{line:450,column:2},end:{line:452,column:3}}],line:450},'58':{loc:{start:{line:455,column:2},end:{line:463,column:3}},type:'if',locations:[{start:{line:455,column:2},end:{line:463,column:3}},{start:{line:455,column:2},end:{line:463,column:3}}],line:455},'59':{loc:{start:{line:458,column:9},end:{line:463,column:3}},type:'if',locations:[{start:{line:458,column:9},end:{line:463,column:3}},{start:{line:458,column:9},end:{line:463,column:3}}],line:458},'60':{loc:{start:{line:465,column:2},end:{line:469,column:3}},type:'if',locations:[{start:{line:465,column:2},end:{line:469,column:3}},{start:{line:465,column:2},end:{line:469,column:3}}],line:465},'61':{loc:{start:{line:474,column:2},end:{line:480,column:3}},type:'if',locations:[{start:{line:474,column:2},end:{line:480,column:3}},{start:{line:474,column:2},end:{line:480,column:3}}],line:474},'62':{loc:{start:{line:476,column:9},end:{line:480,column:3}},type:'if',locations:[{start:{line:476,column:9},end:{line:480,column:3}},{start:{line:476,column:9},end:{line:480,column:3}}],line:476},'63':{loc:{start:{line:481,column:2},end:{line:483,column:3}},type:'if',locations:[{start:{line:481,column:2},end:{line:483,column:3}},{start:{line:481,column:2},end:{line:483,column:3}}],line:481},'64':{loc:{start:{line:481,column:6},end:{line:481,column:69}},type:'binary-expr',locations:[{start:{line:481,column:6},end:{line:481,column:33}},{start:{line:481,column:37},end:{line:481,column:51}},{start:{line:481,column:55},end:{line:481,column:69}}],line:481},'65':{loc:{start:{line:484,column:2},end:{line:486,column:3}},type:'if',locations:[{start:{line:484,column:2},end:{line:486,column:3}},{start:{line:484,column:2},end:{line:486,column:3}}],line:484},'66':{loc:{start:{line:484,column:6},end:{line:484,column:66}},type:'binary-expr',locations:[{start:{line:484,column:6},end:{line:484,column:33}},{start:{line:484,column:37},end:{line:484,column:50}},{start:{line:484,column:54},end:{line:484,column:66}}],line:484},'67':{loc:{start:{line:489,column:2},end:{line:493,column:3}},type:'if',locations:[{start:{line:489,column:2},end:{line:493,column:3}},{start:{line:489,column:2},end:{line:493,column:3}}],line:489},'68':{loc:{start:{line:511,column:2},end:{line:513,column:3}},type:'if',locations:[{start:{line:511,column:2},end:{line:513,column:3}},{start:{line:511,column:2},end:{line:513,column:3}}],line:511},'69':{loc:{start:{line:520,column:2},end:{line:526,column:3}},type:'if',locations:[{start:{line:520,column:2},end:{line:526,column:3}},{start:{line:520,column:2},end:{line:526,column:3}}],line:520},'70':{loc:{start:{line:522,column:9},end:{line:526,column:3}},type:'if',locations:[{start:{line:522,column:9},end:{line:526,column:3}},{start:{line:522,column:9},end:{line:526,column:3}}],line:522},'71':{loc:{start:{line:532,column:2},end:{line:534,column:3}},type:'if',locations:[{start:{line:532,column:2},end:{line:534,column:3}},{start:{line:532,column:2},end:{line:534,column:3}}],line:532},'72':{loc:{start:{line:543,column:2},end:{line:557,column:3}},type:'if',locations:[{start:{line:543,column:2},end:{line:557,column:3}},{start:{line:543,column:2},end:{line:557,column:3}}],line:543},'73':{loc:{start:{line:545,column:4},end:{line:547,column:5}},type:'if',locations:[{start:{line:545,column:4},end:{line:547,column:5}},{start:{line:545,column:4},end:{line:547,column:5}}],line:545},'74':{loc:{start:{line:552,column:4},end:{line:554,column:5}},type:'if',locations:[{start:{line:552,column:4},end:{line:554,column:5}},{start:{line:552,column:4},end:{line:554,column:5}}],line:552},'75':{loc:{start:{line:564,column:2},end:{line:568,column:3}},type:'if',locations:[{start:{line:564,column:2},end:{line:568,column:3}},{start:{line:564,column:2},end:{line:568,column:3}}],line:564},'76':{loc:{start:{line:571,column:2},end:{line:593,column:3}},type:'if',locations:[{start:{line:571,column:2},end:{line:593,column:3}},{start:{line:571,column:2},end:{line:593,column:3}}],line:571},'77':{loc:{start:{line:576,column:4},end:{line:592,column:5}},type:'if',locations:[{start:{line:576,column:4},end:{line:592,column:5}},{start:{line:576,column:4},end:{line:592,column:5}}],line:576},'78':{loc:{start:{line:578,column:6},end:{line:582,column:7}},type:'if',locations:[{start:{line:578,column:6},end:{line:582,column:7}},{start:{line:578,column:6},end:{line:582,column:7}}],line:578},'79':{loc:{start:{line:584,column:11},end:{line:592,column:5}},type:'if',locations:[{start:{line:584,column:11},end:{line:592,column:5}},{start:{line:584,column:11},end:{line:592,column:5}}],line:584},'80':{loc:{start:{line:594,column:2},end:{line:645,column:3}},type:'if',locations:[{start:{line:594,column:2},end:{line:645,column:3}},{start:{line:594,column:2},end:{line:645,column:3}}],line:594},'81':{loc:{start:{line:595,column:4},end:{line:606,column:5}},type:'if',locations:[{start:{line:595,column:4},end:{line:606,column:5}},{start:{line:595,column:4},end:{line:606,column:5}}],line:595},'82':{loc:{start:{line:598,column:11},end:{line:606,column:5}},type:'if',locations:[{start:{line:598,column:11},end:{line:606,column:5}},{start:{line:598,column:11},end:{line:606,column:5}}],line:598},'83':{loc:{start:{line:601,column:11},end:{line:606,column:5}},type:'if',locations:[{start:{line:601,column:11},end:{line:606,column:5}},{start:{line:601,column:11},end:{line:606,column:5}}],line:601},'84':{loc:{start:{line:607,column:9},end:{line:645,column:3}},type:'if',locations:[{start:{line:607,column:9},end:{line:645,column:3}},{start:{line:607,column:9},end:{line:645,column:3}}],line:607},'85':{loc:{start:{line:608,column:4},end:{line:616,column:5}},type:'if',locations:[{start:{line:608,column:4},end:{line:616,column:5}},{start:{line:608,column:4},end:{line:616,column:5}}],line:608},'86':{loc:{start:{line:611,column:11},end:{line:616,column:5}},type:'if',locations:[{start:{line:611,column:11},end:{line:616,column:5}},{start:{line:611,column:11},end:{line:616,column:5}}],line:611},'87':{loc:{start:{line:617,column:9},end:{line:645,column:3}},type:'if',locations:[{start:{line:617,column:9},end:{line:645,column:3}},{start:{line:617,column:9},end:{line:645,column:3}}],line:617},'88':{loc:{start:{line:618,column:4},end:{line:629,column:5}},type:'if',locations:[{start:{line:618,column:4},end:{line:629,column:5}},{start:{line:618,column:4},end:{line:629,column:5}}],line:618},'89':{loc:{start:{line:621,column:11},end:{line:629,column:5}},type:'if',locations:[{start:{line:621,column:11},end:{line:629,column:5}},{start:{line:621,column:11},end:{line:629,column:5}}],line:621},'90':{loc:{start:{line:624,column:11},end:{line:629,column:5}},type:'if',locations:[{start:{line:624,column:11},end:{line:629,column:5}},{start:{line:624,column:11},end:{line:629,column:5}}],line:624},'91':{loc:{start:{line:630,column:9},end:{line:645,column:3}},type:'if',locations:[{start:{line:630,column:9},end:{line:645,column:3}},{start:{line:630,column:9},end:{line:645,column:3}}],line:630},'92':{loc:{start:{line:631,column:4},end:{line:642,column:5}},type:'if',locations:[{start:{line:631,column:4},end:{line:642,column:5}},{start:{line:631,column:4},end:{line:642,column:5}}],line:631},'93':{loc:{start:{line:634,column:11},end:{line:642,column:5}},type:'if',locations:[{start:{line:634,column:11},end:{line:642,column:5}},{start:{line:634,column:11},end:{line:642,column:5}}],line:634},'94':{loc:{start:{line:637,column:11},end:{line:642,column:5}},type:'if',locations:[{start:{line:637,column:11},end:{line:642,column:5}},{start:{line:637,column:11},end:{line:642,column:5}}],line:637},'95':{loc:{start:{line:649,column:2},end:{line:653,column:3}},type:'if',locations:[{start:{line:649,column:2},end:{line:653,column:3}},{start:{line:649,column:2},end:{line:653,column:3}}],line:649},'96':{loc:{start:{line:664,column:4},end:{line:679,column:5}},type:'if',locations:[{start:{line:664,column:4},end:{line:679,column:5}},{start:{line:664,column:4},end:{line:679,column:5}}],line:664},'97':{loc:{start:{line:669,column:6},end:{line:673,column:7}},type:'if',locations:[{start:{line:669,column:6},end:{line:673,column:7}},{start:{line:669,column:6},end:{line:673,column:7}}],line:669},'98':{loc:{start:{line:674,column:6},end:{line:678,column:7}},type:'if',locations:[{start:{line:674,column:6},end:{line:678,column:7}},{start:{line:674,column:6},end:{line:678,column:7}}],line:674},'99':{loc:{start:{line:676,column:13},end:{line:678,column:7}},type:'if',locations:[{start:{line:676,column:13},end:{line:678,column:7}},{start:{line:676,column:13},end:{line:678,column:7}}],line:676},'100':{loc:{start:{line:681,column:2},end:{line:683,column:3}},type:'if',locations:[{start:{line:681,column:2},end:{line:683,column:3}},{start:{line:681,column:2},end:{line:683,column:3}}],line:681},'101':{loc:{start:{line:713,column:4},end:{line:716,column:5}},type:'if',locations:[{start:{line:713,column:4},end:{line:716,column:5}},{start:{line:713,column:4},end:{line:716,column:5}}],line:713},'102':{loc:{start:{line:724,column:4},end:{line:726,column:5}},type:'if',locations:[{start:{line:724,column:4},end:{line:726,column:5}},{start:{line:724,column:4},end:{line:726,column:5}}],line:724},'103':{loc:{start:{line:727,column:4},end:{line:734,column:5}},type:'if',locations:[{start:{line:727,column:4},end:{line:734,column:5}},{start:{line:727,column:4},end:{line:734,column:5}}],line:727},'104':{loc:{start:{line:729,column:6},end:{line:733,column:7}},type:'if',locations:[{start:{line:729,column:6},end:{line:733,column:7}},{start:{line:729,column:6},end:{line:733,column:7}}],line:729},'105':{loc:{start:{line:730,column:8},end:{line:732,column:9}},type:'if',locations:[{start:{line:730,column:8},end:{line:732,column:9}},{start:{line:730,column:8},end:{line:732,column:9}}],line:730},'106':{loc:{start:{line:735,column:4},end:{line:737,column:5}},type:'if',locations:[{start:{line:735,column:4},end:{line:737,column:5}},{start:{line:735,column:4},end:{line:737,column:5}}],line:735},'107':{loc:{start:{line:756,column:2},end:{line:760,column:3}},type:'if',locations:[{start:{line:756,column:2},end:{line:760,column:3}},{start:{line:756,column:2},end:{line:760,column:3}}],line:756},'108':{loc:{start:{line:766,column:2},end:{line:772,column:3}},type:'if',locations:[{start:{line:766,column:2},end:{line:772,column:3}},{start:{line:766,column:2},end:{line:772,column:3}}],line:766},'109':{loc:{start:{line:774,column:2},end:{line:793,column:3}},type:'if',locations:[{start:{line:774,column:2},end:{line:793,column:3}},{start:{line:774,column:2},end:{line:793,column:3}}],line:774},'110':{loc:{start:{line:800,column:2},end:{line:802,column:3}},type:'if',locations:[{start:{line:800,column:2},end:{line:802,column:3}},{start:{line:800,column:2},end:{line:802,column:3}}],line:800},'111':{loc:{start:{line:804,column:2},end:{line:834,column:3}},type:'if',locations:[{start:{line:804,column:2},end:{line:834,column:3}},{start:{line:804,column:2},end:{line:834,column:3}}],line:804},'112':{loc:{start:{line:808,column:6},end:{line:810,column:7}},type:'if',locations:[{start:{line:808,column:6},end:{line:810,column:7}},{start:{line:808,column:6},end:{line:810,column:7}}],line:808},'113':{loc:{start:{line:811,column:6},end:{line:813,column:7}},type:'if',locations:[{start:{line:811,column:6},end:{line:813,column:7}},{start:{line:811,column:6},end:{line:813,column:7}}],line:811},'114':{loc:{start:{line:818,column:9},end:{line:834,column:3}},type:'if',locations:[{start:{line:818,column:9},end:{line:834,column:3}},{start:{line:818,column:9},end:{line:834,column:3}}],line:818},'115':{loc:{start:{line:822,column:6},end:{line:824,column:7}},type:'if',locations:[{start:{line:822,column:6},end:{line:824,column:7}},{start:{line:822,column:6},end:{line:824,column:7}}],line:822},'116':{loc:{start:{line:825,column:6},end:{line:827,column:7}},type:'if',locations:[{start:{line:825,column:6},end:{line:827,column:7}},{start:{line:825,column:6},end:{line:827,column:7}}],line:825},'117':{loc:{start:{line:839,column:2},end:{line:841,column:3}},type:'if',locations:[{start:{line:839,column:2},end:{line:841,column:3}},{start:{line:839,column:2},end:{line:841,column:3}}],line:839}},s:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0,'44':0,'45':0,'46':0,'47':0,'48':0,'49':0,'50':0,'51':0,'52':0,'53':0,'54':0,'55':0,'56':0,'57':0,'58':0,'59':0,'60':0,'61':0,'62':0,'63':0,'64':0,'65':0,'66':0,'67':0,'68':0,'69':0,'70':0,'71':0,'72':0,'73':0,'74':0,'75':0,'76':0,'77':0,'78':0,'79':0,'80':0,'81':0,'82':0,'83':0,'84':0,'85':0,'86':0,'87':0,'88':0,'89':0,'90':0,'91':0,'92':0,'93':0,'94':0,'95':0,'96':0,'97':0,'98':0,'99':0,'100':0,'101':0,'102':0,'103':0,'104':0,'105':0,'106':0,'107':0,'108':0,'109':0,'110':0,'111':0,'112':0,'113':0,'114':0,'115':0,'116':0,'117':0,'118':0,'119':0,'120':0,'121':0,'122':0,'123':0,'124':0,'125':0,'126':0,'127':0,'128':0,'129':0,'130':0,'131':0,'132':0,'133':0,'134':0,'135':0,'136':0,'137':0,'138':0,'139':0,'140':0,'141':0,'142':0,'143':0,'144':0,'145':0,'146':0,'147':0,'148':0,'149':0,'150':0,'151':0,'152':0,'153':0,'154':0,'155':0,'156':0,'157':0,'158':0,'159':0,'160':0,'161':0,'162':0,'163':0,'164':0,'165':0,'166':0,'167':0,'168':0,'169':0,'170':0,'171':0,'172':0,'173':0,'174':0,'175':0,'176':0,'177':0,'178':0,'179':0,'180':0,'181':0,'182':0,'183':0,'184':0,'185':0,'186':0,'187':0,'188':0,'189':0,'190':0,'191':0,'192':0,'193':0,'194':0,'195':0,'196':0,'197':0,'198':0,'199':0,'200':0,'201':0,'202':0,'203':0,'204':0,'205':0,'206':0,'207':0,'208':0,'209':0,'210':0,'211':0,'212':0,'213':0,'214':0,'215':0,'216':0,'217':0,'218':0,'219':0,'220':0,'221':0,'222':0,'223':0,'224':0,'225':0,'226':0,'227':0,'228':0,'229':0,'230':0,'231':0,'232':0,'233':0,'234':0,'235':0,'236':0,'237':0,'238':0,'239':0,'240':0,'241':0,'242':0,'243':0,'244':0,'245':0,'246':0,'247':0,'248':0,'249':0,'250':0,'251':0,'252':0,'253':0,'254':0,'255':0,'256':0,'257':0,'258':0,'259':0,'260':0,'261':0,'262':0,'263':0,'264':0,'265':0,'266':0,'267':0,'268':0,'269':0,'270':0,'271':0,'272':0,'273':0,'274':0,'275':0,'276':0,'277':0,'278':0,'279':0,'280':0,'281':0,'282':0,'283':0,'284':0,'285':0,'286':0,'287':0,'288':0,'289':0,'290':0,'291':0,'292':0,'293':0,'294':0,'295':0,'296':0,'297':0,'298':0,'299':0,'300':0,'301':0,'302':0,'303':0,'304':0,'305':0,'306':0,'307':0,'308':0,'309':0,'310':0,'311':0,'312':0,'313':0,'314':0,'315':0,'316':0,'317':0,'318':0,'319':0,'320':0,'321':0,'322':0,'323':0,'324':0,'325':0,'326':0,'327':0,'328':0,'329':0,'330':0,'331':0,'332':0,'333':0,'334':0,'335':0,'336':0,'337':0,'338':0,'339':0,'340':0,'341':0,'342':0,'343':0,'344':0,'345':0,'346':0,'347':0,'348':0,'349':0,'350':0,'351':0,'352':0,'353':0,'354':0,'355':0,'356':0,'357':0,'358':0,'359':0,'360':0,'361':0,'362':0,'363':0,'364':0,'365':0,'366':0,'367':0,'368':0,'369':0,'370':0,'371':0,'372':0,'373':0,'374':0,'375':0,'376':0,'377':0,'378':0,'379':0,'380':0,'381':0,'382':0,'383':0,'384':0,'385':0,'386':0,'387':0,'388':0,'389':0,'390':0,'391':0,'392':0,'393':0,'394':0,'395':0,'396':0,'397':0,'398':0,'399':0,'400':0,'401':0,'402':0,'403':0,'404':0,'405':0,'406':0,'407':0,'408':0,'409':0,'410':0,'411':0,'412':0,'413':0,'414':0,'415':0,'416':0,'417':0,'418':0,'419':0,'420':0,'421':0,'422':0,'423':0,'424':0,'425':0,'426':0,'427':0,'428':0,'429':0,'430':0,'431':0,'432':0,'433':0,'434':0,'435':0,'436':0,'437':0,'438':0,'439':0,'440':0,'441':0,'442':0,'443':0,'444':0,'445':0,'446':0,'447':0,'448':0,'449':0,'450':0,'451':0,'452':0,'453':0,'454':0,'455':0,'456':0,'457':0,'458':0,'459':0,'460':0,'461':0,'462':0,'463':0,'464':0,'465':0,'466':0,'467':0,'468':0,'469':0,'470':0,'471':0,'472':0,'473':0,'474':0,'475':0,'476':0,'477':0,'478':0,'479':0,'480':0,'481':0,'482':0,'483':0,'484':0,'485':0,'486':0,'487':0,'488':0,'489':0},f:{'0':0,'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0,'17':0,'18':0,'19':0,'20':0,'21':0,'22':0,'23':0,'24':0,'25':0,'26':0,'27':0,'28':0,'29':0,'30':0,'31':0,'32':0,'33':0,'34':0,'35':0,'36':0,'37':0,'38':0,'39':0,'40':0,'41':0,'42':0,'43':0},b:{'0':[0,0],'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0],'5':[0,0],'6':[0,0],'7':[0,0],'8':[0,0],'9':[0,0],'10':[0,0],'11':[0,0],'12':[0,0],'13':[0,0],'14':[0,0],'15':[0,0],'16':[0,0],'17':[0,0],'18':[0,0],'19':[0,0],'20':[0,0],'21':[0,0],'22':[0,0],'23':[0,0],'24':[0,0],'25':[0,0],'26':[0,0],'27':[0,0],'28':[0,0],'29':[0,0],'30':[0,0],'31':[0,0],'32':[0,0],'33':[0,0],'34':[0,0],'35':[0,0],'36':[0,0],'37':[0,0],'38':[0,0],'39':[0,0],'40':[0,0],'41':[0,0],'42':[0,0],'43':[0,0],'44':[0,0],'45':[0,0],'46':[0,0],'47':[0,0],'48':[0,0],'49':[0,0],'50':[0,0],'51':[0,0],'52':[0,0],'53':[0,0],'54':[0,0],'55':[0,0],'56':[0,0],'57':[0,0],'58':[0,0],'59':[0,0],'60':[0,0],'61':[0,0],'62':[0,0],'63':[0,0],'64':[0,0,0],'65':[0,0],'66':[0,0,0],'67':[0,0],'68':[0,0],'69':[0,0],'70':[0,0],'71':[0,0],'72':[0,0],'73':[0,0],'74':[0,0],'75':[0,0],'76':[0,0],'77':[0,0],'78':[0,0],'79':[0,0],'80':[0,0],'81':[0,0],'82':[0,0],'83':[0,0],'84':[0,0],'85':[0,0],'86':[0,0],'87':[0,0],'88':[0,0],'89':[0,0],'90':[0,0],'91':[0,0],'92':[0,0],'93':[0,0],'94':[0,0],'95':[0,0],'96':[0,0],'97':[0,0],'98':[0,0],'99':[0,0],'100':[0,0],'101':[0,0],'102':[0,0],'103':[0,0],'104':[0,0],'105':[0,0],'106':[0,0],'107':[0,0],'108':[0,0],'109':[0,0],'110':[0,0],'111':[0,0],'112':[0,0],'113':[0,0],'114':[0,0],'115':[0,0],'116':[0,0],'117':[0,0]},_coverageSchema:'332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();var BigNumber=(cov_npqogpf4g.s[0]++,require('bignumber.js'));// Javascript 'reference' implementation of the Solidity exchange contract.
//
// Intended to make it easier to test a large number of scenarios by comparing how
// the Javascript and Solidity versions behave (of course, we could have made the
// same mistakes in both - but the code isn't an /exact/ port, the Solidity one aims
// to minimise gas whereas in JS we can go for readability first).
//
// Until better tools emerge, it's much easier to measure code coverage in JS
// than in Solidity.
//
// Note that unlike the real contract, we use friendly prices, orderIds,
// and enum names throughout. We use wei-denominated sizes though.
//
// Currently limiting ourselves to ES5 here - perhaps should transpile?
//
function ReferenceExchange(){cov_npqogpf4g.f[0]++;cov_npqogpf4g.s[1]++;if(!(this instanceof ReferenceExchange)){cov_npqogpf4g.b[0][0]++;cov_npqogpf4g.s[2]++;throw new Error("constructor used as function");}else{cov_npqogpf4g.b[0][1]++;}cov_npqogpf4g.s[3]++;this.bigZero=new BigNumber(0);cov_npqogpf4g.s[4]++;this.balanceBaseForClient={};cov_npqogpf4g.s[5]++;this.balanceCntrForClient={};cov_npqogpf4g.s[6]++;this.balanceRwrdForClient={};// not really part of the exchange but doesn't seem worth having separate reference tokens
cov_npqogpf4g.s[7]++;this.approvedBaseForClient={};cov_npqogpf4g.s[8]++;this.approvedRwrdForClient={};cov_npqogpf4g.s[9]++;this.ownBaseForClient={};cov_npqogpf4g.s[10]++;this.ownCntrForClient={};cov_npqogpf4g.s[11]++;this.ownRwrdForClient={};cov_npqogpf4g.s[12]++;this.orderForOrderId={};cov_npqogpf4g.s[13]++;this.orderChainForPrice={};cov_npqogpf4g.s[14]++;this.baseMinRemainingSize=new BigNumber('10000000000000000');cov_npqogpf4g.s[15]++;this.baseMinInitialSize=new BigNumber('100000000000000000');cov_npqogpf4g.s[16]++;this.baseMaxSize=new BigNumber('1e32');cov_npqogpf4g.s[17]++;this.cntrMinInitialSize=new BigNumber('10000000000000000');cov_npqogpf4g.s[18]++;this.cntrMaxSize=new BigNumber('1e32');cov_npqogpf4g.s[19]++;this.feesPer10K=5;cov_npqogpf4g.s[20]++;this.ethRwrdRate=1000;cov_npqogpf4g.s[21]++;this.events=[];}cov_npqogpf4g.s[22]++;module.exports=ReferenceExchange;cov_npqogpf4g.s[23]++;ReferenceExchange.prototype.collectEvents=function(){cov_npqogpf4g.f[1]++;var events=(cov_npqogpf4g.s[24]++,this.events);cov_npqogpf4g.s[25]++;this.events=[];cov_npqogpf4g.s[26]++;return events;};cov_npqogpf4g.s[27]++;ReferenceExchange.prototype._raiseEvent=function(event){cov_npqogpf4g.f[2]++;cov_npqogpf4g.s[28]++;this.events.push(event);};cov_npqogpf4g.s[29]++;ReferenceExchange.prototype._getOrDflt=function(obj,key,dflt){cov_npqogpf4g.f[3]++;cov_npqogpf4g.s[30]++;if(obj.hasOwnProperty(key)){cov_npqogpf4g.b[1][0]++;cov_npqogpf4g.s[31]++;return obj[key];}else{cov_npqogpf4g.b[1][1]++;cov_npqogpf4g.s[32]++;return dflt;}};cov_npqogpf4g.s[33]++;ReferenceExchange.prototype.getClientBalances=function(client){cov_npqogpf4g.f[4]++;cov_npqogpf4g.s[34]++;return[this._getOrDflt(this.balanceBaseForClient,client,this.bigZero),this._getOrDflt(this.balanceCntrForClient,client,this.bigZero),this._getOrDflt(this.balanceRwrdForClient,client,this.bigZero),this._getOrDflt(this.approvedBaseForClient,client,this.bigZero),this._getOrDflt(this.approvedRwrdForClient,client,this.bigZero),this._getOrDflt(this.ownBaseForClient,client,this.bigZero),this._getOrDflt(this.ownRwrdForClient,client,this.bigZero)];};// annoying special case due to geth/metamask bug
cov_npqogpf4g.s[35]++;ReferenceExchange.prototype.getOwnCntrBalance=function(client){cov_npqogpf4g.f[5]++;cov_npqogpf4g.s[36]++;return this._getOrDflt(this.ownCntrForClient,client,this.bigZero);};// demo/test only
cov_npqogpf4g.s[37]++;ReferenceExchange.prototype.depositBaseForTesting=function(client,amountBase){cov_npqogpf4g.f[6]++;cov_npqogpf4g.s[38]++;this._creditFundsBase(client,amountBase);};// demo/test only
cov_npqogpf4g.s[39]++;ReferenceExchange.prototype.depositCntrForTesting=function(client,amountCntr){cov_npqogpf4g.f[7]++;cov_npqogpf4g.s[40]++;this._creditFundsCntr(client,amountCntr);};cov_npqogpf4g.s[41]++;ReferenceExchange.prototype.setBalancesForTesting=function(client,balanceBase,balanceCntr,balanceRwrd,ownBase,ownCntr,ownRwrd){cov_npqogpf4g.f[8]++;cov_npqogpf4g.s[42]++;this.balanceBaseForClient[client]=balanceBase;cov_npqogpf4g.s[43]++;this.balanceCntrForClient[client]=balanceCntr;cov_npqogpf4g.s[44]++;this.balanceRwrdForClient[client]=balanceRwrd;cov_npqogpf4g.s[45]++;this.ownBaseForClient[client]=ownBase;cov_npqogpf4g.s[46]++;this.ownCntrForClient[client]=ownCntr;cov_npqogpf4g.s[47]++;this.ownRwrdForClient[client]=ownRwrd;};// demo/test only - would normally be the base token that has this method!
cov_npqogpf4g.s[48]++;ReferenceExchange.prototype.baseTokenApprove=function(client,newApprovedAmount){cov_npqogpf4g.f[9]++;var existingApprovedAmount=(cov_npqogpf4g.s[49]++,this.approvedBaseForClient[client]);cov_npqogpf4g.s[50]++;if(!existingApprovedAmount){cov_npqogpf4g.b[2][0]++;cov_npqogpf4g.s[51]++;this.approvedBaseForClient[client]=this.bigZero;cov_npqogpf4g.s[52]++;existingApprovedAmount=this.bigZero;}else{cov_npqogpf4g.b[2][1]++;}cov_npqogpf4g.s[53]++;if((cov_npqogpf4g.b[4][0]++,!existingApprovedAmount.isZero())&&(cov_npqogpf4g.b[4][1]++,!newApprovedAmount.isZero())){cov_npqogpf4g.b[3][0]++;cov_npqogpf4g.s[54]++;throw new Error("must set approved amount to zero before changing to non-zero amount");}else{cov_npqogpf4g.b[3][1]++;}// perhaps surprisingly this doesn't check or affect balance
cov_npqogpf4g.s[55]++;this.approvedBaseForClient[client]=newApprovedAmount;};cov_npqogpf4g.s[56]++;ReferenceExchange.prototype.transferFromBase=function(client){cov_npqogpf4g.f[10]++;var amountBase=(cov_npqogpf4g.s[57]++,this.approvedBaseForClient[client]);cov_npqogpf4g.s[58]++;if((cov_npqogpf4g.b[6][0]++,!amountBase)||(cov_npqogpf4g.b[6][1]++,amountBase.lte(this.bigZero))){cov_npqogpf4g.b[5][0]++;cov_npqogpf4g.s[59]++;throw new Error("approved amount must be strictly positive");}else{cov_npqogpf4g.b[5][1]++;}cov_npqogpf4g.s[60]++;this._creditFunds(this.approvedBaseForClient,client,amountBase.negated());cov_npqogpf4g.s[61]++;this._creditFunds(this.ownBaseForClient,client,amountBase.negated());cov_npqogpf4g.s[62]++;this._creditFundsBase(client,amountBase);// TODO - raise event
};cov_npqogpf4g.s[63]++;ReferenceExchange.prototype.transferBase=function(client,amountBase){cov_npqogpf4g.f[11]++;var balanceBase=(cov_npqogpf4g.s[64]++,this.balanceBaseForClient[client]);cov_npqogpf4g.s[65]++;if((cov_npqogpf4g.b[8][0]++,!balanceBase)||(cov_npqogpf4g.b[8][1]++,balanceBase.lt(amountBase))){cov_npqogpf4g.b[7][0]++;cov_npqogpf4g.s[66]++;throw new Error("insufficient base funds in book");}else{cov_npqogpf4g.b[7][1]++;}cov_npqogpf4g.s[67]++;this._creditFunds(this.ownBaseForClient,client,amountBase);cov_npqogpf4g.s[68]++;this._creditFundsBase(client,amountBase.negated());// TODO - raise event
};// real one doesn't need an amountCntr param 'cos part of msg
cov_npqogpf4g.s[69]++;ReferenceExchange.prototype.depositCntr=function(client,amountCntr){cov_npqogpf4g.f[12]++;var ownBalanceCntr=(cov_npqogpf4g.s[70]++,this.ownCntrForClient[client]);cov_npqogpf4g.s[71]++;if((cov_npqogpf4g.b[10][0]++,!ownBalanceCntr)||(cov_npqogpf4g.b[10][1]++,ownBalanceCntr.lt(amountCntr))){cov_npqogpf4g.b[9][0]++;cov_npqogpf4g.s[72]++;throw new Error("insufficient cntr funds in own address");}else{cov_npqogpf4g.b[9][1]++;}cov_npqogpf4g.s[73]++;this._creditFunds(this.ownCntrForClient,client,amountCntr.negated());cov_npqogpf4g.s[74]++;this._creditFundsCntr(client,amountCntr);// TODO - raise event
};cov_npqogpf4g.s[75]++;ReferenceExchange.prototype.withdrawCntr=function(client,amountCntr){cov_npqogpf4g.f[13]++;var balanceCntr=(cov_npqogpf4g.s[76]++,this.balanceCntrForClient[client]);cov_npqogpf4g.s[77]++;if((cov_npqogpf4g.b[12][0]++,!balanceCntr)||(cov_npqogpf4g.b[12][1]++,balanceCntr.lt(amountCntr))){cov_npqogpf4g.b[11][0]++;cov_npqogpf4g.s[78]++;throw new Error("insufficient cntr funds in book");}else{cov_npqogpf4g.b[11][1]++;}cov_npqogpf4g.s[79]++;this._creditFunds(this.ownCntrForClient,client,amountCntr);cov_npqogpf4g.s[80]++;this._creditFundsCntr(client,amountCntr.negated());// TODO - raise event
};// demo/test only - would normally be the reward token that has this method!
cov_npqogpf4g.s[81]++;ReferenceExchange.prototype.rwrdTokenApprove=function(client,newApprovedAmount){cov_npqogpf4g.f[14]++;var existingApprovedAmount=(cov_npqogpf4g.s[82]++,this.approvedRwrdForClient[client]);cov_npqogpf4g.s[83]++;if(!existingApprovedAmount){cov_npqogpf4g.b[13][0]++;cov_npqogpf4g.s[84]++;this.approvedRwrdForClient[client]=this.bigZero;cov_npqogpf4g.s[85]++;existingApprovedAmount=this.bigZero;}else{cov_npqogpf4g.b[13][1]++;}cov_npqogpf4g.s[86]++;if((cov_npqogpf4g.b[15][0]++,!existingApprovedAmount.isZero())&&(cov_npqogpf4g.b[15][1]++,!newApprovedAmount.isZero())){cov_npqogpf4g.b[14][0]++;cov_npqogpf4g.s[87]++;throw new Error("must set approved amount to zero before changing to non-zero amount");}else{cov_npqogpf4g.b[14][1]++;}// perhaps surprisingly this doesn't check or affect balance
cov_npqogpf4g.s[88]++;this.approvedRwrdForClient[client]=newApprovedAmount;};cov_npqogpf4g.s[89]++;ReferenceExchange.prototype.transferFromRwrd=function(client){cov_npqogpf4g.f[15]++;var amountRwrd=(cov_npqogpf4g.s[90]++,this.approvedRwrdForClient[client]);cov_npqogpf4g.s[91]++;if((cov_npqogpf4g.b[17][0]++,!amountRwrd)||(cov_npqogpf4g.b[17][1]++,amountRwrd.lte(this.bigZero))){cov_npqogpf4g.b[16][0]++;cov_npqogpf4g.s[92]++;throw new Error("approved amount must be strictly positive");}else{cov_npqogpf4g.b[16][1]++;}cov_npqogpf4g.s[93]++;this._creditFunds(this.approvedRwrdForClient,client,amountRwrd.negated());cov_npqogpf4g.s[94]++;this._creditFunds(this.ownRwrdForClient,client,amountRwrd.negated());cov_npqogpf4g.s[95]++;this._creditFundsRwrd(client,amountRwrd);// TODO - raise event
};cov_npqogpf4g.s[96]++;ReferenceExchange.prototype.transferRwrd=function(client,amountRwrd){cov_npqogpf4g.f[16]++;var balanceRwrd=(cov_npqogpf4g.s[97]++,this.balanceRwrdForClient[client]);cov_npqogpf4g.s[98]++;if((cov_npqogpf4g.b[19][0]++,!balanceRwrd)||(cov_npqogpf4g.b[19][1]++,balanceRwrd.lt(amountRwrd))){cov_npqogpf4g.b[18][0]++;cov_npqogpf4g.s[99]++;throw new Error("insufficient rwrd funds in book");}else{cov_npqogpf4g.b[18][1]++;}cov_npqogpf4g.s[100]++;this._creditFunds(this.ownRwrdForClient,client,amountRwrd);cov_npqogpf4g.s[101]++;this._creditFundsBase(client,amountRwrd.negated());// TODO - raise event
};cov_npqogpf4g.s[102]++;ReferenceExchange.prototype._creditFunds=function(balanceMap,client,amount){cov_npqogpf4g.f[17]++;cov_npqogpf4g.s[103]++;if(!balanceMap.hasOwnProperty(client)){cov_npqogpf4g.b[20][0]++;cov_npqogpf4g.s[104]++;balanceMap[client]=this.bigZero;}else{cov_npqogpf4g.b[20][1]++;}cov_npqogpf4g.s[105]++;balanceMap[client]=balanceMap[client].add(amount);cov_npqogpf4g.s[106]++;if(balanceMap[client].lt(0)){cov_npqogpf4g.b[21][0]++;cov_npqogpf4g.s[107]++;throw new Error("balances should never go negative");}else{cov_npqogpf4g.b[21][1]++;}};cov_npqogpf4g.s[108]++;ReferenceExchange.prototype._creditFundsBase=function(client,amountBase){cov_npqogpf4g.f[18]++;cov_npqogpf4g.s[109]++;this._creditFunds(this.balanceBaseForClient,client,amountBase);};cov_npqogpf4g.s[110]++;ReferenceExchange.prototype._creditFundsCntr=function(client,amountCntr){cov_npqogpf4g.f[19]++;cov_npqogpf4g.s[111]++;this._creditFunds(this.balanceCntrForClient,client,amountCntr);};cov_npqogpf4g.s[112]++;ReferenceExchange.prototype._creditFundsRwrd=function(client,amountRwrd){cov_npqogpf4g.f[20]++;cov_npqogpf4g.s[113]++;this._creditFunds(this.balanceRwrdForClient,client,amountRwrd);};cov_npqogpf4g.s[114]++;ReferenceExchange.prototype.walkBook=function(fromPrice){cov_npqogpf4g.f[21]++;var minBuyPrice=(cov_npqogpf4g.s[115]++,'Buy @ 0.00000100');var maxSellPrice=(cov_npqogpf4g.s[116]++,'Sell @ 999000');var endPrice=(cov_npqogpf4g.s[117]++,this._isBuyPrice(fromPrice)?(cov_npqogpf4g.b[22][0]++,minBuyPrice):(cov_npqogpf4g.b[22][1]++,maxSellPrice));var allPrices=(cov_npqogpf4g.s[118]++,this._priceRange(fromPrice,endPrice));var price;cov_npqogpf4g.s[119]++;for(var i=0;i<allPrices.length;i++){cov_npqogpf4g.s[120]++;price=allPrices[i];cov_npqogpf4g.s[121]++;if(this.orderChainForPrice.hasOwnProperty(price)){cov_npqogpf4g.b[23][0]++;var orderChain=(cov_npqogpf4g.s[122]++,this.orderChainForPrice[price]);var depth=(cov_npqogpf4g.s[123]++,this.bigZero);var count=(cov_npqogpf4g.s[124]++,this.bigZero);cov_npqogpf4g.s[125]++;for(var j=0;j<orderChain.length;j++){var order=(cov_npqogpf4g.s[126]++,orderChain[j]);cov_npqogpf4g.s[127]++;depth=depth.add(order.sizeBase.minus(order.executedBase));cov_npqogpf4g.s[128]++;count=count.add(1);}cov_npqogpf4g.s[129]++;return[price,depth,count];}else{cov_npqogpf4g.b[23][1]++;}}cov_npqogpf4g.s[130]++;return[endPrice,this.bigZero,this.bigZero];};// Follows the slightly weird convention used by walkBook
// TODO - perhaps abstract book building to some separate class that calls walkBook, the real contract does not have this
cov_npqogpf4g.s[131]++;ReferenceExchange.prototype.getBook=function(){cov_npqogpf4g.f[22]++;var bidSide=(cov_npqogpf4g.s[132]++,[]);var askSide=(cov_npqogpf4g.s[133]++,[]);// why are we using ES5?
var allPrices,i,orderChain,depth,count,j;// ok, this is ludicrously inefficient
cov_npqogpf4g.s[134]++;allPrices=this._priceRange('Buy @ 999000','Buy @ 0.00000100');var price;cov_npqogpf4g.s[135]++;for(i=0;i<allPrices.length;i++){cov_npqogpf4g.s[136]++;price=allPrices[i];cov_npqogpf4g.s[137]++;if(this.orderChainForPrice.hasOwnProperty(price)){cov_npqogpf4g.b[24][0]++;cov_npqogpf4g.s[138]++;orderChain=this.orderChainForPrice[price];cov_npqogpf4g.s[139]++;depth=this.bigZero;cov_npqogpf4g.s[140]++;count=this.bigZero;cov_npqogpf4g.s[141]++;for(j=0;j<orderChain.length;j++){cov_npqogpf4g.s[142]++;order=orderChain[j];cov_npqogpf4g.s[143]++;depth=depth.add(order.sizeBase.minus(order.executedBase));cov_npqogpf4g.s[144]++;count=count.add(1);}cov_npqogpf4g.s[145]++;bidSide.push([price,depth,count]);}else{cov_npqogpf4g.b[24][1]++;}}cov_npqogpf4g.s[146]++;allPrices=this._priceRange('Sell @ 0.00000100','Sell @ 999000');cov_npqogpf4g.s[147]++;for(i=0;i<allPrices.length;i++){cov_npqogpf4g.s[148]++;price=allPrices[i];cov_npqogpf4g.s[149]++;if(this.orderChainForPrice.hasOwnProperty(price)){cov_npqogpf4g.b[25][0]++;cov_npqogpf4g.s[150]++;orderChain=this.orderChainForPrice[price];cov_npqogpf4g.s[151]++;depth=this.bigZero;cov_npqogpf4g.s[152]++;count=this.bigZero;cov_npqogpf4g.s[153]++;for(j=0;j<orderChain.length;j++){cov_npqogpf4g.s[154]++;order=orderChain[j];cov_npqogpf4g.s[155]++;depth=depth.add(order.sizeBase.minus(order.executedBase));cov_npqogpf4g.s[156]++;count=count.add(1);}cov_npqogpf4g.s[157]++;askSide.push([price,depth,count]);}else{cov_npqogpf4g.b[25][1]++;}}cov_npqogpf4g.s[158]++;return[bidSide,askSide];};cov_npqogpf4g.s[159]++;ReferenceExchange.prototype.getOrder=function(orderId){cov_npqogpf4g.f[23]++;cov_npqogpf4g.s[160]++;if(!this.orderForOrderId.hasOwnProperty(orderId)){cov_npqogpf4g.b[26][0]++;cov_npqogpf4g.s[161]++;throw new Error("order "+orderId+" does not exist");}else{cov_npqogpf4g.b[26][1]++;}cov_npqogpf4g.s[162]++;return this.orderForOrderId[orderId];};cov_npqogpf4g.s[163]++;ReferenceExchange.prototype.createOrder=function(client,orderId,price,sizeBase,terms,maxMatches){cov_npqogpf4g.f[24]++;cov_npqogpf4g.s[164]++;if(this.orderForOrderId.hasOwnProperty(orderId)){cov_npqogpf4g.b[27][0]++;cov_npqogpf4g.s[165]++;throw new Error("order "+orderId+" already exists");}else{cov_npqogpf4g.b[27][1]++;}var order=(cov_npqogpf4g.s[166]++,{orderId:orderId,client:client,price:this._normalisePrice(price),sizeBase:sizeBase,sizeCntr:this.bigZero,terms:terms,status:'Unknown',reasonCode:'None',executedBase:this.bigZero,executedCntr:this.bigZero,feesBaseOrCntr:this.bigZero,feesRwrd:this.bigZero});cov_npqogpf4g.s[167]++;this.orderForOrderId[orderId]=order;cov_npqogpf4g.s[168]++;if(!this._isValidPrice(order.price)){cov_npqogpf4g.b[28][0]++;cov_npqogpf4g.s[169]++;order.status='Rejected';cov_npqogpf4g.s[170]++;order.reasonCode='InvalidPrice';cov_npqogpf4g.s[171]++;return;}else{cov_npqogpf4g.b[28][1]++;}cov_npqogpf4g.s[172]++;if((cov_npqogpf4g.b[30][0]++,sizeBase.lt(this.baseMinInitialSize))||(cov_npqogpf4g.b[30][1]++,sizeBase.gte(this.baseMaxSize))){cov_npqogpf4g.b[29][0]++;cov_npqogpf4g.s[173]++;order.status='Rejected';cov_npqogpf4g.s[174]++;order.reasonCode='InvalidSize';cov_npqogpf4g.s[175]++;return;}else{cov_npqogpf4g.b[29][1]++;}var sizeCntr=(cov_npqogpf4g.s[176]++,this.computeAmountCntr(sizeBase,price));cov_npqogpf4g.s[177]++;if((cov_npqogpf4g.b[32][0]++,sizeCntr.lt(this.cntrMinInitialSize))||(cov_npqogpf4g.b[32][1]++,sizeCntr.gte(this.cntrMaxSize))){cov_npqogpf4g.b[31][0]++;cov_npqogpf4g.s[178]++;order.status='Rejected';cov_npqogpf4g.s[179]++;order.reasonCode='InvalidSize';cov_npqogpf4g.s[180]++;return;}else{cov_npqogpf4g.b[31][1]++;}cov_npqogpf4g.s[181]++;order.sizeCntr=sizeCntr;cov_npqogpf4g.s[182]++;if(!this._debitFundsForOrder(order)){cov_npqogpf4g.b[33][0]++;cov_npqogpf4g.s[183]++;order.status='Rejected';cov_npqogpf4g.s[184]++;order.reasonCode='InsufficientFunds';cov_npqogpf4g.s[185]++;return;}else{cov_npqogpf4g.b[33][1]++;}cov_npqogpf4g.s[186]++;this._processOrder(order,maxMatches);};cov_npqogpf4g.s[187]++;ReferenceExchange.prototype.cancelOrder=function(client,orderId){cov_npqogpf4g.f[25]++;var order=(cov_npqogpf4g.s[188]++,this.orderForOrderId[orderId]);cov_npqogpf4g.s[189]++;if(order.client!==client){cov_npqogpf4g.b[34][0]++;cov_npqogpf4g.s[190]++;throw new Error('not your order');}else{cov_npqogpf4g.b[34][1]++;}cov_npqogpf4g.s[191]++;if((cov_npqogpf4g.b[36][0]++,order.status!=='Open')&&(cov_npqogpf4g.b[36][1]++,order.status!=='NeedsGas')){cov_npqogpf4g.b[35][0]++;cov_npqogpf4g.s[192]++;// not really an error as such
return;}else{cov_npqogpf4g.b[35][1]++;}cov_npqogpf4g.s[193]++;if(order.status==='Open'){cov_npqogpf4g.b[37][0]++;var orderChain=(cov_npqogpf4g.s[194]++,this.orderChainForPrice[order.price]);cov_npqogpf4g.s[195]++;if(!orderChain){cov_npqogpf4g.b[38][0]++;cov_npqogpf4g.s[196]++;throw new Error('assertion broken - must be a chain for price of open order');}else{cov_npqogpf4g.b[38][1]++;}var newOrderChain=(cov_npqogpf4g.s[197]++,orderChain.filter(function(v){cov_npqogpf4g.f[26]++;cov_npqogpf4g.s[198]++;return v.orderId!==orderId;}));cov_npqogpf4g.s[199]++;if(newOrderChain.length===orderChain.length){cov_npqogpf4g.b[39][0]++;cov_npqogpf4g.s[200]++;throw new Error('assertion broken - open order must be in the chain for its price');}else{cov_npqogpf4g.b[39][1]++;}cov_npqogpf4g.s[201]++;if(newOrderChain.length===0){cov_npqogpf4g.b[40][0]++;cov_npqogpf4g.s[202]++;delete this.orderChainForPrice[order.price];}else{cov_npqogpf4g.b[40][1]++;cov_npqogpf4g.s[203]++;this.orderChainForPrice[order.price]=newOrderChain;}cov_npqogpf4g.s[204]++;this._raiseEvent({eventType:'MarketOrderEvent',orderId:orderId,marketOrderEventType:'Remove',price:order.price,depthBase:order.sizeBase.minus(order.executedBase),tradeBase:this.bigZero});}else{cov_npqogpf4g.b[37][1]++;}cov_npqogpf4g.s[205]++;this._refundUnmatchedAndFinish(order,'Done','ClientCancel');};cov_npqogpf4g.s[206]++;ReferenceExchange.prototype.continueOrder=function(client,orderId,maxMatches){cov_npqogpf4g.f[27]++;var order=(cov_npqogpf4g.s[207]++,this.orderForOrderId[orderId]);cov_npqogpf4g.s[208]++;if(order.client!==client){cov_npqogpf4g.b[41][0]++;cov_npqogpf4g.s[209]++;throw new Error('not your order');}else{cov_npqogpf4g.b[41][1]++;}cov_npqogpf4g.s[210]++;if(order.status!=='NeedsGas'){cov_npqogpf4g.b[42][0]++;cov_npqogpf4g.s[211]++;// not really an error as such?
return;}else{cov_npqogpf4g.b[42][1]++;}cov_npqogpf4g.s[212]++;order.status='Unknown';cov_npqogpf4g.s[213]++;this._processOrder(order,maxMatches);};// Take the number part of a price entered by a human as a string (e.g. '1.23'),
// along with the intended direction ('Buy' or 'Sell') (not entered by a human),
// and turn it into either [ error, undefined] or [ undefined, result] where:
// error = { msg: 'problem description', suggestion: 'optional replacement'}
// result = [ direction, mantissa, exponent ]
// where direction = Buy/Sell, mantissa is a number from 100-999, exponent is
// a number from -5 to 6 as used by the book contract's packed price format.
//
// e.g. ('Buy', '12.3') -> [undefined, ['Buy', 123, 2]]
//
cov_npqogpf4g.s[214]++;ReferenceExchange.prototype._parseFriendlyPricePart=function(direction,pricePart){cov_npqogpf4g.f[28]++;cov_npqogpf4g.s[215]++;if((cov_npqogpf4g.b[44][0]++,direction!=='Buy')&&(cov_npqogpf4g.b[44][1]++,direction!=='Sell')){cov_npqogpf4g.b[43][0]++;cov_npqogpf4g.s[216]++;return[{msg:'has an unknown problem'},undefined];}else{cov_npqogpf4g.b[43][1]++;}cov_npqogpf4g.s[217]++;if(pricePart===undefined){cov_npqogpf4g.b[45][0]++;cov_npqogpf4g.s[218]++;return[{msg:'is blank'},undefined];}else{cov_npqogpf4g.b[45][1]++;}var trimmedPricePart=(cov_npqogpf4g.s[219]++,pricePart.trim());cov_npqogpf4g.s[220]++;if(trimmedPricePart===''){cov_npqogpf4g.b[46][0]++;cov_npqogpf4g.s[221]++;return[{msg:'is blank'},undefined];}else{cov_npqogpf4g.b[46][1]++;}var looksLikeANumber=(cov_npqogpf4g.s[222]++,/^[0-9]*\.?[0-9]*$/.test(trimmedPricePart));cov_npqogpf4g.s[223]++;if(!looksLikeANumber){cov_npqogpf4g.b[47][0]++;cov_npqogpf4g.s[224]++;return[{msg:'does not look like a regular number'},undefined];}else{cov_npqogpf4g.b[47][1]++;}var number=(cov_npqogpf4g.s[225]++,new BigNumber(NaN));cov_npqogpf4g.s[226]++;try{cov_npqogpf4g.s[227]++;number=new BigNumber(trimmedPricePart);}catch(e){}cov_npqogpf4g.s[228]++;if((cov_npqogpf4g.b[49][0]++,number.isNaN())||(cov_npqogpf4g.b[49][1]++,!number.isFinite())){cov_npqogpf4g.b[48][0]++;cov_npqogpf4g.s[229]++;return[{msg:'does not look like a regular number'},undefined];}else{cov_npqogpf4g.b[48][1]++;}var minPrice=(cov_npqogpf4g.s[230]++,new BigNumber('0.000001'));var maxPrice=(cov_npqogpf4g.s[231]++,new BigNumber('999000'));cov_npqogpf4g.s[232]++;if(number.lt(minPrice)){cov_npqogpf4g.b[50][0]++;cov_npqogpf4g.s[233]++;return[{msg:'is too small',suggestion:minPrice.toFixed()},undefined];}else{cov_npqogpf4g.b[50][1]++;}cov_npqogpf4g.s[234]++;if(number.gt(maxPrice)){cov_npqogpf4g.b[51][0]++;cov_npqogpf4g.s[235]++;return[{msg:'is too large',suggestion:maxPrice.toFixed()},undefined];}else{cov_npqogpf4g.b[51][1]++;}var currentPower=(cov_npqogpf4g.s[236]++,new BigNumber('1000000'));cov_npqogpf4g.s[237]++;for(var exponent=6;exponent>=-5;exponent--){cov_npqogpf4g.s[238]++;if(number.gte(currentPower.times('0.1'))){cov_npqogpf4g.b[52][0]++;var rawMantissa=(cov_npqogpf4g.s[239]++,number.div(currentPower));var mantissa=(cov_npqogpf4g.s[240]++,rawMantissa.mul(1000));cov_npqogpf4g.s[241]++;if(mantissa.isInteger()){cov_npqogpf4g.b[53][0]++;cov_npqogpf4g.s[242]++;if((cov_npqogpf4g.b[55][0]++,mantissa.lt(100))||(cov_npqogpf4g.b[55][1]++,mantissa.gt(999))){cov_npqogpf4g.b[54][0]++;cov_npqogpf4g.s[243]++;return[{msg:'has an unknown problem'},undefined];}else{cov_npqogpf4g.b[54][1]++;}cov_npqogpf4g.s[244]++;return[undefined,[direction,mantissa.toNumber(),exponent]];}else{cov_npqogpf4g.b[53][1]++;// round in favour of the order placer
var roundMode=(cov_npqogpf4g.s[245]++,direction==='Buy'?(cov_npqogpf4g.b[56][0]++,BigNumber.ROUND_DOWN):(cov_npqogpf4g.b[56][1]++,BigNumber.ROUND_UP));var roundMantissa=(cov_npqogpf4g.s[246]++,mantissa.round(0,roundMode));var roundedNumber=(cov_npqogpf4g.s[247]++,roundMantissa.div(1000).mul(currentPower));cov_npqogpf4g.s[248]++;return[{msg:'has too many significant figures',suggestion:roundedNumber.toFixed()},undefined];}}else{cov_npqogpf4g.b[52][1]++;}cov_npqogpf4g.s[249]++;currentPower=currentPower.times('0.1');}cov_npqogpf4g.s[250]++;return[{msg:'has an unknown problem'},undefined];};// e.g. 'Buy @ 12.3' -> ['Buy', 123, 2]
//
cov_npqogpf4g.s[251]++;ReferenceExchange.prototype._splitPrice=function(price){cov_npqogpf4g.f[29]++;var invalidSplitPrice=(cov_npqogpf4g.s[252]++,['Invalid',0,0]);cov_npqogpf4g.s[253]++;if(!price.startsWith){cov_npqogpf4g.b[57][0]++;cov_npqogpf4g.s[254]++;return invalidSplitPrice;}else{cov_npqogpf4g.b[57][1]++;}var direction;var pricePart;cov_npqogpf4g.s[255]++;if(price.startsWith('Buy @ ')){cov_npqogpf4g.b[58][0]++;cov_npqogpf4g.s[256]++;direction='Buy';cov_npqogpf4g.s[257]++;pricePart=price.substr('Buy @ '.length);}else{cov_npqogpf4g.b[58][1]++;cov_npqogpf4g.s[258]++;if(price.startsWith('Sell @ ')){cov_npqogpf4g.b[59][0]++;cov_npqogpf4g.s[259]++;direction='Sell';cov_npqogpf4g.s[260]++;pricePart=price.substr('Sell @ '.length);}else{cov_npqogpf4g.b[59][1]++;cov_npqogpf4g.s[261]++;return invalidSplitPrice;}}var errorAndResult=(cov_npqogpf4g.s[262]++,this._parseFriendlyPricePart(direction,pricePart));cov_npqogpf4g.s[263]++;if(errorAndResult[0]){cov_npqogpf4g.b[60][0]++;cov_npqogpf4g.s[264]++;return invalidSplitPrice;}else{cov_npqogpf4g.b[60][1]++;cov_npqogpf4g.s[265]++;return errorAndResult[1];}};cov_npqogpf4g.s[266]++;ReferenceExchange.prototype._makePrice=function(direction,mantissa,exponent){cov_npqogpf4g.f[30]++;var price=(cov_npqogpf4g.s[267]++,'');cov_npqogpf4g.s[268]++;if(direction==='Buy'){cov_npqogpf4g.b[61][0]++;cov_npqogpf4g.s[269]++;price+='Buy @ ';}else{cov_npqogpf4g.b[61][1]++;cov_npqogpf4g.s[270]++;if(direction==='Sell'){cov_npqogpf4g.b[62][0]++;cov_npqogpf4g.s[271]++;price+='Sell @ ';}else{cov_npqogpf4g.b[62][1]++;cov_npqogpf4g.s[272]++;return'Invalid';}}cov_npqogpf4g.s[273]++;if((cov_npqogpf4g.b[64][0]++,!Number.isInteger(mantissa))||(cov_npqogpf4g.b[64][1]++,mantissa<100)||(cov_npqogpf4g.b[64][2]++,mantissa>999)){cov_npqogpf4g.b[63][0]++;cov_npqogpf4g.s[274]++;return'Invalid';}else{cov_npqogpf4g.b[63][1]++;}cov_npqogpf4g.s[275]++;if((cov_npqogpf4g.b[66][0]++,!Number.isInteger(exponent))||(cov_npqogpf4g.b[66][1]++,exponent<-5)||(cov_npqogpf4g.b[66][2]++,exponent>6)){cov_npqogpf4g.b[65][0]++;cov_npqogpf4g.s[276]++;return'Invalid';}else{cov_npqogpf4g.b[65][1]++;}var effectiveExponent=(cov_npqogpf4g.s[277]++,exponent-3);var dps;cov_npqogpf4g.s[278]++;if(effectiveExponent>=0){cov_npqogpf4g.b[67][0]++;cov_npqogpf4g.s[279]++;dps=0;}else{cov_npqogpf4g.b[67][1]++;cov_npqogpf4g.s[280]++;dps=0-effectiveExponent;}// TODO - consider using bignumber ..
cov_npqogpf4g.s[281]++;price+=(mantissa*Math.pow(10,effectiveExponent)).toFixed(dps);cov_npqogpf4g.s[282]++;return price;};cov_npqogpf4g.s[283]++;ReferenceExchange.prototype._isValidPrice=function(price){cov_npqogpf4g.f[31]++;var splitPrice=(cov_npqogpf4g.s[284]++,this._splitPrice(price));cov_npqogpf4g.s[285]++;return splitPrice[0]!=='Invalid';};cov_npqogpf4g.s[286]++;ReferenceExchange.prototype._normalisePrice=function(price){cov_npqogpf4g.f[32]++;var splitPrice=(cov_npqogpf4g.s[287]++,this._splitPrice(price));cov_npqogpf4g.s[288]++;return this._makePrice(splitPrice[0],splitPrice[1],splitPrice[2]);};cov_npqogpf4g.s[289]++;ReferenceExchange.prototype._isBuyPrice=function(price){cov_npqogpf4g.f[33]++;var splitPrice=(cov_npqogpf4g.s[290]++,this._splitPrice(price));cov_npqogpf4g.s[291]++;if(splitPrice[0]==='Invalid'){cov_npqogpf4g.b[68][0]++;cov_npqogpf4g.s[292]++;throw"not a valid sided price: "+price;}else{cov_npqogpf4g.b[68][1]++;}cov_npqogpf4g.s[293]++;return splitPrice[0]==='Buy';};cov_npqogpf4g.s[294]++;ReferenceExchange.prototype.oppositePrice=function(price){cov_npqogpf4g.f[34]++;var splitPrice=(cov_npqogpf4g.s[295]++,this._splitPrice(price));var oppositeDirection;cov_npqogpf4g.s[296]++;if(splitPrice[0]==='Buy'){cov_npqogpf4g.b[69][0]++;cov_npqogpf4g.s[297]++;oppositeDirection='Sell';}else{cov_npqogpf4g.b[69][1]++;cov_npqogpf4g.s[298]++;if(splitPrice[0]==='Sell'){cov_npqogpf4g.b[70][0]++;cov_npqogpf4g.s[299]++;oppositeDirection='Buy';}else{cov_npqogpf4g.b[70][1]++;cov_npqogpf4g.s[300]++;oppositeDirection='Invalid';}}cov_npqogpf4g.s[301]++;return this._makePrice(oppositeDirection,splitPrice[1],splitPrice[2]);};cov_npqogpf4g.s[302]++;ReferenceExchange.prototype.computeAmountCntr=function(amountBase,price){cov_npqogpf4g.f[35]++;var splitPrice=(cov_npqogpf4g.s[303]++,this._splitPrice(price));cov_npqogpf4g.s[304]++;if(splitPrice[0]==='Invalid'){cov_npqogpf4g.b[71][0]++;cov_npqogpf4g.s[305]++;throw"not a valid sided price: "+price;}else{cov_npqogpf4g.b[71][1]++;}var result=(cov_npqogpf4g.s[306]++,amountBase);cov_npqogpf4g.s[307]++;result=result.times(splitPrice[1]);cov_npqogpf4g.s[308]++;result=result.times(new BigNumber('10').pow(splitPrice[2]-3));cov_npqogpf4g.s[309]++;result=result.truncated();cov_npqogpf4g.s[310]++;return result;};cov_npqogpf4g.s[311]++;ReferenceExchange.prototype._debitFundsForOrder=function(order){cov_npqogpf4g.f[36]++;cov_npqogpf4g.s[312]++;if(this._isBuyPrice(order.price)){cov_npqogpf4g.b[72][0]++;var availableCntr=(cov_npqogpf4g.s[313]++,this.getClientBalances(order.client)[1]);cov_npqogpf4g.s[314]++;if(availableCntr.lt(order.sizeCntr)){cov_npqogpf4g.b[73][0]++;cov_npqogpf4g.s[315]++;return false;}else{cov_npqogpf4g.b[73][1]++;}cov_npqogpf4g.s[316]++;this.balanceCntrForClient[order.client]=availableCntr.minus(order.sizeCntr);cov_npqogpf4g.s[317]++;return true;}else{cov_npqogpf4g.b[72][1]++;var availableBase=(cov_npqogpf4g.s[318]++,this.getClientBalances(order.client)[0]);cov_npqogpf4g.s[319]++;if(availableBase.lt(order.sizeBase)){cov_npqogpf4g.b[74][0]++;cov_npqogpf4g.s[320]++;return false;}else{cov_npqogpf4g.b[74][1]++;}cov_npqogpf4g.s[321]++;this.balanceBaseForClient[order.client]=availableBase.minus(order.sizeBase);cov_npqogpf4g.s[322]++;return true;}};cov_npqogpf4g.s[323]++;ReferenceExchange.prototype._processOrder=function(order,maxMatches){cov_npqogpf4g.f[37]++;var ourOriginalExecutedBase=(cov_npqogpf4g.s[324]++,order.executedBase);var ourOriginalExecutedCntr=(cov_npqogpf4g.s[325]++,order.executedCntr);var theirPriceStart;cov_npqogpf4g.s[326]++;if(this._isBuyPrice(order.price)){cov_npqogpf4g.b[75][0]++;cov_npqogpf4g.s[327]++;theirPriceStart="Sell @ 0.00000100";}else{cov_npqogpf4g.b[75][1]++;cov_npqogpf4g.s[328]++;theirPriceStart="Buy @ 990000";}var theirPriceEnd=(cov_npqogpf4g.s[329]++,this.oppositePrice(order.price));var matchStopReason=(cov_npqogpf4g.s[330]++,this._matchAgainstBook(order,theirPriceStart,theirPriceEnd,maxMatches));cov_npqogpf4g.s[331]++;if(order.executedBase.gt(ourOriginalExecutedBase)){cov_npqogpf4g.b[76][0]++;var liquidityTakenBase=(cov_npqogpf4g.s[332]++,order.executedBase.minus(ourOriginalExecutedBase));var liquidityTakenCntr=(cov_npqogpf4g.s[333]++,order.executedCntr.minus(ourOriginalExecutedCntr));// Clients can use their reward tokens to pay fees.
var feesRwrd=(cov_npqogpf4g.s[334]++,liquidityTakenCntr.times(this.feesPer10K).dividedToIntegerBy(10000).times(this.ethRwrdRate));cov_npqogpf4g.s[335]++;if(feesRwrd.lte(this.getClientBalances(order.client)[2])){cov_npqogpf4g.b[77][0]++;cov_npqogpf4g.s[336]++;this._creditFundsRwrd(order.client,feesRwrd.negated());cov_npqogpf4g.s[337]++;if(this._isBuyPrice(order.price)){cov_npqogpf4g.b[78][0]++;cov_npqogpf4g.s[338]++;this._creditFundsBase(order.client,liquidityTakenBase);}else{cov_npqogpf4g.b[78][1]++;cov_npqogpf4g.s[339]++;this._creditFundsCntr(order.client,liquidityTakenCntr);}cov_npqogpf4g.s[340]++;order.feesRwrd=order.feesRwrd.add(feesRwrd);}else{cov_npqogpf4g.b[77][1]++;cov_npqogpf4g.s[341]++;if(this._isBuyPrice(order.price)){cov_npqogpf4g.b[79][0]++;var feesBase=(cov_npqogpf4g.s[342]++,liquidityTakenBase.times(this.feesPer10K).dividedToIntegerBy(10000));cov_npqogpf4g.s[343]++;this._creditFundsBase(order.client,liquidityTakenBase.minus(feesBase));cov_npqogpf4g.s[344]++;order.feesBaseOrCntr=order.feesBaseOrCntr.add(feesBase);}else{cov_npqogpf4g.b[79][1]++;var feesCntr=(cov_npqogpf4g.s[345]++,liquidityTakenCntr.times(this.feesPer10K).dividedToIntegerBy(10000));cov_npqogpf4g.s[346]++;this._creditFundsCntr(order.client,liquidityTakenCntr.minus(feesCntr));cov_npqogpf4g.s[347]++;order.feesBaseOrCntr=order.feesBaseOrCntr.add(feesCntr);}}}else{cov_npqogpf4g.b[76][1]++;}cov_npqogpf4g.s[348]++;if(order.terms==='ImmediateOrCancel'){cov_npqogpf4g.b[80][0]++;cov_npqogpf4g.s[349]++;if(matchStopReason==='Satisfied'){cov_npqogpf4g.b[81][0]++;cov_npqogpf4g.s[350]++;this._refundUnmatchedAndFinish(order,'Done','None');cov_npqogpf4g.s[351]++;return;}else{cov_npqogpf4g.b[81][1]++;cov_npqogpf4g.s[352]++;if(matchStopReason==='MaxMatches'){cov_npqogpf4g.b[82][0]++;cov_npqogpf4g.s[353]++;this._refundUnmatchedAndFinish(order,'Done','TooManyMatches');cov_npqogpf4g.s[354]++;return;}else{cov_npqogpf4g.b[82][1]++;cov_npqogpf4g.s[355]++;if(matchStopReason==='BookExhausted'){cov_npqogpf4g.b[83][0]++;cov_npqogpf4g.s[356]++;this._refundUnmatchedAndFinish(order,'Done','Unmatched');cov_npqogpf4g.s[357]++;return;}else{cov_npqogpf4g.b[83][1]++;cov_npqogpf4g.s[358]++;throw new Error("internal error");}}}}else{cov_npqogpf4g.b[80][1]++;cov_npqogpf4g.s[359]++;if(order.terms==='MakerOnly'){cov_npqogpf4g.b[84][0]++;cov_npqogpf4g.s[360]++;if(matchStopReason==='MaxMatches'){cov_npqogpf4g.b[85][0]++;cov_npqogpf4g.s[361]++;this._refundUnmatchedAndFinish(order,'Rejected','WouldTake');cov_npqogpf4g.s[362]++;return;}else{cov_npqogpf4g.b[85][1]++;cov_npqogpf4g.s[363]++;if(matchStopReason==='BookExhausted'){cov_npqogpf4g.b[86][0]++;cov_npqogpf4g.s[364]++;this._enterOrder(order);cov_npqogpf4g.s[365]++;return;}else{cov_npqogpf4g.b[86][1]++;cov_npqogpf4g.s[366]++;throw new Error("internal error");}}}else{cov_npqogpf4g.b[84][1]++;cov_npqogpf4g.s[367]++;if(order.terms==='GTCNoGasTopup'){cov_npqogpf4g.b[87][0]++;cov_npqogpf4g.s[368]++;if(matchStopReason==='Satisfied'){cov_npqogpf4g.b[88][0]++;cov_npqogpf4g.s[369]++;this._refundUnmatchedAndFinish(order,'Done','None');cov_npqogpf4g.s[370]++;return;}else{cov_npqogpf4g.b[88][1]++;cov_npqogpf4g.s[371]++;if(matchStopReason==='MaxMatches'){cov_npqogpf4g.b[89][0]++;cov_npqogpf4g.s[372]++;this._refundUnmatchedAndFinish(order,'Done','TooManyMatches');cov_npqogpf4g.s[373]++;return;}else{cov_npqogpf4g.b[89][1]++;cov_npqogpf4g.s[374]++;if(matchStopReason==='BookExhausted'){cov_npqogpf4g.b[90][0]++;cov_npqogpf4g.s[375]++;this._enterOrder(order);cov_npqogpf4g.s[376]++;return;}else{cov_npqogpf4g.b[90][1]++;cov_npqogpf4g.s[377]++;throw new Error("internal error");}}}}else{cov_npqogpf4g.b[87][1]++;cov_npqogpf4g.s[378]++;if(order.terms==='GTCWithGasTopup'){cov_npqogpf4g.b[91][0]++;cov_npqogpf4g.s[379]++;if(matchStopReason==='Satisfied'){cov_npqogpf4g.b[92][0]++;cov_npqogpf4g.s[380]++;this._refundUnmatchedAndFinish(order,'Done','None');cov_npqogpf4g.s[381]++;return;}else{cov_npqogpf4g.b[92][1]++;cov_npqogpf4g.s[382]++;if(matchStopReason==='MaxMatches'){cov_npqogpf4g.b[93][0]++;cov_npqogpf4g.s[383]++;order.status='NeedsGas';cov_npqogpf4g.s[384]++;return;}else{cov_npqogpf4g.b[93][1]++;cov_npqogpf4g.s[385]++;if(matchStopReason==='BookExhausted'){cov_npqogpf4g.b[94][0]++;cov_npqogpf4g.s[386]++;this._enterOrder(order);cov_npqogpf4g.s[387]++;return;}else{cov_npqogpf4g.b[94][1]++;cov_npqogpf4g.s[388]++;throw new Error("internal error");}}}}else{cov_npqogpf4g.b[91][1]++;cov_npqogpf4g.s[389]++;throw new Error("unknown terms "+order.terms);}}}}};cov_npqogpf4g.s[390]++;ReferenceExchange.prototype._refundUnmatchedAndFinish=function(order,status,reasonCode){cov_npqogpf4g.f[38]++;cov_npqogpf4g.s[391]++;if(this._isBuyPrice(order.price)){cov_npqogpf4g.b[95][0]++;cov_npqogpf4g.s[392]++;this._creditFundsCntr(order.client,order.sizeCntr.minus(order.executedCntr));}else{cov_npqogpf4g.b[95][1]++;cov_npqogpf4g.s[393]++;this._creditFundsBase(order.client,order.sizeBase.minus(order.executedBase));}cov_npqogpf4g.s[394]++;order.status=status;cov_npqogpf4g.s[395]++;order.reasonCode=reasonCode;};cov_npqogpf4g.s[396]++;ReferenceExchange.prototype._matchAgainstBook=function(order,theirPriceStart,theirPriceEnd,maxMatches){cov_npqogpf4g.f[39]++;var matchesLeft=(cov_npqogpf4g.s[397]++,maxMatches);var theirPrices=(cov_npqogpf4g.s[398]++,this._priceRange(theirPriceStart,theirPriceEnd));var matchStopReason=(cov_npqogpf4g.s[399]++,'None');cov_npqogpf4g.s[400]++;for(var i=0;i<theirPrices.length;i++){var theirPrice=(cov_npqogpf4g.s[401]++,theirPrices[i]);cov_npqogpf4g.s[402]++;if(this.orderChainForPrice.hasOwnProperty(theirPrice)){cov_npqogpf4g.b[96][0]++;var result=(cov_npqogpf4g.s[403]++,this._matchWithOccupiedPrice(order,theirPrice,matchesLeft));var removedLastAtPrice=(cov_npqogpf4g.s[404]++,result[0]);cov_npqogpf4g.s[405]++;matchesLeft=result[1];cov_npqogpf4g.s[406]++;matchStopReason=result[2];cov_npqogpf4g.s[407]++;if(removedLastAtPrice){cov_npqogpf4g.b[97][0]++;cov_npqogpf4g.s[408]++;// there's no great reason for this, mostly just by analogy of the
// bitmaps which the Solidity version maintains ...
delete this.orderChainForPrice[theirPrice];}else{cov_npqogpf4g.b[97][1]++;}cov_npqogpf4g.s[409]++;if(matchStopReason==='PriceExhausted'){cov_npqogpf4g.b[98][0]++;cov_npqogpf4g.s[410]++;matchStopReason='None';}else{cov_npqogpf4g.b[98][1]++;cov_npqogpf4g.s[411]++;if(matchStopReason!=='None'){cov_npqogpf4g.b[99][0]++;cov_npqogpf4g.s[412]++;break;}else{cov_npqogpf4g.b[99][1]++;}}}else{cov_npqogpf4g.b[96][1]++;}}cov_npqogpf4g.s[413]++;if(matchStopReason==='None'){cov_npqogpf4g.b[100][0]++;cov_npqogpf4g.s[414]++;matchStopReason='BookExhausted';}else{cov_npqogpf4g.b[100][1]++;}cov_npqogpf4g.s[415]++;return matchStopReason;};// Match our order against up to maxMatches resting orders at the given price (which is known
// by the caller to have at least one resting order).
//
// The matches (partial or complete) of the resting orders are recorded, and their funds are credited.
//
// The order chain for the resting orders is updated, but the occupied price bitmap is NOT - the caller
// must clear the relevant bit if removedLastAtPrice = true is returned.
//
// Only updates the executedBase and executedCntr of our order - caller is responsible
// for e.g. crediting our matched funds, updating status.
//
// Calling with maxMatches == 0 is ok - and expected when the order is a maker-only order.
//
// Returns [ removedLastAtPrice, matchesLeft, matchStopReason ] where:
//
// If our order is completely matched, matchStopReason will be Satisfied.
// If our order is not completely matched, matchStopReason will be either:
// MaxMatches (we are not allowed to match any more times)
// or:
// PriceExhausted (nothing left on the book at this exact price)
//
cov_npqogpf4g.s[416]++;ReferenceExchange.prototype._matchWithOccupiedPrice=function(order,theirPrice,maxMatches){cov_npqogpf4g.f[40]++;var matchStopReason=(cov_npqogpf4g.s[417]++,'None');var matchesLeft=(cov_npqogpf4g.s[418]++,maxMatches);var orderChain=(cov_npqogpf4g.s[419]++,this.orderChainForPrice[theirPrice]);cov_npqogpf4g.s[420]++;while(true){cov_npqogpf4g.s[421]++;if(matchesLeft===0){cov_npqogpf4g.b[101][0]++;cov_npqogpf4g.s[422]++;matchStopReason='MaxMatches';cov_npqogpf4g.s[423]++;break;}else{cov_npqogpf4g.b[101][1]++;}var theirOrder=(cov_npqogpf4g.s[424]++,orderChain[0]);cov_npqogpf4g.s[425]++;this._matchWithTheirs(order,theirOrder);cov_npqogpf4g.s[426]++;matchesLeft-=1;// It may seem a bit odd to stop here if our remaining amount is very small -
// there could still be resting orders we can match it against. But the gas
// cost of matching each order is quite high - potentially high enough to
// wipe out the profit the taker hopes for from trading the tiny amount left.
cov_npqogpf4g.s[427]++;if(order.sizeBase.minus(order.executedBase).lt(this.baseMinRemainingSize)){cov_npqogpf4g.b[102][0]++;cov_npqogpf4g.s[428]++;matchStopReason='Satisfied';}else{cov_npqogpf4g.b[102][1]++;}cov_npqogpf4g.s[429]++;if(theirOrder.status!=='Open'){cov_npqogpf4g.b[103][0]++;cov_npqogpf4g.s[430]++;orderChain.splice(0,1);cov_npqogpf4g.s[431]++;if(orderChain.length===0){cov_npqogpf4g.b[104][0]++;cov_npqogpf4g.s[432]++;if(matchStopReason==='None'){cov_npqogpf4g.b[105][0]++;cov_npqogpf4g.s[433]++;matchStopReason='PriceExhausted';}else{cov_npqogpf4g.b[105][1]++;}}else{cov_npqogpf4g.b[104][1]++;}}else{cov_npqogpf4g.b[103][1]++;}cov_npqogpf4g.s[434]++;if(matchStopReason!=='None'){cov_npqogpf4g.b[106][0]++;cov_npqogpf4g.s[435]++;break;}else{cov_npqogpf4g.b[106][1]++;}}cov_npqogpf4g.s[436]++;return[orderChain.length===0,matchesLeft,matchStopReason];};// Match our order against a resting order in the book (their order).
//
// The match (partial or complete) of the resting order is recorded, and their funds are credited.
//
// The resting order is NOT removed from the book by this call - the caller must do that
// if the resting order has status != Open after the call.
//
// Only updates the executedBase and executedCntr of our order - caller is responsible
// for e.g. crediting our matched funds, updating status.
//
cov_npqogpf4g.s[437]++;ReferenceExchange.prototype._matchWithTheirs=function(ourOrder,theirOrder){cov_npqogpf4g.f[41]++;var ourRemainingBase=(cov_npqogpf4g.s[438]++,ourOrder.sizeBase.minus(ourOrder.executedBase));var theirRemainingBase=(cov_npqogpf4g.s[439]++,theirOrder.sizeBase.minus(theirOrder.executedBase));var matchBase;cov_npqogpf4g.s[440]++;if(ourRemainingBase.lt(theirRemainingBase)){cov_npqogpf4g.b[107][0]++;cov_npqogpf4g.s[441]++;matchBase=ourRemainingBase;}else{cov_npqogpf4g.b[107][1]++;cov_npqogpf4g.s[442]++;matchBase=theirRemainingBase;}var matchCntr=(cov_npqogpf4g.s[443]++,this.computeAmountCntr(matchBase,theirOrder.price));cov_npqogpf4g.s[444]++;ourOrder.executedBase=ourOrder.executedBase.add(matchBase);cov_npqogpf4g.s[445]++;ourOrder.executedCntr=ourOrder.executedCntr.add(matchCntr);cov_npqogpf4g.s[446]++;theirOrder.executedBase=theirOrder.executedBase.add(matchBase);cov_npqogpf4g.s[447]++;theirOrder.executedCntr=theirOrder.executedCntr.add(matchCntr);cov_npqogpf4g.s[448]++;if(this._isBuyPrice(theirOrder.price)){cov_npqogpf4g.b[108][0]++;cov_npqogpf4g.s[449]++;// they have bought base (using the Cntr they already paid when creating the order)
this._creditFundsBase(theirOrder.client,matchBase);}else{cov_npqogpf4g.b[108][1]++;cov_npqogpf4g.s[450]++;// they have bought Cntr (using the base they already paid when creating the order)
this._creditFundsCntr(theirOrder.client,matchCntr);}var theirStillRemainingBase=(cov_npqogpf4g.s[451]++,theirOrder.sizeBase.minus(theirOrder.executedBase));cov_npqogpf4g.s[452]++;if(theirStillRemainingBase.lt(this.baseMinRemainingSize)){cov_npqogpf4g.b[109][0]++;cov_npqogpf4g.s[453]++;this._refundUnmatchedAndFinish(theirOrder,'Done','None');cov_npqogpf4g.s[454]++;this._raiseEvent({eventType:'MarketOrderEvent',orderId:theirOrder.orderId,marketOrderEventType:'CompleteFill',price:theirOrder.price,depthBase:matchBase.add(theirStillRemainingBase),tradeBase:matchBase});}else{cov_npqogpf4g.b[109][1]++;cov_npqogpf4g.s[455]++;this._raiseEvent({eventType:'MarketOrderEvent',orderId:theirOrder.orderId,marketOrderEventType:'PartialFill',price:theirOrder.price,depthBase:matchBase,tradeBase:matchBase});}};cov_npqogpf4g.s[456]++;ReferenceExchange.prototype._priceRange=function(priceStart,priceEnd){cov_npqogpf4g.f[42]++;var splitPriceStart=(cov_npqogpf4g.s[457]++,this._splitPrice(priceStart));var splitPriceEnd=(cov_npqogpf4g.s[458]++,this._splitPrice(priceEnd));var prices=(cov_npqogpf4g.s[459]++,[]);cov_npqogpf4g.s[460]++;if(splitPriceStart[0]!==splitPriceEnd[0]){cov_npqogpf4g.b[110][0]++;cov_npqogpf4g.s[461]++;throw new Error('mixed directions not supported');}else{cov_npqogpf4g.b[110][1]++;}var e,mStart,mEnd,m;cov_npqogpf4g.s[462]++;if(splitPriceStart[0]==='Buy'){cov_npqogpf4g.b[111][0]++;cov_npqogpf4g.s[463]++;for(e=splitPriceStart[2];e>=splitPriceEnd[2];e--){cov_npqogpf4g.s[464]++;mStart=999;cov_npqogpf4g.s[465]++;mEnd=100;cov_npqogpf4g.s[466]++;if(e===splitPriceStart[2]){cov_npqogpf4g.b[112][0]++;cov_npqogpf4g.s[467]++;mStart=splitPriceStart[1];}else{cov_npqogpf4g.b[112][1]++;}cov_npqogpf4g.s[468]++;if(e===splitPriceEnd[2]){cov_npqogpf4g.b[113][0]++;cov_npqogpf4g.s[469]++;mEnd=splitPriceEnd[1];}else{cov_npqogpf4g.b[113][1]++;}cov_npqogpf4g.s[470]++;for(m=mStart;m>=mEnd;m--){cov_npqogpf4g.s[471]++;prices.push(this._makePrice(splitPriceStart[0],m,e));}}}else{cov_npqogpf4g.b[111][1]++;cov_npqogpf4g.s[472]++;if(splitPriceStart[0]==='Sell'){cov_npqogpf4g.b[114][0]++;cov_npqogpf4g.s[473]++;for(e=splitPriceStart[2];e<=splitPriceEnd[2];e++){cov_npqogpf4g.s[474]++;mStart=100;cov_npqogpf4g.s[475]++;mEnd=999;cov_npqogpf4g.s[476]++;if(e===splitPriceStart[2]){cov_npqogpf4g.b[115][0]++;cov_npqogpf4g.s[477]++;mStart=splitPriceStart[1];}else{cov_npqogpf4g.b[115][1]++;}cov_npqogpf4g.s[478]++;if(e===splitPriceEnd[2]){cov_npqogpf4g.b[116][0]++;cov_npqogpf4g.s[479]++;mEnd=splitPriceEnd[1];}else{cov_npqogpf4g.b[116][1]++;}cov_npqogpf4g.s[480]++;for(m=mStart;m<=mEnd;m++){cov_npqogpf4g.s[481]++;prices.push(this._makePrice(splitPriceStart[0],m,e));}}}else{cov_npqogpf4g.b[114][1]++;cov_npqogpf4g.s[482]++;throw new Error("unexpected starting price "+priceStart);}}cov_npqogpf4g.s[483]++;return prices;};cov_npqogpf4g.s[484]++;ReferenceExchange.prototype._enterOrder=function(order){cov_npqogpf4g.f[43]++;cov_npqogpf4g.s[485]++;if(!this.orderChainForPrice.hasOwnProperty(order.price)){cov_npqogpf4g.b[117][0]++;cov_npqogpf4g.s[486]++;this.orderChainForPrice[order.price]=[];}else{cov_npqogpf4g.b[117][1]++;}cov_npqogpf4g.s[487]++;this.orderChainForPrice[order.price].push(order);cov_npqogpf4g.s[488]++;order.status='Open';cov_npqogpf4g.s[489]++;this._raiseEvent({eventType:'MarketOrderEvent',orderId:order.orderId,marketOrderEventType:'Add',price:order.price,depthBase:order.sizeBase.minus(order.executedBase),tradeBase:this.bigZero});};